From 12671c82eadc367a43502109e5e0237e228da998 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 19 Dec 2014 00:23:00 +0100 Subject: [PATCH 001/132] Moved VM to execution --- core/execution.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/core/execution.go b/core/execution.go index cd98746c41..0b5e0558f1 100644 --- a/core/execution.go +++ b/core/execution.go @@ -9,7 +9,7 @@ import ( ) type Execution struct { - vm vm.VirtualMachine + env vm.Environment address, input []byte Gas, price, value *big.Int object *state.StateObject @@ -17,9 +17,7 @@ type Execution struct { } func NewExecution(env vm.Environment, address, input []byte, gas, gasPrice, value *big.Int) *Execution { - evm := vm.New(env, vm.DebugVmTy) - - return &Execution{vm: evm, address: address, input: input, Gas: gas, price: gasPrice, value: value} + return &Execution{env: env, address: address, input: input, Gas: gas, price: gasPrice, value: value} } func (self *Execution) Addr() []byte { @@ -28,16 +26,18 @@ func (self *Execution) Addr() []byte { func (self *Execution) Call(codeAddr []byte, caller vm.ClosureRef) ([]byte, error) { // Retrieve the executing code - code := self.vm.Env().State().GetCode(codeAddr) + code := self.env.State().GetCode(codeAddr) return self.exec(code, codeAddr, caller) } func (self *Execution) exec(code, contextAddr []byte, caller vm.ClosureRef) (ret []byte, err error) { - env := self.vm.Env() + env := self.env + evm := vm.New(env, vm.DebugVmTy) + chainlogger.Debugf("pre state %x\n", env.State().Root()) - if self.vm.Env().Depth() == vm.MaxCallDepth { + if env.Depth() == vm.MaxCallDepth { // Consume all gas (by not returning it) and return a depth error return nil, vm.DepthError{} } @@ -56,21 +56,21 @@ func (self *Execution) exec(code, contextAddr []byte, caller vm.ClosureRef) (ret snapshot := env.State().Copy() defer func() { - if /*vm.IsDepthErr(err) ||*/ vm.IsOOGErr(err) { + if vm.IsOOGErr(err) { env.State().Set(snapshot) } chainlogger.Debugf("post state %x\n", env.State().Root()) }() self.object = to - ret, err = self.vm.Run(to, caller, code, self.value, self.Gas, self.price, self.input) + ret, err = evm.Run(to, caller, code, self.value, self.Gas, self.price, self.input) return } func (self *Execution) Create(caller vm.ClosureRef) (ret []byte, err error, account *state.StateObject) { ret, err = self.exec(self.input, nil, caller) - account = self.vm.Env().State().GetStateObject(self.address) + account = self.env.State().GetStateObject(self.address) return } From 88af879f7ae55249ff7a9669184b52a611e4fb20 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 19 Dec 2014 01:18:22 +0100 Subject: [PATCH 002/132] version bump --- cmd/ethereum/main.go | 2 +- cmd/mist/main.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/ethereum/main.go b/cmd/ethereum/main.go index 9efc8e9dc4..2a3c460546 100644 --- a/cmd/ethereum/main.go +++ b/cmd/ethereum/main.go @@ -30,7 +30,7 @@ import ( const ( ClientIdentifier = "Ethereum(G)" - Version = "0.7.9" + Version = "0.7.10" ) var clilogger = logger.NewLogger("CLI") diff --git a/cmd/mist/main.go b/cmd/mist/main.go index 14336b4e8b..eaf0af0c77 100644 --- a/cmd/mist/main.go +++ b/cmd/mist/main.go @@ -31,7 +31,7 @@ import ( const ( ClientIdentifier = "Mist" - Version = "0.7.9" + Version = "0.7.10" ) var ethereum *eth.Ethereum From 5da5db5a0a149235c742748aa4b3b94d13d6910f Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 19 Dec 2014 13:34:21 +0100 Subject: [PATCH 003/132] Added authors --- cmd/mist/assets/qml/main.qml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/mist/assets/qml/main.qml b/cmd/mist/assets/qml/main.qml index 9f1f214a6f..a08a8b4efa 100644 --- a/cmd/mist/assets/qml/main.qml +++ b/cmd/mist/assets/qml/main.qml @@ -786,8 +786,8 @@ ApplicationWindow { title: "About" minimumWidth: 350 maximumWidth: 350 - maximumHeight: 200 - minimumHeight: 200 + maximumHeight: 280 + minimumHeight: 280 Image { id: aboutIcon @@ -797,7 +797,7 @@ ApplicationWindow { smooth: true source: "../facet.png" x: 10 - y: 10 + y: 30 } Text { @@ -806,7 +806,7 @@ ApplicationWindow { anchors.top: parent.top anchors.topMargin: 30 font.pointSize: 12 - text: "

Mist (0.6.5)

Amalthea


Development

Jeffrey Wilcke
Viktor Trón

Building

Maran Hidskes" + text: "

Mist (0.7.10)


Development

Jeffrey Wilcke
Viktor Trón
Felix Lange
Taylor Gerring
Daniel Nagy

UX

Alex van de Sande
" } } From 0e93b98533968f4a0033ec6214391f5ca647a956 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 19 Dec 2014 13:34:53 +0100 Subject: [PATCH 004/132] Transaction was generating incorrect hash because of var changes --- core/state_transition.go | 2 +- core/types/transaction.go | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/core/state_transition.go b/core/state_transition.go index 9e81ddf284..a54246eba9 100644 --- a/core/state_transition.go +++ b/core/state_transition.go @@ -112,7 +112,7 @@ func (self *StateTransition) BuyGas() error { sender := self.From() if sender.Balance().Cmp(MessageGasValue(self.msg)) < 0 { - return fmt.Errorf("Insufficient funds to pre-pay gas. Req %v, has %v", MessageGasValue(self.msg), sender.Balance()) + return fmt.Errorf("insufficient ETH for gas (%x). Req %v, has %v", sender.Address()[:4], MessageGasValue(self.msg), sender.Balance()) } coinbase := self.Coinbase() diff --git a/core/types/transaction.go b/core/types/transaction.go index c64fb69f03..f6ad0774b6 100644 --- a/core/types/transaction.go +++ b/core/types/transaction.go @@ -47,7 +47,7 @@ func NewTransactionFromValue(val *ethutil.Value) *Transaction { } func (tx *Transaction) Hash() []byte { - data := []interface{}{tx.Nonce, tx.gasPrice, tx.gas, tx.recipient, tx.Value, tx.Data} + data := []interface{}{tx.nonce, tx.gasPrice, tx.gas, tx.recipient, tx.value, tx.data} return crypto.Sha3(ethutil.NewValue(data).Encode()) } @@ -108,8 +108,8 @@ func (tx *Transaction) PublicKey() []byte { sig := append(r, s...) sig = append(sig, v-27) - pubkey := crypto.Ecrecover(append(hash, sig...)) - //pubkey, _ := secp256k1.RecoverPubkey(hash, sig) + //pubkey := crypto.Ecrecover(append(hash, sig...)) + pubkey, _ := secp256k1.RecoverPubkey(hash, sig) return pubkey } @@ -138,9 +138,7 @@ func (tx *Transaction) Sign(privk []byte) error { } func (tx *Transaction) RlpData() interface{} { - data := []interface{}{tx.Nonce, tx.GasPrice, tx.Gas, tx.recipient, tx.Value, tx.Data} - - // TODO Remove prefixing zero's + data := []interface{}{tx.nonce, tx.gasPrice, tx.gas, tx.recipient, tx.value, tx.data} return append(data, tx.v, new(big.Int).SetBytes(tx.r).Bytes(), new(big.Int).SetBytes(tx.s).Bytes()) } @@ -184,6 +182,7 @@ func (tx *Transaction) String() string { V: 0x%x R: 0x%x S: 0x%x + Hex: %x `, tx.Hash(), len(tx.recipient) == 0, @@ -192,11 +191,13 @@ func (tx *Transaction) String() string { tx.nonce, tx.gasPrice, tx.gas, - tx.Value, - tx.Data, + tx.value, + tx.data, tx.v, tx.r, - tx.s) + tx.s, + ethutil.Encode(tx), + ) } // Transaction slice type for basic sorting From f5b8f3d41b533d51eb81e895ed9b6aa31d7aaaef Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 19 Dec 2014 13:59:49 +0100 Subject: [PATCH 005/132] Removed OOG check. Revert should always happen. --- core/block_manager.go | 2 +- core/execution.go | 4 +--- core/state_transition.go | 11 +++++++++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/core/block_manager.go b/core/block_manager.go index 8d319f84e5..20285f8f0e 100644 --- a/core/block_manager.go +++ b/core/block_manager.go @@ -129,7 +129,6 @@ done: statelogger.Infoln(err) erroneous = append(erroneous, tx) err = nil - continue } } @@ -215,6 +214,7 @@ func (sm *BlockManager) ProcessWithParent(block, parent *types.Block) (td *big.I receiptSha := types.DeriveSha(receipts) if bytes.Compare(receiptSha, block.ReceiptSha) != 0 { + chainlogger.Debugln(receipts) err = fmt.Errorf("validating receipt root. received=%x got=%x", block.ReceiptSha, receiptSha) return } diff --git a/core/execution.go b/core/execution.go index 0b5e0558f1..44dbd3ace0 100644 --- a/core/execution.go +++ b/core/execution.go @@ -56,9 +56,7 @@ func (self *Execution) exec(code, contextAddr []byte, caller vm.ClosureRef) (ret snapshot := env.State().Copy() defer func() { - if vm.IsOOGErr(err) { - env.State().Set(snapshot) - } + env.State().Set(snapshot) chainlogger.Debugf("post state %x\n", env.State().Root()) }() diff --git a/core/state_transition.go b/core/state_transition.go index a54246eba9..a60f31e3e6 100644 --- a/core/state_transition.go +++ b/core/state_transition.go @@ -189,12 +189,19 @@ func (self *StateTransition) TransitionState() (ret []byte, err error) { self.rec = MakeContract(msg, self.state) ret, err, ref = vmenv.Create(sender, self.rec.Address(), self.msg.Data(), self.gas, self.gasPrice, self.value) - ref.SetCode(ret) + if err == nil { + dataGas := big.NewInt(int64(len(ret))) + dataGas.Mul(dataGas, vm.GasCreateByte) + if err = self.UseGas(dataGas); err == nil { + ref.SetCode(ret) + } + } } else { ret, err = vmenv.Call(self.From(), self.To().Address(), self.msg.Data(), self.gas, self.gasPrice, self.value) } + if err != nil { - statelogger.Debugln(err) + self.UseGas(self.gas) } return From 1508a23a6fe3cc50f718bfd6c62caae056534c09 Mon Sep 17 00:00:00 2001 From: obscuren Date: Sat, 20 Dec 2014 02:21:13 +0100 Subject: [PATCH 006/132] Minor updates on gas and removed/refactored old code. --- core/block_manager.go | 4 +++- core/execution.go | 15 ++++++--------- core/state_transition.go | 25 ++++++++++++------------ state/state.go | 7 +++++++ vm/environment.go | 5 +++++ vm/vm_debug.go | 41 +++++++++++++++++++++------------------- 6 files changed, 55 insertions(+), 42 deletions(-) diff --git a/core/block_manager.go b/core/block_manager.go index 20285f8f0e..2567e39c4d 100644 --- a/core/block_manager.go +++ b/core/block_manager.go @@ -142,6 +142,7 @@ done: receipt := types.NewReceipt(state.Root(), cumulative) receipt.SetLogs(state.Logs()) receipt.Bloom = types.CreateBloom(types.Receipts{receipt}) + chainlogger.Debugln(receipt) // Notify all subscribers if !transientProcess { @@ -214,7 +215,8 @@ func (sm *BlockManager) ProcessWithParent(block, parent *types.Block) (td *big.I receiptSha := types.DeriveSha(receipts) if bytes.Compare(receiptSha, block.ReceiptSha) != 0 { - chainlogger.Debugln(receipts) + //chainlogger.Debugf("validating receipt root. received=%x got=%x", block.ReceiptSha, receiptSha) + fmt.Printf("%x\n", ethutil.Encode(receipts)) err = fmt.Errorf("validating receipt root. received=%x got=%x", block.ReceiptSha, receiptSha) return } diff --git a/core/execution.go b/core/execution.go index 44dbd3ace0..b7eead0dd3 100644 --- a/core/execution.go +++ b/core/execution.go @@ -3,6 +3,7 @@ package core import ( "fmt" "math/big" + "time" "github.com/ethereum/go-ethereum/state" "github.com/ethereum/go-ethereum/vm" @@ -12,7 +13,6 @@ type Execution struct { env vm.Environment address, input []byte Gas, price, value *big.Int - object *state.StateObject SkipTransfer bool } @@ -35,8 +35,6 @@ func (self *Execution) exec(code, contextAddr []byte, caller vm.ClosureRef) (ret env := self.env evm := vm.New(env, vm.DebugVmTy) - chainlogger.Debugf("pre state %x\n", env.State().Root()) - if env.Depth() == vm.MaxCallDepth { // Consume all gas (by not returning it) and return a depth error return nil, vm.DepthError{} @@ -55,13 +53,12 @@ func (self *Execution) exec(code, contextAddr []byte, caller vm.ClosureRef) (ret } snapshot := env.State().Copy() - defer func() { - env.State().Set(snapshot) - chainlogger.Debugf("post state %x\n", env.State().Root()) - }() - - self.object = to + start := time.Now() ret, err = evm.Run(to, caller, code, self.value, self.Gas, self.price, self.input) + if err != nil { + env.State().Set(snapshot) + } + chainlogger.Debugf("vm took %v\n", time.Since(start)) return } diff --git a/core/state_transition.go b/core/state_transition.go index a60f31e3e6..7b7026c298 100644 --- a/core/state_transition.go +++ b/core/state_transition.go @@ -186,13 +186,13 @@ func (self *StateTransition) TransitionState() (ret []byte, err error) { vmenv := self.VmEnv() var ref vm.ClosureRef if MessageCreatesContract(msg) { - self.rec = MakeContract(msg, self.state) - - ret, err, ref = vmenv.Create(sender, self.rec.Address(), self.msg.Data(), self.gas, self.gasPrice, self.value) + contract := MakeContract(msg, self.state) + ret, err, ref = vmenv.Create(sender, contract.Address(), self.msg.Data(), self.gas, self.gasPrice, self.value) if err == nil { dataGas := big.NewInt(int64(len(ret))) dataGas.Mul(dataGas, vm.GasCreateByte) if err = self.UseGas(dataGas); err == nil { + //self.state.SetCode(ref.Address(), ret) ref.SetCode(ret) } } @@ -218,20 +218,19 @@ func MakeContract(msg Message, state *state.StateDB) *state.StateObject { } func (self *StateTransition) RefundGas() { - coinbaseSub := new(big.Int).Set(self.gas) - uhalf := new(big.Int).Div(self.GasUsed(), ethutil.Big2) - for addr, ref := range self.state.Refunds() { - refund := ethutil.BigMin(uhalf, ref) - coinbaseSub.Add(self.gas, refund) - self.state.AddBalance([]byte(addr), refund.Mul(refund, self.msg.GasPrice())) - } - coinbase, sender := self.Coinbase(), self.From() - coinbase.RefundGas(coinbaseSub, self.msg.GasPrice()) - // Return remaining gas remaining := new(big.Int).Mul(self.gas, self.msg.GasPrice()) sender.AddAmount(remaining) + + uhalf := new(big.Int).Div(self.GasUsed(), ethutil.Big2) + for addr, ref := range self.state.Refunds() { + refund := ethutil.BigMin(uhalf, ref) + self.gas.Add(self.gas, refund) + self.state.AddBalance([]byte(addr), refund.Mul(refund, self.msg.GasPrice())) + } + + coinbase.RefundGas(self.gas, self.msg.GasPrice()) } func (self *StateTransition) GasUsed() *big.Int { diff --git a/state/state.go b/state/state.go index a8d6116685..f77da72f07 100644 --- a/state/state.go +++ b/state/state.go @@ -94,6 +94,13 @@ func (self *StateDB) GetCode(addr []byte) []byte { return nil } +func (self *StateDB) SetCode(addr, code []byte) { + stateObject := self.GetStateObject(addr) + if stateObject != nil { + stateObject.SetCode(code) + } +} + func (self *StateDB) GetState(a, b []byte) []byte { stateObject := self.GetStateObject(a) if stateObject != nil { diff --git a/vm/environment.go b/vm/environment.go index d77fb14193..969bc5e431 100644 --- a/vm/environment.go +++ b/vm/environment.go @@ -2,6 +2,7 @@ package vm import ( "errors" + "fmt" "math/big" "github.com/ethereum/go-ethereum/ethutil" @@ -74,3 +75,7 @@ func (self *Log) Data() []byte { func (self *Log) RlpData() interface{} { return []interface{}{self.address, ethutil.ByteSliceToInterface(self.topics), self.data} } + +func (self *Log) String() string { + return fmt.Sprintf("[A=%x T=%x D=%x]", self.address, self.topics, self.data) +} diff --git a/vm/vm_debug.go b/vm/vm_debug.go index fd16a3895e..aa3291e66f 100644 --- a/vm/vm_debug.go +++ b/vm/vm_debug.go @@ -108,13 +108,13 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * } ) + vmlogger.Debugf("(%d) (%x) %x (code=%d) gas: %v (d) %x\n", self.env.Depth(), caller.Address()[:4], closure.Address(), len(code), closure.Gas, callData) + // Don't bother with the execution if there's no code. if len(code) == 0 { return closure.Return(nil), nil } - vmlogger.Debugf("(%d) (%x) %x gas: %v (d) %x\n", self.env.Depth(), caller.Address()[:4], closure.Address(), closure.Gas, callData) - for { prevStep = step // The base for all big integer arithmetic @@ -134,6 +134,7 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * addStepGasUsage(GasStep) var newMemSize *big.Int = ethutil.Big0 + var additionalGas *big.Int = new(big.Int) // Stack Check, memory resize & gas phase switch op { // Stack checks only @@ -213,22 +214,24 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * newMemSize = calcMemSize(stack.Peek(), stack.data[stack.Len()-2]) case SHA3: require(2) - gas.Set(GasSha) - newMemSize = calcMemSize(stack.Peek(), stack.data[stack.Len()-2]) + additionalGas.Set(stack.data[stack.Len()-2]) case CALLDATACOPY: require(2) newMemSize = calcMemSize(stack.Peek(), stack.data[stack.Len()-3]) + additionalGas.Set(stack.data[stack.Len()-3]) case CODECOPY: require(3) newMemSize = calcMemSize(stack.Peek(), stack.data[stack.Len()-3]) + additionalGas.Set(stack.data[stack.Len()-3]) case EXTCODECOPY: require(4) newMemSize = calcMemSize(stack.data[stack.Len()-2], stack.data[stack.Len()-4]) + additionalGas.Set(stack.data[stack.Len()-4]) case CALL, CALLCODE: require(7) gas.Set(GasCall) @@ -245,20 +248,23 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * newMemSize = calcMemSize(stack.data[stack.Len()-2], stack.data[stack.Len()-3]) } + switch op { + case CALLDATACOPY, CODECOPY, EXTCODECOPY: + additionalGas.Add(additionalGas, u256(31)) + additionalGas.Div(additionalGas, u256(32)) + addStepGasUsage(additionalGas) + case SHA3: + additionalGas.Add(additionalGas, u256(31)) + additionalGas.Div(additionalGas, u256(32)) + additionalGas.Mul(additionalGas, GasSha3Byte) + addStepGasUsage(additionalGas) + } + if newMemSize.Cmp(ethutil.Big0) > 0 { newMemSize.Add(newMemSize, u256(31)) newMemSize.Div(newMemSize, u256(32)) newMemSize.Mul(newMemSize, u256(32)) - switch op { - case CALLDATACOPY, CODECOPY, EXTCODECOPY: - addStepGasUsage(new(big.Int).Div(newMemSize, u256(32))) - case SHA3: - g := new(big.Int).Div(newMemSize, u256(32)) - g.Mul(g, GasSha3Byte) - addStepGasUsage(g) - } - if newMemSize.Cmp(u256(int64(mem.Len()))) > 0 { memGasUsage := new(big.Int).Sub(newMemSize, u256(int64(mem.Len()))) memGasUsage.Mul(GasMemory, memGasUsage) @@ -643,9 +649,7 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * case CODECOPY, EXTCODECOPY: var code []byte if op == EXTCODECOPY { - addr := stack.Pop().Bytes() - - code = statedb.GetCode(addr) + code = statedb.GetCode(stack.Pop().Bytes()) } else { code = closure.Code } @@ -663,12 +667,11 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * } else if cOff+l > size { l = uint64(math.Min(float64(cOff+l), float64(size))) } - codeCopy := code[cOff : cOff+l] mem.Set(mOff, l, codeCopy) - self.Printf(" => [%v, %v, %v] %x", mOff, cOff, l, code[cOff:cOff+l]) + self.Printf(" => [%v, %v, %v] %x", mOff, cOff, l, codeCopy) case GASPRICE: stack.Push(closure.Price) @@ -891,7 +894,7 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * size, offset := stack.Popn() ret := mem.Get(offset.Int64(), size.Int64()) - self.Printf(" => (%d) 0x%x", len(ret), ret).Endl() + self.Printf(" => [%v, %v] (%d) 0x%x", offset, size, len(ret), ret).Endl() return closure.Return(ret), nil case SUICIDE: From 0a9dc1536c5d776844d6947a0090ff7e1a7c6ab4 Mon Sep 17 00:00:00 2001 From: obscuren Date: Sat, 20 Dec 2014 02:33:45 +0100 Subject: [PATCH 007/132] Increased peer from 10 to 30 --- cmd/ethereum/flags.go | 2 +- cmd/mist/flags.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/ethereum/flags.go b/cmd/ethereum/flags.go index 783944cf25..85aca47c36 100644 --- a/cmd/ethereum/flags.go +++ b/cmd/ethereum/flags.go @@ -85,7 +85,7 @@ func Init() { flag.StringVar(&KeyStore, "keystore", "db", "system to store keyrings: db|file (db)") flag.StringVar(&OutboundPort, "port", "30303", "listening port") flag.BoolVar(&UseUPnP, "upnp", false, "enable UPnP support") - flag.IntVar(&MaxPeer, "maxpeer", 10, "maximum desired peers") + flag.IntVar(&MaxPeer, "maxpeer", 30, "maximum desired peers") flag.IntVar(&RpcPort, "rpcport", 8080, "port to start json-rpc server on") flag.BoolVar(&StartRpc, "rpc", false, "start rpc server") flag.BoolVar(&StartWebSockets, "ws", false, "start websocket server") diff --git a/cmd/mist/flags.go b/cmd/mist/flags.go index 2ae0a04871..e494081813 100644 --- a/cmd/mist/flags.go +++ b/cmd/mist/flags.go @@ -104,7 +104,7 @@ func Init() { flag.StringVar(&KeyStore, "keystore", "db", "system to store keyrings: db|file (db)") flag.StringVar(&OutboundPort, "port", "30303", "listening port") flag.BoolVar(&UseUPnP, "upnp", true, "enable UPnP support") - flag.IntVar(&MaxPeer, "maxpeer", 10, "maximum desired peers") + flag.IntVar(&MaxPeer, "maxpeer", 30, "maximum desired peers") flag.IntVar(&RpcPort, "rpcport", 8080, "port to start json-rpc server on") flag.BoolVar(&StartRpc, "rpc", false, "start rpc server") flag.BoolVar(&StartWebSockets, "ws", false, "start websocket server") From 0e5aed63ddbda716ba7373bed7cfc083ec35ced1 Mon Sep 17 00:00:00 2001 From: obscuren Date: Sun, 21 Dec 2014 15:06:35 +0100 Subject: [PATCH 008/132] Updated QWhisper * changed api * general whisper debug interface --- cmd/mist/assets/qml/views/whisper.qml | 32 +++++++++++++++++++++++++-- cmd/mist/ui_lib.go | 8 +++++++ ui/qt/qwhisper/message.go | 23 +++++++++++++++++++ ui/qt/qwhisper/watch.go | 13 +++++++++++ ui/qt/qwhisper/whisper.go | 17 +++++--------- 5 files changed, 80 insertions(+), 13 deletions(-) create mode 100644 ui/qt/qwhisper/message.go create mode 100644 ui/qt/qwhisper/watch.go diff --git a/cmd/mist/assets/qml/views/whisper.qml b/cmd/mist/assets/qml/views/whisper.qml index b50841ba5f..b43ea4f8b5 100644 --- a/cmd/mist/assets/qml/views/whisper.qml +++ b/cmd/mist/assets/qml/views/whisper.qml @@ -9,7 +9,7 @@ import Ethereum 1.0 Rectangle { id: root - property var title: "Whisper" + property var title: "Whisper Traffic" property var iconSource: "../facet.png" property var menuItem @@ -21,10 +21,22 @@ Rectangle { identity = shh.newIdentity() console.log("New identity:", identity) - var t = shh.watch({topics: ["chat"]}) + var t = shh.watch({}, root) + } + + function onMessage(message) { + whisperModel.insert(0, {data: JSON.stringify({from: message.from, payload: eth.toAscii(message.payload)})}) } RowLayout { + id: input + anchors { + left: parent.left + leftMargin: 20 + top: parent.top + topMargin: 20 + } + TextField { id: to placeholderText: "To" @@ -44,4 +56,20 @@ Rectangle { } } } + + TableView { + id: txTableView + anchors { + top: input.bottom + topMargin: 10 + bottom: parent.bottom + left: parent.left + right: parent.right + } + TableViewColumn{ role: "data" ; title: "Data" ; width: parent.width - 2 } + + model: ListModel { + id: whisperModel + } + } } diff --git a/cmd/mist/ui_lib.go b/cmd/mist/ui_lib.go index 68f3335631..fd4ffcb84e 100644 --- a/cmd/mist/ui_lib.go +++ b/cmd/mist/ui_lib.go @@ -381,6 +381,14 @@ func (self *UiLib) ToHex(data string) string { return "0x" + ethutil.Bytes2Hex([]byte(data)) } +func (self *UiLib) ToAscii(data string) string { + start := 0 + if len(data) > 1 && data[0:2] == "0x" { + start = 2 + } + return string(ethutil.Hex2Bytes(data[start:])) +} + /* // XXX Refactor me & MOVE func (self *Ethereum) InstallFilter(filter *core.Filter) (id int) { diff --git a/ui/qt/qwhisper/message.go b/ui/qt/qwhisper/message.go new file mode 100644 index 0000000000..07505ba09b --- /dev/null +++ b/ui/qt/qwhisper/message.go @@ -0,0 +1,23 @@ +package qwhisper + +import ( + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/ethutil" + "github.com/ethereum/go-ethereum/whisper" +) + +type Message struct { + ref *whisper.Message + Flags byte + Payload string + From string +} + +func ToQMessage(msg *whisper.Message) *Message { + return &Message{ + ref: msg, + Flags: msg.Flags, + Payload: ethutil.Bytes2Hex(msg.Payload), + From: ethutil.Bytes2Hex(crypto.FromECDSAPub(msg.Recover())), + } +} diff --git a/ui/qt/qwhisper/watch.go b/ui/qt/qwhisper/watch.go new file mode 100644 index 0000000000..0ccedc7194 --- /dev/null +++ b/ui/qt/qwhisper/watch.go @@ -0,0 +1,13 @@ +package qwhisper + +import ( + "fmt" + "unsafe" +) + +type Watch struct { +} + +func (self *Watch) Arrived(v unsafe.Pointer) { + fmt.Println(v) +} diff --git a/ui/qt/qwhisper/whisper.go b/ui/qt/qwhisper/whisper.go index 8f05c06953..6fb00cdac9 100644 --- a/ui/qt/qwhisper/whisper.go +++ b/ui/qt/qwhisper/whisper.go @@ -3,7 +3,6 @@ package qwhisper import ( "fmt" "time" - "unsafe" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethutil" @@ -19,13 +18,6 @@ func fromHex(s string) []byte { } func toHex(b []byte) string { return "0x" + ethutil.Bytes2Hex(b) } -type Watch struct { -} - -func (self *Watch) Arrived(v unsafe.Pointer) { - fmt.Println(v) -} - type Whisper struct { *whisper.Whisper view qml.Object @@ -70,15 +62,18 @@ func (self *Whisper) HasIdentity(key string) bool { return self.Whisper.HasIdentity(crypto.ToECDSA(fromHex(key))) } -func (self *Whisper) Watch(opts map[string]interface{}) *Watch { +func (self *Whisper) Watch(opts map[string]interface{}, view *qml.Common) int { filter := filterFromMap(opts) filter.Fn = func(msg *whisper.Message) { - fmt.Println(msg) + if view != nil { + view.Call("onMessage", ToQMessage(msg)) + } } + i := self.Whisper.Watch(filter) self.watches[i] = &Watch{} - return self.watches[i] + return i } func filterFromMap(opts map[string]interface{}) (f whisper.Filter) { From 795b14330ad4399ef292835eac452d258dcd7464 Mon Sep 17 00:00:00 2001 From: obscuren Date: Sun, 21 Dec 2014 15:13:06 +0100 Subject: [PATCH 009/132] Fixed EVM environment. Closes #215 --- cmd/evm/main.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cmd/evm/main.go b/cmd/evm/main.go index c6c986a04a..2bdfdfa9f3 100644 --- a/cmd/evm/main.go +++ b/cmd/evm/main.go @@ -141,9 +141,7 @@ func (self *VMEnv) Transfer(from, to vm.Account, amount *big.Int) error { } func (self *VMEnv) vm(addr, data []byte, gas, price, value *big.Int) *core.Execution { - evm := vm.New(self, vm.DebugVmTy) - - return core.NewExecution(evm, addr, data, gas, price, value) + return core.NewExecution(self, addr, data, gas, price, value) } func (self *VMEnv) Call(caller vm.ClosureRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error) { From 176c98eb66dcbd55c5944bac555d9172609c739f Mon Sep 17 00:00:00 2001 From: Taylor Gerring Date: Sun, 21 Dec 2014 11:18:43 -0600 Subject: [PATCH 010/132] Updated tool import paths --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index d09cbcdb09..923827e7c5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,8 +8,8 @@ before_install: install: - go get code.google.com/p/go.tools/cmd/goimports - go get github.com/golang/lint/golint - # - go get code.google.com/p/go.tools/cmd/vet - - go get code.google.com/p/go.tools/cmd/cover + # - go get golang.org/x/tools/cmd/vet + - go get golang.org/x/tools/cmd/cover - go get github.com/mattn/goveralls - ./install_deps.sh before_script: From b3629c6f62bd3774eb8858819a8ee07dfb775b73 Mon Sep 17 00:00:00 2001 From: Taylor Gerring Date: Sun, 21 Dec 2014 11:19:33 -0600 Subject: [PATCH 011/132] remove temp coverage file --- profile.cov | 3038 --------------------------------------------------- 1 file changed, 3038 deletions(-) delete mode 100644 profile.cov diff --git a/profile.cov b/profile.cov deleted file mode 100644 index e92cd379f3..0000000000 --- a/profile.cov +++ /dev/null @@ -1,3038 +0,0 @@ -mode: count -github.com/ethereum/go-ethereum/chain/state_transition.go:40.134,42.2 1 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:44.60,45.20 1 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:49.2,50.16 2 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:45.20,47.3 1 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:52.58,53.21 1 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:57.2,59.17 2 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:53.21,55.3 1 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:61.60,62.49 1 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:66.2,66.21 1 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:70.2,71.17 2 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:62.49,64.3 1 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:66.21,68.3 1 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:74.60,75.30 1 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:78.2,80.12 2 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:75.30,77.3 1 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:83.54,85.2 1 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:87.45,91.50 3 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:95.2,97.16 3 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:101.2,104.12 3 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:91.50,93.3 1 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:97.16,99.3 1 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:107.42,114.2 4 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:116.53,123.30 2 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:128.2,128.37 1 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:132.2,132.12 1 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:123.30,125.3 1 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:128.37,130.3 1 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:135.60,139.39 2 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:143.2,155.45 4 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:160.2,162.46 3 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:166.2,166.42 1 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:170.2,172.26 2 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:198.2,207.41 2 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:264.2,264.8 1 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:139.39,141.3 1 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:155.45,157.3 1 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:162.46,164.3 1 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:166.42,168.3 1 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:172.26,181.22 5 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:186.3,186.33 1 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:181.22,183.4 1 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:187.4,196.3 4 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:207.41,214.20 3 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:220.3,221.20 2 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:214.20,218.4 2 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:222.4,223.29 1 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:223.29,225.21 2 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:231.4,231.20 1 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:225.21,229.5 2 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:267.122,281.2 5 0 -github.com/ethereum/go-ethereum/chain/state_transition.go:284.81,291.2 4 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:34.79,35.48 1 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:35.48,36.42 1 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:36.42,37.9 1 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:42.102,43.48 1 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:51.2,51.12 1 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:43.48,44.49 1 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:44.49,45.21 1 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:45.21,47.5 1 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:80.45,87.2 1 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:90.59,98.2 4 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:100.70,105.18 2 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:109.2,109.55 1 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:113.2,113.38 1 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:119.2,124.41 3 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:128.2,128.21 1 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:137.2,137.12 1 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:105.18,107.3 1 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:109.55,111.3 1 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:113.38,115.3 1 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:124.41,126.3 1 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:128.21,129.51 1 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:129.51,131.4 1 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:140.36,142.6 1 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:142.6,143.10 1 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:144.3,146.83 2 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:150.4,150.22 1 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:155.4,156.18 2 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:170.3,171.13 1 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:146.83,148.5 1 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:150.22,151.10 1 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:156.18,158.5 1 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:158.6,169.5 5 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:176.61,178.2 1 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:180.64,186.53 5 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:194.2,194.15 1 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:186.53,192.3 3 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:197.55,201.53 3 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:201.53,205.45 4 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:205.45,207.4 1 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:211.55,215.25 3 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:215.25,216.76 1 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:216.76,217.15 1 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:221.4,221.16 1 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:217.15,220.5 2 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:226.50,234.2 3 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:236.29,238.2 1 0 -github.com/ethereum/go-ethereum/chain/transaction_pool.go:240.28,246.2 3 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:78.57,89.2 4 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:91.35,93.2 1 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:95.34,97.2 1 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:99.53,101.2 1 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:103.51,105.2 1 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:107.52,109.2 1 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:111.55,115.2 2 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:117.54,119.2 1 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:121.232,131.25 2 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:178.2,180.53 2 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:131.25,140.17 6 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:159.3,173.62 10 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:140.17,142.11 2 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:143.4,145.13 2 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:146.4,149.15 2 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:150.4,154.13 4 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:173.62,175.4 1 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:183.99,188.34 3 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:192.2,192.37 1 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:195.2,197.44 2 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:188.34,190.3 1 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:192.37,194.3 1 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:200.121,211.61 4 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:215.2,216.16 2 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:220.2,221.44 2 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:226.2,227.54 2 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:233.2,233.55 1 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:238.2,238.66 1 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:244.2,245.49 2 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:250.2,252.31 2 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:258.2,258.41 1 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:211.61,213.3 1 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:216.16,218.3 1 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:221.44,224.3 2 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:227.54,230.3 2 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:233.55,236.3 2 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:238.66,241.3 2 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:245.49,248.3 2 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:252.31,255.3 2 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:258.41,272.3 7 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:272.4,274.3 1 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:277.120,283.16 4 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:287.2,287.22 1 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:283.16,285.3 1 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:290.74,292.37 2 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:297.2,303.26 4 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:310.2,310.19 1 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:292.37,294.3 1 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:303.26,308.3 1 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:316.73,318.36 2 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:322.2,323.14 2 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:335.2,335.72 1 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:339.2,339.12 1 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:318.36,320.3 1 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:323.14,325.3 1 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:335.72,337.3 1 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:342.97,347.37 4 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:378.2,382.12 3 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:347.37,348.34 1 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:353.3,354.25 2 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:358.3,358.81 1 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:362.3,362.40 1 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:366.3,374.68 6 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:348.34,351.4 1 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:354.25,356.4 1 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:358.81,360.4 1 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:362.40,364.4 1 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:385.96,386.37 1 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:390.2,403.39 6 0 -github.com/ethereum/go-ethereum/chain/block_manager.go:386.37,388.3 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:34.40,36.2 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:38.62,40.2 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:45.54,47.2 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:49.50,51.2 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:53.44,55.2 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:57.42,59.2 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:61.42,63.2 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:65.40,67.2 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:69.37,71.2 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:73.39,75.2 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:78.45,80.25 2 0 -github.com/ethereum/go-ethereum/chain/filter.go:83.2,84.23 2 0 -github.com/ethereum/go-ethereum/chain/filter.go:88.2,93.41 2 0 -github.com/ethereum/go-ethereum/chain/filter.go:119.2,121.24 2 0 -github.com/ethereum/go-ethereum/chain/filter.go:80.25,82.3 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:84.23,86.3 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:93.41,95.10 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:104.3,104.30 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:116.3,116.59 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:96.3,97.15 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:98.3,99.9 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:104.30,107.18 2 0 -github.com/ethereum/go-ethereum/chain/filter.go:113.4,113.61 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:107.18,110.10 2 0 -github.com/ethereum/go-ethereum/chain/filter.go:124.58,125.33 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:131.2,131.8 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:125.33,126.34 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:126.34,128.4 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:134.76,138.31 2 0 -github.com/ethereum/go-ethereum/chain/filter.go:172.2,172.17 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:138.31,139.57 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:143.3,143.63 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:147.3,148.29 2 0 -github.com/ethereum/go-ethereum/chain/filter.go:152.3,152.46 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:165.3,165.13 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:169.3,169.39 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:139.57,140.12 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:143.63,144.12 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:148.29,150.4 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:152.46,153.95 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:157.4,157.110 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:161.4,162.9 2 0 -github.com/ethereum/go-ethereum/chain/filter.go:153.95,154.13 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:157.110,158.13 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:165.13,166.12 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:175.58,177.24 2 0 -github.com/ethereum/go-ethereum/chain/filter.go:188.2,188.22 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:199.2,199.35 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:177.24,178.34 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:178.34,179.48 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:179.48,181.10 2 0 -github.com/ethereum/go-ethereum/chain/filter.go:184.4,186.3 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:188.22,189.30 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:189.30,190.114 1 0 -github.com/ethereum/go-ethereum/chain/filter.go:190.114,192.10 2 0 -github.com/ethereum/go-ethereum/chain/filter.go:195.4,197.3 1 0 -github.com/ethereum/go-ethereum/chain/error.go:14.38,16.2 1 0 -github.com/ethereum/go-ethereum/chain/error.go:18.37,20.2 1 0 -github.com/ethereum/go-ethereum/chain/error.go:22.34,26.2 2 0 -github.com/ethereum/go-ethereum/chain/error.go:32.37,34.2 1 0 -github.com/ethereum/go-ethereum/chain/error.go:36.35,38.2 1 0 -github.com/ethereum/go-ethereum/chain/error.go:40.33,44.2 2 0 -github.com/ethereum/go-ethereum/chain/error.go:51.42,53.2 1 0 -github.com/ethereum/go-ethereum/chain/error.go:55.70,57.2 1 0 -github.com/ethereum/go-ethereum/chain/error.go:59.38,63.2 2 0 -github.com/ethereum/go-ethereum/chain/error.go:70.36,74.2 2 0 -github.com/ethereum/go-ethereum/chain/error.go:75.40,77.2 1 0 -github.com/ethereum/go-ethereum/chain/error.go:78.51,80.2 1 0 -github.com/ethereum/go-ethereum/chain/error.go:87.37,89.2 1 0 -github.com/ethereum/go-ethereum/chain/error.go:91.43,93.2 1 0 -github.com/ethereum/go-ethereum/chain/error.go:95.33,99.2 2 0 -github.com/ethereum/go-ethereum/chain/error.go:105.35,107.2 1 0 -github.com/ethereum/go-ethereum/chain/error.go:108.41,110.2 1 0 -github.com/ethereum/go-ethereum/chain/error.go:112.36,116.2 2 0 -github.com/ethereum/go-ethereum/chain/error.go:122.37,124.2 1 0 -github.com/ethereum/go-ethereum/chain/error.go:125.30,128.2 2 0 -github.com/ethereum/go-ethereum/chain/vm_env.go:17.83,23.2 1 0 -github.com/ethereum/go-ethereum/chain/vm_env.go:25.43,25.70 1 0 -github.com/ethereum/go-ethereum/chain/vm_env.go:26.43,26.71 1 0 -github.com/ethereum/go-ethereum/chain/vm_env.go:27.43,27.73 1 0 -github.com/ethereum/go-ethereum/chain/vm_env.go:28.43,28.73 1 0 -github.com/ethereum/go-ethereum/chain/vm_env.go:29.43,29.69 1 0 -github.com/ethereum/go-ethereum/chain/vm_env.go:30.43,30.75 1 0 -github.com/ethereum/go-ethereum/chain/vm_env.go:31.43,31.71 1 0 -github.com/ethereum/go-ethereum/chain/vm_env.go:32.43,32.67 1 0 -github.com/ethereum/go-ethereum/chain/vm_env.go:33.43,33.64 1 0 -github.com/ethereum/go-ethereum/chain/vm_env.go:34.43,34.73 1 0 -github.com/ethereum/go-ethereum/chain/vm_env.go:35.43,37.2 1 0 -github.com/ethereum/go-ethereum/chain/vm_env.go:38.73,40.2 1 0 -github.com/ethereum/go-ethereum/chain/asm.go:11.48,13.6 2 0 -github.com/ethereum/go-ethereum/chain/asm.go:49.2,49.12 1 0 -github.com/ethereum/go-ethereum/chain/asm.go:13.6,14.50 1 0 -github.com/ethereum/go-ethereum/chain/asm.go:19.3,25.13 4 0 -github.com/ethereum/go-ethereum/chain/asm.go:46.3,46.27 1 0 -github.com/ethereum/go-ethereum/chain/asm.go:14.50,16.4 1 0 -github.com/ethereum/go-ethereum/chain/asm.go:26.3,33.39 3 0 -github.com/ethereum/go-ethereum/chain/asm.go:37.4,38.22 2 0 -github.com/ethereum/go-ethereum/chain/asm.go:41.4,43.31 2 0 -github.com/ethereum/go-ethereum/chain/asm.go:33.39,35.5 1 0 -github.com/ethereum/go-ethereum/chain/asm.go:38.22,40.5 1 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:17.42,27.4 1 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:27.4,32.3 4 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:35.58,39.33 3 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:45.2,45.13 1 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:39.33,41.3 1 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:41.4,43.3 1 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:63.38,71.2 4 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:73.67,75.2 1 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:77.40,79.20 2 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:94.2,94.88 1 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:79.20,90.3 6 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:90.4,92.3 1 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:98.64,102.28 3 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:107.2,118.19 4 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:125.2,125.14 1 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:102.28,105.3 2 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:118.19,123.3 3 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:128.33,140.2 6 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:143.49,154.2 6 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:157.48,159.2 1 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:162.52,165.2 2 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:167.92,169.18 2 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:174.2,174.35 1 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:185.2,185.8 1 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:169.18,171.3 1 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:174.35,178.42 2 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:182.3,182.40 1 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:178.42,179.9 1 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:188.62,190.20 2 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:203.2,203.38 1 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:190.20,191.31 1 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:200.3,200.13 1 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:191.31,193.63 1 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:193.63,194.63 1 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:194.63,196.6 1 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:206.69,208.60 2 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:214.2,214.60 1 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:218.2,218.14 1 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:208.60,209.35 1 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:209.35,210.9 1 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:214.60,216.3 1 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:221.57,224.2 2 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:226.79,228.19 2 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:232.2,235.37 3 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:239.2,243.16 4 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:228.19,230.3 1 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:235.37,237.3 1 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:246.71,252.2 4 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:255.60,261.2 3 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:263.32,264.28 1 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:264.28,266.3 1 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:269.72,271.2 1 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:274.99,275.49 1 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:284.2,285.26 2 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:275.49,282.3 4 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:285.26,288.3 2 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:291.81,293.15 2 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:295.2,295.49 1 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:321.2,321.26 1 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:326.2,328.8 2 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:293.15,293.42 1 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:295.49,302.20 2 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:307.3,309.17 3 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:317.3,318.24 2 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:302.20,305.4 2 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:309.17,316.4 5 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:321.26,324.3 2 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:341.48,344.31 2 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:348.2,348.14 1 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:344.31,346.3 1 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:351.44,353.48 2 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:357.2,357.28 1 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:353.48,355.3 1 0 -github.com/ethereum/go-ethereum/chain/chain_manager.go:365.48,368.2 2 0 -github.com/ethereum/go-ethereum/chain/dagger.go:31.41,33.2 1 0 -github.com/ethereum/go-ethereum/chain/dagger.go:35.36,37.2 1 0 -github.com/ethereum/go-ethereum/chain/dagger.go:39.77,47.6 7 0 -github.com/ethereum/go-ethereum/chain/dagger.go:76.2,76.12 1 0 -github.com/ethereum/go-ethereum/chain/dagger.go:47.6,48.10 1 0 -github.com/ethereum/go-ethereum/chain/dagger.go:71.3,71.17 1 0 -github.com/ethereum/go-ethereum/chain/dagger.go:49.3,52.14 3 0 -github.com/ethereum/go-ethereum/chain/dagger.go:53.3,56.41 2 0 -github.com/ethereum/go-ethereum/chain/dagger.go:65.4,66.35 2 0 -github.com/ethereum/go-ethereum/chain/dagger.go:56.41,63.5 5 0 -github.com/ethereum/go-ethereum/chain/dagger.go:66.35,68.5 1 0 -github.com/ethereum/go-ethereum/chain/dagger.go:71.17,73.4 1 0 -github.com/ethereum/go-ethereum/chain/dagger.go:79.75,92.2 8 0 -github.com/ethereum/go-ethereum/chain/dagger.go:94.44,95.2 0 0 -github.com/ethereum/go-ethereum/chain/dagger.go:104.59,107.28 2 0 -github.com/ethereum/go-ethereum/chain/dagger.go:125.2,125.14 1 0 -github.com/ethereum/go-ethereum/chain/dagger.go:107.28,112.23 4 0 -github.com/ethereum/go-ethereum/chain/dagger.go:120.3,120.12 1 0 -github.com/ethereum/go-ethereum/chain/dagger.go:112.23,117.4 2 0 -github.com/ethereum/go-ethereum/chain/dagger.go:120.12,121.9 1 0 -github.com/ethereum/go-ethereum/chain/dagger.go:128.57,141.40 8 0 -github.com/ethereum/go-ethereum/chain/dagger.go:146.2,146.40 1 0 -github.com/ethereum/go-ethereum/chain/dagger.go:153.2,153.24 1 0 -github.com/ethereum/go-ethereum/chain/dagger.go:141.40,145.3 1 0 -github.com/ethereum/go-ethereum/chain/dagger.go:146.40,148.29 1 0 -github.com/ethereum/go-ethereum/chain/dagger.go:148.29,150.4 1 0 -github.com/ethereum/go-ethereum/chain/dagger.go:156.60,163.2 4 0 -github.com/ethereum/go-ethereum/chain/dagger.go:165.52,173.2 5 0 -github.com/ethereum/go-ethereum/chain/dagger.go:175.54,176.12 1 0 -github.com/ethereum/go-ethereum/chain/dagger.go:180.2,181.12 2 0 -github.com/ethereum/go-ethereum/chain/dagger.go:187.2,193.39 6 0 -github.com/ethereum/go-ethereum/chain/dagger.go:206.2,208.12 2 0 -github.com/ethereum/go-ethereum/chain/dagger.go:176.12,178.3 1 0 -github.com/ethereum/go-ethereum/chain/dagger.go:181.12,183.3 1 0 -github.com/ethereum/go-ethereum/chain/dagger.go:183.4,185.3 1 0 -github.com/ethereum/go-ethereum/chain/dagger.go:193.39,204.3 9 0 -github.com/ethereum/go-ethereum/chain/dagger.go:211.32,214.2 1 0 -github.com/ethereum/go-ethereum/chain/dagger.go:216.46,224.25 6 0 -github.com/ethereum/go-ethereum/chain/dagger.go:240.2,240.31 1 0 -github.com/ethereum/go-ethereum/chain/dagger.go:224.25,238.3 10 0 -github.com/ethereum/go-ethereum/chain/types/block.go:23.45,30.2 5 0 -github.com/ethereum/go-ethereum/chain/types/block.go:32.41,34.2 1 0 -github.com/ethereum/go-ethereum/chain/types/block.go:38.46,40.29 2 0 -github.com/ethereum/go-ethereum/chain/types/block.go:44.2,44.12 1 0 -github.com/ethereum/go-ethereum/chain/types/block.go:40.29,42.3 1 0 -github.com/ethereum/go-ethereum/chain/types/block.go:49.41,55.2 2 0 -github.com/ethereum/go-ethereum/chain/types/block.go:62.35,62.62 1 0 -github.com/ethereum/go-ethereum/chain/types/block.go:63.40,65.2 1 0 -github.com/ethereum/go-ethereum/chain/types/block.go:66.45,66.95 1 0 -github.com/ethereum/go-ethereum/chain/types/block.go:68.33,68.72 1 0 -github.com/ethereum/go-ethereum/chain/types/block.go:104.43,109.2 3 0 -github.com/ethereum/go-ethereum/chain/types/block.go:112.59,117.2 3 0 -github.com/ethereum/go-ethereum/chain/types/block.go:124.23,143.2 4 0 -github.com/ethereum/go-ethereum/chain/types/block.go:146.42,149.2 1 0 -github.com/ethereum/go-ethereum/chain/types/block.go:151.42,153.2 1 0 -github.com/ethereum/go-ethereum/chain/types/block.go:155.42,157.2 1 0 -github.com/ethereum/go-ethereum/chain/types/block.go:159.49,161.2 1 0 -github.com/ethereum/go-ethereum/chain/types/block.go:163.58,164.42 1 0 -github.com/ethereum/go-ethereum/chain/types/block.go:170.2,179.36 7 0 -github.com/ethereum/go-ethereum/chain/types/block.go:164.42,166.3 1 0 -github.com/ethereum/go-ethereum/chain/types/block.go:182.43,188.2 4 0 -github.com/ethereum/go-ethereum/chain/types/block.go:190.61,191.39 1 0 -github.com/ethereum/go-ethereum/chain/types/block.go:197.2,197.12 1 0 -github.com/ethereum/go-ethereum/chain/types/block.go:191.39,192.42 1 0 -github.com/ethereum/go-ethereum/chain/types/block.go:192.42,194.4 1 0 -github.com/ethereum/go-ethereum/chain/types/block.go:201.28,203.2 1 0 -github.com/ethereum/go-ethereum/chain/types/block.go:205.28,208.2 1 0 -github.com/ethereum/go-ethereum/chain/types/block.go:211.47,214.35 2 0 -github.com/ethereum/go-ethereum/chain/types/block.go:219.2,219.13 1 0 -github.com/ethereum/go-ethereum/chain/types/block.go:214.35,217.3 1 0 -github.com/ethereum/go-ethereum/chain/types/block.go:222.45,225.37 2 0 -github.com/ethereum/go-ethereum/chain/types/block.go:230.2,230.15 1 0 -github.com/ethereum/go-ethereum/chain/types/block.go:225.37,228.3 1 0 -github.com/ethereum/go-ethereum/chain/types/block.go:233.48,236.2 2 0 -github.com/ethereum/go-ethereum/chain/types/block.go:238.51,242.2 3 0 -github.com/ethereum/go-ethereum/chain/types/block.go:244.54,247.2 2 0 -github.com/ethereum/go-ethereum/chain/types/block.go:249.44,251.2 1 0 -github.com/ethereum/go-ethereum/chain/types/block.go:253.40,257.2 1 0 -github.com/ethereum/go-ethereum/chain/types/block.go:259.44,262.2 2 0 -github.com/ethereum/go-ethereum/chain/types/block.go:264.60,269.37 2 0 -github.com/ethereum/go-ethereum/chain/types/block.go:283.2,283.37 1 0 -github.com/ethereum/go-ethereum/chain/types/block.go:269.37,274.34 3 0 -github.com/ethereum/go-ethereum/chain/types/block.go:274.34,279.4 1 0 -github.com/ethereum/go-ethereum/chain/types/block.go:283.37,286.37 3 0 -github.com/ethereum/go-ethereum/chain/types/block.go:286.37,288.4 1 0 -github.com/ethereum/go-ethereum/chain/types/block.go:293.53,309.2 15 0 -github.com/ethereum/go-ethereum/chain/types/block.go:311.59,316.2 3 0 -github.com/ethereum/go-ethereum/chain/types/block.go:318.39,320.2 1 0 -github.com/ethereum/go-ethereum/chain/types/block.go:322.40,324.2 1 0 -github.com/ethereum/go-ethereum/chain/types/block.go:326.37,328.2 1 0 -github.com/ethereum/go-ethereum/chain/types/block.go:330.42,332.2 1 0 -github.com/ethereum/go-ethereum/chain/types/block.go:334.50,365.2 1 0 -github.com/ethereum/go-ethereum/chain/types/block.go:367.44,369.2 1 0 -github.com/ethereum/go-ethereum/chain/types/block.go:371.37,410.2 1 0 -github.com/ethereum/go-ethereum/chain/types/block.go:412.47,414.2 1 0 -github.com/ethereum/go-ethereum/chain/types/block.go:417.42,419.2 1 0 -github.com/ethereum/go-ethereum/chain/types/bloom9.go:11.44,13.35 2 0 -github.com/ethereum/go-ethereum/chain/types/bloom9.go:17.2,17.46 1 0 -github.com/ethereum/go-ethereum/chain/types/bloom9.go:13.35,15.3 1 0 -github.com/ethereum/go-ethereum/chain/types/bloom9.go:20.42,22.27 2 0 -github.com/ethereum/go-ethereum/chain/types/bloom9.go:37.2,37.12 1 0 -github.com/ethereum/go-ethereum/chain/types/bloom9.go:22.27,24.36 2 0 -github.com/ethereum/go-ethereum/chain/types/bloom9.go:28.3,28.26 1 0 -github.com/ethereum/go-ethereum/chain/types/bloom9.go:24.36,26.4 1 0 -github.com/ethereum/go-ethereum/chain/types/bloom9.go:28.26,30.4 1 0 -github.com/ethereum/go-ethereum/chain/types/bloom9.go:40.32,42.35 2 0 -github.com/ethereum/go-ethereum/chain/types/bloom9.go:48.2,48.10 1 0 -github.com/ethereum/go-ethereum/chain/types/bloom9.go:42.35,46.3 3 0 -github.com/ethereum/go-ethereum/chain/types/bloom9.go:51.42,56.2 3 0 -github.com/ethereum/go-ethereum/chain/types/derive_sha.go:13.43,15.34 2 0 -github.com/ethereum/go-ethereum/chain/types/derive_sha.go:19.2,19.23 1 0 -github.com/ethereum/go-ethereum/chain/types/derive_sha.go:15.34,17.3 1 0 -github.com/ethereum/go-ethereum/chain/types/receipt.go:19.67,21.2 1 0 -github.com/ethereum/go-ethereum/chain/types/receipt.go:23.55,28.2 3 0 -github.com/ethereum/go-ethereum/chain/types/receipt.go:30.47,32.2 1 0 -github.com/ethereum/go-ethereum/chain/types/receipt.go:34.61,40.16 5 0 -github.com/ethereum/go-ethereum/chain/types/receipt.go:40.16,42.3 1 0 -github.com/ethereum/go-ethereum/chain/types/receipt.go:45.44,47.2 1 0 -github.com/ethereum/go-ethereum/chain/types/receipt.go:49.41,51.2 1 0 -github.com/ethereum/go-ethereum/chain/types/receipt.go:53.47,54.57 1 0 -github.com/ethereum/go-ethereum/chain/types/receipt.go:58.2,58.13 1 0 -github.com/ethereum/go-ethereum/chain/types/receipt.go:54.57,56.3 1 0 -github.com/ethereum/go-ethereum/chain/types/receipt.go:61.38,63.2 1 0 -github.com/ethereum/go-ethereum/chain/types/receipt.go:67.43,67.63 1 0 -github.com/ethereum/go-ethereum/chain/types/receipt.go:68.43,68.74 1 0 -github.com/ethereum/go-ethereum/chain/types/transaction.go:15.39,18.2 1 0 -github.com/ethereum/go-ethereum/chain/types/transaction.go:34.87,36.2 1 0 -github.com/ethereum/go-ethereum/chain/types/transaction.go:38.96,40.2 1 0 -github.com/ethereum/go-ethereum/chain/types/transaction.go:42.56,47.2 3 0 -github.com/ethereum/go-ethereum/chain/types/transaction.go:49.63,54.2 3 0 -github.com/ethereum/go-ethereum/chain/types/transaction.go:56.46,58.2 1 0 -github.com/ethereum/go-ethereum/chain/types/transaction.go:60.48,63.2 2 0 -github.com/ethereum/go-ethereum/chain/types/transaction.go:65.38,69.2 2 0 -github.com/ethereum/go-ethereum/chain/types/transaction.go:71.47,73.2 1 0 -github.com/ethereum/go-ethereum/chain/types/transaction.go:76.42,78.2 1 0 -github.com/ethereum/go-ethereum/chain/types/transaction.go:80.67,88.2 2 0 -github.com/ethereum/go-ethereum/chain/types/transaction.go:90.53,96.2 3 0 -github.com/ethereum/go-ethereum/chain/types/transaction.go:98.43,112.2 7 0 -github.com/ethereum/go-ethereum/chain/types/transaction.go:114.40,119.40 2 0 -github.com/ethereum/go-ethereum/chain/types/transaction.go:123.2,123.37 1 0 -github.com/ethereum/go-ethereum/chain/types/transaction.go:119.40,121.3 1 0 -github.com/ethereum/go-ethereum/chain/types/transaction.go:126.49,135.2 5 0 -github.com/ethereum/go-ethereum/chain/types/transaction.go:137.46,143.2 2 0 -github.com/ethereum/go-ethereum/chain/types/transaction.go:145.50,147.2 1 0 -github.com/ethereum/go-ethereum/chain/types/transaction.go:149.43,151.2 1 0 -github.com/ethereum/go-ethereum/chain/types/transaction.go:153.47,155.2 1 0 -github.com/ethereum/go-ethereum/chain/types/transaction.go:157.63,169.34 10 0 -github.com/ethereum/go-ethereum/chain/types/transaction.go:169.34,171.3 1 0 -github.com/ethereum/go-ethereum/chain/types/transaction.go:174.40,201.2 1 0 -github.com/ethereum/go-ethereum/chain/types/transaction.go:206.48,209.26 2 0 -github.com/ethereum/go-ethereum/chain/types/transaction.go:214.2,214.12 1 0 -github.com/ethereum/go-ethereum/chain/types/transaction.go:209.26,212.3 1 0 -github.com/ethereum/go-ethereum/chain/types/transaction.go:216.44,216.61 1 0 -github.com/ethereum/go-ethereum/chain/types/transaction.go:217.44,217.71 1 0 -github.com/ethereum/go-ethereum/chain/types/transaction.go:218.44,218.72 1 0 -github.com/ethereum/go-ethereum/chain/types/transaction.go:222.40,224.2 1 0 -github.com/ethereum/go-ethereum/compression/rle/read_write.go:20.45,23.32 2 4 -github.com/ethereum/go-ethereum/compression/rle/read_write.go:45.2,45.25 1 4 -github.com/ethereum/go-ethereum/compression/rle/read_write.go:23.32,24.22 1 4 -github.com/ethereum/go-ethereum/compression/rle/read_write.go:24.22,25.22 1 4 -github.com/ethereum/go-ethereum/compression/rle/read_write.go:25.22,26.21 1 4 -github.com/ethereum/go-ethereum/compression/rle/read_write.go:36.5,36.8 1 4 -github.com/ethereum/go-ethereum/compression/rle/read_write.go:27.5,28.22 1 1 -github.com/ethereum/go-ethereum/compression/rle/read_write.go:29.5,30.26 1 1 -github.com/ethereum/go-ethereum/compression/rle/read_write.go:31.5,32.26 1 1 -github.com/ethereum/go-ethereum/compression/rle/read_write.go:33.5,34.46 1 1 -github.com/ethereum/go-ethereum/compression/rle/read_write.go:37.6,39.5 1 0 -github.com/ethereum/go-ethereum/compression/rle/read_write.go:40.5,42.4 1 0 -github.com/ethereum/go-ethereum/compression/rle/read_write.go:48.52,49.9 1 0 -github.com/ethereum/go-ethereum/compression/rle/read_write.go:50.2,51.38 1 0 -github.com/ethereum/go-ethereum/compression/rle/read_write.go:52.2,54.32 2 0 -github.com/ethereum/go-ethereum/compression/rle/read_write.go:60.3,60.39 1 0 -github.com/ethereum/go-ethereum/compression/rle/read_write.go:61.2,62.64 1 0 -github.com/ethereum/go-ethereum/compression/rle/read_write.go:67.3,67.14 1 0 -github.com/ethereum/go-ethereum/compression/rle/read_write.go:68.2,69.20 1 0 -github.com/ethereum/go-ethereum/compression/rle/read_write.go:54.32,55.19 1 0 -github.com/ethereum/go-ethereum/compression/rle/read_write.go:58.4,58.7 1 0 -github.com/ethereum/go-ethereum/compression/rle/read_write.go:55.19,56.10 1 0 -github.com/ethereum/go-ethereum/compression/rle/read_write.go:62.64,64.4 1 0 -github.com/ethereum/go-ethereum/compression/rle/read_write.go:64.5,64.79 1 0 -github.com/ethereum/go-ethereum/compression/rle/read_write.go:64.79,66.4 1 0 -github.com/ethereum/go-ethereum/compression/rle/read_write.go:73.34,77.19 3 0 -github.com/ethereum/go-ethereum/compression/rle/read_write.go:83.2,83.20 1 0 -github.com/ethereum/go-ethereum/compression/rle/read_write.go:77.19,81.3 3 0 -github.com/ethereum/go-ethereum/crypto/crypto.go:13.31,18.2 3 1 -github.com/ethereum/go-ethereum/crypto/crypto.go:21.51,23.2 1 0 -github.com/ethereum/go-ethereum/crypto/crypto.go:25.33,29.2 2 1 -github.com/ethereum/go-ethereum/crypto/crypto.go:31.36,36.2 3 1 -github.com/ethereum/go-ethereum/crypto/crypto.go:38.36,47.2 3 0 -github.com/ethereum/go-ethereum/crypto/key_manager.go:18.55,20.2 1 0 -github.com/ethereum/go-ethereum/crypto/key_manager.go:22.52,24.2 1 0 -github.com/ethereum/go-ethereum/crypto/key_manager.go:26.41,28.2 1 0 -github.com/ethereum/go-ethereum/crypto/key_manager.go:30.41,32.2 1 0 -github.com/ethereum/go-ethereum/crypto/key_manager.go:34.42,36.2 1 0 -github.com/ethereum/go-ethereum/crypto/key_manager.go:38.41,40.2 1 0 -github.com/ethereum/go-ethereum/crypto/key_manager.go:42.39,44.2 1 0 -github.com/ethereum/go-ethereum/crypto/key_manager.go:46.67,48.16 2 0 -github.com/ethereum/go-ethereum/crypto/key_manager.go:51.2,52.12 2 0 -github.com/ethereum/go-ethereum/crypto/key_manager.go:48.16,50.3 1 0 -github.com/ethereum/go-ethereum/crypto/key_manager.go:55.61,57.12 2 0 -github.com/ethereum/go-ethereum/crypto/key_manager.go:64.2,64.21 1 0 -github.com/ethereum/go-ethereum/crypto/key_manager.go:57.12,60.17 3 0 -github.com/ethereum/go-ethereum/crypto/key_manager.go:60.17,62.4 1 0 -github.com/ethereum/go-ethereum/crypto/key_manager.go:67.45,69.2 1 0 -github.com/ethereum/go-ethereum/crypto/key_manager.go:71.80,72.29 1 0 -github.com/ethereum/go-ethereum/crypto/key_manager.go:75.2,79.16 5 0 -github.com/ethereum/go-ethereum/crypto/key_manager.go:82.2,85.12 4 0 -github.com/ethereum/go-ethereum/crypto/key_manager.go:72.29,74.3 1 0 -github.com/ethereum/go-ethereum/crypto/key_manager.go:79.16,81.3 1 0 -github.com/ethereum/go-ethereum/crypto/key_manager.go:88.50,89.31 1 0 -github.com/ethereum/go-ethereum/crypto/key_manager.go:92.2,93.12 2 0 -github.com/ethereum/go-ethereum/crypto/key_manager.go:89.31,91.3 1 0 -github.com/ethereum/go-ethereum/crypto/key_manager.go:96.73,98.12 2 0 -github.com/ethereum/go-ethereum/crypto/key_manager.go:105.2,105.20 1 0 -github.com/ethereum/go-ethereum/crypto/key_manager.go:108.2,108.42 1 0 -github.com/ethereum/go-ethereum/crypto/key_manager.go:98.12,101.17 3 0 -github.com/ethereum/go-ethereum/crypto/key_manager.go:101.17,103.4 1 0 -github.com/ethereum/go-ethereum/crypto/key_manager.go:105.20,107.3 1 0 -github.com/ethereum/go-ethereum/crypto/key_manager.go:111.96,113.16 2 0 -github.com/ethereum/go-ethereum/crypto/key_manager.go:116.2,116.42 1 0 -github.com/ethereum/go-ethereum/crypto/key_manager.go:113.16,115.3 1 0 -github.com/ethereum/go-ethereum/crypto/key_manager.go:119.87,121.16 2 0 -github.com/ethereum/go-ethereum/crypto/key_manager.go:124.2,124.42 1 0 -github.com/ethereum/go-ethereum/crypto/key_manager.go:121.16,123.3 1 0 -github.com/ethereum/go-ethereum/crypto/key_manager.go:127.47,130.2 2 0 -github.com/ethereum/go-ethereum/crypto/key_store.go:24.51,26.2 1 0 -github.com/ethereum/go-ethereum/crypto/key_store.go:28.67,31.2 2 0 -github.com/ethereum/go-ethereum/crypto/key_store.go:33.61,35.16 2 0 -github.com/ethereum/go-ethereum/crypto/key_store.go:38.2,40.16 3 0 -github.com/ethereum/go-ethereum/crypto/key_store.go:44.2,44.24 1 0 -github.com/ethereum/go-ethereum/crypto/key_store.go:47.2,47.21 1 0 -github.com/ethereum/go-ethereum/crypto/key_store.go:35.16,37.3 1 0 -github.com/ethereum/go-ethereum/crypto/key_store.go:40.16,42.3 1 0 -github.com/ethereum/go-ethereum/crypto/key_store.go:44.24,46.3 1 0 -github.com/ethereum/go-ethereum/crypto/key_store.go:54.69,61.38 7 0 -github.com/ethereum/go-ethereum/crypto/key_store.go:68.2,69.19 2 0 -github.com/ethereum/go-ethereum/crypto/key_store.go:73.2,76.16 4 0 -github.com/ethereum/go-ethereum/crypto/key_store.go:80.2,82.16 3 0 -github.com/ethereum/go-ethereum/crypto/key_store.go:86.2,88.16 3 0 -github.com/ethereum/go-ethereum/crypto/key_store.go:92.2,94.16 3 0 -github.com/ethereum/go-ethereum/crypto/key_store.go:98.2,98.12 1 0 -github.com/ethereum/go-ethereum/crypto/key_store.go:61.38,66.3 4 0 -github.com/ethereum/go-ethereum/crypto/key_store.go:69.19,71.3 1 0 -github.com/ethereum/go-ethereum/crypto/key_store.go:76.16,78.3 1 0 -github.com/ethereum/go-ethereum/crypto/key_store.go:82.16,84.3 1 0 -github.com/ethereum/go-ethereum/crypto/key_store.go:88.16,90.3 1 0 -github.com/ethereum/go-ethereum/crypto/key_store.go:94.16,96.3 1 0 -github.com/ethereum/go-ethereum/crypto/key_store.go:101.63,103.19 2 0 -github.com/ethereum/go-ethereum/crypto/key_store.go:106.2,109.16 3 0 -github.com/ethereum/go-ethereum/crypto/key_store.go:112.2,112.36 1 0 -github.com/ethereum/go-ethereum/crypto/key_store.go:103.19,105.3 1 0 -github.com/ethereum/go-ethereum/crypto/key_store.go:109.16,111.3 1 0 -github.com/ethereum/go-ethereum/crypto/keypair.go:19.36,23.2 3 0 -github.com/ethereum/go-ethereum/crypto/keypair.go:25.57,27.16 2 0 -github.com/ethereum/go-ethereum/crypto/keypair.go:31.2,31.61 1 0 -github.com/ethereum/go-ethereum/crypto/keypair.go:27.16,29.3 1 0 -github.com/ethereum/go-ethereum/crypto/keypair.go:34.36,35.22 1 0 -github.com/ethereum/go-ethereum/crypto/keypair.go:38.2,38.18 1 0 -github.com/ethereum/go-ethereum/crypto/keypair.go:35.22,37.3 1 0 -github.com/ethereum/go-ethereum/crypto/keypair.go:41.37,42.22 1 0 -github.com/ethereum/go-ethereum/crypto/keypair.go:45.2,45.19 1 0 -github.com/ethereum/go-ethereum/crypto/keypair.go:42.22,44.3 1 0 -github.com/ethereum/go-ethereum/crypto/keypair.go:48.64,50.2 1 0 -github.com/ethereum/go-ethereum/crypto/keypair.go:52.38,54.2 1 0 -github.com/ethereum/go-ethereum/crypto/keypair.go:56.45,58.2 1 0 -github.com/ethereum/go-ethereum/crypto/keyring.go:15.28,17.2 1 0 -github.com/ethereum/go-ethereum/crypto/keyring.go:19.48,21.2 1 0 -github.com/ethereum/go-ethereum/crypto/keyring.go:23.46,24.21 1 0 -github.com/ethereum/go-ethereum/crypto/keyring.go:28.2,28.12 1 0 -github.com/ethereum/go-ethereum/crypto/keyring.go:24.21,26.3 1 0 -github.com/ethereum/go-ethereum/crypto/keyring.go:31.32,33.2 1 0 -github.com/ethereum/go-ethereum/crypto/keyring.go:35.29,37.2 1 0 -github.com/ethereum/go-ethereum/crypto/keyring.go:39.42,40.33 1 0 -github.com/ethereum/go-ethereum/crypto/keyring.go:40.33,42.3 1 0 -github.com/ethereum/go-ethereum/crypto/keyring.go:45.44,47.27 2 0 -github.com/ethereum/go-ethereum/crypto/keyring.go:50.2,50.16 1 0 -github.com/ethereum/go-ethereum/crypto/keyring.go:47.27,49.3 1 0 -github.com/ethereum/go-ethereum/crypto/keyring.go:53.59,57.16 4 0 -github.com/ethereum/go-ethereum/crypto/keyring.go:60.2,61.16 2 0 -github.com/ethereum/go-ethereum/crypto/keyring.go:64.2,64.21 1 0 -github.com/ethereum/go-ethereum/crypto/keyring.go:57.16,59.3 1 0 -github.com/ethereum/go-ethereum/crypto/keyring.go:61.16,63.3 1 0 -github.com/ethereum/go-ethereum/crypto/keyring.go:67.61,70.45 3 0 -github.com/ethereum/go-ethereum/crypto/keyring.go:84.2,84.39 1 0 -github.com/ethereum/go-ethereum/crypto/keyring.go:70.45,73.23 3 0 -github.com/ethereum/go-ethereum/crypto/keyring.go:79.3,79.23 1 0 -github.com/ethereum/go-ethereum/crypto/keyring.go:73.23,75.4 1 0 -github.com/ethereum/go-ethereum/crypto/keyring.go:75.5,75.29 1 0 -github.com/ethereum/go-ethereum/crypto/keyring.go:75.29,77.4 1 0 -github.com/ethereum/go-ethereum/crypto/keyring.go:79.23,81.4 1 0 -github.com/ethereum/go-ethereum/crypto/keyring.go:87.61,89.27 2 0 -github.com/ethereum/go-ethereum/crypto/keyring.go:96.2,96.21 1 0 -github.com/ethereum/go-ethereum/crypto/keyring.go:89.27,91.17 2 0 -github.com/ethereum/go-ethereum/crypto/keyring.go:94.3,94.30 1 0 -github.com/ethereum/go-ethereum/crypto/keyring.go:91.17,93.4 1 0 -github.com/ethereum/go-ethereum/crypto/keyring.go:99.57,102.16 3 0 -github.com/ethereum/go-ethereum/crypto/keyring.go:106.2,107.16 2 0 -github.com/ethereum/go-ethereum/crypto/keyring.go:110.2,110.21 1 0 -github.com/ethereum/go-ethereum/crypto/keyring.go:102.16,105.3 2 0 -github.com/ethereum/go-ethereum/crypto/keyring.go:107.16,109.3 1 0 -github.com/ethereum/go-ethereum/crypto/keyring.go:113.38,115.2 1 0 -github.com/ethereum/go-ethereum/crypto/keyring.go:117.45,119.32 2 0 -github.com/ethereum/go-ethereum/crypto/keyring.go:122.2,122.10 1 0 -github.com/ethereum/go-ethereum/crypto/keyring.go:119.32,121.3 1 0 -github.com/ethereum/go-ethereum/crypto/mnemonic.go:9.50,10.26 1 24 -github.com/ethereum/go-ethereum/crypto/mnemonic.go:15.2,15.11 1 0 -github.com/ethereum/go-ethereum/crypto/mnemonic.go:10.26,11.17 1 18817 -github.com/ethereum/go-ethereum/crypto/mnemonic.go:11.17,13.4 1 24 -github.com/ethereum/go-ethereum/crypto/mnemonic.go:18.46,22.56 3 1 -github.com/ethereum/go-ethereum/crypto/mnemonic.go:30.2,30.12 1 1 -github.com/ethereum/go-ethereum/crypto/mnemonic.go:22.56,29.3 6 8 -github.com/ethereum/go-ethereum/crypto/mnemonic.go:33.46,37.39 3 1 -github.com/ethereum/go-ethereum/crypto/mnemonic.go:59.2,59.12 1 1 -github.com/ethereum/go-ethereum/crypto/mnemonic.go:37.39,50.12 9 8 -github.com/ethereum/go-ethereum/crypto/mnemonic.go:53.3,53.12 1 8 -github.com/ethereum/go-ethereum/crypto/mnemonic.go:56.3,57.32 2 8 -github.com/ethereum/go-ethereum/crypto/mnemonic.go:50.12,52.4 1 4 -github.com/ethereum/go-ethereum/crypto/mnemonic.go:53.12,55.4 1 2 -github.com/ethereum/go-ethereum/ethdb/memory_database.go:16.45,20.2 2 0 -github.com/ethereum/go-ethereum/ethdb/memory_database.go:22.54,24.2 1 0 -github.com/ethereum/go-ethereum/ethdb/memory_database.go:26.56,28.2 1 0 -github.com/ethereum/go-ethereum/ethdb/memory_database.go:38.49,42.2 2 0 -github.com/ethereum/go-ethereum/ethdb/memory_database.go:44.32,45.30 1 0 -github.com/ethereum/go-ethereum/ethdb/memory_database.go:45.30,49.3 3 0 -github.com/ethereum/go-ethereum/ethdb/memory_database.go:52.32,53.2 0 0 -github.com/ethereum/go-ethereum/ethdb/memory_database.go:55.45,58.35 2 0 -github.com/ethereum/go-ethereum/ethdb/memory_database.go:62.2,62.13 1 0 -github.com/ethereum/go-ethereum/ethdb/memory_database.go:58.35,60.3 1 0 -github.com/ethereum/go-ethereum/ethdb/database.go:18.56,23.16 3 0 -github.com/ethereum/go-ethereum/ethdb/database.go:27.2,29.22 2 0 -github.com/ethereum/go-ethereum/ethdb/database.go:23.16,25.3 1 0 -github.com/ethereum/go-ethereum/ethdb/database.go:32.56,33.15 1 0 -github.com/ethereum/go-ethereum/ethdb/database.go:37.2,38.16 2 0 -github.com/ethereum/go-ethereum/ethdb/database.go:33.15,35.3 1 0 -github.com/ethereum/go-ethereum/ethdb/database.go:38.16,40.3 1 0 -github.com/ethereum/go-ethereum/ethdb/database.go:43.58,45.16 2 0 -github.com/ethereum/go-ethereum/ethdb/database.go:49.2,49.15 1 0 -github.com/ethereum/go-ethereum/ethdb/database.go:53.2,53.17 1 0 -github.com/ethereum/go-ethereum/ethdb/database.go:45.16,47.3 1 0 -github.com/ethereum/go-ethereum/ethdb/database.go:49.15,51.3 1 0 -github.com/ethereum/go-ethereum/ethdb/database.go:56.51,58.2 1 0 -github.com/ethereum/go-ethereum/ethdb/database.go:60.47,63.20 2 0 -github.com/ethereum/go-ethereum/ethdb/database.go:67.2,67.13 1 0 -github.com/ethereum/go-ethereum/ethdb/database.go:63.20,65.3 1 0 -github.com/ethereum/go-ethereum/ethdb/database.go:70.58,72.2 1 0 -github.com/ethereum/go-ethereum/ethdb/database.go:74.34,77.2 1 0 -github.com/ethereum/go-ethereum/ethdb/database.go:79.34,81.18 2 0 -github.com/ethereum/go-ethereum/ethdb/database.go:81.18,88.3 5 0 -github.com/ethereum/go-ethereum/ethutil/bytes.go:14.35,16.2 1 1 -github.com/ethereum/go-ethereum/ethutil/bytes.go:18.60,19.22 1 0 -github.com/ethereum/go-ethereum/ethutil/bytes.go:25.2,25.10 1 0 -github.com/ethereum/go-ethereum/ethutil/bytes.go:19.22,20.34 1 0 -github.com/ethereum/go-ethereum/ethutil/bytes.go:20.34,22.4 1 0 -github.com/ethereum/go-ethereum/ethutil/bytes.go:31.54,34.16 3 1 -github.com/ethereum/go-ethereum/ethutil/bytes.go:38.2,38.41 1 1 -github.com/ethereum/go-ethereum/ethutil/bytes.go:34.16,36.3 1 0 -github.com/ethereum/go-ethereum/ethutil/bytes.go:44.37,53.16 6 2 -github.com/ethereum/go-ethereum/ethutil/bytes.go:57.2,57.15 1 2 -github.com/ethereum/go-ethereum/ethutil/bytes.go:53.16,55.3 1 0 -github.com/ethereum/go-ethereum/ethutil/bytes.go:63.43,64.25 1 5 -github.com/ethereum/go-ethereum/ethutil/bytes.go:84.2,84.8 1 5 -github.com/ethereum/go-ethereum/ethutil/bytes.go:65.2,67.58 2 1 -github.com/ethereum/go-ethereum/ethutil/bytes.go:68.2,72.20 4 2 -github.com/ethereum/go-ethereum/ethutil/bytes.go:73.2,77.20 4 1 -github.com/ethereum/go-ethereum/ethutil/bytes.go:78.2,81.20 3 1 -github.com/ethereum/go-ethereum/ethutil/bytes.go:90.32,91.14 1 7 -github.com/ethereum/go-ethereum/ethutil/bytes.go:95.2,95.33 1 5 -github.com/ethereum/go-ethereum/ethutil/bytes.go:91.14,93.3 1 2 -github.com/ethereum/go-ethereum/ethutil/bytes.go:101.47,106.2 3 1 -github.com/ethereum/go-ethereum/ethutil/bytes.go:108.29,111.2 2 5 -github.com/ethereum/go-ethereum/ethutil/bytes.go:113.33,115.2 1 2 -github.com/ethereum/go-ethereum/ethutil/bytes.go:117.35,121.2 2 3 -github.com/ethereum/go-ethereum/ethutil/bytes.go:123.76,124.70 1 0 -github.com/ethereum/go-ethereum/ethutil/bytes.go:130.2,130.8 1 0 -github.com/ethereum/go-ethereum/ethutil/bytes.go:124.70,126.3 1 0 -github.com/ethereum/go-ethereum/ethutil/bytes.go:126.4,128.3 1 0 -github.com/ethereum/go-ethereum/ethutil/bytes.go:133.37,134.20 1 4 -github.com/ethereum/go-ethereum/ethutil/bytes.go:138.2,139.53 2 3 -github.com/ethereum/go-ethereum/ethutil/bytes.go:147.2,147.27 1 2 -github.com/ethereum/go-ethereum/ethutil/bytes.go:134.20,136.3 1 1 -github.com/ethereum/go-ethereum/ethutil/bytes.go:139.53,141.3 1 1 -github.com/ethereum/go-ethereum/ethutil/bytes.go:141.4,141.46 1 2 -github.com/ethereum/go-ethereum/ethutil/bytes.go:141.46,143.3 1 1 -github.com/ethereum/go-ethereum/ethutil/bytes.go:143.4,145.3 1 1 -github.com/ethereum/go-ethereum/ethutil/bytes.go:150.50,151.28 1 2 -github.com/ethereum/go-ethereum/ethutil/bytes.go:167.2,167.8 1 2 -github.com/ethereum/go-ethereum/ethutil/bytes.go:151.28,152.27 1 4 -github.com/ethereum/go-ethereum/ethutil/bytes.go:153.3,155.16 2 3 -github.com/ethereum/go-ethereum/ethutil/bytes.go:161.4,161.48 1 3 -github.com/ethereum/go-ethereum/ethutil/bytes.go:162.3,163.45 1 1 -github.com/ethereum/go-ethereum/ethutil/bytes.go:155.16,157.5 1 1 -github.com/ethereum/go-ethereum/ethutil/bytes.go:157.6,159.5 1 2 -github.com/ethereum/go-ethereum/ethutil/bytes.go:170.48,171.20 1 6 -github.com/ethereum/go-ethereum/ethutil/bytes.go:175.2,178.15 3 5 -github.com/ethereum/go-ethereum/ethutil/bytes.go:171.20,173.3 1 1 -github.com/ethereum/go-ethereum/ethutil/bytes.go:181.47,182.20 1 7 -github.com/ethereum/go-ethereum/ethutil/bytes.go:186.2,189.15 3 6 -github.com/ethereum/go-ethereum/ethutil/bytes.go:182.20,184.3 1 1 -github.com/ethereum/go-ethereum/ethutil/bytes.go:192.46,193.18 1 2 -github.com/ethereum/go-ethereum/ethutil/bytes.go:197.2,199.20 2 1 -github.com/ethereum/go-ethereum/ethutil/bytes.go:193.18,195.3 1 1 -github.com/ethereum/go-ethereum/ethutil/bytes.go:203.47,204.18 1 2 -github.com/ethereum/go-ethereum/ethutil/bytes.go:208.2,210.20 2 1 -github.com/ethereum/go-ethereum/ethutil/bytes.go:204.18,206.3 1 1 -github.com/ethereum/go-ethereum/ethutil/bytes.go:214.42,215.21 1 0 -github.com/ethereum/go-ethereum/ethutil/bytes.go:223.2,225.8 2 0 -github.com/ethereum/go-ethereum/ethutil/bytes.go:215.21,217.3 1 0 -github.com/ethereum/go-ethereum/ethutil/bytes.go:217.4,217.28 1 0 -github.com/ethereum/go-ethereum/ethutil/bytes.go:217.28,219.3 1 0 -github.com/ethereum/go-ethereum/ethutil/bytes.go:219.4,221.3 1 0 -github.com/ethereum/go-ethereum/ethutil/bytes.go:228.63,229.26 1 0 -github.com/ethereum/go-ethereum/ethutil/bytes.go:233.2,233.8 1 0 -github.com/ethereum/go-ethereum/ethutil/bytes.go:229.26,231.3 1 0 -github.com/ethereum/go-ethereum/ethutil/path.go:10.45,14.22 2 2 -github.com/ethereum/go-ethereum/ethutil/path.go:21.2,21.8 1 2 -github.com/ethereum/go-ethereum/ethutil/path.go:14.22,19.3 3 1 -github.com/ethereum/go-ethereum/ethutil/path.go:24.38,26.38 2 2 -github.com/ethereum/go-ethereum/ethutil/path.go:30.2,30.13 1 1 -github.com/ethereum/go-ethereum/ethutil/path.go:26.38,28.3 1 1 -github.com/ethereum/go-ethereum/ethutil/path.go:33.51,35.16 2 2 -github.com/ethereum/go-ethereum/ethutil/path.go:39.2,40.16 2 1 -github.com/ethereum/go-ethereum/ethutil/path.go:44.2,44.26 1 1 -github.com/ethereum/go-ethereum/ethutil/path.go:35.16,37.3 1 1 -github.com/ethereum/go-ethereum/ethutil/path.go:40.16,42.3 1 0 -github.com/ethereum/go-ethereum/ethutil/path.go:47.55,49.16 2 2 -github.com/ethereum/go-ethereum/ethutil/path.go:52.2,55.16 3 1 -github.com/ethereum/go-ethereum/ethutil/path.go:59.2,59.12 1 1 -github.com/ethereum/go-ethereum/ethutil/path.go:49.16,51.3 1 1 -github.com/ethereum/go-ethereum/ethutil/path.go:55.16,57.3 1 0 -github.com/ethereum/go-ethereum/ethutil/script_unix.go:15.66,16.21 1 0 -github.com/ethereum/go-ethereum/ethutil/script_unix.go:48.2,48.17 1 0 -github.com/ethereum/go-ethereum/ethutil/script_unix.go:16.21,19.41 2 0 -github.com/ethereum/go-ethereum/ethutil/script_unix.go:19.41,20.16 1 0 -github.com/ethereum/go-ethereum/ethutil/script_unix.go:21.4,23.19 2 0 -github.com/ethereum/go-ethereum/ethutil/script_unix.go:27.5,27.25 1 0 -github.com/ethereum/go-ethereum/ethutil/script_unix.go:23.19,25.6 1 0 -github.com/ethereum/go-ethereum/ethutil/script_unix.go:29.5,34.23 4 0 -github.com/ethereum/go-ethereum/ethutil/script_unix.go:44.4,44.24 1 0 -github.com/ethereum/go-ethereum/ethutil/script_unix.go:34.23,36.31 2 0 -github.com/ethereum/go-ethereum/ethutil/script_unix.go:41.5,41.39 1 0 -github.com/ethereum/go-ethereum/ethutil/script_unix.go:36.31,37.19 1 0 -github.com/ethereum/go-ethereum/ethutil/script_unix.go:37.19,39.7 1 0 -github.com/ethereum/go-ethereum/ethutil/size.go:7.41,8.20 1 3 -github.com/ethereum/go-ethereum/ethutil/size.go:8.20,10.3 1 1 -github.com/ethereum/go-ethereum/ethutil/size.go:10.4,10.24 1 2 -github.com/ethereum/go-ethereum/ethutil/size.go:10.24,12.3 1 1 -github.com/ethereum/go-ethereum/ethutil/size.go:12.4,14.3 1 1 -github.com/ethereum/go-ethereum/ethutil/rlp.go:22.36,24.2 1 0 -github.com/ethereum/go-ethereum/ethutil/rlp.go:30.34,34.2 2 0 -github.com/ethereum/go-ethereum/ethutil/rlp.go:35.65,37.2 1 0 -github.com/ethereum/go-ethereum/ethutil/rlp.go:46.25,47.16 1 0 -github.com/ethereum/go-ethereum/ethutil/rlp.go:51.2,51.15 1 0 -github.com/ethereum/go-ethereum/ethutil/rlp.go:47.16,49.3 1 0 -github.com/ethereum/go-ethereum/ethutil/rlp.go:54.57,59.9 3 0 -github.com/ethereum/go-ethereum/ethutil/rlp.go:91.2,91.14 1 0 -github.com/ethereum/go-ethereum/ethutil/rlp.go:60.2,61.14 1 0 -github.com/ethereum/go-ethereum/ethutil/rlp.go:63.2,64.39 1 0 -github.com/ethereum/go-ethereum/ethutil/rlp.go:66.2,69.34 2 0 -github.com/ethereum/go-ethereum/ethutil/rlp.go:71.2,73.31 2 0 -github.com/ethereum/go-ethereum/ethutil/rlp.go:78.3,78.15 1 0 -github.com/ethereum/go-ethereum/ethutil/rlp.go:79.2,81.39 2 0 -github.com/ethereum/go-ethereum/ethutil/rlp.go:86.3,86.15 1 0 -github.com/ethereum/go-ethereum/ethutil/rlp.go:87.2,88.53 1 0 -github.com/ethereum/go-ethereum/ethutil/rlp.go:73.31,76.4 2 0 -github.com/ethereum/go-ethereum/ethutil/rlp.go:81.39,84.4 2 0 -github.com/ethereum/go-ethereum/ethutil/rlp.go:100.40,103.19 2 59 -github.com/ethereum/go-ethereum/ethutil/rlp.go:177.2,177.21 1 59 -github.com/ethereum/go-ethereum/ethutil/rlp.go:103.19,104.29 1 59 -github.com/ethereum/go-ethereum/ethutil/rlp.go:105.3,106.31 1 2 -github.com/ethereum/go-ethereum/ethutil/rlp.go:107.3,108.35 1 0 -github.com/ethereum/go-ethereum/ethutil/rlp.go:110.3,111.44 1 10 -github.com/ethereum/go-ethereum/ethutil/rlp.go:112.3,113.44 1 0 -github.com/ethereum/go-ethereum/ethutil/rlp.go:114.3,115.44 1 0 -github.com/ethereum/go-ethereum/ethutil/rlp.go:116.3,117.44 1 0 -github.com/ethereum/go-ethereum/ethutil/rlp.go:118.3,119.44 1 0 -github.com/ethereum/go-ethereum/ethutil/rlp.go:120.3,121.37 1 0 -github.com/ethereum/go-ethereum/ethutil/rlp.go:122.3,123.44 1 0 -github.com/ethereum/go-ethereum/ethutil/rlp.go:124.3,125.44 1 0 -github.com/ethereum/go-ethereum/ethutil/rlp.go:126.3,127.44 1 0 -github.com/ethereum/go-ethereum/ethutil/rlp.go:128.3,129.44 1 1 -github.com/ethereum/go-ethereum/ethutil/rlp.go:130.3,132.16 1 12 -github.com/ethereum/go-ethereum/ethutil/rlp.go:137.3,138.33 1 0 -github.com/ethereum/go-ethereum/ethutil/rlp.go:139.3,140.35 1 20 -github.com/ethereum/go-ethereum/ethutil/rlp.go:151.3,152.33 1 6 -github.com/ethereum/go-ethereum/ethutil/rlp.go:153.3,155.41 1 8 -github.com/ethereum/go-ethereum/ethutil/rlp.go:165.4,166.26 2 8 -github.com/ethereum/go-ethereum/ethutil/rlp.go:169.4,170.25 2 8 -github.com/ethereum/go-ethereum/ethutil/rlp.go:132.16,134.5 1 0 -github.com/ethereum/go-ethereum/ethutil/rlp.go:134.6,136.5 1 12 -github.com/ethereum/go-ethereum/ethutil/rlp.go:140.35,142.5 1 11 -github.com/ethereum/go-ethereum/ethutil/rlp.go:142.6,142.26 1 9 -github.com/ethereum/go-ethereum/ethutil/rlp.go:142.26,145.5 2 8 -github.com/ethereum/go-ethereum/ethutil/rlp.go:145.6,150.5 4 1 -github.com/ethereum/go-ethereum/ethutil/rlp.go:155.41,156.20 1 8 -github.com/ethereum/go-ethereum/ethutil/rlp.go:156.20,158.6 1 8 -github.com/ethereum/go-ethereum/ethutil/rlp.go:158.7,162.6 3 0 -github.com/ethereum/go-ethereum/ethutil/rlp.go:166.26,168.5 1 19 -github.com/ethereum/go-ethereum/ethutil/rlp.go:172.4,175.3 1 0 -github.com/ethereum/go-ethereum/ethutil/rlp.go:182.60,185.9 3 16 -github.com/ethereum/go-ethereum/ethutil/rlp.go:241.2,241.17 1 0 -github.com/ethereum/go-ethereum/ethutil/rlp.go:186.2,187.28 1 3 -github.com/ethereum/go-ethereum/ethutil/rlp.go:189.2,192.44 2 9 -github.com/ethereum/go-ethereum/ethutil/rlp.go:194.2,199.54 3 1 -github.com/ethereum/go-ethereum/ethutil/rlp.go:201.2,205.30 4 3 -github.com/ethereum/go-ethereum/ethutil/rlp.go:217.3,217.20 1 3 -github.com/ethereum/go-ethereum/ethutil/rlp.go:219.2,226.38 5 0 -github.com/ethereum/go-ethereum/ethutil/rlp.go:235.3,235.20 1 0 -github.com/ethereum/go-ethereum/ethutil/rlp.go:237.2,238.53 1 0 -github.com/ethereum/go-ethereum/ethutil/rlp.go:205.30,216.4 5 9 -github.com/ethereum/go-ethereum/ethutil/rlp.go:226.38,234.4 5 0 -github.com/ethereum/go-ethereum/ethutil/set.go:13.40,15.24 2 0 -github.com/ethereum/go-ethereum/ethutil/set.go:19.2,19.12 1 0 -github.com/ethereum/go-ethereum/ethutil/set.go:15.24,17.3 1 0 -github.com/ethereum/go-ethereum/ethutil/set.go:22.54,26.2 2 0 -github.com/ethereum/go-ethereum/ethutil/set.go:28.50,32.2 2 0 -github.com/ethereum/go-ethereum/ethutil/set.go:34.32,36.2 1 0 -github.com/ethereum/go-ethereum/ethutil/big.go:8.32,13.2 3 18 -github.com/ethereum/go-ethereum/ethutil/big.go:18.31,23.2 3 8 -github.com/ethereum/go-ethereum/ethutil/big.go:28.33,33.2 3 1 -github.com/ethereum/go-ethereum/ethutil/big.go:35.40,37.2 1 1 -github.com/ethereum/go-ethereum/ethutil/big.go:46.32,54.2 2 2 -github.com/ethereum/go-ethereum/ethutil/big.go:56.32,57.22 1 2 -github.com/ethereum/go-ethereum/ethutil/big.go:57.22,59.3 1 1 -github.com/ethereum/go-ethereum/ethutil/big.go:59.4,62.3 1 1 -github.com/ethereum/go-ethereum/ethutil/big.go:69.48,72.31 2 4 -github.com/ethereum/go-ethereum/ethutil/big.go:76.2,76.64 1 3 -github.com/ethereum/go-ethereum/ethutil/big.go:72.31,74.3 1 1 -github.com/ethereum/go-ethereum/ethutil/big.go:82.37,84.2 1 1 -github.com/ethereum/go-ethereum/ethutil/big.go:89.37,90.19 1 2 -github.com/ethereum/go-ethereum/ethutil/big.go:94.2,94.10 1 1 -github.com/ethereum/go-ethereum/ethutil/big.go:90.19,92.3 1 1 -github.com/ethereum/go-ethereum/ethutil/big.go:100.37,101.19 1 2 -github.com/ethereum/go-ethereum/ethutil/big.go:105.2,105.10 1 1 -github.com/ethereum/go-ethereum/ethutil/big.go:101.19,103.3 1 1 -github.com/ethereum/go-ethereum/ethutil/config.go:30.85,31.19 1 0 -github.com/ethereum/go-ethereum/ethutil/config.go:48.2,48.15 1 0 -github.com/ethereum/go-ethereum/ethutil/config.go:31.19,33.29 1 0 -github.com/ethereum/go-ethereum/ethutil/config.go:37.3,41.17 2 0 -github.com/ethereum/go-ethereum/ethutil/config.go:46.3,46.83 1 0 -github.com/ethereum/go-ethereum/ethutil/config.go:33.29,36.4 2 0 -github.com/ethereum/go-ethereum/ethutil/config.go:41.17,43.4 1 0 -github.com/ethereum/go-ethereum/ethutil/config.go:43.5,45.4 1 0 -github.com/ethereum/go-ethereum/ethutil/config.go:52.61,55.2 2 0 -github.com/ethereum/go-ethereum/ethutil/config.go:57.44,59.2 1 0 -github.com/ethereum/go-ethereum/ethutil/config.go:67.49,69.2 1 0 -github.com/ethereum/go-ethereum/ethutil/config.go:71.43,71.64 1 0 -github.com/ethereum/go-ethereum/ethutil/config.go:72.43,72.73 2 0 -github.com/ethereum/go-ethereum/ethutil/list.go:20.35,22.34 2 0 -github.com/ethereum/go-ethereum/ethutil/list.go:26.2,26.49 1 0 -github.com/ethereum/go-ethereum/ethutil/list.go:22.34,24.3 1 0 -github.com/ethereum/go-ethereum/ethutil/list.go:29.24,31.2 1 0 -github.com/ethereum/go-ethereum/ethutil/list.go:34.42,35.25 1 0 -github.com/ethereum/go-ethereum/ethutil/list.go:44.2,44.12 1 0 -github.com/ethereum/go-ethereum/ethutil/list.go:35.25,42.3 4 0 -github.com/ethereum/go-ethereum/ethutil/list.go:47.48,53.2 3 0 -github.com/ethereum/go-ethereum/ethutil/list.go:57.41,63.2 4 0 -github.com/ethereum/go-ethereum/ethutil/list.go:66.43,68.2 1 0 -github.com/ethereum/go-ethereum/ethutil/list.go:71.35,74.35 2 0 -github.com/ethereum/go-ethereum/ethutil/list.go:78.2,80.21 2 0 -github.com/ethereum/go-ethereum/ethutil/list.go:74.35,76.3 1 0 -github.com/ethereum/go-ethereum/ethutil/package.go:33.44,35.16 2 0 -github.com/ethereum/go-ethereum/ethutil/package.go:38.2,41.16 3 0 -github.com/ethereum/go-ethereum/ethutil/package.go:45.2,45.21 1 0 -github.com/ethereum/go-ethereum/ethutil/package.go:35.16,37.3 1 0 -github.com/ethereum/go-ethereum/ethutil/package.go:41.16,43.3 1 0 -github.com/ethereum/go-ethereum/ethutil/package.go:51.48,55.49 3 0 -github.com/ethereum/go-ethereum/ethutil/package.go:60.2,60.23 1 0 -github.com/ethereum/go-ethereum/ethutil/package.go:55.49,56.3 0 0 -github.com/ethereum/go-ethereum/ethutil/package.go:56.4,56.23 1 0 -github.com/ethereum/go-ethereum/ethutil/package.go:56.23,58.3 1 0 -github.com/ethereum/go-ethereum/ethutil/package.go:66.66,69.26 2 0 -github.com/ethereum/go-ethereum/ethutil/package.go:75.2,75.8 1 0 -github.com/ethereum/go-ethereum/ethutil/package.go:69.26,70.19 1 0 -github.com/ethereum/go-ethereum/ethutil/package.go:70.19,72.4 1 0 -github.com/ethereum/go-ethereum/ethutil/package.go:83.50,85.16 2 0 -github.com/ethereum/go-ethereum/ethutil/package.go:88.2,92.23 3 0 -github.com/ethereum/go-ethereum/ethutil/package.go:96.2,97.16 2 0 -github.com/ethereum/go-ethereum/ethutil/package.go:101.2,102.16 2 0 -github.com/ethereum/go-ethereum/ethutil/package.go:106.2,106.26 1 0 -github.com/ethereum/go-ethereum/ethutil/package.go:110.2,111.20 2 0 -github.com/ethereum/go-ethereum/ethutil/package.go:115.2,116.16 2 0 -github.com/ethereum/go-ethereum/ethutil/package.go:120.2,122.24 2 0 -github.com/ethereum/go-ethereum/ethutil/package.go:85.16,87.3 1 0 -github.com/ethereum/go-ethereum/ethutil/package.go:92.23,94.3 1 0 -github.com/ethereum/go-ethereum/ethutil/package.go:97.16,99.3 1 0 -github.com/ethereum/go-ethereum/ethutil/package.go:102.16,104.3 1 0 -github.com/ethereum/go-ethereum/ethutil/package.go:106.26,108.3 1 0 -github.com/ethereum/go-ethereum/ethutil/package.go:111.20,113.3 1 0 -github.com/ethereum/go-ethereum/ethutil/package.go:116.16,118.3 1 0 -github.com/ethereum/go-ethereum/ethutil/common.go:9.23,11.2 1 2 -github.com/ethereum/go-ethereum/ethutil/common.go:13.40,14.43 1 1 -github.com/ethereum/go-ethereum/ethutil/common.go:17.2,17.13 1 1 -github.com/ethereum/go-ethereum/ethutil/common.go:14.43,16.3 1 0 -github.com/ethereum/go-ethereum/ethutil/common.go:36.44,42.9 2 12 -github.com/ethereum/go-ethereum/ethutil/common.go:70.2,70.27 1 12 -github.com/ethereum/go-ethereum/ethutil/common.go:74.2,74.41 1 10 -github.com/ethereum/go-ethereum/ethutil/common.go:43.2,45.20 2 2 -github.com/ethereum/go-ethereum/ethutil/common.go:46.2,48.21 2 2 -github.com/ethereum/go-ethereum/ethutil/common.go:49.2,51.18 2 1 -github.com/ethereum/go-ethereum/ethutil/common.go:52.2,54.19 2 1 -github.com/ethereum/go-ethereum/ethutil/common.go:55.2,57.18 2 1 -github.com/ethereum/go-ethereum/ethutil/common.go:58.2,60.20 2 1 -github.com/ethereum/go-ethereum/ethutil/common.go:61.2,63.20 2 2 -github.com/ethereum/go-ethereum/ethutil/common.go:64.2,66.16 2 1 -github.com/ethereum/go-ethereum/ethutil/common.go:70.27,72.3 1 2 -github.com/ethereum/go-ethereum/ethutil/rand.go:9.48,12.17 3 2 -github.com/ethereum/go-ethereum/ethutil/rand.go:15.2,15.16 1 2 -github.com/ethereum/go-ethereum/ethutil/rand.go:18.2,18.40 1 2 -github.com/ethereum/go-ethereum/ethutil/rand.go:12.17,14.3 1 0 -github.com/ethereum/go-ethereum/ethutil/rand.go:15.16,17.3 1 0 -github.com/ethereum/go-ethereum/ethutil/rand.go:22.37,24.2 1 2 -github.com/ethereum/go-ethereum/ethutil/value.go:19.35,21.2 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:23.39,25.31 2 39 -github.com/ethereum/go-ethereum/ethutil/value.go:29.2,29.23 1 39 -github.com/ethereum/go-ethereum/ethutil/value.go:25.31,27.3 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:32.39,34.2 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:36.32,38.2 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:40.29,42.45 1 8 -github.com/ethereum/go-ethereum/ethutil/value.go:46.2,46.25 1 1 -github.com/ethereum/go-ethereum/ethutil/value.go:42.45,44.3 1 7 -github.com/ethereum/go-ethereum/ethutil/value.go:49.37,51.2 1 2 -github.com/ethereum/go-ethereum/ethutil/value.go:53.43,55.2 1 1 -github.com/ethereum/go-ethereum/ethutil/value.go:57.33,58.36 1 11 -github.com/ethereum/go-ethereum/ethutil/value.go:80.2,80.10 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:58.36,60.3 1 1 -github.com/ethereum/go-ethereum/ethutil/value.go:60.4,60.44 1 10 -github.com/ethereum/go-ethereum/ethutil/value.go:60.44,62.3 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:62.4,62.44 1 10 -github.com/ethereum/go-ethereum/ethutil/value.go:62.44,64.3 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:64.4,64.44 1 10 -github.com/ethereum/go-ethereum/ethutil/value.go:64.44,66.3 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:66.4,66.45 1 10 -github.com/ethereum/go-ethereum/ethutil/value.go:66.45,68.3 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:68.4,68.45 1 10 -github.com/ethereum/go-ethereum/ethutil/value.go:68.45,70.3 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:70.4,70.41 1 10 -github.com/ethereum/go-ethereum/ethutil/value.go:70.41,72.3 1 10 -github.com/ethereum/go-ethereum/ethutil/value.go:72.4,72.42 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:72.42,74.3 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:74.4,74.44 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:74.44,76.3 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:76.4,76.46 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:76.46,78.3 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:83.31,84.35 1 3 -github.com/ethereum/go-ethereum/ethutil/value.go:107.2,107.10 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:84.35,86.3 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:86.4,86.43 1 3 -github.com/ethereum/go-ethereum/ethutil/value.go:86.43,88.3 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:88.4,88.43 1 3 -github.com/ethereum/go-ethereum/ethutil/value.go:88.43,90.3 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:90.4,90.43 1 3 -github.com/ethereum/go-ethereum/ethutil/value.go:90.43,92.3 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:92.4,92.41 1 3 -github.com/ethereum/go-ethereum/ethutil/value.go:92.41,94.3 1 2 -github.com/ethereum/go-ethereum/ethutil/value.go:94.4,94.45 1 1 -github.com/ethereum/go-ethereum/ethutil/value.go:94.45,96.3 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:96.4,96.45 1 1 -github.com/ethereum/go-ethereum/ethutil/value.go:96.45,98.3 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:98.4,98.44 1 1 -github.com/ethereum/go-ethereum/ethutil/value.go:98.44,100.3 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:100.4,100.46 1 1 -github.com/ethereum/go-ethereum/ethutil/value.go:100.46,102.3 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:102.4,102.44 1 1 -github.com/ethereum/go-ethereum/ethutil/value.go:102.44,105.3 2 1 -github.com/ethereum/go-ethereum/ethutil/value.go:110.31,111.35 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:115.2,115.12 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:111.35,113.3 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:118.37,119.35 1 10 -github.com/ethereum/go-ethereum/ethutil/value.go:131.2,131.22 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:119.35,123.3 2 1 -github.com/ethereum/go-ethereum/ethutil/value.go:123.4,123.44 1 9 -github.com/ethereum/go-ethereum/ethutil/value.go:123.44,125.3 1 3 -github.com/ethereum/go-ethereum/ethutil/value.go:125.4,125.42 1 6 -github.com/ethereum/go-ethereum/ethutil/value.go:125.42,127.3 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:127.4,129.3 1 6 -github.com/ethereum/go-ethereum/ethutil/value.go:134.32,135.35 1 2 -github.com/ethereum/go-ethereum/ethutil/value.go:143.2,143.11 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:135.35,137.3 1 1 -github.com/ethereum/go-ethereum/ethutil/value.go:137.4,137.42 1 1 -github.com/ethereum/go-ethereum/ethutil/value.go:137.42,139.3 1 1 -github.com/ethereum/go-ethereum/ethutil/value.go:139.4,139.40 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:139.40,141.3 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:146.34,147.35 1 10 -github.com/ethereum/go-ethereum/ethutil/value.go:159.2,159.17 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:147.35,149.3 1 6 -github.com/ethereum/go-ethereum/ethutil/value.go:149.4,149.40 1 4 -github.com/ethereum/go-ethereum/ethutil/value.go:149.40,151.3 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:151.4,151.42 1 4 -github.com/ethereum/go-ethereum/ethutil/value.go:151.42,153.3 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:153.4,153.44 1 4 -github.com/ethereum/go-ethereum/ethutil/value.go:153.44,155.3 1 2 -github.com/ethereum/go-ethereum/ethutil/value.go:155.4,157.3 1 2 -github.com/ethereum/go-ethereum/ethutil/value.go:162.31,163.36 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:167.2,167.12 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:163.36,165.3 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:170.41,171.42 1 10 -github.com/ethereum/go-ethereum/ethutil/value.go:175.2,175.24 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:171.42,173.3 1 10 -github.com/ethereum/go-ethereum/ethutil/value.go:178.46,182.2 2 1 -github.com/ethereum/go-ethereum/ethutil/value.go:184.42,188.2 2 1 -github.com/ethereum/go-ethereum/ethutil/value.go:190.52,194.2 2 1 -github.com/ethereum/go-ethereum/ethutil/value.go:197.34,199.2 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:201.32,203.2 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:205.33,208.2 2 0 -github.com/ethereum/go-ethereum/ethutil/value.go:213.33,217.2 2 0 -github.com/ethereum/go-ethereum/ethutil/value.go:219.34,221.2 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:224.39,225.42 1 5 -github.com/ethereum/go-ethereum/ethutil/value.go:239.2,239.22 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:225.42,227.20 1 5 -github.com/ethereum/go-ethereum/ethutil/value.go:231.3,231.14 1 5 -github.com/ethereum/go-ethereum/ethutil/value.go:235.3,235.26 1 5 -github.com/ethereum/go-ethereum/ethutil/value.go:227.20,229.4 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:231.14,233.4 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:242.34,243.32 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:252.2,252.12 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:244.2,245.41 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:246.2,247.34 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:248.2,249.28 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:255.38,257.2 1 4 -github.com/ethereum/go-ethereum/ethutil/value.go:259.43,261.2 1 2 -github.com/ethereum/go-ethereum/ethutil/value.go:263.35,265.2 1 3 -github.com/ethereum/go-ethereum/ethutil/value.go:268.29,272.2 2 4 -github.com/ethereum/go-ethereum/ethutil/value.go:274.44,275.20 1 3 -github.com/ethereum/go-ethereum/ethutil/value.go:282.2,282.22 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:275.20,280.3 3 3 -github.com/ethereum/go-ethereum/ethutil/value.go:286.42,289.14 2 0 -github.com/ethereum/go-ethereum/ethutil/value.go:301.2,301.13 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:289.14,290.41 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:290.41,291.30 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:291.30,293.5 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:294.5,294.43 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:294.43,295.30 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:295.30,297.5 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:304.26,306.2 1 3 -github.com/ethereum/go-ethereum/ethutil/value.go:308.39,313.2 3 2 -github.com/ethereum/go-ethereum/ethutil/value.go:315.48,319.2 2 5 -github.com/ethereum/go-ethereum/ethutil/value.go:330.59,334.12 3 4 -github.com/ethereum/go-ethereum/ethutil/value.go:347.2,347.13 1 4 -github.com/ethereum/go-ethereum/ethutil/value.go:335.2,336.35 1 2 -github.com/ethereum/go-ethereum/ethutil/value.go:337.2,338.35 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:339.2,340.35 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:341.2,342.41 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:343.2,344.35 1 2 -github.com/ethereum/go-ethereum/ethutil/value.go:350.50,352.2 1 2 -github.com/ethereum/go-ethereum/ethutil/value.go:354.50,356.2 1 2 -github.com/ethereum/go-ethereum/ethutil/value.go:358.50,360.2 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:362.50,364.2 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:366.50,368.2 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:376.48,378.2 1 1 -github.com/ethereum/go-ethereum/ethutil/value.go:380.36,382.2 1 0 -github.com/ethereum/go-ethereum/ethutil/value.go:384.38,385.30 1 4 -github.com/ethereum/go-ethereum/ethutil/value.go:389.2,392.13 3 3 -github.com/ethereum/go-ethereum/ethutil/value.go:385.30,387.3 1 1 -github.com/ethereum/go-ethereum/ethutil/value.go:395.41,397.2 1 3 -github.com/ethereum/go-ethereum/ethutil/value.go:399.36,401.2 1 0 -github.com/ethereum/go-ethereum/event/event.go:41.66,45.17 4 1005 -github.com/ethereum/go-ethereum/event/event.go:63.2,63.12 1 1004 -github.com/ethereum/go-ethereum/event/event.go:45.17,47.3 1 1 -github.com/ethereum/go-ethereum/event/event.go:47.4,48.22 1 1004 -github.com/ethereum/go-ethereum/event/event.go:51.3,51.27 1 1004 -github.com/ethereum/go-ethereum/event/event.go:48.22,50.4 1 5 -github.com/ethereum/go-ethereum/event/event.go:51.27,54.32 3 1006 -github.com/ethereum/go-ethereum/event/event.go:57.4,60.25 4 1005 -github.com/ethereum/go-ethereum/event/event.go:54.32,56.5 1 1 -github.com/ethereum/go-ethereum/event/event.go:68.48,71.17 3 6657815 -github.com/ethereum/go-ethereum/event/event.go:75.2,77.27 3 6657811 -github.com/ethereum/go-ethereum/event/event.go:80.2,80.12 1 6657811 -github.com/ethereum/go-ethereum/event/event.go:71.17,74.3 2 4 -github.com/ethereum/go-ethereum/event/event.go:77.27,79.3 1 4004 -github.com/ethereum/go-ethereum/event/event.go:86.28,88.32 2 5 -github.com/ethereum/go-ethereum/event/event.go:93.2,95.20 3 5 -github.com/ethereum/go-ethereum/event/event.go:88.32,89.28 1 3 -github.com/ethereum/go-ethereum/event/event.go:89.28,91.4 1 3 -github.com/ethereum/go-ethereum/event/event.go:98.36,100.34 2 1001 -github.com/ethereum/go-ethereum/event/event.go:109.2,109.22 1 1001 -github.com/ethereum/go-ethereum/event/event.go:100.34,101.37 1 1001 -github.com/ethereum/go-ethereum/event/event.go:101.37,102.22 1 1001 -github.com/ethereum/go-ethereum/event/event.go:102.22,104.5 1 5 -github.com/ethereum/go-ethereum/event/event.go:104.6,106.5 1 996 -github.com/ethereum/go-ethereum/event/event.go:112.46,113.26 1 2007 -github.com/ethereum/go-ethereum/event/event.go:118.2,118.11 1 1005 -github.com/ethereum/go-ethereum/event/event.go:113.26,114.16 1 17982 -github.com/ethereum/go-ethereum/event/event.go:114.16,116.4 1 1002 -github.com/ethereum/go-ethereum/event/event.go:121.52,126.2 4 996 -github.com/ethereum/go-ethereum/event/event.go:142.35,150.2 2 1005 -github.com/ethereum/go-ethereum/event/event.go:152.44,154.2 1 1003 -github.com/ethereum/go-ethereum/event/event.go:156.32,159.2 2 1001 -github.com/ethereum/go-ethereum/event/event.go:161.30,164.14 3 1004 -github.com/ethereum/go-ethereum/event/event.go:167.2,173.19 6 1003 -github.com/ethereum/go-ethereum/event/event.go:164.14,166.3 1 1 -github.com/ethereum/go-ethereum/event/event.go:176.42,178.9 2 4004 -github.com/ethereum/go-ethereum/event/event.go:182.2,182.20 1 4004 -github.com/ethereum/go-ethereum/event/event.go:179.2,179.21 0 1004 -github.com/ethereum/go-ethereum/event/event.go:180.2,180.19 0 3000 -github.com/ethereum/go-ethereum/logger/loggers.go:56.13,58.2 1 1 -github.com/ethereum/go-ethereum/logger/loggers.go:64.21,70.36 2 1 -github.com/ethereum/go-ethereum/logger/loggers.go:77.2,77.6 1 1 -github.com/ethereum/go-ethereum/logger/loggers.go:70.36,75.3 4 22 -github.com/ethereum/go-ethereum/logger/loggers.go:77.6,78.10 1 52 -github.com/ethereum/go-ethereum/logger/loggers.go:79.3,80.31 1 20 -github.com/ethereum/go-ethereum/logger/loggers.go:84.3,86.19 2 16 -github.com/ethereum/go-ethereum/logger/loggers.go:88.3,90.31 1 7 -github.com/ethereum/go-ethereum/logger/loggers.go:93.4,96.17 4 7 -github.com/ethereum/go-ethereum/logger/loggers.go:98.3,100.31 1 8 -github.com/ethereum/go-ethereum/logger/loggers.go:103.4,105.32 3 8 -github.com/ethereum/go-ethereum/logger/loggers.go:108.4,108.17 1 8 -github.com/ethereum/go-ethereum/logger/loggers.go:80.31,82.5 1 19 -github.com/ethereum/go-ethereum/logger/loggers.go:90.31,92.5 1 6 -github.com/ethereum/go-ethereum/logger/loggers.go:100.31,102.5 1 6 -github.com/ethereum/go-ethereum/logger/loggers.go:105.32,107.5 1 6 -github.com/ethereum/go-ethereum/logger/loggers.go:113.68,114.22 1 22 -github.com/ethereum/go-ethereum/logger/loggers.go:119.2,119.11 1 12 -github.com/ethereum/go-ethereum/logger/loggers.go:114.22,115.37 1 19 -github.com/ethereum/go-ethereum/logger/loggers.go:115.37,117.4 1 14 -github.com/ethereum/go-ethereum/logger/loggers.go:124.14,128.2 3 7 -github.com/ethereum/go-ethereum/logger/loggers.go:132.14,136.2 3 8 -github.com/ethereum/go-ethereum/logger/loggers.go:139.34,141.2 1 16 -github.com/ethereum/go-ethereum/logger/loggers.go:150.36,152.2 1 7 -github.com/ethereum/go-ethereum/logger/loggers.go:154.64,156.2 1 10 -github.com/ethereum/go-ethereum/logger/loggers.go:158.78,160.2 1 10 -github.com/ethereum/go-ethereum/logger/loggers.go:163.49,165.2 1 2 -github.com/ethereum/go-ethereum/logger/loggers.go:168.48,170.2 1 4 -github.com/ethereum/go-ethereum/logger/loggers.go:173.48,175.2 1 3 -github.com/ethereum/go-ethereum/logger/loggers.go:178.49,180.2 1 1 -github.com/ethereum/go-ethereum/logger/loggers.go:183.55,185.2 1 0 -github.com/ethereum/go-ethereum/logger/loggers.go:188.63,190.2 1 7 -github.com/ethereum/go-ethereum/logger/loggers.go:193.62,195.2 1 1 -github.com/ethereum/go-ethereum/logger/loggers.go:198.62,200.2 1 1 -github.com/ethereum/go-ethereum/logger/loggers.go:203.63,205.2 1 1 -github.com/ethereum/go-ethereum/logger/loggers.go:208.69,210.2 1 0 -github.com/ethereum/go-ethereum/logger/loggers.go:213.49,217.2 3 0 -github.com/ethereum/go-ethereum/logger/loggers.go:220.63,224.2 3 0 -github.com/ethereum/go-ethereum/logger/loggers.go:228.77,231.2 2 11 -github.com/ethereum/go-ethereum/logger/loggers.go:238.61,240.2 1 2 -github.com/ethereum/go-ethereum/logger/loggers.go:242.48,244.2 1 0 -github.com/ethereum/go-ethereum/logger/loggers.go:246.47,248.2 1 2 -github.com/ethereum/go-ethereum/p2p/client_identity.go:23.133,34.2 2 6 -github.com/ethereum/go-ethereum/p2p/client_identity.go:36.39,37.2 0 0 -github.com/ethereum/go-ethereum/p2p/client_identity.go:39.48,41.33 2 11 -github.com/ethereum/go-ethereum/p2p/client_identity.go:45.2,50.20 1 11 -github.com/ethereum/go-ethereum/p2p/client_identity.go:41.33,43.3 1 11 -github.com/ethereum/go-ethereum/p2p/client_identity.go:53.48,55.2 1 23 -github.com/ethereum/go-ethereum/p2p/client_identity.go:57.77,59.2 1 1 -github.com/ethereum/go-ethereum/p2p/client_identity.go:61.61,63.2 1 2 -github.com/ethereum/go-ethereum/p2p/natpmp.go:21.42,23.2 1 0 -github.com/ethereum/go-ethereum/p2p/natpmp.go:25.70,27.16 2 0 -github.com/ethereum/go-ethereum/p2p/natpmp.go:30.2,32.8 3 0 -github.com/ethereum/go-ethereum/p2p/natpmp.go:27.16,29.3 1 0 -github.com/ethereum/go-ethereum/p2p/natpmp.go:36.71,37.18 1 0 -github.com/ethereum/go-ethereum/p2p/natpmp.go:42.2,43.16 2 0 -github.com/ethereum/go-ethereum/p2p/natpmp.go:46.2,47.8 2 0 -github.com/ethereum/go-ethereum/p2p/natpmp.go:37.18,40.3 2 0 -github.com/ethereum/go-ethereum/p2p/natpmp.go:43.16,45.3 1 0 -github.com/ethereum/go-ethereum/p2p/natpmp.go:50.103,55.2 2 0 -github.com/ethereum/go-ethereum/p2p/peer_error.go:60.79,62.9 2 17 -github.com/ethereum/go-ethereum/p2p/peer_error.go:65.2,67.34 3 17 -github.com/ethereum/go-ethereum/p2p/peer_error.go:62.9,64.3 1 0 -github.com/ethereum/go-ethereum/p2p/peer_error.go:70.39,72.2 1 15 -github.com/ethereum/go-ethereum/p2p/peer_error.go:74.44,76.2 1 19 -github.com/ethereum/go-ethereum/p2p/protocol.go:81.37,82.38 1 0 -github.com/ethereum/go-ethereum/p2p/protocol.go:86.2,86.30 1 0 -github.com/ethereum/go-ethereum/p2p/protocol.go:82.38,84.3 1 0 -github.com/ethereum/go-ethereum/p2p/protocol.go:95.48,101.2 2 10 -github.com/ethereum/go-ethereum/p2p/protocol.go:103.35,104.22 1 10 -github.com/ethereum/go-ethereum/p2p/protocol.go:104.22,112.3 2 7 -github.com/ethereum/go-ethereum/p2p/protocol.go:115.34,116.2 0 10 -github.com/ethereum/go-ethereum/p2p/protocol.go:118.34,121.2 2 6 -github.com/ethereum/go-ethereum/p2p/protocol.go:123.37,125.2 1 0 -github.com/ethereum/go-ethereum/p2p/protocol.go:127.41,129.2 1 0 -github.com/ethereum/go-ethereum/p2p/protocol.go:131.44,133.2 1 16 -github.com/ethereum/go-ethereum/p2p/protocol.go:135.64,138.25 3 8 -github.com/ethereum/go-ethereum/p2p/protocol.go:138.25,140.3 1 8 -github.com/ethereum/go-ethereum/p2p/protocol.go:140.4,142.3 1 0 -github.com/ethereum/go-ethereum/p2p/protocol.go:145.66,146.32 1 3 -github.com/ethereum/go-ethereum/p2p/protocol.go:176.2,176.17 1 1 -github.com/ethereum/go-ethereum/p2p/protocol.go:146.32,148.3 1 1 -github.com/ethereum/go-ethereum/p2p/protocol.go:148.4,149.42 1 2 -github.com/ethereum/go-ethereum/p2p/protocol.go:154.3,154.21 1 0 -github.com/ethereum/go-ethereum/p2p/protocol.go:149.42,153.4 3 2 -github.com/ethereum/go-ethereum/p2p/protocol.go:155.3,160.5 2 0 -github.com/ethereum/go-ethereum/p2p/protocol.go:161.3,163.19 2 0 -github.com/ethereum/go-ethereum/p2p/protocol.go:164.3,164.16 0 0 -github.com/ethereum/go-ethereum/p2p/protocol.go:165.3,167.65 1 0 -github.com/ethereum/go-ethereum/p2p/protocol.go:170.3,171.25 1 0 -github.com/ethereum/go-ethereum/p2p/protocol.go:172.3,173.73 1 0 -github.com/ethereum/go-ethereum/p2p/protocol.go:167.65,169.5 1 0 -github.com/ethereum/go-ethereum/p2p/protocol.go:179.62,183.2 2 21 -github.com/ethereum/go-ethereum/p2p/protocol.go:185.91,189.22 4 2 -github.com/ethereum/go-ethereum/p2p/protocol.go:189.22,191.3 1 0 -github.com/ethereum/go-ethereum/p2p/protocol.go:194.49,196.16 2 0 -github.com/ethereum/go-ethereum/p2p/protocol.go:196.16,201.3 4 0 -github.com/ethereum/go-ethereum/p2p/protocol.go:204.53,207.29 3 1 -github.com/ethereum/go-ethereum/p2p/protocol.go:212.2,224.30 4 1 -github.com/ethereum/go-ethereum/p2p/protocol.go:230.2,230.22 1 1 -github.com/ethereum/go-ethereum/p2p/protocol.go:235.2,235.23 1 1 -github.com/ethereum/go-ethereum/p2p/protocol.go:241.2,241.82 1 1 -github.com/ethereum/go-ethereum/p2p/protocol.go:247.2,247.77 1 1 -github.com/ethereum/go-ethereum/p2p/protocol.go:253.2,253.23 1 1 -github.com/ethereum/go-ethereum/p2p/protocol.go:263.2,264.20 2 1 -github.com/ethereum/go-ethereum/p2p/protocol.go:268.2,277.8 5 1 -github.com/ethereum/go-ethereum/p2p/protocol.go:207.29,210.3 2 0 -github.com/ethereum/go-ethereum/p2p/protocol.go:224.30,227.3 2 0 -github.com/ethereum/go-ethereum/p2p/protocol.go:230.22,233.3 2 0 -github.com/ethereum/go-ethereum/p2p/protocol.go:235.23,238.3 2 0 -github.com/ethereum/go-ethereum/p2p/protocol.go:241.82,244.3 2 0 -github.com/ethereum/go-ethereum/p2p/protocol.go:247.77,250.3 2 0 -github.com/ethereum/go-ethereum/p2p/protocol.go:253.23,255.57 2 1 -github.com/ethereum/go-ethereum/p2p/protocol.go:255.57,258.4 2 0 -github.com/ethereum/go-ethereum/p2p/protocol.go:258.5,260.4 1 1 -github.com/ethereum/go-ethereum/p2p/protocol.go:264.20,267.3 2 3 -github.com/ethereum/go-ethereum/p2p/server.go:32.35,36.2 1 6 -github.com/ethereum/go-ethereum/p2p/server.go:38.60,43.9 5 0 -github.com/ethereum/go-ethereum/p2p/server.go:46.2,46.15 1 0 -github.com/ethereum/go-ethereum/p2p/server.go:43.9,45.3 1 0 -github.com/ethereum/go-ethereum/p2p/server.go:49.59,54.2 4 1 -github.com/ethereum/go-ethereum/p2p/server.go:56.52,61.2 4 0 -github.com/ethereum/go-ethereum/p2p/server.go:63.55,68.2 4 0 -github.com/ethereum/go-ethereum/p2p/server.go:98.129,101.33 2 5 -github.com/ethereum/go-ethereum/p2p/server.go:104.2,130.32 5 5 -github.com/ethereum/go-ethereum/p2p/server.go:133.2,133.13 1 5 -github.com/ethereum/go-ethereum/p2p/server.go:101.33,103.3 1 3 -github.com/ethereum/go-ethereum/p2p/server.go:130.32,132.3 1 10 -github.com/ethereum/go-ethereum/p2p/server.go:136.79,139.2 2 0 -github.com/ethereum/go-ethereum/p2p/server.go:141.74,144.2 2 0 -github.com/ethereum/go-ethereum/p2p/server.go:146.53,148.2 1 1 -github.com/ethereum/go-ethereum/p2p/server.go:150.58,155.16 4 1 -github.com/ethereum/go-ethereum/p2p/server.go:168.2,168.8 1 1 -github.com/ethereum/go-ethereum/p2p/server.go:155.16,157.37 2 1 -github.com/ethereum/go-ethereum/p2p/server.go:161.3,161.25 1 1 -github.com/ethereum/go-ethereum/p2p/server.go:157.37,160.4 2 2 -github.com/ethereum/go-ethereum/p2p/server.go:161.25,163.4 1 0 -github.com/ethereum/go-ethereum/p2p/server.go:163.5,166.4 2 1 -github.com/ethereum/go-ethereum/p2p/server.go:171.45,174.34 3 0 -github.com/ethereum/go-ethereum/p2p/server.go:179.2,179.8 1 0 -github.com/ethereum/go-ethereum/p2p/server.go:174.34,175.18 1 0 -github.com/ethereum/go-ethereum/p2p/server.go:175.18,177.4 1 0 -github.com/ethereum/go-ethereum/p2p/server.go:182.37,186.2 3 1 -github.com/ethereum/go-ethereum/p2p/server.go:190.48,193.9 1 0 -github.com/ethereum/go-ethereum/p2p/server.go:194.2,195.34 1 0 -github.com/ethereum/go-ethereum/p2p/server.go:196.2,196.10 0 0 -github.com/ethereum/go-ethereum/p2p/server.go:200.61,202.2 1 7 -github.com/ethereum/go-ethereum/p2p/server.go:204.43,206.2 1 7 -github.com/ethereum/go-ethereum/p2p/server.go:208.41,210.2 1 7 -github.com/ethereum/go-ethereum/p2p/server.go:212.58,215.34 3 1 -github.com/ethereum/go-ethereum/p2p/server.go:215.34,216.18 1 2 -github.com/ethereum/go-ethereum/p2p/server.go:216.18,218.4 1 2 -github.com/ethereum/go-ethereum/p2p/server.go:223.51,225.12 2 4 -github.com/ethereum/go-ethereum/p2p/server.go:237.2,237.10 1 4 -github.com/ethereum/go-ethereum/p2p/server.go:249.2,249.33 1 4 -github.com/ethereum/go-ethereum/p2p/server.go:225.12,227.17 2 3 -github.com/ethereum/go-ethereum/p2p/server.go:227.17,231.4 3 0 -github.com/ethereum/go-ethereum/p2p/server.go:231.5,235.4 3 3 -github.com/ethereum/go-ethereum/p2p/server.go:237.10,239.17 2 3 -github.com/ethereum/go-ethereum/p2p/server.go:239.17,243.4 3 0 -github.com/ethereum/go-ethereum/p2p/server.go:243.5,247.4 3 3 -github.com/ethereum/go-ethereum/p2p/server.go:252.28,255.18 2 4 -github.com/ethereum/go-ethereum/p2p/server.go:263.2,263.20 1 4 -github.com/ethereum/go-ethereum/p2p/server.go:271.2,277.34 6 4 -github.com/ethereum/go-ethereum/p2p/server.go:282.2,283.32 2 4 -github.com/ethereum/go-ethereum/p2p/server.go:291.2,295.6 3 4 -github.com/ethereum/go-ethereum/p2p/server.go:305.2,305.33 1 4 -github.com/ethereum/go-ethereum/p2p/server.go:255.18,261.3 5 3 -github.com/ethereum/go-ethereum/p2p/server.go:263.20,269.3 5 3 -github.com/ethereum/go-ethereum/p2p/server.go:277.34,278.18 1 8 -github.com/ethereum/go-ethereum/p2p/server.go:278.18,280.4 1 6 -github.com/ethereum/go-ethereum/p2p/server.go:283.32,288.3 1 6 -github.com/ethereum/go-ethereum/p2p/server.go:295.6,296.10 1 8 -github.com/ethereum/go-ethereum/p2p/server.go:297.3,300.26 3 8 -github.com/ethereum/go-ethereum/p2p/server.go:300.26,301.14 1 4 -github.com/ethereum/go-ethereum/p2p/server.go:309.63,310.6 1 3 -github.com/ethereum/go-ethereum/p2p/server.go:310.6,311.10 1 2591 -github.com/ethereum/go-ethereum/p2p/server.go:312.3,313.46 1 2588 -github.com/ethereum/go-ethereum/p2p/server.go:314.3,318.10 4 3 -github.com/ethereum/go-ethereum/p2p/server.go:325.56,330.6 4 3 -github.com/ethereum/go-ethereum/p2p/server.go:330.6,331.10 1 10 -github.com/ethereum/go-ethereum/p2p/server.go:332.3,338.15 3 4 -github.com/ethereum/go-ethereum/p2p/server.go:339.3,346.21 3 3 -github.com/ethereum/go-ethereum/p2p/server.go:347.3,348.31 1 0 -github.com/ethereum/go-ethereum/p2p/server.go:349.3,350.41 1 3 -github.com/ethereum/go-ethereum/p2p/server.go:353.4,355.10 3 3 -github.com/ethereum/go-ethereum/p2p/server.go:350.41,352.5 1 1 -github.com/ethereum/go-ethereum/p2p/server.go:361.61,366.11 4 6 -github.com/ethereum/go-ethereum/p2p/server.go:369.2,369.8 1 6 -github.com/ethereum/go-ethereum/p2p/server.go:366.11,368.3 1 0 -github.com/ethereum/go-ethereum/p2p/server.go:373.73,376.16 3 2588 -github.com/ethereum/go-ethereum/p2p/server.go:383.2,383.16 1 2588 -github.com/ethereum/go-ethereum/p2p/server.go:376.16,379.17 3 3 -github.com/ethereum/go-ethereum/p2p/server.go:379.17,381.4 1 0 -github.com/ethereum/go-ethereum/p2p/server.go:383.16,386.3 2 2585 -github.com/ethereum/go-ethereum/p2p/server.go:386.4,389.3 2 3 -github.com/ethereum/go-ethereum/p2p/server.go:393.84,396.16 3 3 -github.com/ethereum/go-ethereum/p2p/server.go:399.2,399.16 1 3 -github.com/ethereum/go-ethereum/p2p/server.go:396.16,398.3 1 3 -github.com/ethereum/go-ethereum/p2p/server.go:399.16,402.3 2 0 -github.com/ethereum/go-ethereum/p2p/server.go:402.4,404.3 1 3 -github.com/ethereum/go-ethereum/p2p/server.go:408.86,411.17 3 6 -github.com/ethereum/go-ethereum/p2p/server.go:411.17,415.3 3 0 -github.com/ethereum/go-ethereum/p2p/server.go:415.4,424.3 7 6 -github.com/ethereum/go-ethereum/p2p/server.go:428.59,435.17 6 6 -github.com/ethereum/go-ethereum/p2p/server.go:441.2,459.24 13 6 -github.com/ethereum/go-ethereum/p2p/server.go:435.17,439.3 3 0 -github.com/ethereum/go-ethereum/p2p/server.go:463.38,467.2 3 8 -github.com/ethereum/go-ethereum/p2p/server.go:469.74,471.35 1 1 -github.com/ethereum/go-ethereum/p2p/server.go:475.2,477.34 3 1 -github.com/ethereum/go-ethereum/p2p/server.go:482.2,483.12 2 1 -github.com/ethereum/go-ethereum/p2p/server.go:471.35,473.3 1 0 -github.com/ethereum/go-ethereum/p2p/server.go:477.34,478.82 1 2 -github.com/ethereum/go-ethereum/p2p/server.go:478.82,480.4 1 0 -github.com/ethereum/go-ethereum/p2p/connection.go:32.32,35.2 2 18 -github.com/ethereum/go-ethereum/p2p/connection.go:37.33,40.2 2 18 -github.com/ethereum/go-ethereum/p2p/connection.go:42.35,46.2 3 18 -github.com/ethereum/go-ethereum/p2p/connection.go:48.36,52.2 3 18 -github.com/ethereum/go-ethereum/p2p/connection.go:54.72,64.2 1 18 -github.com/ethereum/go-ethereum/p2p/connection.go:66.46,68.2 1 18 -github.com/ethereum/go-ethereum/p2p/connection.go:70.47,72.2 1 19 -github.com/ethereum/go-ethereum/p2p/connection.go:74.51,76.2 1 8 -github.com/ethereum/go-ethereum/p2p/connection.go:78.37,86.6 7 18 -github.com/ethereum/go-ethereum/p2p/connection.go:86.6,89.23 2 304 -github.com/ethereum/go-ethereum/p2p/connection.go:96.3,96.10 1 304 -github.com/ethereum/go-ethereum/p2p/connection.go:89.23,92.4 2 12 -github.com/ethereum/go-ethereum/p2p/connection.go:92.5,94.4 1 292 -github.com/ethereum/go-ethereum/p2p/connection.go:97.3,98.32 1 136 -github.com/ethereum/go-ethereum/p2p/connection.go:99.3,100.18 1 136 -github.com/ethereum/go-ethereum/p2p/connection.go:112.4,112.46 1 136 -github.com/ethereum/go-ethereum/p2p/connection.go:113.3,115.42 2 7 -github.com/ethereum/go-ethereum/p2p/connection.go:120.4,120.46 1 7 -github.com/ethereum/go-ethereum/p2p/connection.go:121.3,122.25 1 7 -github.com/ethereum/go-ethereum/p2p/connection.go:123.3,126.10 3 18 -github.com/ethereum/go-ethereum/p2p/connection.go:100.18,101.43 1 133 -github.com/ethereum/go-ethereum/p2p/connection.go:101.43,103.6 1 129 -github.com/ethereum/go-ethereum/p2p/connection.go:103.7,103.25 1 4 -github.com/ethereum/go-ethereum/p2p/connection.go:103.25,105.6 1 0 -github.com/ethereum/go-ethereum/p2p/connection.go:105.7,107.6 1 4 -github.com/ethereum/go-ethereum/p2p/connection.go:108.6,111.5 2 3 -github.com/ethereum/go-ethereum/p2p/connection.go:115.42,117.5 1 0 -github.com/ethereum/go-ethereum/p2p/connection.go:117.6,119.5 1 7 -github.com/ethereum/go-ethereum/p2p/connection.go:132.38,136.6 4 18 -github.com/ethereum/go-ethereum/p2p/connection.go:136.6,137.35 1 56 -github.com/ethereum/go-ethereum/p2p/connection.go:141.3,141.10 1 56 -github.com/ethereum/go-ethereum/p2p/connection.go:137.35,140.4 2 19 -github.com/ethereum/go-ethereum/p2p/connection.go:142.3,143.38 1 19 -github.com/ethereum/go-ethereum/p2p/connection.go:144.3,145.18 1 19 -github.com/ethereum/go-ethereum/p2p/connection.go:151.3,154.10 3 18 -github.com/ethereum/go-ethereum/p2p/connection.go:145.18,148.5 2 19 -github.com/ethereum/go-ethereum/p2p/connection.go:148.6,150.5 1 0 -github.com/ethereum/go-ethereum/p2p/connection.go:159.43,166.2 4 19 -github.com/ethereum/go-ethereum/p2p/connection.go:168.39,169.34 1 19 -github.com/ethereum/go-ethereum/p2p/connection.go:169.34,173.3 3 0 -github.com/ethereum/go-ethereum/p2p/connection.go:176.69,180.15 4 19 -github.com/ethereum/go-ethereum/p2p/connection.go:184.2,184.13 1 19 -github.com/ethereum/go-ethereum/p2p/connection.go:180.15,183.3 2 0 -github.com/ethereum/go-ethereum/p2p/connection.go:187.74,199.6 8 136 -github.com/ethereum/go-ethereum/p2p/connection.go:248.2,248.13 1 136 -github.com/ethereum/go-ethereum/p2p/connection.go:199.6,203.28 1 152 -github.com/ethereum/go-ethereum/p2p/connection.go:218.3,218.12 1 17 -github.com/ethereum/go-ethereum/p2p/connection.go:203.28,205.11 2 145 -github.com/ethereum/go-ethereum/p2p/connection.go:216.4,216.39 1 10 -github.com/ethereum/go-ethereum/p2p/connection.go:205.11,207.38 2 135 -github.com/ethereum/go-ethereum/p2p/connection.go:214.5,214.14 1 135 -github.com/ethereum/go-ethereum/p2p/connection.go:207.38,208.15 1 2 -github.com/ethereum/go-ethereum/p2p/connection.go:208.15,210.7 1 1 -github.com/ethereum/go-ethereum/p2p/connection.go:210.8,212.7 1 1 -github.com/ethereum/go-ethereum/p2p/connection.go:218.12,220.50 1 10 -github.com/ethereum/go-ethereum/p2p/connection.go:224.4,227.18 3 9 -github.com/ethereum/go-ethereum/p2p/connection.go:220.50,222.10 2 1 -github.com/ethereum/go-ethereum/p2p/connection.go:227.18,229.5 1 8 -github.com/ethereum/go-ethereum/p2p/connection.go:229.6,232.5 2 1 -github.com/ethereum/go-ethereum/p2p/connection.go:233.5,239.4 4 7 -github.com/ethereum/go-ethereum/p2p/connection.go:251.82,253.6 2 136 -github.com/ethereum/go-ethereum/p2p/connection.go:274.2,274.13 1 136 -github.com/ethereum/go-ethereum/p2p/connection.go:253.6,259.41 4 136 -github.com/ethereum/go-ethereum/p2p/connection.go:259.41,260.21 1 136 -github.com/ethereum/go-ethereum/p2p/connection.go:263.4,263.42 1 136 -github.com/ethereum/go-ethereum/p2p/connection.go:260.21,262.5 1 10 -github.com/ethereum/go-ethereum/p2p/connection.go:263.42,264.10 1 136 -github.com/ethereum/go-ethereum/p2p/connection.go:266.5,272.4 4 0 -github.com/ethereum/go-ethereum/p2p/message.go:16.33,18.2 1 54 -github.com/ethereum/go-ethereum/p2p/message.go:20.40,22.2 1 5 -github.com/ethereum/go-ethereum/p2p/message.go:24.72,43.2 1 37 -github.com/ethereum/go-ethereum/p2p/message.go:45.60,59.2 5 5 -github.com/ethereum/go-ethereum/p2p/message.go:61.41,63.2 1 5 -github.com/ethereum/go-ethereum/p2p/message.go:67.54,68.28 1 28 -github.com/ethereum/go-ethereum/p2p/message.go:74.2,74.8 1 28 -github.com/ethereum/go-ethereum/p2p/message.go:68.28,71.3 2 27 -github.com/ethereum/go-ethereum/p2p/message.go:71.4,73.3 1 1 -github.com/ethereum/go-ethereum/p2p/messenger.go:28.104,41.2 2 10 -github.com/ethereum/go-ethereum/p2p/messenger.go:43.32,49.2 5 10 -github.com/ethereum/go-ethereum/p2p/messenger.go:51.31,56.42 4 10 -github.com/ethereum/go-ethereum/p2p/messenger.go:59.2,62.19 4 10 -github.com/ethereum/go-ethereum/p2p/messenger.go:56.42,58.3 1 14 -github.com/ethereum/go-ethereum/p2p/messenger.go:65.36,67.6 2 10 -github.com/ethereum/go-ethereum/p2p/messenger.go:67.6,68.10 1 14 -github.com/ethereum/go-ethereum/p2p/messenger.go:69.3,71.10 1 4 -github.com/ethereum/go-ethereum/p2p/messenger.go:76.3,78.10 2 10 -github.com/ethereum/go-ethereum/p2p/messenger.go:71.10,73.5 1 4 -github.com/ethereum/go-ethereum/p2p/messenger.go:73.6,75.5 1 0 -github.com/ethereum/go-ethereum/p2p/messenger.go:88.47,97.16 3 4 -github.com/ethereum/go-ethereum/p2p/messenger.go:102.2,103.16 2 4 -github.com/ethereum/go-ethereum/p2p/messenger.go:108.2,114.6 5 4 -github.com/ethereum/go-ethereum/p2p/messenger.go:97.16,100.3 2 0 -github.com/ethereum/go-ethereum/p2p/messenger.go:103.16,106.3 2 0 -github.com/ethereum/go-ethereum/p2p/messenger.go:114.6,115.10 1 4 -github.com/ethereum/go-ethereum/p2p/messenger.go:116.3,118.10 1 4 -github.com/ethereum/go-ethereum/p2p/messenger.go:123.3,124.10 1 0 -github.com/ethereum/go-ethereum/p2p/messenger.go:118.10,120.5 1 0 -github.com/ethereum/go-ethereum/p2p/messenger.go:120.6,122.5 1 4 -github.com/ethereum/go-ethereum/p2p/messenger.go:134.82,138.42 4 4 -github.com/ethereum/go-ethereum/p2p/messenger.go:144.2,144.67 1 0 -github.com/ethereum/go-ethereum/p2p/messenger.go:138.42,139.20 1 5 -github.com/ethereum/go-ethereum/p2p/messenger.go:142.3,142.16 1 1 -github.com/ethereum/go-ethereum/p2p/messenger.go:139.20,141.4 1 4 -github.com/ethereum/go-ethereum/p2p/messenger.go:147.128,152.6 4 8 -github.com/ethereum/go-ethereum/p2p/messenger.go:152.6,153.10 1 19 -github.com/ethereum/go-ethereum/p2p/messenger.go:154.3,155.10 1 10 -github.com/ethereum/go-ethereum/p2p/messenger.go:162.3,163.14 1 9 -github.com/ethereum/go-ethereum/p2p/messenger.go:155.10,158.5 2 3 -github.com/ethereum/go-ethereum/p2p/messenger.go:158.6,161.5 1 7 -github.com/ethereum/go-ethereum/p2p/messenger.go:163.14,167.5 3 1 -github.com/ethereum/go-ethereum/p2p/messenger.go:167.6,172.5 4 8 -github.com/ethereum/go-ethereum/p2p/messenger.go:177.57,182.33 5 3 -github.com/ethereum/go-ethereum/p2p/messenger.go:182.33,184.9 2 5 -github.com/ethereum/go-ethereum/p2p/messenger.go:184.9,194.4 8 4 -github.com/ethereum/go-ethereum/p2p/messenger.go:194.5,197.4 1 1 -github.com/ethereum/go-ethereum/p2p/messenger.go:201.63,206.23 5 26 -github.com/ethereum/go-ethereum/p2p/messenger.go:214.2,216.28 2 24 -github.com/ethereum/go-ethereum/p2p/messenger.go:219.2,219.12 1 24 -github.com/ethereum/go-ethereum/p2p/messenger.go:206.23,209.10 3 5 -github.com/ethereum/go-ethereum/p2p/messenger.go:212.3,212.29 1 3 -github.com/ethereum/go-ethereum/p2p/messenger.go:209.10,211.4 1 2 -github.com/ethereum/go-ethereum/p2p/messenger.go:216.28,218.3 1 18 -github.com/ethereum/go-ethereum/p2p/natupnp.go:23.54,25.16 2 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:28.2,29.16 2 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:32.2,36.16 4 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:40.2,49.32 5 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:92.2,93.8 2 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:25.16,27.3 1 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:29.16,31.3 1 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:36.16,38.3 1 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:49.32,51.17 2 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:54.3,56.17 3 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:61.3,62.43 2 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:67.3,70.19 4 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:73.3,75.19 3 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:78.3,81.17 4 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:84.3,86.17 3 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:89.3,90.9 2 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:51.17,53.4 1 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:56.17,57.12 1 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:62.43,63.12 1 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:70.19,71.12 1 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:75.19,76.12 1 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:81.17,83.4 1 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:86.17,88.4 1 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:148.59,150.31 2 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:155.2,155.12 1 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:150.31,151.37 1 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:151.37,153.4 1 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:158.62,160.31 2 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:165.2,165.12 1 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:160.31,161.39 1 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:161.39,163.4 1 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:168.40,170.16 2 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:173.2,174.30 2 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:177.2,177.27 1 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:170.16,172.3 1 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:174.30,176.3 1 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:180.60,182.16 2 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:185.2,186.25 2 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:190.2,193.16 3 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:196.2,197.75 2 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:201.2,202.14 2 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:206.2,207.14 2 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:211.2,212.14 2 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:216.2,217.8 2 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:182.16,184.3 1 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:186.25,189.3 2 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:193.16,195.3 1 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:197.75,200.3 2 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:202.14,205.3 2 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:207.14,210.3 2 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:212.14,215.3 2 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:220.48,226.2 5 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:228.79,234.16 3 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:237.2,246.16 8 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:250.2,250.19 1 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:254.2,254.25 1 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:260.2,260.8 1 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:234.16,236.3 1 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:246.16,248.3 1 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:250.19,252.3 1 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:254.25,259.3 3 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:267.64,274.16 4 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:280.2,281.8 2 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:274.16,276.3 1 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:284.65,286.16 2 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:289.2,290.8 2 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:286.16,288.3 1 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:293.152,307.16 7 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:313.2,315.8 3 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:307.16,309.3 1 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:318.98,327.16 4 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:333.2,334.8 2 0 -github.com/ethereum/go-ethereum/p2p/natupnp.go:327.16,329.3 1 0 -github.com/ethereum/go-ethereum/p2p/network.go:57.55,62.2 1 0 -github.com/ethereum/go-ethereum/p2p/network.go:64.63,70.2 1 0 -github.com/ethereum/go-ethereum/p2p/network.go:72.71,73.26 1 0 -github.com/ethereum/go-ethereum/p2p/network.go:81.2,81.50 1 0 -github.com/ethereum/go-ethereum/p2p/network.go:73.26,75.23 2 0 -github.com/ethereum/go-ethereum/p2p/network.go:79.3,79.21 1 0 -github.com/ethereum/go-ethereum/p2p/network.go:75.23,78.4 2 0 -github.com/ethereum/go-ethereum/p2p/network.go:84.45,85.22 1 0 -github.com/ethereum/go-ethereum/p2p/network.go:99.2,99.8 1 0 -github.com/ethereum/go-ethereum/p2p/network.go:86.2,86.12 0 0 -github.com/ethereum/go-ethereum/p2p/network.go:87.2,89.18 2 0 -github.com/ethereum/go-ethereum/p2p/network.go:94.2,95.42 1 0 -github.com/ethereum/go-ethereum/p2p/network.go:96.2,97.57 1 0 -github.com/ethereum/go-ethereum/p2p/network.go:89.18,91.4 1 0 -github.com/ethereum/go-ethereum/p2p/network.go:91.5,93.4 1 0 -github.com/ethereum/go-ethereum/p2p/network.go:102.32,106.2 3 0 -github.com/ethereum/go-ethereum/p2p/network.go:108.63,110.16 2 0 -github.com/ethereum/go-ethereum/p2p/network.go:115.2,115.8 1 0 -github.com/ethereum/go-ethereum/p2p/network.go:110.16,112.3 1 0 -github.com/ethereum/go-ethereum/p2p/network.go:112.4,114.3 1 0 -github.com/ethereum/go-ethereum/p2p/network.go:118.46,122.6 3 0 -github.com/ethereum/go-ethereum/p2p/network.go:141.2,142.28 2 0 -github.com/ethereum/go-ethereum/p2p/network.go:122.6,123.10 1 0 -github.com/ethereum/go-ethereum/p2p/network.go:124.3,127.53 3 0 -github.com/ethereum/go-ethereum/p2p/network.go:130.3,131.30 1 0 -github.com/ethereum/go-ethereum/p2p/network.go:135.3,137.13 2 0 -github.com/ethereum/go-ethereum/p2p/network.go:127.53,129.5 1 0 -github.com/ethereum/go-ethereum/p2p/network.go:131.30,132.54 1 0 -github.com/ethereum/go-ethereum/p2p/network.go:132.54,133.6 0 0 -github.com/ethereum/go-ethereum/p2p/network.go:142.28,143.73 1 0 -github.com/ethereum/go-ethereum/p2p/network.go:143.73,145.4 1 0 -github.com/ethereum/go-ethereum/p2p/network.go:145.5,147.4 1 0 -github.com/ethereum/go-ethereum/p2p/network.go:151.74,153.16 2 0 -github.com/ethereum/go-ethereum/p2p/network.go:159.2,159.17 1 0 -github.com/ethereum/go-ethereum/p2p/network.go:153.16,158.3 1 0 -github.com/ethereum/go-ethereum/p2p/network.go:162.69,164.16 2 0 -github.com/ethereum/go-ethereum/p2p/network.go:169.2,169.17 1 0 -github.com/ethereum/go-ethereum/p2p/network.go:164.16,168.3 3 0 -github.com/ethereum/go-ethereum/p2p/network.go:172.65,173.39 1 0 -github.com/ethereum/go-ethereum/p2p/network.go:177.2,179.16 3 0 -github.com/ethereum/go-ethereum/p2p/network.go:183.2,183.19 1 0 -github.com/ethereum/go-ethereum/p2p/network.go:188.2,188.18 1 0 -github.com/ethereum/go-ethereum/p2p/network.go:195.2,195.8 1 0 -github.com/ethereum/go-ethereum/p2p/network.go:173.39,175.3 1 0 -github.com/ethereum/go-ethereum/p2p/network.go:179.16,182.3 2 0 -github.com/ethereum/go-ethereum/p2p/network.go:183.19,187.3 3 0 -github.com/ethereum/go-ethereum/p2p/network.go:188.18,192.3 2 0 -github.com/ethereum/go-ethereum/p2p/network.go:192.4,194.3 1 0 -github.com/ethereum/go-ethereum/p2p/peer.go:24.42,26.2 1 9 -github.com/ethereum/go-ethereum/p2p/peer.go:28.51,30.2 1 0 -github.com/ethereum/go-ethereum/p2p/peer.go:32.36,34.2 1 9 -github.com/ethereum/go-ethereum/p2p/peer.go:36.83,52.2 8 7 -github.com/ethereum/go-ethereum/p2p/peer.go:54.35,56.18 2 20 -github.com/ethereum/go-ethereum/p2p/peer.go:61.2,61.89 1 18 -github.com/ethereum/go-ethereum/p2p/peer.go:56.18,58.3 1 9 -github.com/ethereum/go-ethereum/p2p/peer.go:58.4,60.3 1 9 -github.com/ethereum/go-ethereum/p2p/peer.go:64.58,66.2 1 24 -github.com/ethereum/go-ethereum/p2p/peer.go:68.27,71.2 2 7 -github.com/ethereum/go-ethereum/p2p/peer.go:73.26,79.2 2 7 -github.com/ethereum/go-ethereum/p2p/peer.go:81.39,83.2 1 2 -github.com/ethereum/go-ethereum/p2p/peer_error_handler.go:25.153,33.2 1 8 -github.com/ethereum/go-ethereum/p2p/peer_error_handler.go:35.39,37.2 1 8 -github.com/ethereum/go-ethereum/p2p/peer_error_handler.go:39.38,43.2 3 8 -github.com/ethereum/go-ethereum/p2p/peer_error_handler.go:45.40,46.6 1 8 -github.com/ethereum/go-ethereum/p2p/peer_error_handler.go:46.6,47.10 1 19 -github.com/ethereum/go-ethereum/p2p/peer_error_handler.go:48.3,49.10 1 11 -github.com/ethereum/go-ethereum/p2p/peer_error_handler.go:55.3,57.10 2 8 -github.com/ethereum/go-ethereum/p2p/peer_error_handler.go:49.10,52.5 2 11 -github.com/ethereum/go-ethereum/p2p/peer_error_handler.go:52.6,54.5 1 0 -github.com/ethereum/go-ethereum/p2p/peer_error_handler.go:62.60,64.24 2 11 -github.com/ethereum/go-ethereum/p2p/peer_error_handler.go:83.2,83.40 1 11 -github.com/ethereum/go-ethereum/p2p/peer_error_handler.go:86.2,86.31 1 11 -github.com/ethereum/go-ethereum/p2p/peer_error_handler.go:65.2,66.35 1 0 -github.com/ethereum/go-ethereum/p2p/peer_error_handler.go:67.2,68.31 1 0 -github.com/ethereum/go-ethereum/p2p/peer_error_handler.go:69.2,70.27 1 0 -github.com/ethereum/go-ethereum/p2p/peer_error_handler.go:71.2,72.29 1 0 -github.com/ethereum/go-ethereum/p2p/peer_error_handler.go:73.2,74.27 1 0 -github.com/ethereum/go-ethereum/p2p/peer_error_handler.go:75.2,76.28 1 11 -github.com/ethereum/go-ethereum/p2p/peer_error_handler.go:77.2,78.32 1 0 -github.com/ethereum/go-ethereum/p2p/peer_error_handler.go:79.2,80.47 1 0 -github.com/ethereum/go-ethereum/p2p/peer_error_handler.go:83.40,85.3 1 0 -github.com/ethereum/go-ethereum/p2p/peer_error_handler.go:86.31,91.3 1 11 -github.com/ethereum/go-ethereum/p2p/peer_error_handler.go:94.69,95.24 1 0 -github.com/ethereum/go-ethereum/p2p/peer_error_handler.go:96.2,97.11 1 0 -github.com/ethereum/go-ethereum/p2p/peer_error_handler.go:98.2,99.11 1 0 -github.com/ethereum/go-ethereum/pow/ar/ops.go:11.13,21.2 9 1 -github.com/ethereum/go-ethereum/pow/ar/ops.go:23.34,25.2 1 899964 -github.com/ethereum/go-ethereum/pow/ar/ops.go:26.34,28.2 1 6 -github.com/ethereum/go-ethereum/pow/ar/ops.go:29.34,31.2 1 12 -github.com/ethereum/go-ethereum/pow/ar/ops.go:32.34,34.2 1 12 -github.com/ethereum/go-ethereum/pow/ar/ops.go:35.34,37.2 1 0 -github.com/ethereum/go-ethereum/pow/ar/ops.go:38.33,40.2 1 0 -github.com/ethereum/go-ethereum/pow/ar/ops.go:41.35,46.2 3 6 -github.com/ethereum/go-ethereum/pow/ar/ops.go:47.37,51.2 2 6 -github.com/ethereum/go-ethereum/pow/ar/ops.go:52.34,54.2 1 0 -github.com/ethereum/go-ethereum/pow/ar/pow.go:19.33,21.2 1 1 -github.com/ethereum/go-ethereum/pow/ar/pow.go:23.56,26.32 2 1 -github.com/ethereum/go-ethereum/pow/ar/pow.go:26.32,31.23 4 150000 -github.com/ethereum/go-ethereum/pow/ar/pow.go:37.3,38.49 2 150000 -github.com/ethereum/go-ethereum/pow/ar/pow.go:31.23,33.4 1 149979 -github.com/ethereum/go-ethereum/pow/ar/pow.go:33.5,35.4 1 21 -github.com/ethereum/go-ethereum/pow/ar/pow.go:42.69,44.32 2 6 -github.com/ethereum/go-ethereum/pow/ar/pow.go:48.2,48.30 1 6 -github.com/ethereum/go-ethereum/pow/ar/pow.go:55.2,56.34 2 6 -github.com/ethereum/go-ethereum/pow/ar/pow.go:74.2,74.18 1 6 -github.com/ethereum/go-ethereum/pow/ar/pow.go:44.32,46.3 1 60000 -github.com/ethereum/go-ethereum/pow/ar/pow.go:48.30,53.3 3 900000 -github.com/ethereum/go-ethereum/pow/ar/pow.go:56.34,58.10 2 9000 -github.com/ethereum/go-ethereum/pow/ar/pow.go:68.3,69.65 2 9000 -github.com/ethereum/go-ethereum/pow/ar/pow.go:58.10,59.29 1 9000 -github.com/ethereum/go-ethereum/pow/ar/pow.go:59.29,61.5 1 900000 -github.com/ethereum/go-ethereum/pow/ar/pow.go:62.5,63.29 1 0 -github.com/ethereum/go-ethereum/pow/ar/pow.go:63.29,65.5 1 0 -github.com/ethereum/go-ethereum/pow/ar/pow.go:69.65,71.4 1 0 -github.com/ethereum/go-ethereum/pow/ar/pow.go:77.53,94.2 12 0 -github.com/ethereum/go-ethereum/pow/ar/pow.go:96.45,104.6 6 1 -github.com/ethereum/go-ethereum/pow/ar/pow.go:104.6,105.54 1 6 -github.com/ethereum/go-ethereum/pow/ar/pow.go:110.3,116.51 5 6 -github.com/ethereum/go-ethereum/pow/ar/pow.go:105.54,108.4 2 1 -github.com/ethereum/go-ethereum/pow/ar/pow.go:116.51,118.4 1 1 -github.com/ethereum/go-ethereum/pow/ar/pow.go:118.5,120.4 1 5 -github.com/ethereum/go-ethereum/pow/ar/rnd.go:18.37,20.2 1 0 -github.com/ethereum/go-ethereum/pow/ar/rnd.go:22.35,23.31 1 510007 -github.com/ethereum/go-ethereum/pow/ar/rnd.go:36.2,36.12 1 0 -github.com/ethereum/go-ethereum/pow/ar/rnd.go:23.31,25.3 1 509988 -github.com/ethereum/go-ethereum/pow/ar/rnd.go:25.4,25.43 1 19 -github.com/ethereum/go-ethereum/pow/ar/rnd.go:25.43,27.3 1 13 -github.com/ethereum/go-ethereum/pow/ar/rnd.go:27.4,27.40 1 6 -github.com/ethereum/go-ethereum/pow/ar/rnd.go:27.40,29.23 2 6 -github.com/ethereum/go-ethereum/pow/ar/rnd.go:33.3,33.54 1 6 -github.com/ethereum/go-ethereum/pow/ar/rnd.go:29.23,31.4 1 60000 -github.com/ethereum/go-ethereum/pow/ar/rnd.go:48.26,50.2 1 7 -github.com/ethereum/go-ethereum/pow/ar/rnd.go:52.43,57.46 3 510021 -github.com/ethereum/go-ethereum/pow/ar/rnd.go:61.2,61.10 1 510021 -github.com/ethereum/go-ethereum/pow/ar/rnd.go:57.46,59.3 1 509988 -github.com/ethereum/go-ethereum/pow/ar/rnd.go:64.42,66.2 1 450021 -github.com/ethereum/go-ethereum/ptrie/hashnode.go:7.36,9.2 1 0 -github.com/ethereum/go-ethereum/ptrie/hashnode.go:11.45,13.2 1 0 -github.com/ethereum/go-ethereum/ptrie/hashnode.go:15.42,17.2 1 2 -github.com/ethereum/go-ethereum/ptrie/hashnode.go:20.36,20.50 1 0 -github.com/ethereum/go-ethereum/ptrie/hashnode.go:21.36,21.51 1 0 -github.com/ethereum/go-ethereum/ptrie/hashnode.go:22.36,22.51 1 0 -github.com/ethereum/go-ethereum/ptrie/node.go:17.51,17.78 1 0 -github.com/ethereum/go-ethereum/ptrie/node.go:18.51,18.78 1 0 -github.com/ethereum/go-ethereum/ptrie/node.go:19.51,19.78 1 2 -github.com/ethereum/go-ethereum/ptrie/node.go:20.51,20.91 1 81 -github.com/ethereum/go-ethereum/ptrie/node.go:21.51,21.90 1 18 -github.com/ethereum/go-ethereum/ptrie/node.go:24.50,26.34 2 12 -github.com/ethereum/go-ethereum/ptrie/node.go:34.2,34.42 1 12 -github.com/ethereum/go-ethereum/ptrie/node.go:26.34,27.18 1 204 -github.com/ethereum/go-ethereum/ptrie/node.go:27.18,29.4 1 95 -github.com/ethereum/go-ethereum/ptrie/node.go:29.5,31.4 1 109 -github.com/ethereum/go-ethereum/ptrie/node.go:38.51,40.2 1 49 -github.com/ethereum/go-ethereum/ptrie/shortnode.go:11.63,13.2 1 147 -github.com/ethereum/go-ethereum/ptrie/shortnode.go:14.37,18.2 2 85 -github.com/ethereum/go-ethereum/ptrie/shortnode.go:19.37,19.52 1 0 -github.com/ethereum/go-ethereum/ptrie/shortnode.go:20.37,20.52 1 0 -github.com/ethereum/go-ethereum/ptrie/shortnode.go:22.46,24.2 1 97 -github.com/ethereum/go-ethereum/ptrie/shortnode.go:25.43,27.2 1 76 -github.com/ethereum/go-ethereum/ptrie/shortnode.go:29.37,31.2 1 85 -github.com/ethereum/go-ethereum/ptrie/trie.go:19.42,21.2 1 7 -github.com/ethereum/go-ethereum/ptrie/trie.go:22.48,24.2 1 76 -github.com/ethereum/go-ethereum/ptrie/trie.go:33.23,35.2 1 6 -github.com/ethereum/go-ethereum/ptrie/trie.go:37.46,46.2 6 2 -github.com/ethereum/go-ethereum/ptrie/trie.go:49.33,49.55 1 0 -github.com/ethereum/go-ethereum/ptrie/trie.go:50.33,52.22 2 7 -github.com/ethereum/go-ethereum/ptrie/trie.go:63.2,65.13 2 7 -github.com/ethereum/go-ethereum/ptrie/trie.go:52.22,54.33 2 7 -github.com/ethereum/go-ethereum/ptrie/trie.go:54.33,56.4 1 7 -github.com/ethereum/go-ethereum/ptrie/trie.go:56.5,58.4 1 0 -github.com/ethereum/go-ethereum/ptrie/trie.go:59.4,61.3 1 0 -github.com/ethereum/go-ethereum/ptrie/trie.go:68.56,68.106 1 74 -github.com/ethereum/go-ethereum/ptrie/trie.go:69.50,75.21 4 74 -github.com/ethereum/go-ethereum/ptrie/trie.go:81.2,81.18 1 74 -github.com/ethereum/go-ethereum/ptrie/trie.go:75.21,77.3 1 70 -github.com/ethereum/go-ethereum/ptrie/trie.go:77.4,79.3 1 4 -github.com/ethereum/go-ethereum/ptrie/trie.go:84.48,84.80 1 4 -github.com/ethereum/go-ethereum/ptrie/trie.go:85.42,92.14 5 4 -github.com/ethereum/go-ethereum/ptrie/trie.go:96.2,96.12 1 1 -github.com/ethereum/go-ethereum/ptrie/trie.go:92.14,94.3 1 3 -github.com/ethereum/go-ethereum/ptrie/trie.go:99.49,99.84 1 0 -github.com/ethereum/go-ethereum/ptrie/trie.go:100.43,108.2 5 0 -github.com/ethereum/go-ethereum/ptrie/trie.go:110.66,111.19 1 298 -github.com/ethereum/go-ethereum/ptrie/trie.go:115.2,115.17 1 285 -github.com/ethereum/go-ethereum/ptrie/trie.go:119.2,119.29 1 206 -github.com/ethereum/go-ethereum/ptrie/trie.go:111.19,113.3 1 13 -github.com/ethereum/go-ethereum/ptrie/trie.go:115.17,117.3 1 79 -github.com/ethereum/go-ethereum/ptrie/trie.go:120.2,123.26 3 76 -github.com/ethereum/go-ethereum/ptrie/trie.go:127.3,129.28 3 76 -github.com/ethereum/go-ethereum/ptrie/trie.go:139.3,139.23 1 76 -github.com/ethereum/go-ethereum/ptrie/trie.go:143.3,143.50 1 63 -github.com/ethereum/go-ethereum/ptrie/trie.go:145.2,149.13 3 130 -github.com/ethereum/go-ethereum/ptrie/trie.go:151.2,152.24 1 0 -github.com/ethereum/go-ethereum/ptrie/trie.go:123.26,125.4 1 0 -github.com/ethereum/go-ethereum/ptrie/trie.go:129.28,131.4 1 54 -github.com/ethereum/go-ethereum/ptrie/trie.go:131.5,138.4 6 22 -github.com/ethereum/go-ethereum/ptrie/trie.go:139.23,141.4 1 13 -github.com/ethereum/go-ethereum/ptrie/trie.go:156.51,157.19 1 15 -github.com/ethereum/go-ethereum/ptrie/trie.go:161.2,161.17 1 12 -github.com/ethereum/go-ethereum/ptrie/trie.go:165.2,165.29 1 12 -github.com/ethereum/go-ethereum/ptrie/trie.go:157.19,159.3 1 3 -github.com/ethereum/go-ethereum/ptrie/trie.go:161.17,163.3 1 0 -github.com/ethereum/go-ethereum/ptrie/trie.go:166.2,170.57 3 5 -github.com/ethereum/go-ethereum/ptrie/trie.go:174.3,174.13 1 1 -github.com/ethereum/go-ethereum/ptrie/trie.go:175.2,176.45 1 7 -github.com/ethereum/go-ethereum/ptrie/trie.go:177.2,178.24 1 0 -github.com/ethereum/go-ethereum/ptrie/trie.go:170.57,172.4 1 4 -github.com/ethereum/go-ethereum/ptrie/trie.go:182.54,183.19 1 10 -github.com/ethereum/go-ethereum/ptrie/trie.go:187.2,187.29 1 10 -github.com/ethereum/go-ethereum/ptrie/trie.go:183.19,185.3 1 0 -github.com/ethereum/go-ethereum/ptrie/trie.go:188.2,191.26 3 4 -github.com/ethereum/go-ethereum/ptrie/trie.go:210.2,215.27 4 6 -github.com/ethereum/go-ethereum/ptrie/trie.go:225.3,226.16 2 6 -github.com/ethereum/go-ethereum/ptrie/trie.go:242.3,242.15 1 6 -github.com/ethereum/go-ethereum/ptrie/trie.go:244.2,245.24 1 0 -github.com/ethereum/go-ethereum/ptrie/trie.go:191.26,193.4 1 4 -github.com/ethereum/go-ethereum/ptrie/trie.go:193.5,193.42 1 0 -github.com/ethereum/go-ethereum/ptrie/trie.go:193.42,197.33 3 0 -github.com/ethereum/go-ethereum/ptrie/trie.go:205.4,205.12 1 0 -github.com/ethereum/go-ethereum/ptrie/trie.go:198.4,200.48 2 0 -github.com/ethereum/go-ethereum/ptrie/trie.go:201.4,202.44 1 0 -github.com/ethereum/go-ethereum/ptrie/trie.go:206.5,208.4 1 0 -github.com/ethereum/go-ethereum/ptrie/trie.go:215.27,216.29 1 102 -github.com/ethereum/go-ethereum/ptrie/trie.go:216.29,217.18 1 10 -github.com/ethereum/go-ethereum/ptrie/trie.go:217.18,219.6 1 6 -github.com/ethereum/go-ethereum/ptrie/trie.go:219.7,221.6 1 4 -github.com/ethereum/go-ethereum/ptrie/trie.go:226.16,228.4 1 0 -github.com/ethereum/go-ethereum/ptrie/trie.go:228.5,228.22 1 6 -github.com/ethereum/go-ethereum/ptrie/trie.go:228.22,230.33 2 2 -github.com/ethereum/go-ethereum/ptrie/trie.go:231.4,234.49 2 0 -github.com/ethereum/go-ethereum/ptrie/trie.go:235.4,236.68 1 2 -github.com/ethereum/go-ethereum/ptrie/trie.go:238.5,240.4 1 4 -github.com/ethereum/go-ethereum/ptrie/trie.go:250.53,252.11 2 95 -github.com/ethereum/go-ethereum/ptrie/trie.go:253.2,254.105 1 3 -github.com/ethereum/go-ethereum/ptrie/trie.go:255.2,257.26 2 5 -github.com/ethereum/go-ethereum/ptrie/trie.go:260.3,260.15 1 5 -github.com/ethereum/go-ethereum/ptrie/trie.go:261.2,262.34 1 25 -github.com/ethereum/go-ethereum/ptrie/trie.go:263.2,264.41 1 62 -github.com/ethereum/go-ethereum/ptrie/trie.go:257.26,259.4 1 85 -github.com/ethereum/go-ethereum/ptrie/trie.go:268.41,269.29 1 200 -github.com/ethereum/go-ethereum/ptrie/trie.go:270.2,272.28 2 5 -github.com/ethereum/go-ethereum/ptrie/trie.go:273.2,274.14 1 195 -github.com/ethereum/go-ethereum/ptrie/trie.go:278.48,280.21 2 103 -github.com/ethereum/go-ethereum/ptrie/trie.go:287.2,287.23 1 27 -github.com/ethereum/go-ethereum/ptrie/trie.go:280.21,285.3 3 76 -github.com/ethereum/go-ethereum/ptrie/valuenode.go:8.46,8.61 1 0 -github.com/ethereum/go-ethereum/ptrie/valuenode.go:9.46,9.66 1 3 -github.com/ethereum/go-ethereum/ptrie/valuenode.go:10.46,10.61 1 0 -github.com/ethereum/go-ethereum/ptrie/valuenode.go:11.46,11.61 1 0 -github.com/ethereum/go-ethereum/ptrie/valuenode.go:12.46,12.66 1 0 -github.com/ethereum/go-ethereum/ptrie/valuenode.go:13.46,13.66 1 135 -github.com/ethereum/go-ethereum/ptrie/fullnode.go:8.37,10.2 1 27 -github.com/ethereum/go-ethereum/ptrie/fullnode.go:12.36,12.51 1 0 -github.com/ethereum/go-ethereum/ptrie/fullnode.go:13.36,16.2 2 0 -github.com/ethereum/go-ethereum/ptrie/fullnode.go:18.35,18.50 1 136 -github.com/ethereum/go-ethereum/ptrie/fullnode.go:21.42,22.34 1 0 -github.com/ethereum/go-ethereum/ptrie/fullnode.go:28.2,28.8 1 0 -github.com/ethereum/go-ethereum/ptrie/fullnode.go:22.34,23.18 1 0 -github.com/ethereum/go-ethereum/ptrie/fullnode.go:23.18,25.4 1 0 -github.com/ethereum/go-ethereum/ptrie/fullnode.go:31.42,33.2 1 27 -github.com/ethereum/go-ethereum/ptrie/fullnode.go:35.45,37.34 2 33 -github.com/ethereum/go-ethereum/ptrie/fullnode.go:45.2,45.10 1 33 -github.com/ethereum/go-ethereum/ptrie/fullnode.go:37.34,38.18 1 561 -github.com/ethereum/go-ethereum/ptrie/fullnode.go:38.18,40.4 1 136 -github.com/ethereum/go-ethereum/ptrie/fullnode.go:40.5,42.4 1 425 -github.com/ethereum/go-ethereum/ptrie/fullnode.go:48.47,50.2 1 265 -github.com/ethereum/go-ethereum/ptrie/fullnode.go:52.40,53.31 1 249 -github.com/ethereum/go-ethereum/ptrie/fullnode.go:58.2,58.12 1 134 -github.com/ethereum/go-ethereum/ptrie/fullnode.go:53.31,57.3 2 115 -github.com/ethereum/go-ethereum/rlp/decode.go:69.50,71.2 1 73 -github.com/ethereum/go-ethereum/rlp/decode.go:73.47,75.9 2 2 -github.com/ethereum/go-ethereum/rlp/decode.go:76.2,77.19 1 1 -github.com/ethereum/go-ethereum/rlp/decode.go:78.2,79.20 1 1 -github.com/ethereum/go-ethereum/rlp/decode.go:80.2,81.23 1 0 -github.com/ethereum/go-ethereum/rlp/decode.go:85.52,87.16 2 36 -github.com/ethereum/go-ethereum/rlp/decode.go:90.2,91.12 2 31 -github.com/ethereum/go-ethereum/rlp/decode.go:87.16,89.3 1 5 -github.com/ethereum/go-ethereum/rlp/decode.go:94.53,96.16 2 24 -github.com/ethereum/go-ethereum/rlp/decode.go:99.2,100.12 2 16 -github.com/ethereum/go-ethereum/rlp/decode.go:96.16,98.3 1 8 -github.com/ethereum/go-ethereum/rlp/decode.go:103.55,105.16 2 7 -github.com/ethereum/go-ethereum/rlp/decode.go:108.2,109.12 2 5 -github.com/ethereum/go-ethereum/rlp/decode.go:105.16,107.3 1 2 -github.com/ethereum/go-ethereum/rlp/decode.go:112.60,114.2 1 1 -github.com/ethereum/go-ethereum/rlp/decode.go:116.55,118.16 2 4 -github.com/ethereum/go-ethereum/rlp/decode.go:121.2,122.14 2 3 -github.com/ethereum/go-ethereum/rlp/decode.go:126.2,127.12 2 3 -github.com/ethereum/go-ethereum/rlp/decode.go:118.16,120.3 1 1 -github.com/ethereum/go-ethereum/rlp/decode.go:122.14,125.3 2 2 -github.com/ethereum/go-ethereum/rlp/decode.go:132.57,134.89 2 8 -github.com/ethereum/go-ethereum/rlp/decode.go:141.2,142.16 2 5 -github.com/ethereum/go-ethereum/rlp/decode.go:145.2,146.33 2 5 -github.com/ethereum/go-ethereum/rlp/decode.go:149.2,149.50 1 5 -github.com/ethereum/go-ethereum/rlp/decode.go:152.2,152.17 1 5 -github.com/ethereum/go-ethereum/rlp/decode.go:134.89,135.34 1 3 -github.com/ethereum/go-ethereum/rlp/decode.go:135.34,137.4 1 2 -github.com/ethereum/go-ethereum/rlp/decode.go:137.5,139.4 1 1 -github.com/ethereum/go-ethereum/rlp/decode.go:142.16,144.3 1 0 -github.com/ethereum/go-ethereum/rlp/decode.go:146.33,148.3 1 2 -github.com/ethereum/go-ethereum/rlp/decode.go:149.50,151.3 1 9 -github.com/ethereum/go-ethereum/rlp/decode.go:161.83,163.16 2 20 -github.com/ethereum/go-ethereum/rlp/decode.go:166.2,166.15 1 20 -github.com/ethereum/go-ethereum/rlp/decode.go:175.2,176.6 2 14 -github.com/ethereum/go-ethereum/rlp/decode.go:203.2,203.19 1 11 -github.com/ethereum/go-ethereum/rlp/decode.go:211.2,211.20 1 11 -github.com/ethereum/go-ethereum/rlp/decode.go:163.16,165.3 1 0 -github.com/ethereum/go-ethereum/rlp/decode.go:166.15,167.34 1 6 -github.com/ethereum/go-ethereum/rlp/decode.go:172.3,172.21 1 6 -github.com/ethereum/go-ethereum/rlp/decode.go:167.34,169.4 1 3 -github.com/ethereum/go-ethereum/rlp/decode.go:169.5,171.4 1 3 -github.com/ethereum/go-ethereum/rlp/decode.go:176.6,177.18 1 49 -github.com/ethereum/go-ethereum/rlp/decode.go:180.3,180.34 1 48 -github.com/ethereum/go-ethereum/rlp/decode.go:196.3,196.50 1 48 -github.com/ethereum/go-ethereum/rlp/decode.go:201.3,201.6 1 35 -github.com/ethereum/go-ethereum/rlp/decode.go:177.18,179.4 1 1 -github.com/ethereum/go-ethereum/rlp/decode.go:180.34,182.22 1 23 -github.com/ethereum/go-ethereum/rlp/decode.go:191.4,191.22 1 23 -github.com/ethereum/go-ethereum/rlp/decode.go:182.22,184.19 2 9 -github.com/ethereum/go-ethereum/rlp/decode.go:187.5,189.18 3 9 -github.com/ethereum/go-ethereum/rlp/decode.go:184.19,186.6 1 7 -github.com/ethereum/go-ethereum/rlp/decode.go:191.22,193.5 1 23 -github.com/ethereum/go-ethereum/rlp/decode.go:196.50,197.9 1 11 -github.com/ethereum/go-ethereum/rlp/decode.go:198.5,198.24 1 37 -github.com/ethereum/go-ethereum/rlp/decode.go:198.24,200.4 1 2 -github.com/ethereum/go-ethereum/rlp/decode.go:203.19,204.34 1 9 -github.com/ethereum/go-ethereum/rlp/decode.go:204.34,207.4 1 3 -github.com/ethereum/go-ethereum/rlp/decode.go:207.5,209.4 1 6 -github.com/ethereum/go-ethereum/rlp/decode.go:214.58,216.16 2 8 -github.com/ethereum/go-ethereum/rlp/decode.go:219.2,219.18 1 7 -github.com/ethereum/go-ethereum/rlp/decode.go:222.2,223.16 2 4 -github.com/ethereum/go-ethereum/rlp/decode.go:226.2,226.12 1 4 -github.com/ethereum/go-ethereum/rlp/decode.go:216.16,218.3 1 1 -github.com/ethereum/go-ethereum/rlp/decode.go:219.18,221.3 1 3 -github.com/ethereum/go-ethereum/rlp/decode.go:223.16,225.3 1 4 -github.com/ethereum/go-ethereum/rlp/decode.go:231.58,233.16 2 18 -github.com/ethereum/go-ethereum/rlp/decode.go:236.2,236.14 1 18 -github.com/ethereum/go-ethereum/rlp/decode.go:256.2,256.12 1 8 -github.com/ethereum/go-ethereum/rlp/decode.go:233.16,235.3 1 0 -github.com/ethereum/go-ethereum/rlp/decode.go:237.2,238.21 1 3 -github.com/ethereum/go-ethereum/rlp/decode.go:241.3,243.15 3 2 -github.com/ethereum/go-ethereum/rlp/decode.go:244.2,245.31 1 9 -github.com/ethereum/go-ethereum/rlp/decode.go:248.3,249.43 2 7 -github.com/ethereum/go-ethereum/rlp/decode.go:252.3,252.23 1 6 -github.com/ethereum/go-ethereum/rlp/decode.go:253.2,254.51 1 6 -github.com/ethereum/go-ethereum/rlp/decode.go:238.21,240.4 1 1 -github.com/ethereum/go-ethereum/rlp/decode.go:245.31,247.4 1 2 -github.com/ethereum/go-ethereum/rlp/decode.go:249.43,251.4 1 1 -github.com/ethereum/go-ethereum/rlp/decode.go:259.41,261.37 2 14 -github.com/ethereum/go-ethereum/rlp/decode.go:261.37,263.3 1 35 -github.com/ethereum/go-ethereum/rlp/decode.go:271.59,273.38 2 4 -github.com/ethereum/go-ethereum/rlp/decode.go:282.2,282.56 1 4 -github.com/ethereum/go-ethereum/rlp/decode.go:300.2,300.17 1 4 -github.com/ethereum/go-ethereum/rlp/decode.go:273.38,274.41 1 11 -github.com/ethereum/go-ethereum/rlp/decode.go:274.41,276.18 2 10 -github.com/ethereum/go-ethereum/rlp/decode.go:279.4,279.43 1 10 -github.com/ethereum/go-ethereum/rlp/decode.go:276.18,278.5 1 0 -github.com/ethereum/go-ethereum/rlp/decode.go:282.56,283.36 1 9 -github.com/ethereum/go-ethereum/rlp/decode.go:286.3,286.28 1 9 -github.com/ethereum/go-ethereum/rlp/decode.go:295.3,295.44 1 9 -github.com/ethereum/go-ethereum/rlp/decode.go:298.3,298.13 1 9 -github.com/ethereum/go-ethereum/rlp/decode.go:283.36,285.4 1 0 -github.com/ethereum/go-ethereum/rlp/decode.go:286.28,288.18 2 19 -github.com/ethereum/go-ethereum/rlp/decode.go:288.18,290.10 1 3 -github.com/ethereum/go-ethereum/rlp/decode.go:291.6,291.25 1 16 -github.com/ethereum/go-ethereum/rlp/decode.go:291.25,293.5 1 0 -github.com/ethereum/go-ethereum/rlp/decode.go:295.44,297.4 1 1 -github.com/ethereum/go-ethereum/rlp/decode.go:303.56,306.16 3 5 -github.com/ethereum/go-ethereum/rlp/decode.go:309.2,309.56 1 5 -github.com/ethereum/go-ethereum/rlp/decode.go:324.2,324.17 1 5 -github.com/ethereum/go-ethereum/rlp/decode.go:306.16,308.3 1 0 -github.com/ethereum/go-ethereum/rlp/decode.go:309.56,311.48 2 13 -github.com/ethereum/go-ethereum/rlp/decode.go:315.3,316.18 2 8 -github.com/ethereum/go-ethereum/rlp/decode.go:319.3,319.60 1 8 -github.com/ethereum/go-ethereum/rlp/decode.go:322.3,322.13 1 8 -github.com/ethereum/go-ethereum/rlp/decode.go:311.48,314.4 2 5 -github.com/ethereum/go-ethereum/rlp/decode.go:316.18,318.4 1 8 -github.com/ethereum/go-ethereum/rlp/decode.go:319.60,321.4 1 8 -github.com/ethereum/go-ethereum/rlp/decode.go:329.58,331.16 2 9 -github.com/ethereum/go-ethereum/rlp/decode.go:334.2,334.18 1 8 -github.com/ethereum/go-ethereum/rlp/decode.go:347.2,347.12 1 8 -github.com/ethereum/go-ethereum/rlp/decode.go:331.16,333.3 1 1 -github.com/ethereum/go-ethereum/rlp/decode.go:334.18,336.71 2 2 -github.com/ethereum/go-ethereum/rlp/decode.go:339.3,339.17 1 2 -github.com/ethereum/go-ethereum/rlp/decode.go:336.71,338.4 1 0 -github.com/ethereum/go-ethereum/rlp/decode.go:340.4,342.17 2 6 -github.com/ethereum/go-ethereum/rlp/decode.go:345.3,345.30 1 6 -github.com/ethereum/go-ethereum/rlp/decode.go:342.17,344.4 1 0 -github.com/ethereum/go-ethereum/rlp/decode.go:352.61,354.2 1 5 -github.com/ethereum/go-ethereum/rlp/decode.go:356.56,361.46 1 2 -github.com/ethereum/go-ethereum/rlp/decode.go:364.2,364.47 1 2 -github.com/ethereum/go-ethereum/rlp/decode.go:361.46,363.3 1 2 -github.com/ethereum/go-ethereum/rlp/decode.go:376.31,377.11 1 1 -github.com/ethereum/go-ethereum/rlp/decode.go:378.2,379.16 1 0 -github.com/ethereum/go-ethereum/rlp/decode.go:380.2,381.18 1 0 -github.com/ethereum/go-ethereum/rlp/decode.go:382.2,383.16 1 1 -github.com/ethereum/go-ethereum/rlp/decode.go:384.2,385.39 1 0 -github.com/ethereum/go-ethereum/rlp/decode.go:435.38,437.2 1 109 -github.com/ethereum/go-ethereum/rlp/decode.go:442.42,444.16 2 25 -github.com/ethereum/go-ethereum/rlp/decode.go:447.2,447.14 1 23 -github.com/ethereum/go-ethereum/rlp/decode.go:444.16,446.3 1 2 -github.com/ethereum/go-ethereum/rlp/decode.go:448.2,450.32 2 8 -github.com/ethereum/go-ethereum/rlp/decode.go:451.2,453.38 2 12 -github.com/ethereum/go-ethereum/rlp/decode.go:456.3,456.16 1 11 -github.com/ethereum/go-ethereum/rlp/decode.go:457.2,458.32 1 3 -github.com/ethereum/go-ethereum/rlp/decode.go:453.38,455.4 1 1 -github.com/ethereum/go-ethereum/rlp/decode.go:465.41,467.2 1 31 -github.com/ethereum/go-ethereum/rlp/decode.go:469.52,471.16 2 91 -github.com/ethereum/go-ethereum/rlp/decode.go:474.2,474.14 1 75 -github.com/ethereum/go-ethereum/rlp/decode.go:471.16,473.3 1 16 -github.com/ethereum/go-ethereum/rlp/decode.go:475.2,477.32 2 62 -github.com/ethereum/go-ethereum/rlp/decode.go:478.2,479.31 1 11 -github.com/ethereum/go-ethereum/rlp/decode.go:482.3,482.32 1 7 -github.com/ethereum/go-ethereum/rlp/decode.go:483.2,484.30 1 2 -github.com/ethereum/go-ethereum/rlp/decode.go:479.31,481.4 1 4 -github.com/ethereum/go-ethereum/rlp/decode.go:491.50,493.16 2 40 -github.com/ethereum/go-ethereum/rlp/decode.go:496.2,496.18 1 39 -github.com/ethereum/go-ethereum/rlp/decode.go:499.2,502.18 4 37 -github.com/ethereum/go-ethereum/rlp/decode.go:493.16,495.3 1 1 -github.com/ethereum/go-ethereum/rlp/decode.go:496.18,498.3 1 2 -github.com/ethereum/go-ethereum/rlp/decode.go:507.34,508.23 1 31 -github.com/ethereum/go-ethereum/rlp/decode.go:511.2,512.25 2 30 -github.com/ethereum/go-ethereum/rlp/decode.go:515.2,516.22 2 28 -github.com/ethereum/go-ethereum/rlp/decode.go:519.2,521.12 3 28 -github.com/ethereum/go-ethereum/rlp/decode.go:508.23,510.3 1 1 -github.com/ethereum/go-ethereum/rlp/decode.go:512.25,514.3 1 2 -github.com/ethereum/go-ethereum/rlp/decode.go:516.22,518.3 1 3 -github.com/ethereum/go-ethereum/rlp/decode.go:527.48,528.16 1 73 -github.com/ethereum/go-ethereum/rlp/decode.go:531.2,533.32 3 72 -github.com/ethereum/go-ethereum/rlp/decode.go:536.2,536.18 1 71 -github.com/ethereum/go-ethereum/rlp/decode.go:539.2,540.16 2 70 -github.com/ethereum/go-ethereum/rlp/decode.go:543.2,543.37 1 69 -github.com/ethereum/go-ethereum/rlp/decode.go:528.16,530.3 1 1 -github.com/ethereum/go-ethereum/rlp/decode.go:533.32,535.3 1 1 -github.com/ethereum/go-ethereum/rlp/decode.go:536.18,538.3 1 1 -github.com/ethereum/go-ethereum/rlp/decode.go:540.16,542.3 1 1 -github.com/ethereum/go-ethereum/rlp/decode.go:557.61,559.22 2 224 -github.com/ethereum/go-ethereum/rlp/decode.go:562.2,562.16 1 224 -github.com/ethereum/go-ethereum/rlp/decode.go:572.2,572.45 1 201 -github.com/ethereum/go-ethereum/rlp/decode.go:575.2,575.28 1 200 -github.com/ethereum/go-ethereum/rlp/decode.go:559.22,561.3 1 94 -github.com/ethereum/go-ethereum/rlp/decode.go:562.16,563.40 1 192 -github.com/ethereum/go-ethereum/rlp/decode.go:566.3,567.17 2 175 -github.com/ethereum/go-ethereum/rlp/decode.go:570.3,570.30 1 169 -github.com/ethereum/go-ethereum/rlp/decode.go:563.40,565.4 1 17 -github.com/ethereum/go-ethereum/rlp/decode.go:567.17,569.4 1 6 -github.com/ethereum/go-ethereum/rlp/decode.go:572.45,574.3 1 1 -github.com/ethereum/go-ethereum/rlp/decode.go:578.65,580.16 2 175 -github.com/ethereum/go-ethereum/rlp/decode.go:583.2,584.9 2 170 -github.com/ethereum/go-ethereum/rlp/decode.go:580.16,582.3 1 5 -github.com/ethereum/go-ethereum/rlp/decode.go:585.2,589.22 2 76 -github.com/ethereum/go-ethereum/rlp/decode.go:590.2,595.39 1 37 -github.com/ethereum/go-ethereum/rlp/decode.go:596.2,604.27 2 6 -github.com/ethereum/go-ethereum/rlp/decode.go:605.2,611.37 1 47 -github.com/ethereum/go-ethereum/rlp/decode.go:612.2,620.25 2 4 -github.com/ethereum/go-ethereum/rlp/decode.go:624.54,625.15 1 17 -github.com/ethereum/go-ethereum/rlp/decode.go:632.2,633.29 2 11 -github.com/ethereum/go-ethereum/rlp/decode.go:636.2,637.48 2 11 -github.com/ethereum/go-ethereum/rlp/decode.go:625.15,627.20 2 6 -github.com/ethereum/go-ethereum/rlp/decode.go:630.3,630.24 1 6 -github.com/ethereum/go-ethereum/rlp/decode.go:627.20,629.4 1 1 -github.com/ethereum/go-ethereum/rlp/decode.go:633.29,635.3 1 44 -github.com/ethereum/go-ethereum/rlp/decode.go:640.51,643.33 3 30 -github.com/ethereum/go-ethereum/rlp/decode.go:647.2,647.19 1 30 -github.com/ethereum/go-ethereum/rlp/decode.go:650.2,650.12 1 30 -github.com/ethereum/go-ethereum/rlp/decode.go:643.33,646.3 2 27 -github.com/ethereum/go-ethereum/rlp/decode.go:647.19,649.3 1 3 -github.com/ethereum/go-ethereum/rlp/decode.go:653.43,656.39 3 181 -github.com/ethereum/go-ethereum/rlp/decode.go:659.2,659.15 1 181 -github.com/ethereum/go-ethereum/rlp/decode.go:656.39,658.3 1 1 -github.com/ethereum/go-ethereum/rlp/decode.go:662.37,664.22 2 211 -github.com/ethereum/go-ethereum/rlp/decode.go:664.22,666.3 1 76 -github.com/ethereum/go-ethereum/rlp/typecache.go:21.58,25.17 4 70 -github.com/ethereum/go-ethereum/rlp/typecache.go:29.2,31.29 3 21 -github.com/ethereum/go-ethereum/rlp/typecache.go:25.17,27.3 1 49 -github.com/ethereum/go-ethereum/rlp/typecache.go:34.59,36.17 2 41 -github.com/ethereum/go-ethereum/rlp/typecache.go:43.2,45.16 3 27 -github.com/ethereum/go-ethereum/rlp/typecache.go:50.2,51.28 2 26 -github.com/ethereum/go-ethereum/rlp/typecache.go:36.17,39.3 1 14 -github.com/ethereum/go-ethereum/rlp/typecache.go:45.16,49.3 2 1 -github.com/ethereum/go-ethereum/rlp/typecache.go:59.64,62.9 3 27 -github.com/ethereum/go-ethereum/rlp/typecache.go:86.2,86.18 1 27 -github.com/ethereum/go-ethereum/rlp/typecache.go:63.2,64.31 1 1 -github.com/ethereum/go-ethereum/rlp/typecache.go:65.2,66.36 1 2 -github.com/ethereum/go-ethereum/rlp/typecache.go:67.2,68.30 1 1 -github.com/ethereum/go-ethereum/rlp/typecache.go:69.2,70.35 1 1 -github.com/ethereum/go-ethereum/rlp/typecache.go:71.2,72.37 1 2 -github.com/ethereum/go-ethereum/rlp/typecache.go:73.2,74.30 1 1 -github.com/ethereum/go-ethereum/rlp/typecache.go:75.2,76.43 1 8 -github.com/ethereum/go-ethereum/rlp/typecache.go:77.2,78.45 1 4 -github.com/ethereum/go-ethereum/rlp/typecache.go:79.2,80.42 1 5 -github.com/ethereum/go-ethereum/rlp/typecache.go:81.2,82.33 1 1 -github.com/ethereum/go-ethereum/rlp/typecache.go:83.2,84.64 1 1 -github.com/ethereum/go-ethereum/rlp/typecache.go:89.37,91.2 1 22 -github.com/ethereum/go-ethereum/state/dump.go:23.34,29.70 2 1 -github.com/ethereum/go-ethereum/state/dump.go:42.2,43.16 2 1 -github.com/ethereum/go-ethereum/state/dump.go:47.2,47.13 1 1 -github.com/ethereum/go-ethereum/state/dump.go:29.70,35.66 4 0 -github.com/ethereum/go-ethereum/state/dump.go:39.3,39.59 1 0 -github.com/ethereum/go-ethereum/state/dump.go:35.66,38.4 2 0 -github.com/ethereum/go-ethereum/state/dump.go:43.16,45.3 1 0 -github.com/ethereum/go-ethereum/state/dump.go:51.48,53.59 2 0 -github.com/ethereum/go-ethereum/state/dump.go:53.59,55.3 1 0 -github.com/ethereum/go-ethereum/state/errors.go:13.36,17.2 2 0 -github.com/ethereum/go-ethereum/state/errors.go:18.40,20.2 1 0 -github.com/ethereum/go-ethereum/state/errors.go:21.51,23.2 1 0 -github.com/ethereum/go-ethereum/state/log.go:16.51,23.16 3 0 -github.com/ethereum/go-ethereum/state/log.go:27.2,27.12 1 0 -github.com/ethereum/go-ethereum/state/log.go:23.16,25.3 1 0 -github.com/ethereum/go-ethereum/state/log.go:30.40,32.2 1 0 -github.com/ethereum/go-ethereum/state/log.go:34.34,36.2 1 0 -github.com/ethereum/go-ethereum/state/log.go:40.40,42.27 2 0 -github.com/ethereum/go-ethereum/state/log.go:46.2,46.13 1 0 -github.com/ethereum/go-ethereum/state/log.go:42.27,44.3 1 0 -github.com/ethereum/go-ethereum/state/log.go:49.34,51.27 2 0 -github.com/ethereum/go-ethereum/state/log.go:54.2,54.47 1 0 -github.com/ethereum/go-ethereum/state/log.go:51.27,53.3 1 0 -github.com/ethereum/go-ethereum/state/manifest.go:16.30,21.2 3 6 -github.com/ethereum/go-ethereum/state/manifest.go:23.28,25.2 1 6 -github.com/ethereum/go-ethereum/state/manifest.go:27.57,31.2 2 0 -github.com/ethereum/go-ethereum/state/manifest.go:49.52,51.2 1 0 -github.com/ethereum/go-ethereum/state/manifest.go:53.38,55.2 1 0 -github.com/ethereum/go-ethereum/state/state.go:32.34,34.2 1 6 -github.com/ethereum/go-ethereum/state/state.go:36.32,38.2 1 0 -github.com/ethereum/go-ethereum/state/state.go:40.37,42.2 1 0 -github.com/ethereum/go-ethereum/state/state.go:44.32,46.2 1 0 -github.com/ethereum/go-ethereum/state/state.go:49.53,51.24 2 0 -github.com/ethereum/go-ethereum/state/state.go:55.2,55.21 1 0 -github.com/ethereum/go-ethereum/state/state.go:51.24,53.3 1 0 -github.com/ethereum/go-ethereum/state/state.go:58.61,61.38 2 0 -github.com/ethereum/go-ethereum/state/state.go:65.2,65.66 1 0 -github.com/ethereum/go-ethereum/state/state.go:61.38,63.3 1 0 -github.com/ethereum/go-ethereum/state/state.go:68.61,70.24 2 0 -github.com/ethereum/go-ethereum/state/state.go:70.24,72.3 1 0 -github.com/ethereum/go-ethereum/state/state.go:75.49,77.24 2 0 -github.com/ethereum/go-ethereum/state/state.go:81.2,81.10 1 0 -github.com/ethereum/go-ethereum/state/state.go:77.24,79.3 1 0 -github.com/ethereum/go-ethereum/state/state.go:84.56,86.24 2 0 -github.com/ethereum/go-ethereum/state/state.go:86.24,88.3 1 0 -github.com/ethereum/go-ethereum/state/state.go:91.48,93.24 2 0 -github.com/ethereum/go-ethereum/state/state.go:97.2,97.12 1 0 -github.com/ethereum/go-ethereum/state/state.go:93.24,95.3 1 0 -github.com/ethereum/go-ethereum/state/state.go:100.49,102.24 2 0 -github.com/ethereum/go-ethereum/state/state.go:106.2,106.12 1 0 -github.com/ethereum/go-ethereum/state/state.go:102.24,104.3 1 0 -github.com/ethereum/go-ethereum/state/state.go:109.66,111.24 2 0 -github.com/ethereum/go-ethereum/state/state.go:111.24,113.3 1 0 -github.com/ethereum/go-ethereum/state/state.go:116.45,118.24 2 0 -github.com/ethereum/go-ethereum/state/state.go:124.2,124.14 1 0 -github.com/ethereum/go-ethereum/state/state.go:118.24,122.3 2 0 -github.com/ethereum/go-ethereum/state/state.go:132.64,135.37 2 0 -github.com/ethereum/go-ethereum/state/state.go:139.2,139.65 1 0 -github.com/ethereum/go-ethereum/state/state.go:135.37,137.3 1 0 -github.com/ethereum/go-ethereum/state/state.go:143.64,147.2 2 0 -github.com/ethereum/go-ethereum/state/state.go:150.61,154.24 3 3 -github.com/ethereum/go-ethereum/state/state.go:158.2,159.20 2 1 -github.com/ethereum/go-ethereum/state/state.go:163.2,166.20 3 0 -github.com/ethereum/go-ethereum/state/state.go:154.24,156.3 1 2 -github.com/ethereum/go-ethereum/state/state.go:159.20,161.3 1 1 -github.com/ethereum/go-ethereum/state/state.go:169.56,171.2 1 0 -github.com/ethereum/go-ethereum/state/state.go:174.66,176.24 2 1 -github.com/ethereum/go-ethereum/state/state.go:180.2,180.20 1 1 -github.com/ethereum/go-ethereum/state/state.go:176.24,178.3 1 1 -github.com/ethereum/go-ethereum/state/state.go:184.61,193.2 5 1 -github.com/ethereum/go-ethereum/state/state.go:196.57,198.2 1 0 -github.com/ethereum/go-ethereum/state/state.go:204.40,206.2 1 0 -github.com/ethereum/go-ethereum/state/state.go:208.34,209.22 1 2 -github.com/ethereum/go-ethereum/state/state.go:226.2,226.12 1 0 -github.com/ethereum/go-ethereum/state/state.go:209.22,211.49 2 2 -github.com/ethereum/go-ethereum/state/state.go:215.3,215.41 1 2 -github.com/ethereum/go-ethereum/state/state.go:219.3,223.15 4 2 -github.com/ethereum/go-ethereum/state/state.go:211.49,213.4 1 1 -github.com/ethereum/go-ethereum/state/state.go:215.41,217.4 1 0 -github.com/ethereum/go-ethereum/state/state.go:229.38,230.18 1 1 -github.com/ethereum/go-ethereum/state/state.go:234.2,237.24 4 1 -github.com/ethereum/go-ethereum/state/state.go:230.18,232.3 1 0 -github.com/ethereum/go-ethereum/state/state.go:240.31,242.2 1 0 -github.com/ethereum/go-ethereum/state/state.go:245.25,249.45 2 0 -github.com/ethereum/go-ethereum/state/state.go:258.2,258.11 1 0 -github.com/ethereum/go-ethereum/state/state.go:249.45,250.31 1 0 -github.com/ethereum/go-ethereum/state/state.go:255.3,255.22 1 0 -github.com/ethereum/go-ethereum/state/state.go:250.31,251.12 1 0 -github.com/ethereum/go-ethereum/state/state.go:262.24,264.45 1 0 -github.com/ethereum/go-ethereum/state/state.go:272.2,274.11 2 0 -github.com/ethereum/go-ethereum/state/state.go:264.45,265.31 1 0 -github.com/ethereum/go-ethereum/state/state.go:269.3,269.27 1 0 -github.com/ethereum/go-ethereum/state/state.go:265.31,266.12 1 0 -github.com/ethereum/go-ethereum/state/state.go:277.28,280.2 2 0 -github.com/ethereum/go-ethereum/state/state.go:282.29,286.40 2 0 -github.com/ethereum/go-ethereum/state/state.go:290.2,290.48 1 0 -github.com/ethereum/go-ethereum/state/state.go:302.2,302.13 1 0 -github.com/ethereum/go-ethereum/state/state.go:286.40,288.3 1 0 -github.com/ethereum/go-ethereum/state/state.go:290.48,291.25 1 0 -github.com/ethereum/go-ethereum/state/state.go:291.25,294.4 2 0 -github.com/ethereum/go-ethereum/state/state.go:294.5,298.4 2 0 -github.com/ethereum/go-ethereum/state/state.go:302.13,304.13 2 0 -github.com/ethereum/go-ethereum/state/state.go:304.13,308.4 2 0 -github.com/ethereum/go-ethereum/state/state.go:312.41,314.2 1 0 -github.com/ethereum/go-ethereum/state/state.go:317.42,318.48 1 0 -github.com/ethereum/go-ethereum/state/state.go:318.48,320.3 1 0 -github.com/ethereum/go-ethereum/state/state_object.go:14.34,16.2 1 0 -github.com/ethereum/go-ethereum/state/state_object.go:20.36,22.31 2 1 -github.com/ethereum/go-ethereum/state/state_object.go:27.2,27.12 1 1 -github.com/ethereum/go-ethereum/state/state_object.go:22.31,25.3 1 1 -github.com/ethereum/go-ethereum/state/state_object.go:55.34,58.2 2 0 -github.com/ethereum/go-ethereum/state/state_object.go:60.47,70.2 6 2 -github.com/ethereum/go-ethereum/state/state_object.go:72.78,78.2 4 0 -github.com/ethereum/go-ethereum/state/state_object.go:80.65,85.2 3 0 -github.com/ethereum/go-ethereum/state/state_object.go:87.44,90.2 2 0 -github.com/ethereum/go-ethereum/state/state_object.go:92.59,94.2 1 0 -github.com/ethereum/go-ethereum/state/state_object.go:96.63,98.2 1 0 -github.com/ethereum/go-ethereum/state/state_object.go:100.66,102.2 1 1 -github.com/ethereum/go-ethereum/state/state_object.go:103.73,105.2 1 2 -github.com/ethereum/go-ethereum/state/state_object.go:107.62,109.2 1 0 -github.com/ethereum/go-ethereum/state/state_object.go:111.60,115.18 3 1 -github.com/ethereum/go-ethereum/state/state_object.go:123.2,123.14 1 1 -github.com/ethereum/go-ethereum/state/state_object.go:115.18,118.21 2 0 -github.com/ethereum/go-ethereum/state/state_object.go:118.21,120.4 1 0 -github.com/ethereum/go-ethereum/state/state_object.go:126.67,129.2 2 2 -github.com/ethereum/go-ethereum/state/state_object.go:132.60,134.39 1 0 -github.com/ethereum/go-ethereum/state/state_object.go:140.2,141.49 2 0 -github.com/ethereum/go-ethereum/state/state_object.go:134.39,138.3 2 0 -github.com/ethereum/go-ethereum/state/state_object.go:141.49,143.31 1 0 -github.com/ethereum/go-ethereum/state/state_object.go:143.31,145.4 1 0 -github.com/ethereum/go-ethereum/state/state_object.go:149.33,150.39 1 0 -github.com/ethereum/go-ethereum/state/state_object.go:161.2,162.12 2 0 -github.com/ethereum/go-ethereum/state/state_object.go:150.39,151.23 1 0 -github.com/ethereum/go-ethereum/state/state_object.go:158.3,158.35 1 0 -github.com/ethereum/go-ethereum/state/state_object.go:151.23,155.12 2 0 -github.com/ethereum/go-ethereum/state/state_object.go:162.12,166.3 2 0 -github.com/ethereum/go-ethereum/state/state_object.go:169.60,170.39 1 0 -github.com/ethereum/go-ethereum/state/state_object.go:174.2,174.62 1 0 -github.com/ethereum/go-ethereum/state/state_object.go:170.39,172.3 1 0 -github.com/ethereum/go-ethereum/state/state_object.go:177.51,181.2 2 0 -github.com/ethereum/go-ethereum/state/state_object.go:182.50,182.74 1 0 -github.com/ethereum/go-ethereum/state/state_object.go:184.51,188.2 2 0 -github.com/ethereum/go-ethereum/state/state_object.go:189.50,189.74 1 0 -github.com/ethereum/go-ethereum/state/state_object.go:191.51,193.2 1 0 -github.com/ethereum/go-ethereum/state/state_object.go:195.45,195.68 1 0 -github.com/ethereum/go-ethereum/state/state_object.go:202.54,202.56 0 0 -github.com/ethereum/go-ethereum/state/state_object.go:203.61,205.30 2 0 -github.com/ethereum/go-ethereum/state/state_object.go:209.2,211.12 2 0 -github.com/ethereum/go-ethereum/state/state_object.go:205.30,207.3 1 0 -github.com/ethereum/go-ethereum/state/state_object.go:214.56,218.2 2 0 -github.com/ethereum/go-ethereum/state/state_object.go:220.60,221.31 1 0 -github.com/ethereum/go-ethereum/state/state_object.go:225.2,230.12 4 0 -github.com/ethereum/go-ethereum/state/state_object.go:221.31,223.3 1 0 -github.com/ethereum/go-ethereum/state/state_object.go:233.57,240.2 4 0 -github.com/ethereum/go-ethereum/state/state_object.go:242.46,247.23 5 1 -github.com/ethereum/go-ethereum/state/state_object.go:250.2,256.20 6 1 -github.com/ethereum/go-ethereum/state/state_object.go:247.23,249.3 1 1 -github.com/ethereum/go-ethereum/state/state_object.go:259.56,261.2 1 0 -github.com/ethereum/go-ethereum/state/state_object.go:267.36,269.2 1 0 -github.com/ethereum/go-ethereum/state/state_object.go:272.40,274.2 1 1 -github.com/ethereum/go-ethereum/state/state_object.go:277.35,279.2 1 0 -github.com/ethereum/go-ethereum/state/state_object.go:282.48,284.2 1 0 -github.com/ethereum/go-ethereum/state/state_object.go:286.40,288.2 1 0 -github.com/ethereum/go-ethereum/state/state_object.go:295.42,297.2 1 0 -github.com/ethereum/go-ethereum/state/state_object.go:299.48,301.2 1 0 -github.com/ethereum/go-ethereum/state/state_object.go:303.46,315.2 8 0 -github.com/ethereum/go-ethereum/trie/encoding.go:9.44,11.37 2 17 -github.com/ethereum/go-ethereum/trie/encoding.go:15.2,15.21 1 17 -github.com/ethereum/go-ethereum/trie/encoding.go:19.2,21.17 3 17 -github.com/ethereum/go-ethereum/trie/encoding.go:27.2,28.40 2 17 -github.com/ethereum/go-ethereum/trie/encoding.go:32.2,32.22 1 17 -github.com/ethereum/go-ethereum/trie/encoding.go:11.37,13.3 1 9 -github.com/ethereum/go-ethereum/trie/encoding.go:15.21,17.3 1 9 -github.com/ethereum/go-ethereum/trie/encoding.go:21.17,23.3 1 9 -github.com/ethereum/go-ethereum/trie/encoding.go:23.4,25.3 1 8 -github.com/ethereum/go-ethereum/trie/encoding.go:28.40,30.3 1 46 -github.com/ethereum/go-ethereum/trie/encoding.go:35.39,38.18 3 12 -github.com/ethereum/go-ethereum/trie/encoding.go:41.2,41.20 1 12 -github.com/ethereum/go-ethereum/trie/encoding.go:47.2,47.13 1 12 -github.com/ethereum/go-ethereum/trie/encoding.go:38.18,40.3 1 7 -github.com/ethereum/go-ethereum/trie/encoding.go:41.20,43.3 1 6 -github.com/ethereum/go-ethereum/trie/encoding.go:43.4,45.3 1 6 -github.com/ethereum/go-ethereum/trie/encoding.go:50.42,55.24 4 21 -github.com/ethereum/go-ethereum/trie/encoding.go:58.2,60.17 2 21 -github.com/ethereum/go-ethereum/trie/encoding.go:55.24,57.3 1 152 -github.com/ethereum/go-ethereum/trie/encoding.go:63.39,67.24 3 0 -github.com/ethereum/go-ethereum/trie/encoding.go:73.2,75.20 2 0 -github.com/ethereum/go-ethereum/trie/encoding.go:67.24,68.13 1 0 -github.com/ethereum/go-ethereum/trie/encoding.go:68.13,70.4 1 0 -github.com/ethereum/go-ethereum/trie/iterator.go:18.44,19.21 1 0 -github.com/ethereum/go-ethereum/trie/iterator.go:23.2,23.21 1 0 -github.com/ethereum/go-ethereum/trie/iterator.go:32.2,32.19 1 0 -github.com/ethereum/go-ethereum/trie/iterator.go:19.21,21.3 1 0 -github.com/ethereum/go-ethereum/trie/iterator.go:23.21,25.17 2 0 -github.com/ethereum/go-ethereum/trie/iterator.go:29.3,29.17 1 0 -github.com/ethereum/go-ethereum/trie/iterator.go:25.17,27.4 1 0 -github.com/ethereum/go-ethereum/trie/iterator.go:43.40,45.2 1 0 -github.com/ethereum/go-ethereum/trie/iterator.go:47.70,48.23 1 0 -github.com/ethereum/go-ethereum/trie/iterator.go:73.2,73.12 1 0 -github.com/ethereum/go-ethereum/trie/iterator.go:49.2,55.11 4 0 -github.com/ethereum/go-ethereum/trie/iterator.go:56.2,57.29 1 0 -github.com/ethereum/go-ethereum/trie/iterator.go:61.3,61.33 1 0 -github.com/ethereum/go-ethereum/trie/iterator.go:67.2,70.79 2 0 -github.com/ethereum/go-ethereum/trie/iterator.go:57.29,59.4 1 0 -github.com/ethereum/go-ethereum/trie/iterator.go:61.33,63.16 2 0 -github.com/ethereum/go-ethereum/trie/iterator.go:63.16,65.5 1 0 -github.com/ethereum/go-ethereum/trie/iterator.go:76.83,77.35 1 0 -github.com/ethereum/go-ethereum/trie/iterator.go:129.2,129.12 1 0 -github.com/ethereum/go-ethereum/trie/iterator.go:78.2,79.13 1 0 -github.com/ethereum/go-ethereum/trie/iterator.go:80.2,81.19 1 0 -github.com/ethereum/go-ethereum/trie/iterator.go:90.3,91.19 2 0 -github.com/ethereum/go-ethereum/trie/iterator.go:95.3,95.27 1 0 -github.com/ethereum/go-ethereum/trie/iterator.go:102.2,104.22 2 0 -github.com/ethereum/go-ethereum/trie/iterator.go:81.19,85.16 3 0 -github.com/ethereum/go-ethereum/trie/iterator.go:85.16,87.5 1 0 -github.com/ethereum/go-ethereum/trie/iterator.go:91.19,93.4 1 0 -github.com/ethereum/go-ethereum/trie/iterator.go:95.27,98.16 3 0 -github.com/ethereum/go-ethereum/trie/iterator.go:98.16,100.5 1 0 -github.com/ethereum/go-ethereum/trie/iterator.go:104.22,105.49 1 0 -github.com/ethereum/go-ethereum/trie/iterator.go:105.49,110.5 3 0 -github.com/ethereum/go-ethereum/trie/iterator.go:111.5,115.26 4 0 -github.com/ethereum/go-ethereum/trie/iterator.go:123.4,123.18 1 0 -github.com/ethereum/go-ethereum/trie/iterator.go:115.26,117.5 1 0 -github.com/ethereum/go-ethereum/trie/iterator.go:117.6,117.49 1 0 -github.com/ethereum/go-ethereum/trie/iterator.go:117.49,119.5 1 0 -github.com/ethereum/go-ethereum/trie/iterator.go:119.6,121.5 1 0 -github.com/ethereum/go-ethereum/trie/iterator.go:123.18,125.5 1 0 -github.com/ethereum/go-ethereum/trie/iterator.go:133.47,143.2 6 0 -github.com/ethereum/go-ethereum/trie/slice.go:9.39,10.22 1 0 -github.com/ethereum/go-ethereum/trie/slice.go:13.2,13.22 1 0 -github.com/ethereum/go-ethereum/trie/slice.go:18.2,18.13 1 0 -github.com/ethereum/go-ethereum/trie/slice.go:10.22,12.3 1 0 -github.com/ethereum/go-ethereum/trie/slice.go:13.22,14.16 1 0 -github.com/ethereum/go-ethereum/trie/slice.go:14.16,16.4 1 0 -github.com/ethereum/go-ethereum/trie/slice.go:22.44,25.17 2 6 -github.com/ethereum/go-ethereum/trie/slice.go:32.2,32.10 1 6 -github.com/ethereum/go-ethereum/trie/slice.go:25.17,26.19 1 11 -github.com/ethereum/go-ethereum/trie/slice.go:29.3,29.6 1 7 -github.com/ethereum/go-ethereum/trie/slice.go:26.19,27.9 1 4 -github.com/ethereum/go-ethereum/trie/slice.go:35.29,37.2 1 0 -github.com/ethereum/go-ethereum/trie/slice.go:39.31,40.16 1 0 -github.com/ethereum/go-ethereum/trie/slice.go:44.2,44.10 1 0 -github.com/ethereum/go-ethereum/trie/slice.go:40.16,42.3 1 0 -github.com/ethereum/go-ethereum/trie/slice.go:47.35,48.21 1 0 -github.com/ethereum/go-ethereum/trie/slice.go:52.2,52.35 1 0 -github.com/ethereum/go-ethereum/trie/slice.go:48.21,50.3 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:12.44,15.59 2 0 -github.com/ethereum/go-ethereum/trie/trie.go:19.2,19.59 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:15.59,17.3 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:22.27,24.2 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:41.64,43.2 1 16 -github.com/ethereum/go-ethereum/trie/trie.go:45.29,47.2 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:55.43,57.2 1 1 -github.com/ethereum/go-ethereum/trie/trie.go:59.69,63.29 3 26 -github.com/ethereum/go-ethereum/trie/trie.go:72.2,72.10 1 10 -github.com/ethereum/go-ethereum/trie/trie.go:63.29,70.3 4 16 -github.com/ethereum/go-ethereum/trie/trie.go:75.52,77.2 1 25 -github.com/ethereum/go-ethereum/trie/trie.go:79.52,81.37 1 13 -github.com/ethereum/go-ethereum/trie/trie.go:86.2,90.15 3 0 -github.com/ethereum/go-ethereum/trie/trie.go:97.2,99.14 2 0 -github.com/ethereum/go-ethereum/trie/trie.go:81.37,83.3 1 13 -github.com/ethereum/go-ethereum/trie/trie.go:90.15,91.31 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:91.31,94.4 2 0 -github.com/ethereum/go-ethereum/trie/trie.go:102.40,106.2 2 0 -github.com/ethereum/go-ethereum/trie/trie.go:108.30,110.20 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:114.2,114.37 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:120.2,124.28 2 0 -github.com/ethereum/go-ethereum/trie/trie.go:110.20,112.3 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:114.37,115.17 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:115.17,118.4 2 0 -github.com/ethereum/go-ethereum/trie/trie.go:124.28,126.3 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:129.28,130.37 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:135.2,135.23 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:130.37,131.17 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:131.17,133.4 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:152.45,154.32 2 2 -github.com/ethereum/go-ethereum/trie/trie.go:160.2,160.21 1 2 -github.com/ethereum/go-ethereum/trie/trie.go:154.32,156.3 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:156.4,158.3 1 2 -github.com/ethereum/go-ethereum/trie/trie.go:163.55,172.2 5 1 -github.com/ethereum/go-ethereum/trie/trie.go:174.45,175.26 1 9 -github.com/ethereum/go-ethereum/trie/trie.go:176.2,182.24 1 1 -github.com/ethereum/go-ethereum/trie/trie.go:183.2,184.19 1 7 -github.com/ethereum/go-ethereum/trie/trie.go:185.2,186.46 1 1 -github.com/ethereum/go-ethereum/trie/trie.go:194.42,201.17 5 8 -github.com/ethereum/go-ethereum/trie/trie.go:206.2,206.17 1 8 -github.com/ethereum/go-ethereum/trie/trie.go:201.17,203.3 1 6 -github.com/ethereum/go-ethereum/trie/trie.go:203.4,205.3 1 2 -github.com/ethereum/go-ethereum/trie/trie.go:209.39,217.2 5 0 -github.com/ethereum/go-ethereum/trie/trie.go:219.35,227.2 5 0 -github.com/ethereum/go-ethereum/trie/trie.go:229.36,230.31 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:231.2,232.14 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:235.3,235.19 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:236.2,237.18 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:241.3,241.11 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:242.2,243.72 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:232.14,234.4 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:237.18,239.4 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:248.37,250.2 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:253.29,255.39 2 0 -github.com/ethereum/go-ethereum/trie/trie.go:259.2,259.13 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:255.39,257.3 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:263.23,266.2 2 0 -github.com/ethereum/go-ethereum/trie/trie.go:268.23,271.2 2 0 -github.com/ethereum/go-ethereum/trie/trie.go:273.31,275.2 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:277.67,280.48 2 0 -github.com/ethereum/go-ethereum/trie/trie.go:284.2,287.17 3 0 -github.com/ethereum/go-ethereum/trie/trie.go:304.2,304.28 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:280.48,282.3 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:287.17,289.3 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:289.4,289.24 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:289.24,294.57 3 0 -github.com/ethereum/go-ethereum/trie/trie.go:294.57,296.4 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:296.5,298.4 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:299.4,299.25 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:299.25,301.3 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:307.57,310.23 2 18 -github.com/ethereum/go-ethereum/trie/trie.go:314.2,315.19 2 13 -github.com/ethereum/go-ethereum/trie/trie.go:321.2,323.13 2 13 -github.com/ethereum/go-ethereum/trie/trie.go:310.23,312.3 1 5 -github.com/ethereum/go-ethereum/trie/trie.go:315.19,317.3 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:317.4,317.26 1 13 -github.com/ethereum/go-ethereum/trie/trie.go:317.26,319.3 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:326.84,328.2 1 6 -github.com/ethereum/go-ethereum/trie/trie.go:330.50,333.2 1 25 -github.com/ethereum/go-ethereum/trie/trie.go:335.44,337.25 2 13 -github.com/ethereum/go-ethereum/trie/trie.go:340.2,340.14 1 13 -github.com/ethereum/go-ethereum/trie/trie.go:337.25,339.3 1 221 -github.com/ethereum/go-ethereum/trie/trie.go:343.89,344.19 1 22 -github.com/ethereum/go-ethereum/trie/trie.go:349.2,350.33 2 19 -github.com/ethereum/go-ethereum/trie/trie.go:356.2,358.28 2 12 -github.com/ethereum/go-ethereum/trie/trie.go:412.2,412.25 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:344.19,346.3 1 3 -github.com/ethereum/go-ethereum/trie/trie.go:350.33,354.3 2 7 -github.com/ethereum/go-ethereum/trie/trie.go:358.28,365.26 3 6 -github.com/ethereum/go-ethereum/trie/trie.go:370.3,372.31 3 6 -github.com/ethereum/go-ethereum/trie/trie.go:388.3,388.26 1 6 -github.com/ethereum/go-ethereum/trie/trie.go:365.26,368.4 2 0 -github.com/ethereum/go-ethereum/trie/trie.go:372.31,375.4 1 2 -github.com/ethereum/go-ethereum/trie/trie.go:375.5,386.4 6 4 -github.com/ethereum/go-ethereum/trie/trie.go:388.26,391.4 1 1 -github.com/ethereum/go-ethereum/trie/trie.go:391.5,394.4 2 5 -github.com/ethereum/go-ethereum/trie/trie.go:395.4,400.27 2 6 -github.com/ethereum/go-ethereum/trie/trie.go:407.3,409.24 2 6 -github.com/ethereum/go-ethereum/trie/trie.go:400.27,402.18 2 102 -github.com/ethereum/go-ethereum/trie/trie.go:402.18,404.5 1 102 -github.com/ethereum/go-ethereum/trie/trie.go:415.70,416.19 1 5 -github.com/ethereum/go-ethereum/trie/trie.go:421.2,423.33 2 5 -github.com/ethereum/go-ethereum/trie/trie.go:430.2,432.28 2 5 -github.com/ethereum/go-ethereum/trie/trie.go:502.2,502.28 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:416.19,418.3 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:423.33,428.3 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:432.28,438.26 3 2 -github.com/ethereum/go-ethereum/trie/trie.go:438.26,442.4 1 2 -github.com/ethereum/go-ethereum/trie/trie.go:442.5,442.42 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:442.42,447.24 4 0 -github.com/ethereum/go-ethereum/trie/trie.go:456.4,456.25 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:447.24,450.5 2 0 -github.com/ethereum/go-ethereum/trie/trie.go:450.6,452.5 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:457.5,459.4 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:460.4,465.27 3 3 -github.com/ethereum/go-ethereum/trie/trie.go:472.3,474.27 3 3 -github.com/ethereum/go-ethereum/trie/trie.go:483.3,483.19 1 3 -github.com/ethereum/go-ethereum/trie/trie.go:499.3,499.24 1 3 -github.com/ethereum/go-ethereum/trie/trie.go:465.27,467.18 2 51 -github.com/ethereum/go-ethereum/trie/trie.go:467.18,469.5 1 51 -github.com/ethereum/go-ethereum/trie/trie.go:474.27,475.18 1 51 -github.com/ethereum/go-ethereum/trie/trie.go:475.18,476.21 1 5 -github.com/ethereum/go-ethereum/trie/trie.go:476.21,478.6 1 3 -github.com/ethereum/go-ethereum/trie/trie.go:478.7,480.6 1 2 -github.com/ethereum/go-ethereum/trie/trie.go:483.19,485.4 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:485.5,485.25 1 3 -github.com/ethereum/go-ethereum/trie/trie.go:485.25,487.25 2 1 -github.com/ethereum/go-ethereum/trie/trie.go:487.25,489.5 1 1 -github.com/ethereum/go-ethereum/trie/trie.go:489.6,489.31 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:489.31,492.5 2 0 -github.com/ethereum/go-ethereum/trie/trie.go:494.5,496.4 1 2 -github.com/ethereum/go-ethereum/trie/trie.go:516.44,518.2 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:520.40,522.2 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:526.62,527.28 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:527.28,530.37 2 0 -github.com/ethereum/go-ethereum/trie/trie.go:530.37,532.4 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:532.5,533.25 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:533.25,535.5 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:535.6,538.5 2 0 -github.com/ethereum/go-ethereum/trie/trie.go:540.4,541.42 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:541.42,542.48 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:542.48,544.5 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:544.6,545.39 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:545.39,547.6 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:547.7,549.19 2 0 -github.com/ethereum/go-ethereum/trie/trie.go:549.19,552.7 2 0 -github.com/ethereum/go-ethereum/trie/trie.go:559.46,562.2 2 0 -github.com/ethereum/go-ethereum/trie/trie.go:564.44,565.24 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:569.2,571.16 2 0 -github.com/ethereum/go-ethereum/trie/trie.go:565.24,567.3 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:574.37,576.27 2 0 -github.com/ethereum/go-ethereum/trie/trie.go:579.2,579.23 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:576.27,578.3 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:582.38,584.2 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:586.40,588.2 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:592.47,594.2 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:596.77,598.2 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:600.94,601.28 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:601.28,605.70 3 0 -github.com/ethereum/go-ethereum/trie/trie.go:605.70,607.4 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:607.5,608.25 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:608.25,610.5 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:610.6,612.5 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:614.4,615.42 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:615.42,617.48 2 0 -github.com/ethereum/go-ethereum/trie/trie.go:617.48,619.5 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:619.6,620.72 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:620.72,622.6 1 0 -github.com/ethereum/go-ethereum/trie/trie.go:622.7,624.19 2 0 -github.com/ethereum/go-ethereum/trie/trie.go:624.19,626.7 1 0 -github.com/ethereum/go-ethereum/vm/stack.go:25.24,27.2 1 4 -github.com/ethereum/go-ethereum/vm/stack.go:29.36,31.2 1 0 -github.com/ethereum/go-ethereum/vm/stack.go:33.28,35.2 1 141 -github.com/ethereum/go-ethereum/vm/stack.go:37.33,44.2 4 42 -github.com/ethereum/go-ethereum/vm/stack.go:46.46,53.2 4 20 -github.com/ethereum/go-ethereum/vm/stack.go:55.34,59.2 2 16 -github.com/ethereum/go-ethereum/vm/stack.go:61.47,65.2 2 0 -github.com/ethereum/go-ethereum/vm/stack.go:67.52,71.2 2 0 -github.com/ethereum/go-ethereum/vm/stack.go:73.39,77.2 2 0 -github.com/ethereum/go-ethereum/vm/stack.go:79.35,81.2 1 84 -github.com/ethereum/go-ethereum/vm/stack.go:83.50,86.29 2 0 -github.com/ethereum/go-ethereum/vm/stack.go:91.2,91.12 1 0 -github.com/ethereum/go-ethereum/vm/stack.go:86.29,89.3 2 0 -github.com/ethereum/go-ethereum/vm/stack.go:94.26,96.22 2 0 -github.com/ethereum/go-ethereum/vm/stack.go:103.2,103.30 1 0 -github.com/ethereum/go-ethereum/vm/stack.go:96.22,97.31 1 0 -github.com/ethereum/go-ethereum/vm/stack.go:97.31,99.4 1 0 -github.com/ethereum/go-ethereum/vm/stack.go:100.4,102.3 1 0 -github.com/ethereum/go-ethereum/vm/stack.go:110.26,112.2 1 3 -github.com/ethereum/go-ethereum/vm/stack.go:114.56,115.20 1 2 -github.com/ethereum/go-ethereum/vm/stack.go:115.20,118.24 3 2 -github.com/ethereum/go-ethereum/vm/stack.go:128.3,128.43 1 2 -github.com/ethereum/go-ethereum/vm/stack.go:118.24,121.16 2 2 -github.com/ethereum/go-ethereum/vm/stack.go:121.16,126.5 2 2 -github.com/ethereum/go-ethereum/vm/stack.go:132.38,133.28 1 28 -github.com/ethereum/go-ethereum/vm/stack.go:133.28,135.3 1 8 -github.com/ethereum/go-ethereum/vm/stack.go:138.49,139.32 1 4 -github.com/ethereum/go-ethereum/vm/stack.go:145.2,145.12 1 0 -github.com/ethereum/go-ethereum/vm/stack.go:139.32,143.3 2 4 -github.com/ethereum/go-ethereum/vm/stack.go:148.59,149.35 1 0 -github.com/ethereum/go-ethereum/vm/stack.go:157.2,157.8 1 0 -github.com/ethereum/go-ethereum/vm/stack.go:149.35,155.3 4 0 -github.com/ethereum/go-ethereum/vm/stack.go:160.28,162.2 1 139 -github.com/ethereum/go-ethereum/vm/stack.go:164.32,166.2 1 0 -github.com/ethereum/go-ethereum/vm/stack.go:168.26,170.22 2 0 -github.com/ethereum/go-ethereum/vm/stack.go:179.2,179.37 1 0 -github.com/ethereum/go-ethereum/vm/stack.go:170.22,172.45 2 0 -github.com/ethereum/go-ethereum/vm/stack.go:172.45,175.4 2 0 -github.com/ethereum/go-ethereum/vm/stack.go:176.4,178.3 1 0 -github.com/ethereum/go-ethereum/vm/address.go:19.55,21.2 1 2 -github.com/ethereum/go-ethereum/vm/address.go:29.35,31.2 1 1 -github.com/ethereum/go-ethereum/vm/address.go:33.38,35.2 1 1 -github.com/ethereum/go-ethereum/vm/address.go:37.38,39.15 1 0 -github.com/ethereum/go-ethereum/vm/address.go:41.2,41.29 1 0 -github.com/ethereum/go-ethereum/vm/address.go:39.15,39.28 1 0 -github.com/ethereum/go-ethereum/vm/execution.go:19.103,21.2 1 2 -github.com/ethereum/go-ethereum/vm/execution.go:23.38,25.2 1 0 -github.com/ethereum/go-ethereum/vm/execution.go:27.81,32.2 2 2 -github.com/ethereum/go-ethereum/vm/execution.go:34.92,39.15 4 2 -github.com/ethereum/go-ethereum/vm/execution.go:46.2,56.24 3 2 -github.com/ethereum/go-ethereum/vm/execution.go:60.2,60.16 1 2 -github.com/ethereum/go-ethereum/vm/execution.go:90.2,90.8 1 2 -github.com/ethereum/go-ethereum/vm/execution.go:39.15,40.39 1 2 -github.com/ethereum/go-ethereum/vm/execution.go:43.3,43.57 1 2 -github.com/ethereum/go-ethereum/vm/execution.go:40.39,42.4 1 0 -github.com/ethereum/go-ethereum/vm/execution.go:56.24,58.3 1 2 -github.com/ethereum/go-ethereum/vm/execution.go:60.16,64.3 2 0 -github.com/ethereum/go-ethereum/vm/execution.go:64.4,68.40 3 2 -github.com/ethereum/go-ethereum/vm/execution.go:68.40,69.32 1 2 -github.com/ethereum/go-ethereum/vm/execution.go:69.32,72.5 2 2 -github.com/ethereum/go-ethereum/vm/execution.go:73.5,78.39 3 0 -github.com/ethereum/go-ethereum/vm/execution.go:85.4,86.20 2 0 -github.com/ethereum/go-ethereum/vm/execution.go:78.39,82.5 2 0 -github.com/ethereum/go-ethereum/vm/execution.go:93.74,95.2 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:20.52,21.13 1 4 -github.com/ethereum/go-ethereum/vm/vm.go:22.2,23.25 1 3 -github.com/ethereum/go-ethereum/vm/vm.go:24.2,25.23 1 1 -github.com/ethereum/go-ethereum/vm/vm.go:29.70,33.15 2 1 -github.com/ethereum/go-ethereum/vm/vm.go:41.2,41.28 1 1 -github.com/ethereum/go-ethereum/vm/vm.go:45.2,52.25 1 1 -github.com/ethereum/go-ethereum/vm/vm.go:59.2,59.6 1 1 -github.com/ethereum/go-ethereum/vm/vm.go:33.15,34.31 1 1 -github.com/ethereum/go-ethereum/vm/vm.go:34.31,37.4 2 1 -github.com/ethereum/go-ethereum/vm/vm.go:41.28,43.3 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:52.25,53.23 1 15 -github.com/ethereum/go-ethereum/vm/vm.go:53.23,55.5 1 1 -github.com/ethereum/go-ethereum/vm/vm.go:59.6,68.44 5 22 -github.com/ethereum/go-ethereum/vm/vm.go:72.3,75.13 3 22 -github.com/ethereum/go-ethereum/vm/vm.go:144.3,144.39 1 22 -github.com/ethereum/go-ethereum/vm/vm.go:158.3,158.27 1 22 -github.com/ethereum/go-ethereum/vm/vm.go:166.3,168.13 2 22 -github.com/ethereum/go-ethereum/vm/vm.go:707.3,707.7 1 21 -github.com/ethereum/go-ethereum/vm/vm.go:68.44,70.4 1 24 -github.com/ethereum/go-ethereum/vm/vm.go:76.3,77.25 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:78.3,79.25 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:80.3,81.21 1 3 -github.com/ethereum/go-ethereum/vm/vm.go:82.3,86.65 4 0 -github.com/ethereum/go-ethereum/vm/vm.go:93.4,93.43 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:94.3,95.23 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:96.3,98.52 2 0 -github.com/ethereum/go-ethereum/vm/vm.go:99.3,102.52 2 0 -github.com/ethereum/go-ethereum/vm/vm.go:103.3,105.51 2 4 -github.com/ethereum/go-ethereum/vm/vm.go:106.3,109.69 2 0 -github.com/ethereum/go-ethereum/vm/vm.go:110.3,115.69 3 0 -github.com/ethereum/go-ethereum/vm/vm.go:116.3,119.69 2 0 -github.com/ethereum/go-ethereum/vm/vm.go:120.3,123.69 2 0 -github.com/ethereum/go-ethereum/vm/vm.go:124.3,127.82 2 0 -github.com/ethereum/go-ethereum/vm/vm.go:128.3,136.37 6 0 -github.com/ethereum/go-ethereum/vm/vm.go:137.3,141.82 3 0 -github.com/ethereum/go-ethereum/vm/vm.go:86.65,88.5 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:88.6,88.73 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:88.73,90.5 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:90.6,92.5 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:144.39,149.50 4 4 -github.com/ethereum/go-ethereum/vm/vm.go:149.50,155.5 4 2 -github.com/ethereum/go-ethereum/vm/vm.go:158.27,164.4 3 0 -github.com/ethereum/go-ethereum/vm/vm.go:170.3,179.20 5 3 -github.com/ethereum/go-ethereum/vm/vm.go:180.3,189.20 5 0 -github.com/ethereum/go-ethereum/vm/vm.go:190.3,199.20 5 0 -github.com/ethereum/go-ethereum/vm/vm.go:200.3,204.32 3 0 -github.com/ethereum/go-ethereum/vm/vm.go:208.4,211.20 2 0 -github.com/ethereum/go-ethereum/vm/vm.go:212.3,216.32 3 0 -github.com/ethereum/go-ethereum/vm/vm.go:231.4,231.20 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:232.3,240.20 5 0 -github.com/ethereum/go-ethereum/vm/vm.go:241.3,245.32 3 0 -github.com/ethereum/go-ethereum/vm/vm.go:260.4,260.20 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:262.3,270.20 5 1 -github.com/ethereum/go-ethereum/vm/vm.go:271.3,277.20 4 0 -github.com/ethereum/go-ethereum/vm/vm.go:278.3,282.20 3 0 -github.com/ethereum/go-ethereum/vm/vm.go:287.3,292.20 3 0 -github.com/ethereum/go-ethereum/vm/vm.go:298.3,302.26 3 0 -github.com/ethereum/go-ethereum/vm/vm.go:307.3,312.20 3 0 -github.com/ethereum/go-ethereum/vm/vm.go:318.3,323.21 3 0 -github.com/ethereum/go-ethereum/vm/vm.go:328.3,331.35 3 0 -github.com/ethereum/go-ethereum/vm/vm.go:338.3,342.30 3 0 -github.com/ethereum/go-ethereum/vm/vm.go:343.3,347.29 3 0 -github.com/ethereum/go-ethereum/vm/vm.go:348.3,352.30 3 0 -github.com/ethereum/go-ethereum/vm/vm.go:353.3,356.85 3 0 -github.com/ethereum/go-ethereum/vm/vm.go:363.3,375.20 8 0 -github.com/ethereum/go-ethereum/vm/vm.go:376.3,388.20 8 0 -github.com/ethereum/go-ethereum/vm/vm.go:391.3,396.34 4 0 -github.com/ethereum/go-ethereum/vm/vm.go:399.3,400.47 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:402.3,408.23 4 0 -github.com/ethereum/go-ethereum/vm/vm.go:410.3,413.36 2 0 -github.com/ethereum/go-ethereum/vm/vm.go:415.3,417.36 2 0 -github.com/ethereum/go-ethereum/vm/vm.go:419.3,422.21 2 0 -github.com/ethereum/go-ethereum/vm/vm.go:424.3,432.32 3 0 -github.com/ethereum/go-ethereum/vm/vm.go:439.4,439.34 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:440.3,442.29 2 0 -github.com/ethereum/go-ethereum/vm/vm.go:444.3,452.19 2 0 -github.com/ethereum/go-ethereum/vm/vm.go:459.4,461.26 2 0 -github.com/ethereum/go-ethereum/vm/vm.go:462.3,464.25 2 0 -github.com/ethereum/go-ethereum/vm/vm.go:472.4,473.17 2 0 -github.com/ethereum/go-ethereum/vm/vm.go:475.3,477.25 2 0 -github.com/ethereum/go-ethereum/vm/vm.go:485.4,492.19 2 0 -github.com/ethereum/go-ethereum/vm/vm.go:499.4,501.30 2 0 -github.com/ethereum/go-ethereum/vm/vm.go:502.3,503.29 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:506.3,509.38 2 0 -github.com/ethereum/go-ethereum/vm/vm.go:511.3,514.38 2 0 -github.com/ethereum/go-ethereum/vm/vm.go:516.3,519.32 2 0 -github.com/ethereum/go-ethereum/vm/vm.go:521.3,524.22 2 0 -github.com/ethereum/go-ethereum/vm/vm.go:526.3,529.26 2 0 -github.com/ethereum/go-ethereum/vm/vm.go:531.3,533.29 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:536.3,544.36 5 11 -github.com/ethereum/go-ethereum/vm/vm.go:545.3,547.15 2 0 -github.com/ethereum/go-ethereum/vm/vm.go:548.3,550.17 2 0 -github.com/ethereum/go-ethereum/vm/vm.go:551.3,553.18 2 0 -github.com/ethereum/go-ethereum/vm/vm.go:555.3,559.19 4 0 -github.com/ethereum/go-ethereum/vm/vm.go:561.3,565.61 3 0 -github.com/ethereum/go-ethereum/vm/vm.go:567.3,572.53 4 4 -github.com/ethereum/go-ethereum/vm/vm.go:574.3,579.28 4 3 -github.com/ethereum/go-ethereum/vm/vm.go:581.3,586.49 4 0 -github.com/ethereum/go-ethereum/vm/vm.go:588.3,593.12 3 0 -github.com/ethereum/go-ethereum/vm/vm.go:594.3,597.38 3 0 -github.com/ethereum/go-ethereum/vm/vm.go:606.3,606.17 0 0 -github.com/ethereum/go-ethereum/vm/vm.go:607.3,608.31 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:609.3,610.44 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:611.3,612.27 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:614.3,637.18 8 0 -github.com/ethereum/go-ethereum/vm/vm.go:649.3,664.22 8 0 -github.com/ethereum/go-ethereum/vm/vm.go:670.4,672.18 3 0 -github.com/ethereum/go-ethereum/vm/vm.go:680.3,685.35 4 0 -github.com/ethereum/go-ethereum/vm/vm.go:686.3,695.15 5 0 -github.com/ethereum/go-ethereum/vm/vm.go:696.3,698.35 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:699.3,704.67 2 0 -github.com/ethereum/go-ethereum/vm/vm.go:204.32,206.5 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:216.32,218.5 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:218.6,220.53 2 0 -github.com/ethereum/go-ethereum/vm/vm.go:226.5,228.15 2 0 -github.com/ethereum/go-ethereum/vm/vm.go:220.53,222.6 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:222.7,224.6 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:245.32,247.5 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:247.6,249.32 2 0 -github.com/ethereum/go-ethereum/vm/vm.go:255.5,257.15 2 0 -github.com/ethereum/go-ethereum/vm/vm.go:249.32,251.6 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:251.7,253.6 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:282.20,284.5 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:284.6,286.5 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:292.20,294.5 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:294.6,296.5 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:302.26,304.5 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:304.6,306.5 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:312.20,314.5 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:314.6,316.5 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:323.21,325.5 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:325.6,327.5 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:331.35,333.5 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:333.6,335.5 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:356.85,360.5 2 0 -github.com/ethereum/go-ethereum/vm/vm.go:360.6,362.5 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:432.32,437.5 3 0 -github.com/ethereum/go-ethereum/vm/vm.go:452.19,455.5 2 0 -github.com/ethereum/go-ethereum/vm/vm.go:455.6,455.28 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:455.28,457.5 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:464.25,468.5 2 0 -github.com/ethereum/go-ethereum/vm/vm.go:468.6,470.5 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:477.25,481.5 2 0 -github.com/ethereum/go-ethereum/vm/vm.go:481.6,483.5 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:492.19,495.5 2 0 -github.com/ethereum/go-ethereum/vm/vm.go:495.6,495.28 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:495.28,497.5 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:597.38,600.43 2 0 -github.com/ethereum/go-ethereum/vm/vm.go:604.5,604.13 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:600.43,602.6 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:637.18,643.5 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:643.6,647.5 2 0 -github.com/ethereum/go-ethereum/vm/vm.go:664.22,666.5 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:666.6,668.5 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:672.18,674.5 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:674.6,678.5 2 0 -github.com/ethereum/go-ethereum/vm/vm.go:711.35,713.2 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:715.29,717.2 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:719.72,719.87 1 0 -github.com/ethereum/go-ethereum/vm/vm.go:720.72,720.87 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:32.43,34.25 2 3 -github.com/ethereum/go-ethereum/vm/vm_debug.go:38.2,38.57 1 3 -github.com/ethereum/go-ethereum/vm/vm_debug.go:34.25,36.3 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:41.75,44.22 2 3 -github.com/ethereum/go-ethereum/vm/vm_debug.go:60.2,70.30 1 3 -github.com/ethereum/go-ethereum/vm/vm_debug.go:100.2,100.21 1 3 -github.com/ethereum/go-ethereum/vm/vm_debug.go:105.2,105.28 1 3 -github.com/ethereum/go-ethereum/vm/vm_debug.go:109.2,111.6 2 3 -github.com/ethereum/go-ethereum/vm/vm_debug.go:44.22,46.16 1 3 -github.com/ethereum/go-ethereum/vm/vm_debug.go:46.16,47.32 1 3 -github.com/ethereum/go-ethereum/vm/vm_debug.go:47.32,56.5 4 1 -github.com/ethereum/go-ethereum/vm/vm_debug.go:70.30,71.23 1 33 -github.com/ethereum/go-ethereum/vm/vm_debug.go:71.23,73.5 1 1 -github.com/ethereum/go-ethereum/vm/vm_debug.go:76.34,81.14 3 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:95.4,95.15 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:81.14,83.5 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:83.6,85.64 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:91.5,91.12 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:85.64,87.6 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:87.7,87.43 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:87.43,89.6 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:100.21,102.3 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:105.28,107.3 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:111.6,122.30 5 80 -github.com/ethereum/go-ethereum/vm/vm_debug.go:139.3,140.44 2 80 -github.com/ethereum/go-ethereum/vm/vm_debug.go:146.3,150.13 3 80 -github.com/ethereum/go-ethereum/vm/vm_debug.go:253.3,253.39 1 79 -github.com/ethereum/go-ethereum/vm/vm_debug.go:270.3,273.27 3 79 -github.com/ethereum/go-ethereum/vm/vm_debug.go:283.3,283.13 1 79 -github.com/ethereum/go-ethereum/vm/vm_debug.go:917.3,921.22 3 77 -github.com/ethereum/go-ethereum/vm/vm_debug.go:122.30,123.14 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:131.4,132.19 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:136.4,136.92 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:124.4,125.98 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:125.98,128.6 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:132.19,134.5 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:140.44,141.37 1 88 -github.com/ethereum/go-ethereum/vm/vm_debug.go:141.37,143.5 1 88 -github.com/ethereum/go-ethereum/vm/vm_debug.go:152.3,153.14 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:154.3,155.14 1 10 -github.com/ethereum/go-ethereum/vm/vm_debug.go:156.3,157.14 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:158.3,160.14 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:161.3,163.14 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:164.3,171.52 6 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:173.3,174.25 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:175.3,178.25 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:179.3,182.21 2 9 -github.com/ethereum/go-ethereum/vm/vm_debug.go:184.3,190.65 5 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:201.4,201.46 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:202.3,204.23 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:205.3,207.52 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:208.3,211.52 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:212.3,214.51 2 10 -github.com/ethereum/go-ethereum/vm/vm_debug.go:215.3,218.69 2 2 -github.com/ethereum/go-ethereum/vm/vm_debug.go:219.3,224.69 3 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:225.3,228.69 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:229.3,232.69 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:233.3,236.82 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:237.3,245.37 6 2 -github.com/ethereum/go-ethereum/vm/vm_debug.go:246.3,250.82 3 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:190.65,193.5 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:193.6,193.73 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:193.73,197.5 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:197.6,200.5 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:253.39,258.50 4 12 -github.com/ethereum/go-ethereum/vm/vm_debug.go:258.50,266.5 5 6 -github.com/ethereum/go-ethereum/vm/vm_debug.go:273.27,281.4 4 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:285.3,295.20 6 9 -github.com/ethereum/go-ethereum/vm/vm_debug.go:296.3,306.20 6 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:307.3,317.20 6 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:318.3,322.32 3 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:326.4,330.20 3 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:331.3,336.32 3 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:351.4,352.20 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:353.3,358.32 3 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:364.4,367.20 3 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:368.3,373.32 3 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:388.4,389.20 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:391.3,402.20 6 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:403.3,405.17 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:422.3,428.20 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:429.3,433.20 3 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:438.3,443.20 3 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:449.3,453.26 3 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:458.3,463.20 3 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:469.3,474.21 3 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:479.3,481.35 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:488.3,492.30 3 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:493.3,497.29 3 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:498.3,502.30 3 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:503.3,506.34 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:514.4,516.20 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:517.3,530.20 8 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:531.3,544.20 8 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:547.3,553.31 4 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:555.3,558.44 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:559.3,566.45 4 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:567.3,572.33 3 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:573.3,577.33 3 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:578.3,583.32 3 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:584.3,591.32 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:598.4,600.34 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:601.3,605.28 3 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:606.3,614.19 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:621.4,625.72 3 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:626.3,628.25 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:636.4,639.28 3 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:640.3,642.25 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:650.4,657.19 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:664.4,668.72 3 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:669.3,672.40 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:675.3,680.37 3 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:681.3,686.37 3 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:687.3,692.33 3 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:693.3,698.43 3 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:699.3,704.47 3 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:705.3,706.35 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:709.3,720.41 8 47 -github.com/ethereum/go-ethereum/vm/vm_debug.go:721.3,722.15 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:723.3,729.151 4 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:732.3,736.62 3 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:737.3,742.27 5 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:746.4,749.30 3 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:750.3,755.40 4 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:756.3,761.32 3 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:762.3,768.42 4 10 -github.com/ethereum/go-ethereum/vm/vm_debug.go:769.3,774.59 4 9 -github.com/ethereum/go-ethereum/vm/vm_debug.go:775.3,780.30 3 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:784.4,784.59 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:785.3,789.12 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:790.3,793.38 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:799.3,799.17 0 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:800.3,801.18 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:802.3,803.44 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:804.3,805.27 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:807.3,831.18 9 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:844.4,847.23 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:850.3,865.22 8 2 -github.com/ethereum/go-ethereum/vm/vm_debug.go:871.4,873.18 3 2 -github.com/ethereum/go-ethereum/vm/vm_debug.go:882.4,885.23 2 2 -github.com/ethereum/go-ethereum/vm/vm_debug.go:889.3,895.35 4 2 -github.com/ethereum/go-ethereum/vm/vm_debug.go:896.3,903.15 4 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:904.3,907.35 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:908.3,914.67 3 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:322.32,324.5 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:336.32,338.5 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:338.6,340.53 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:346.5,348.15 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:340.53,342.6 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:342.7,344.6 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:358.32,360.5 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:360.6,362.5 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:373.32,375.5 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:375.6,377.32 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:383.5,385.15 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:377.32,379.6 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:379.7,381.6 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:405.17,410.39 5 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:416.5,420.20 3 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:410.39,412.6 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:412.7,414.6 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:433.20,435.5 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:435.6,437.5 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:443.20,445.5 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:445.6,447.5 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:453.26,455.5 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:455.6,457.5 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:463.20,465.5 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:465.6,467.5 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:474.21,476.5 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:476.6,478.5 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:481.35,483.5 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:483.6,485.5 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:506.34,510.5 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:510.6,512.5 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:591.32,596.5 3 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:614.19,617.5 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:617.6,617.28 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:617.28,619.5 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:628.25,632.5 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:632.6,634.5 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:642.25,646.5 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:646.6,648.5 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:657.19,660.5 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:660.6,660.28 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:660.28,662.5 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:729.151,731.5 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:742.27,744.5 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:780.30,782.5 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:793.38,796.13 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:831.18,838.5 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:838.6,842.5 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:847.23,849.5 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:865.22,867.5 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:867.6,869.5 1 2 -github.com/ethereum/go-ethereum/vm/vm_debug.go:873.18,877.5 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:877.6,881.5 2 2 -github.com/ethereum/go-ethereum/vm/vm_debug.go:885.23,887.5 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:921.22,922.51 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:922.51,923.41 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:923.41,926.98 2 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:926.98,928.7 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:929.7,929.29 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:929.29,930.97 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:930.97,932.7 1 0 -github.com/ethereum/go-ethereum/vm/vm_debug.go:940.77,941.31 1 248 -github.com/ethereum/go-ethereum/vm/vm_debug.go:945.2,945.13 1 248 -github.com/ethereum/go-ethereum/vm/vm_debug.go:941.31,943.3 1 248 -github.com/ethereum/go-ethereum/vm/vm_debug.go:948.44,949.31 1 82 -github.com/ethereum/go-ethereum/vm/vm_debug.go:954.2,954.13 1 82 -github.com/ethereum/go-ethereum/vm/vm_debug.go:949.31,952.3 2 82 -github.com/ethereum/go-ethereum/vm/vm_debug.go:957.40,959.2 1 4 -github.com/ethereum/go-ethereum/vm/vm_debug.go:961.34,963.2 1 0 -github.com/ethereum/go-ethereum/vm/closure.go:34.126,46.2 5 4 -github.com/ethereum/go-ethereum/vm/closure.go:49.57,51.14 2 3 -github.com/ethereum/go-ethereum/vm/closure.go:55.2,55.10 1 3 -github.com/ethereum/go-ethereum/vm/closure.go:51.14,53.3 1 0 -github.com/ethereum/go-ethereum/vm/closure.go:58.50,60.2 1 0 -github.com/ethereum/go-ethereum/vm/closure.go:62.39,64.2 1 102 -github.com/ethereum/go-ethereum/vm/closure.go:66.39,67.21 1 102 -github.com/ethereum/go-ethereum/vm/closure.go:71.2,71.10 1 0 -github.com/ethereum/go-ethereum/vm/closure.go:67.21,69.3 1 102 -github.com/ethereum/go-ethereum/vm/closure.go:74.45,75.42 1 11 -github.com/ethereum/go-ethereum/vm/closure.go:79.2,79.24 1 11 -github.com/ethereum/go-ethereum/vm/closure.go:75.42,77.3 1 0 -github.com/ethereum/go-ethereum/vm/closure.go:82.54,83.72 1 47 -github.com/ethereum/go-ethereum/vm/closure.go:87.2,89.34 2 47 -github.com/ethereum/go-ethereum/vm/closure.go:83.72,85.3 1 0 -github.com/ethereum/go-ethereum/vm/closure.go:92.62,94.2 1 0 -github.com/ethereum/go-ethereum/vm/closure.go:96.36,98.2 1 16 -github.com/ethereum/go-ethereum/vm/closure.go:100.82,106.2 3 4 -github.com/ethereum/go-ethereum/vm/closure.go:108.45,113.2 2 4 -github.com/ethereum/go-ethereum/vm/closure.go:115.45,116.24 1 102 -github.com/ethereum/go-ethereum/vm/closure.go:121.2,124.13 3 102 -github.com/ethereum/go-ethereum/vm/closure.go:116.24,118.3 1 0 -github.com/ethereum/go-ethereum/vm/closure.go:128.50,132.2 2 0 -github.com/ethereum/go-ethereum/vm/closure.go:134.47,136.2 1 2 -github.com/ethereum/go-ethereum/vm/closure.go:138.39,140.2 1 0 -github.com/ethereum/go-ethereum/vm/closure.go:142.51,144.2 1 0 -github.com/ethereum/go-ethereum/vm/common.go:46.44,47.30 1 20 -github.com/ethereum/go-ethereum/vm/common.go:51.2,51.33 1 18 -github.com/ethereum/go-ethereum/vm/common.go:47.30,49.3 1 2 -github.com/ethereum/go-ethereum/vm/common.go:55.29,57.2 1 94 -github.com/ethereum/go-ethereum/vm/common.go:60.40,63.59 2 0 -github.com/ethereum/go-ethereum/vm/common.go:67.2,67.12 1 0 -github.com/ethereum/go-ethereum/vm/common.go:63.59,65.3 1 0 -github.com/ethereum/go-ethereum/vm/types.go:328.33,330.19 2 81 -github.com/ethereum/go-ethereum/vm/types.go:334.2,334.12 1 81 -github.com/ethereum/go-ethereum/vm/types.go:330.19,332.3 1 0 -github.com/ethereum/go-ethereum/vm/asm.go:10.48,12.6 2 0 -github.com/ethereum/go-ethereum/vm/asm.go:44.2,44.8 1 0 -github.com/ethereum/go-ethereum/vm/asm.go:12.6,13.50 1 0 -github.com/ethereum/go-ethereum/vm/asm.go:18.3,24.13 4 0 -github.com/ethereum/go-ethereum/vm/asm.go:41.3,41.27 1 0 -github.com/ethereum/go-ethereum/vm/asm.go:13.50,15.4 1 0 -github.com/ethereum/go-ethereum/vm/asm.go:25.3,28.39 3 0 -github.com/ethereum/go-ethereum/vm/asm.go:32.4,33.22 2 0 -github.com/ethereum/go-ethereum/vm/asm.go:36.4,38.31 2 0 -github.com/ethereum/go-ethereum/vm/asm.go:28.39,30.5 1 0 -github.com/ethereum/go-ethereum/vm/asm.go:33.22,35.5 1 0 -github.com/ethereum/go-ethereum/vm/errors.go:12.43,14.2 1 0 -github.com/ethereum/go-ethereum/vm/errors.go:16.42,18.2 1 0 -github.com/ethereum/go-ethereum/vm/errors.go:20.31,23.2 2 2 -github.com/ethereum/go-ethereum/vm/errors.go:29.40,31.2 1 0 -github.com/ethereum/go-ethereum/vm/errors.go:33.39,35.2 1 0 -github.com/ethereum/go-ethereum/vm/errors.go:37.30,40.2 2 0 -github.com/ethereum/go-ethereum/vm/errors.go:44.39,46.2 1 0 -github.com/ethereum/go-ethereum/vm/errors.go:48.33,51.2 2 2 -github.com/ethereum/go-ethereum/vm/analysis.go:9.63,14.50 4 3 -github.com/ethereum/go-ethereum/vm/analysis.go:34.2,34.8 1 3 -github.com/ethereum/go-ethereum/vm/analysis.go:14.50,16.13 2 117 -github.com/ethereum/go-ethereum/vm/analysis.go:17.3,19.33 2 61 -github.com/ethereum/go-ethereum/vm/analysis.go:23.4,24.13 2 61 -github.com/ethereum/go-ethereum/vm/analysis.go:25.3,26.10 1 0 -github.com/ethereum/go-ethereum/vm/analysis.go:30.3,31.14 1 56 -github.com/ethereum/go-ethereum/vm/analysis.go:19.33,21.5 1 61 -github.com/ethereum/go-ethereum/vm/analysis.go:26.10,28.5 1 0 -github.com/ethereum/go-ethereum/vm/environment.go:38.56,39.36 1 0 -github.com/ethereum/go-ethereum/vm/environment.go:43.2,50.12 3 0 -github.com/ethereum/go-ethereum/vm/environment.go:39.36,41.3 1 0 -github.com/ethereum/go-ethereum/wire/client_identity.go:21.118,31.2 2 1 -github.com/ethereum/go-ethereum/wire/client_identity.go:33.39,34.2 0 0 -github.com/ethereum/go-ethereum/wire/client_identity.go:36.48,38.33 2 2 -github.com/ethereum/go-ethereum/wire/client_identity.go:42.2,47.20 1 2 -github.com/ethereum/go-ethereum/wire/client_identity.go:38.33,40.3 1 2 -github.com/ethereum/go-ethereum/wire/client_identity.go:50.77,52.2 1 1 -github.com/ethereum/go-ethereum/wire/client_identity.go:54.61,56.2 1 2 -github.com/ethereum/go-ethereum/wire/messages2.go:23.37,25.2 1 0 -github.com/ethereum/go-ethereum/wire/messages2.go:28.37,29.36 1 0 -github.com/ethereum/go-ethereum/wire/messages2.go:33.2,36.12 3 0 -github.com/ethereum/go-ethereum/wire/messages2.go:29.36,31.3 1 0 -github.com/ethereum/go-ethereum/wire/messages2.go:43.68,47.26 3 0 -github.com/ethereum/go-ethereum/wire/messages2.go:58.2,67.16 6 0 -github.com/ethereum/go-ethereum/wire/messages2.go:71.2,71.12 1 0 -github.com/ethereum/go-ethereum/wire/messages2.go:47.26,48.59 1 0 -github.com/ethereum/go-ethereum/wire/messages2.go:48.59,50.4 1 0 -github.com/ethereum/go-ethereum/wire/messages2.go:50.5,50.50 1 0 -github.com/ethereum/go-ethereum/wire/messages2.go:50.50,52.4 1 0 -github.com/ethereum/go-ethereum/wire/messages2.go:52.5,54.4 1 0 -github.com/ethereum/go-ethereum/wire/messages2.go:67.16,69.3 1 0 -github.com/ethereum/go-ethereum/wire/messages2.go:74.101,75.20 1 0 -github.com/ethereum/go-ethereum/wire/messages2.go:79.2,79.20 1 0 -github.com/ethereum/go-ethereum/wire/messages2.go:84.2,84.46 1 0 -github.com/ethereum/go-ethereum/wire/messages2.go:88.2,90.40 3 0 -github.com/ethereum/go-ethereum/wire/messages2.go:94.2,106.8 6 0 -github.com/ethereum/go-ethereum/wire/messages2.go:75.20,77.3 1 0 -github.com/ethereum/go-ethereum/wire/messages2.go:79.20,81.3 1 0 -github.com/ethereum/go-ethereum/wire/messages2.go:84.46,86.3 1 0 -github.com/ethereum/go-ethereum/wire/messages2.go:90.40,92.3 1 0 -github.com/ethereum/go-ethereum/wire/messages2.go:112.52,114.15 1 0 -github.com/ethereum/go-ethereum/wire/messages2.go:122.2,124.6 3 0 -github.com/ethereum/go-ethereum/wire/messages2.go:149.2,151.78 3 0 -github.com/ethereum/go-ethereum/wire/messages2.go:159.2,159.8 1 0 -github.com/ethereum/go-ethereum/wire/messages2.go:114.15,115.31 1 0 -github.com/ethereum/go-ethereum/wire/messages2.go:115.31,117.4 1 0 -github.com/ethereum/go-ethereum/wire/messages2.go:124.6,131.27 4 0 -github.com/ethereum/go-ethereum/wire/messages2.go:144.3,145.18 2 0 -github.com/ethereum/go-ethereum/wire/messages2.go:131.27,132.28 1 0 -github.com/ethereum/go-ethereum/wire/messages2.go:132.28,135.5 2 0 -github.com/ethereum/go-ethereum/wire/messages2.go:135.6,136.10 1 0 -github.com/ethereum/go-ethereum/wire/messages2.go:140.5,140.20 1 0 -github.com/ethereum/go-ethereum/wire/messages2.go:140.20,141.9 1 0 -github.com/ethereum/go-ethereum/wire/messages2.go:151.78,154.17 1 0 -github.com/ethereum/go-ethereum/wire/messages2.go:154.17,156.4 1 0 -github.com/ethereum/go-ethereum/wire/messages2.go:162.82,163.20 1 0 -github.com/ethereum/go-ethereum/wire/messages2.go:167.2,167.20 1 0 -github.com/ethereum/go-ethereum/wire/messages2.go:172.2,172.46 1 0 -github.com/ethereum/go-ethereum/wire/messages2.go:176.2,178.40 3 0 -github.com/ethereum/go-ethereum/wire/messages2.go:182.2,194.8 6 0 -github.com/ethereum/go-ethereum/wire/messages2.go:163.20,165.3 1 0 -github.com/ethereum/go-ethereum/wire/messages2.go:167.20,169.3 1 0 -github.com/ethereum/go-ethereum/wire/messages2.go:172.46,174.3 1 0 -github.com/ethereum/go-ethereum/wire/messages2.go:178.40,180.3 1 0 -github.com/ethereum/go-ethereum/wire/messages2.go:197.50,199.2 1 0 -github.com/ethereum/go-ethereum/wire/messaging.go:62.35,64.2 1 0 -github.com/ethereum/go-ethereum/wire/messaging.go:72.57,77.2 1 0 -github.com/ethereum/go-ethereum/wire/messaging.go:84.59,86.15 1 0 -github.com/ethereum/go-ethereum/wire/messaging.go:92.2,98.6 2 0 -github.com/ethereum/go-ethereum/wire/messaging.go:145.2,145.29 1 0 -github.com/ethereum/go-ethereum/wire/messaging.go:155.2,155.8 1 0 -github.com/ethereum/go-ethereum/wire/messaging.go:86.15,87.31 1 0 -github.com/ethereum/go-ethereum/wire/messaging.go:87.31,89.4 1 0 -github.com/ethereum/go-ethereum/wire/messaging.go:98.6,104.27 4 0 -github.com/ethereum/go-ethereum/wire/messaging.go:113.3,113.31 1 0 -github.com/ethereum/go-ethereum/wire/messaging.go:120.3,121.21 2 0 -github.com/ethereum/go-ethereum/wire/messaging.go:134.3,134.29 1 0 -github.com/ethereum/go-ethereum/wire/messaging.go:104.27,105.28 1 0 -github.com/ethereum/go-ethereum/wire/messaging.go:105.28,108.5 2 0 -github.com/ethereum/go-ethereum/wire/messaging.go:108.6,109.10 1 0 -github.com/ethereum/go-ethereum/wire/messaging.go:113.31,117.12 2 0 -github.com/ethereum/go-ethereum/wire/messaging.go:121.21,123.48 1 0 -github.com/ethereum/go-ethereum/wire/messaging.go:128.4,131.19 2 0 -github.com/ethereum/go-ethereum/wire/messaging.go:123.48,125.5 1 0 -github.com/ethereum/go-ethereum/wire/messaging.go:134.29,139.22 4 0 -github.com/ethereum/go-ethereum/wire/messaging.go:139.22,140.10 1 0 -github.com/ethereum/go-ethereum/wire/messaging.go:145.29,153.3 4 0 -github.com/ethereum/go-ethereum/wire/messaging.go:160.50,174.16 7 0 -github.com/ethereum/go-ethereum/wire/messaging.go:178.2,178.12 1 0 -github.com/ethereum/go-ethereum/wire/messaging.go:174.16,176.3 1 0 From 7a79428278412ab1f73708af51bce063b000b7a7 Mon Sep 17 00:00:00 2001 From: Taylor Gerring Date: Sun, 21 Dec 2014 12:05:59 -0600 Subject: [PATCH 012/132] Update cover command installation --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 923827e7c5..cffd864abd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ install: - go get code.google.com/p/go.tools/cmd/goimports - go get github.com/golang/lint/golint # - go get golang.org/x/tools/cmd/vet - - go get golang.org/x/tools/cmd/cover + - if ! go get code.google.com/p/go.tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi - go get github.com/mattn/goveralls - ./install_deps.sh before_script: From 7ddebd7a7593a00b80757f3239f32099755405ca Mon Sep 17 00:00:00 2001 From: Taylor Gerring Date: Sun, 21 Dec 2014 13:21:24 -0600 Subject: [PATCH 013/132] Exclude VM tests --- gocoverage.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gocoverage.sh b/gocoverage.sh index 35038108b9..12a4c93cc8 100755 --- a/gocoverage.sh +++ b/gocoverage.sh @@ -13,7 +13,10 @@ for dir in $(find . -maxdepth 10 -not -path './.git*' -not -path '*/_*' -type d) do if ls $dir/*.go &> /dev/null; then # echo $dir - go test -covermode=count -coverprofile=$dir/profile.tmp $dir + if [[ $dir != "./tests/vm" ]] + then + go test -covermode=count -coverprofile=$dir/profile.tmp $dir + fi if [ -f $dir/profile.tmp ] then cat $dir/profile.tmp | tail -n +2 >> profile.cov From f7ec759ef03ac900f129536a1c101050b3623127 Mon Sep 17 00:00:00 2001 From: Taylor Gerring Date: Sun, 21 Dec 2014 13:34:48 -0600 Subject: [PATCH 014/132] inline dependency installation script --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index cffd864abd..3f12f15b1e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ install: # - go get golang.org/x/tools/cmd/vet - if ! go get code.google.com/p/go.tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi - go get github.com/mattn/goveralls - - ./install_deps.sh + - ETH_DEPS=$(go list -f '{{.Imports}} {{.TestImports}} {{.XTestImports}}' github.com/ethereum/go-ethereum/... | sed -e 's/\[//g' | sed -e 's/\]//g' | sed -e 's/C //g'); if [ "$ETH_DEPS" ]; then go get $ETH_DEPS; fi before_script: - gofmt -l -w . - goimports -l -w . From 03dc6ec0d42171c1642430baaf8881bb59de3d8f Mon Sep 17 00:00:00 2001 From: Taylor Gerring Date: Sun, 21 Dec 2014 13:46:06 -0600 Subject: [PATCH 015/132] Update travis go version to tip --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3f12f15b1e..a80338bc35 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: go go: - - 1.3 + - tip before_install: - sudo add-apt-repository ppa:ubuntu-sdk-team/ppa -y - sudo apt-get update -qq From 26bf95731ba7a469e13d996f291795a817cff480 Mon Sep 17 00:00:00 2001 From: Taylor Gerring Date: Sun, 21 Dec 2014 14:31:19 -0600 Subject: [PATCH 016/132] Use repo default branches --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1f37ce892a..82ce9f7fc4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,14 +25,14 @@ RUN apt-get install -y qtbase5-private-dev qtdeclarative5-private-dev libqt5open ## Fetch and install serpent-go RUN go get -v -d github.com/ethereum/serpent-go WORKDIR $GOPATH/src/github.com/ethereum/serpent-go -RUN git checkout master +# RUN git checkout master RUN git submodule update --init RUN go install -v # Fetch and install go-ethereum RUN go get -v -d github.com/ethereum/go-ethereum/... WORKDIR $GOPATH/src/github.com/ethereum/go-ethereum -RUN git checkout poc8 +# RUN git checkout develop RUN ETH_DEPS=$(go list -f '{{.Imports}} {{.TestImports}} {{.XTestImports}}' github.com/ethereum/go-ethereum/... | sed -e 's/\[//g' | sed -e 's/\]//g' | sed -e 's/C //g'); if [ "$ETH_DEPS" ]; then go get $ETH_DEPS; fi RUN go install -v ./cmd/ethereum From 05da381c15bed6f46c6ee54e9f8bdfc6c2bb6f64 Mon Sep 17 00:00:00 2001 From: Taylor Gerring Date: Sun, 21 Dec 2014 14:36:13 -0600 Subject: [PATCH 017/132] Add coveralls coverage badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 564e5c56dd..c54a555cb5 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ Ethereum [![Build Status](http://build.ethdev.com/buildstatusimage?builder=Linux%20Go%20master%20branch)](http://build.ethdev.com:8010/builders/Linux%20Go%20master%20branch/builds/-1) master [![Build Status](http://build.ethdev.com/buildstatusimage?builder=Linux%20Go%20develop%20branch)](http://build.ethdev.com:8010/builders/Linux%20Go%20develop%20branch/builds/-1) develop +[![Coverage Status](https://coveralls.io/repos/ethereum/go-ethereum/badge.png?branch=tests)](https://coveralls.io/r/ethereum/go-ethereum?branch=tests) tests Ethereum Go Client © 2014 Jeffrey Wilcke. From 43bf3b4a783e53e5954d9aa19b1423dbfed85029 Mon Sep 17 00:00:00 2001 From: Taylor Gerring Date: Sun, 21 Dec 2014 14:46:32 -0600 Subject: [PATCH 018/132] Move goveralls call to script --- .travis.yml | 2 +- gocoverage.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index a80338bc35..21c15068b5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,7 @@ before_script: # - go vet ./... # - go test -race ./... script: - - ./gocoverage.sh && goveralls -coverprofile=profile.cov -service=travis-ci -repotoken $COVERALLS_TOKEN + - ./gocoverage.sh env: - secure: "U2U1AmkU4NJBgKR/uUAebQY87cNL0+1JHjnLOmmXwxYYyj5ralWb1aSuSH3qSXiT93qLBmtaUkuv9fberHVqrbAeVlztVdUsKAq7JMQH+M99iFkC9UiRMqHmtjWJ0ok4COD1sRYixxi21wb/JrMe3M1iL4QJVS61iltjHhVdM64=" diff --git a/gocoverage.sh b/gocoverage.sh index 12a4c93cc8..24c8e92801 100755 --- a/gocoverage.sh +++ b/gocoverage.sh @@ -29,4 +29,4 @@ go tool cover -func profile.cov # To submit the test coverage result to coveralls.io, # use goveralls (https://github.com/mattn/goveralls) -# goveralls -coverprofile=profile.cov -service=travis-ci +goveralls -coverprofile=profile.cov -service=travis-ci -repotoken $COVERALLS_TOKEN From 4fd4facf35dc8a2f273fd5e4acacf5c62baa0de2 Mon Sep 17 00:00:00 2001 From: Taylor Gerring Date: Sun, 21 Dec 2014 14:54:51 -0600 Subject: [PATCH 019/132] Remove old file --- install_deps.sh | 8 -------- 1 file changed, 8 deletions(-) delete mode 100755 install_deps.sh diff --git a/install_deps.sh b/install_deps.sh deleted file mode 100755 index 73a3133244..0000000000 --- a/install_deps.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -set -e - -TEST_DEPS=$(go list -f '{{.Imports}} {{.TestImports}} {{.XTestImports}}' github.com/ethereum/go-ethereum/... | sed -e 's/\[//g' | sed -e 's/\]//g' | sed -e 's/C //g') -if [ "$TEST_DEPS" ]; then - go get -race $TEST_DEPS -fi From 8130df63caa719831aeb05f56683ea7439f4af0e Mon Sep 17 00:00:00 2001 From: obscuren Date: Mon, 22 Dec 2014 10:58:28 +0100 Subject: [PATCH 020/132] updated whisper ui --- cmd/mist/assets/qml/views/whisper.qml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/mist/assets/qml/views/whisper.qml b/cmd/mist/assets/qml/views/whisper.qml index b43ea4f8b5..80d4013011 100644 --- a/cmd/mist/assets/qml/views/whisper.qml +++ b/cmd/mist/assets/qml/views/whisper.qml @@ -25,7 +25,7 @@ Rectangle { } function onMessage(message) { - whisperModel.insert(0, {data: JSON.stringify({from: message.from, payload: eth.toAscii(message.payload)})}) + whisperModel.insert(0, {from: message.from, payload: eth.toAscii(message.payload)}) } RowLayout { @@ -66,7 +66,8 @@ Rectangle { left: parent.left right: parent.right } - TableViewColumn{ role: "data" ; title: "Data" ; width: parent.width - 2 } + TableViewColumn{ id: fromRole; role: "from" ; title: "From"; width: 300 } + TableViewColumn{ role: "payload" ; title: "Payload" ; width: parent.width - fromRole.width - 2 } model: ListModel { id: whisperModel From a153b47c2be80bbfb38954c5eae310305d54120b Mon Sep 17 00:00:00 2001 From: obscuren Date: Mon, 22 Dec 2014 11:56:34 +0100 Subject: [PATCH 021/132] moved --- cmd/mist/assets/qml/{webapp.qml => browser.qml} | 3 ++- cmd/mist/assets/qml/main.qml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) rename cmd/mist/assets/qml/{webapp.qml => browser.qml} (99%) diff --git a/cmd/mist/assets/qml/webapp.qml b/cmd/mist/assets/qml/browser.qml similarity index 99% rename from cmd/mist/assets/qml/webapp.qml rename to cmd/mist/assets/qml/browser.qml index bd7399dc9b..26fef0377e 100644 --- a/cmd/mist/assets/qml/webapp.qml +++ b/cmd/mist/assets/qml/browser.qml @@ -59,7 +59,8 @@ Rectangle { } Component.onCompleted: { - webview.url = "http://etherian.io" + //webview.url = "http://etherian.io" + webview.url = "file:///Users/jeffrey/test.html" } signal messages(var messages, int id); diff --git a/cmd/mist/assets/qml/main.qml b/cmd/mist/assets/qml/main.qml index 65cea439a0..06a7bc2a8e 100644 --- a/cmd/mist/assets/qml/main.qml +++ b/cmd/mist/assets/qml/main.qml @@ -45,7 +45,7 @@ ApplicationWindow { // Takes care of loading all default plugins Component.onCompleted: { var wallet = addPlugin("./views/wallet.qml", {noAdd: true, close: false, section: "ethereum", active: true}); - var browser = addPlugin("./webapp.qml", {noAdd: true, close: false, section: "ethereum", active: true}); + var browser = addPlugin("./browser.qml", {noAdd: true, close: false, section: "ethereum", active: true}); root.browser = browser; addPlugin("./views/miner.qml", {noAdd: true, close: false, section: "ethereum", active: true}); From e42517754ac2912b6d3ca78a34b8aeadf8805906 Mon Sep 17 00:00:00 2001 From: obscuren Date: Mon, 22 Dec 2014 11:57:13 +0100 Subject: [PATCH 022/132] updated ethereum.js --- cmd/ethtest/.bowerrc | 5 + cmd/ethtest/.editorconfig | 12 + cmd/ethtest/.gitignore | 18 ++ cmd/ethtest/.jshintrc | 50 +++ cmd/ethtest/.npmignore | 9 + cmd/ethtest/.travis.yml | 11 + cmd/ethtest/LICENSE | 14 + cmd/ethtest/README.md | 79 +++++ cmd/ethtest/bower.json | 51 +++ cmd/ethtest/dist/ethereum.js | 20 ++ cmd/ethtest/dist/ethereum.js.map | 29 ++ cmd/ethtest/dist/ethereum.min.js | 1 + cmd/ethtest/example/contract.html | 75 +++++ cmd/ethtest/example/index.html | 41 +++ cmd/ethtest/example/node-app.js | 16 + cmd/ethtest/gulpfile.js | 123 ++++++++ cmd/ethtest/index.js | 8 + cmd/ethtest/index_qt.js | 5 + cmd/ethtest/lib/abi.js | 218 +++++++++++++ cmd/ethtest/lib/autoprovider.js | 103 +++++++ cmd/ethtest/lib/contract.js | 65 ++++ cmd/ethtest/lib/httprpc.js | 95 ++++++ cmd/ethtest/lib/main.js | 494 ++++++++++++++++++++++++++++++ cmd/ethtest/lib/qt.js | 45 +++ cmd/ethtest/lib/websocket.js | 78 +++++ cmd/ethtest/package.json | 67 ++++ 26 files changed, 1732 insertions(+) create mode 100644 cmd/ethtest/.bowerrc create mode 100644 cmd/ethtest/.editorconfig create mode 100644 cmd/ethtest/.gitignore create mode 100644 cmd/ethtest/.jshintrc create mode 100644 cmd/ethtest/.npmignore create mode 100644 cmd/ethtest/.travis.yml create mode 100644 cmd/ethtest/LICENSE create mode 100644 cmd/ethtest/README.md create mode 100644 cmd/ethtest/bower.json create mode 100644 cmd/ethtest/dist/ethereum.js create mode 100644 cmd/ethtest/dist/ethereum.js.map create mode 100644 cmd/ethtest/dist/ethereum.min.js create mode 100644 cmd/ethtest/example/contract.html create mode 100644 cmd/ethtest/example/index.html create mode 100644 cmd/ethtest/example/node-app.js create mode 100644 cmd/ethtest/gulpfile.js create mode 100644 cmd/ethtest/index.js create mode 100644 cmd/ethtest/index_qt.js create mode 100644 cmd/ethtest/lib/abi.js create mode 100644 cmd/ethtest/lib/autoprovider.js create mode 100644 cmd/ethtest/lib/contract.js create mode 100644 cmd/ethtest/lib/httprpc.js create mode 100644 cmd/ethtest/lib/main.js create mode 100644 cmd/ethtest/lib/qt.js create mode 100644 cmd/ethtest/lib/websocket.js create mode 100644 cmd/ethtest/package.json diff --git a/cmd/ethtest/.bowerrc b/cmd/ethtest/.bowerrc new file mode 100644 index 0000000000..c3a8813e8b --- /dev/null +++ b/cmd/ethtest/.bowerrc @@ -0,0 +1,5 @@ +{ + "directory": "example/js/", + "cwd": "./", + "analytics": false +} \ No newline at end of file diff --git a/cmd/ethtest/.editorconfig b/cmd/ethtest/.editorconfig new file mode 100644 index 0000000000..60a2751d33 --- /dev/null +++ b/cmd/ethtest/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +indent_style = space +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false \ No newline at end of file diff --git a/cmd/ethtest/.gitignore b/cmd/ethtest/.gitignore new file mode 100644 index 0000000000..399b6dc882 --- /dev/null +++ b/cmd/ethtest/.gitignore @@ -0,0 +1,18 @@ +# See http://help.github.com/ignore-files/ for more about ignoring files. +# +# If you find yourself ignoring temporary files generated by your text editor +# or operating system, you probably want to add a global ignore instead: +# git config --global core.excludesfile ~/.gitignore_global + +*.swp +/tmp +*/**/*un~ +*un~ +.DS_Store +*/**/.DS_Store +ethereum/ethereum +ethereal/ethereal +example/js +node_modules +bower_components +npm-debug.log diff --git a/cmd/ethtest/.jshintrc b/cmd/ethtest/.jshintrc new file mode 100644 index 0000000000..c0ec5f89d1 --- /dev/null +++ b/cmd/ethtest/.jshintrc @@ -0,0 +1,50 @@ +{ + "predef": [ + "console", + "require", + "equal", + "test", + "testBoth", + "testWithDefault", + "raises", + "deepEqual", + "start", + "stop", + "ok", + "strictEqual", + "module", + "expect", + "reject", + "impl" + ], + + "esnext": true, + "proto": true, + "node" : true, + "browser" : true, + "browserify" : true, + + "boss" : true, + "curly": false, + "debug": true, + "devel": true, + "eqeqeq": true, + "evil": true, + "forin": false, + "immed": false, + "laxbreak": false, + "newcap": true, + "noarg": true, + "noempty": false, + "nonew": false, + "nomen": false, + "onevar": false, + "plusplus": false, + "regexp": false, + "undef": true, + "sub": true, + "strict": false, + "white": false, + "shadow": true, + "eqnull": true +} \ No newline at end of file diff --git a/cmd/ethtest/.npmignore b/cmd/ethtest/.npmignore new file mode 100644 index 0000000000..5bbffe4fd3 --- /dev/null +++ b/cmd/ethtest/.npmignore @@ -0,0 +1,9 @@ +example/js +node_modules +test +.gitignore +.editorconfig +.travis.yml +.npmignore +component.json +testling.html \ No newline at end of file diff --git a/cmd/ethtest/.travis.yml b/cmd/ethtest/.travis.yml new file mode 100644 index 0000000000..fafacbd5a1 --- /dev/null +++ b/cmd/ethtest/.travis.yml @@ -0,0 +1,11 @@ +language: node_js +node_js: + - "0.11" + - "0.10" +before_script: + - npm install + - npm install jshint +script: + - "jshint *.js lib" +after_script: + - npm run-script gulp diff --git a/cmd/ethtest/LICENSE b/cmd/ethtest/LICENSE new file mode 100644 index 0000000000..0f187b8736 --- /dev/null +++ b/cmd/ethtest/LICENSE @@ -0,0 +1,14 @@ +This file is part of ethereum.js. + +ethereum.js is free software: you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +ethereum.js is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with ethereum.js. If not, see . \ No newline at end of file diff --git a/cmd/ethtest/README.md b/cmd/ethtest/README.md new file mode 100644 index 0000000000..865b62c6b1 --- /dev/null +++ b/cmd/ethtest/README.md @@ -0,0 +1,79 @@ +# Ethereum JavaScript API + +This is the Ethereum compatible JavaScript API using `Promise`s +which implements the [Generic JSON RPC](https://github.com/ethereum/wiki/wiki/Generic-JSON-RPC) spec. It's available on npm as a node module and also for bower and component as an embeddable js + +[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![dependency status][dep-image]][dep-url] [![dev dependency status][dep-dev-image]][dep-dev-url] + + + +## Installation + +### Node.js + + npm install ethereum.js + +### For browser +Bower + + bower install ethereum.js + +Component + + component install ethereum/ethereum.js + +* Include `ethereum.min.js` in your html file. +* Include [es6-promise](https://github.com/jakearchibald/es6-promise) or another ES6-Shim if your browser doesn't support ECMAScript 6. + +## Usage +Require the library: + + var web3 = require('web3'); + +Set a provider (QtProvider, WebSocketProvider, HttpRpcProvider) + + var web3.setProvider(new web3.providers.WebSocketProvider('ws://localhost:40404/eth')); + +There you go, now you can use it: + +``` +web3.eth.coinbase.then(function(result){ + console.log(result); + return web3.eth.balanceAt(result); +}).then(function(balance){ + console.log(web3.toDecimal(balance)); +}).catch(function(err){ + console.log(err); +}); +``` + + +For another example see `example/index.html`. + +## Building + +* `gulp build` + + +### Testing + +**Please note this repo is in it's early stage.** + +If you'd like to run a WebSocket ethereum node check out +[go-ethereum](https://github.com/ethereum/go-ethereum). + +To install ethereum and spawn a node: + +``` +go get github.com/ethereum/go-ethereum/ethereum +ethereum -ws -loglevel=4 +``` + +[npm-image]: https://badge.fury.io/js/ethereum.js.png +[npm-url]: https://npmjs.org/package/ethereum.js +[travis-image]: https://travis-ci.org/ethereum/ethereum.js.svg +[travis-url]: https://travis-ci.org/ethereum/ethereum.js +[dep-image]: https://david-dm.org/ethereum/ethereum.js.svg +[dep-url]: https://david-dm.org/ethereum/ethereum.js +[dep-dev-image]: https://david-dm.org/ethereum/ethereum.js/dev-status.svg +[dep-dev-url]: https://david-dm.org/ethereum/ethereum.js#info=devDependencies \ No newline at end of file diff --git a/cmd/ethtest/bower.json b/cmd/ethtest/bower.json new file mode 100644 index 0000000000..cedae9023d --- /dev/null +++ b/cmd/ethtest/bower.json @@ -0,0 +1,51 @@ +{ + "name": "ethereum.js", + "namespace": "ethereum", + "version": "0.0.3", + "description": "Ethereum Compatible JavaScript API", + "main": ["./dist/ethereum.js", "./dist/ethereum.min.js"], + "dependencies": { + "es6-promise": "#master" + }, + "repository": { + "type": "git", + "url": "https://github.com/ethereum/ethereum.js.git" + }, + "homepage": "https://github.com/ethereum/ethereum.js", + "bugs": { + "url": "https://github.com/ethereum/ethereum.js/issues" + }, + "keywords": [ + "ethereum", + "javascript", + "API" + ], + "authors": [ + { + "name": "Marek Kotewicz", + "email": "marek@ethdev.com", + "homepage": "https://github.com/debris" + }, + { + "name": "Marian Oancea", + "email": "marian@ethdev.com", + "homepage": "https://github.com/cubedro" + } + ], + "license": "LGPL-3.0", + "ignore": [ + "example", + "lib", + "node_modules", + "package.json", + ".bowerrc", + ".editorconfig", + ".gitignore", + ".jshintrc", + ".npmignore", + ".travis.yml", + "gulpfile.js", + "index.js", + "**/*.txt" + ] +} \ No newline at end of file diff --git a/cmd/ethtest/dist/ethereum.js b/cmd/ethtest/dist/ethereum.js new file mode 100644 index 0000000000..b64c15b9e2 --- /dev/null +++ b/cmd/ethtest/dist/ethereum.js @@ -0,0 +1,20 @@ +require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;oi&&(code=hex.charCodeAt(i),0!==code);i+=2)str+=String.fromCharCode(parseInt(hex.substr(i,2),16));return str},toDecimal:function(val){return parseInt(val,16)},fromAscii:function(str,pad){pad=void 0===pad?32:pad;for(var hex=this.toHex(str);hex.length<2*pad;)hex+="00";return"0x"+hex},eth:{prototype:Object(),watch:function(params){return new Filter(params,ethWatch)}},db:{prototype:Object()},shh:{prototype:Object(),watch:function(params){return new Filter(params,shhWatch)}},on:function(event,id,cb){return void 0===web3._events[event]&&(web3._events[event]={}),web3._events[event][id]=cb,this},off:function(event,id){return void 0!==web3._events[event]&&delete web3._events[event][id],this},trigger:function(event,id,data){var cb,callbacks=web3._events[event];callbacks&&callbacks[id]&&(cb=callbacks[id])(data)}};setupMethods(web3.eth,ethMethods()),setupProperties(web3.eth,ethProperties()),setupMethods(web3.db,dbMethods()),setupMethods(web3.shh,shhMethods()),ethWatch={changed:"eth_changed"},setupMethods(ethWatch,ethWatchMethods()),shhWatch={changed:"shh_changed"},setupMethods(shhWatch,shhWatchMethods()),ProviderManager=function(){var self,poll;this.queued=[],this.polls=[],this.ready=!1,this.provider=void 0,this.id=1,self=this,(poll=function(){self.provider&&self.provider.poll&&self.polls.forEach(function(data){data.data._id=self.id,self.id++,self.provider.poll(data.data,data.id)}),setTimeout(poll,12e3)})()},ProviderManager.prototype.send=function(data,cb){data._id=this.id,cb&&(web3._callbacks[data._id]=cb),data.args=data.args||[],this.id++,void 0!==this.provider?this.provider.send(data):(console.warn("provider is not set"),this.queued.push(data))},ProviderManager.prototype.set=function(provider){void 0!==this.provider&&void 0!==this.provider.unload&&this.provider.unload(),this.provider=provider,this.ready=!0},ProviderManager.prototype.sendQueued=function(){for(var i=0;this.queued.length;i++)this.send(this.queued[i])},ProviderManager.prototype.installed=function(){return void 0!==this.provider},ProviderManager.prototype.startPolling=function(data,pollId){this.provider&&this.provider.poll&&this.polls.push({data:data,id:pollId})},ProviderManager.prototype.stopPolling=function(pollId){var i,poll;for(i=this.polls.length;i--;)poll=this.polls[i],poll.id===pollId&&this.polls.splice(i,1)},web3.provider=new ProviderManager,web3.setProvider=function(provider){provider.onmessage=messageHandler,web3.provider.set(provider),web3.provider.sendQueued()},web3.haveProvider=function(){return!!web3.provider.provider},Filter=function(options,impl){this.impl=impl,this.callbacks=[];var self=this;this.promise=impl.newFilter(options),this.promise.then(function(id){self.id=id,web3.on(impl.changed,id,self.trigger.bind(self)),web3.provider.startPolling({call:impl.changed,args:[id]},id)})},Filter.prototype.arrived=function(callback){this.changed(callback)},Filter.prototype.changed=function(callback){var self=this;this.promise.then(function(id){self.callbacks.push(callback)})},Filter.prototype.trigger=function(messages){for(var i=0;ii&&(code=hex.charCodeAt(i),0!==code);i+=2)str+=String.fromCharCode(parseInt(hex.substr(i,2),16));return str},toDecimal:function(val){return parseInt(val,16)},fromAscii:function(str,pad){pad=void 0===pad?32:pad;for(var hex=this.toHex(str);hex.length<2*pad;)hex+=\"00\";return\"0x\"+hex},eth:{prototype:Object(),watch:function(params){return new Filter(params,ethWatch)}},db:{prototype:Object()},shh:{prototype:Object(),watch:function(params){return new Filter(params,shhWatch)}},on:function(event,id,cb){return void 0===web3._events[event]&&(web3._events[event]={}),web3._events[event][id]=cb,this},off:function(event,id){return void 0!==web3._events[event]&&delete web3._events[event][id],this},trigger:function(event,id,data){var cb,callbacks=web3._events[event];callbacks&&callbacks[id]&&(cb=callbacks[id])(data)}};setupMethods(web3.eth,ethMethods()),setupProperties(web3.eth,ethProperties()),setupMethods(web3.db,dbMethods()),setupMethods(web3.shh,shhMethods()),ethWatch={changed:\"eth_changed\"},setupMethods(ethWatch,ethWatchMethods()),shhWatch={changed:\"shh_changed\"},setupMethods(shhWatch,shhWatchMethods()),ProviderManager=function(){var self,poll;this.queued=[],this.polls=[],this.ready=!1,this.provider=void 0,this.id=1,self=this,(poll=function(){self.provider&&self.provider.poll&&self.polls.forEach(function(data){data.data._id=self.id,self.id++,self.provider.poll(data.data,data.id)}),setTimeout(poll,12e3)})()},ProviderManager.prototype.send=function(data,cb){data._id=this.id,cb&&(web3._callbacks[data._id]=cb),data.args=data.args||[],this.id++,void 0!==this.provider?this.provider.send(data):(console.warn(\"provider is not set\"),this.queued.push(data))},ProviderManager.prototype.set=function(provider){void 0!==this.provider&&void 0!==this.provider.unload&&this.provider.unload(),this.provider=provider,this.ready=!0},ProviderManager.prototype.sendQueued=function(){for(var i=0;this.queued.length;i++)this.send(this.queued[i])},ProviderManager.prototype.installed=function(){return void 0!==this.provider},ProviderManager.prototype.startPolling=function(data,pollId){this.provider&&this.provider.poll&&this.polls.push({data:data,id:pollId})},ProviderManager.prototype.stopPolling=function(pollId){var i,poll;for(i=this.polls.length;i--;)poll=this.polls[i],poll.id===pollId&&this.polls.splice(i,1)},web3.provider=new ProviderManager,web3.setProvider=function(provider){provider.onmessage=messageHandler,web3.provider.set(provider),web3.provider.sendQueued()},web3.haveProvider=function(){return!!web3.provider.provider},Filter=function(options,impl){this.impl=impl,this.callbacks=[];var self=this;this.promise=impl.newFilter(options),this.promise.then(function(id){self.id=id,web3.on(impl.changed,id,self.trigger.bind(self)),web3.provider.startPolling({call:impl.changed,args:[id]},id)})},Filter.prototype.arrived=function(callback){this.changed(callback)},Filter.prototype.changed=function(callback){var self=this;this.promise.then(function(id){self.callbacks.push(callback)})},Filter.prototype.trigger=function(messages){for(var i=0;ir&&(e=t.charCodeAt(r),0!==e);r+=2)n+=String.fromCharCode(parseInt(t.substr(r,2),16));return n},toDecimal:function(t){return parseInt(t,16)},fromAscii:function(t,e){e=void 0===e?32:e;for(var n=this.toHex(t);n.length<2*e;)n+="00";return"0x"+n},eth:{prototype:Object(),watch:function(t){return new a(t,o)}},db:{prototype:Object()},shh:{prototype:Object(),watch:function(t){return new a(t,i)}},on:function(t,e,n){return void 0===g._events[t]&&(g._events[t]={}),g._events[t][e]=n,this},off:function(t,e){return void 0!==g._events[t]&&delete g._events[t][e],this},trigger:function(t,e,n){var r,o=g._events[t];o&&o[e]&&(r=o[e])(n)}};f(g.eth,u()),v(g.eth,c()),f(g.db,l()),f(g.shh,h()),o={changed:"eth_changed"},f(o,p()),i={changed:"shh_changed"},f(i,d()),s=function(){var t,e;this.queued=[],this.polls=[],this.ready=!1,this.provider=void 0,this.id=1,t=this,(e=function(){t.provider&&t.provider.poll&&t.polls.forEach(function(e){e.data._id=t.id,t.id++,t.provider.poll(e.data,e.id)}),setTimeout(e,12e3)})()},s.prototype.send=function(t,e){t._id=this.id,e&&(g._callbacks[t._id]=e),t.args=t.args||[],this.id++,void 0!==this.provider?this.provider.send(t):(console.warn("provider is not set"),this.queued.push(t))},s.prototype.set=function(t){void 0!==this.provider&&void 0!==this.provider.unload&&this.provider.unload(),this.provider=t,this.ready=!0},s.prototype.sendQueued=function(){for(var t=0;this.queued.length;t++)this.send(this.queued[t])},s.prototype.installed=function(){return void 0!==this.provider},s.prototype.startPolling=function(t,e){this.provider&&this.provider.poll&&this.polls.push({data:t,id:e})},s.prototype.stopPolling=function(t){var e,n;for(e=this.polls.length;e--;)n=this.polls[e],n.id===t&&this.polls.splice(e,1)},g.provider=new s,g.setProvider=function(t){t.onmessage=r,g.provider.set(t),g.provider.sendQueued()},g.haveProvider=function(){return!!g.provider.provider},a=function(t,e){this.impl=e,this.callbacks=[];var n=this;this.promise=e.newFilter(t),this.promise.then(function(t){n.id=t,g.on(e.changed,t,n.trigger.bind(n)),g.provider.startPolling({call:e.changed,args:[t]},t)})},a.prototype.arrived=function(t){this.changed(t)},a.prototype.changed=function(t){var e=this;this.promise.then(function(){e.callbacks.push(t)})},a.prototype.trigger=function(t){for(var e=0;e + + + + + + + + +

contract

+
+
+ +
+ +
+ + + diff --git a/cmd/ethtest/example/index.html b/cmd/ethtest/example/index.html new file mode 100644 index 0000000000..d0bf094ef2 --- /dev/null +++ b/cmd/ethtest/example/index.html @@ -0,0 +1,41 @@ + + + + + + + + + +

coinbase balance

+ +
+
+
+
+ + + diff --git a/cmd/ethtest/example/node-app.js b/cmd/ethtest/example/node-app.js new file mode 100644 index 0000000000..f63fa9115f --- /dev/null +++ b/cmd/ethtest/example/node-app.js @@ -0,0 +1,16 @@ +#!/usr/bin/env node + +require('es6-promise').polyfill(); + +var web3 = require("../index.js"); + +web3.setProvider(new web3.providers.HttpRpcProvider('http://localhost:8080')); + +web3.eth.coinbase.then(function(result){ + console.log(result); + return web3.eth.balanceAt(result); +}).then(function(balance){ + console.log(web3.toDecimal(balance)); +}).catch(function(err){ + console.log(err); +}); \ No newline at end of file diff --git a/cmd/ethtest/gulpfile.js b/cmd/ethtest/gulpfile.js new file mode 100644 index 0000000000..9e0717d8b1 --- /dev/null +++ b/cmd/ethtest/gulpfile.js @@ -0,0 +1,123 @@ +#!/usr/bin/env node + +'use strict'; + +var path = require('path'); + +var del = require('del'); +var gulp = require('gulp'); +var browserify = require('browserify'); +var jshint = require('gulp-jshint'); +var uglify = require('gulp-uglify'); +var rename = require('gulp-rename'); +var envify = require('envify/custom'); +var unreach = require('unreachable-branch-transform'); +var source = require('vinyl-source-stream'); +var exorcist = require('exorcist'); +var bower = require('bower'); + +var DEST = './dist/'; + +var build = function(src, dst) { + return browserify({ + debug: true, + insert_global_vars: false, + detectGlobals: false, + bundleExternal: false + }) + .require('./' + src + '.js', {expose: 'web3'}) + .add('./' + src + '.js') + .transform('envify', { + NODE_ENV: 'build' + }) + .transform('unreachable-branch-transform') + .transform('uglifyify', { + mangle: false, + compress: { + dead_code: false, + conditionals: true, + unused: false, + hoist_funs: true, + hoist_vars: true, + negate_iife: false + }, + beautify: true, + warnings: true + }) + .bundle() + .pipe(exorcist(path.join( DEST, dst + '.js.map'))) + .pipe(source(dst + '.js')) + .pipe(gulp.dest( DEST )); +}; + +var buildDev = function(src, dst) { + return browserify({ + debug: true, + insert_global_vars: false, + detectGlobals: false, + bundleExternal: false + }) + .require('./' + src + '.js', {expose: 'web3'}) + .add('./' + src + '.js') + .transform('envify', { + NODE_ENV: 'build' + }) + .transform('unreachable-branch-transform') + .bundle() + .pipe(exorcist(path.join( DEST, dst + '.js.map'))) + .pipe(source(dst + '.js')) + .pipe(gulp.dest( DEST )); +}; + +var uglifyFile = function(file) { + return gulp.src( DEST + file + '.js') + .pipe(uglify()) + .pipe(rename(file + '.min.js')) + .pipe(gulp.dest( DEST )); +}; + +gulp.task('bower', function(cb){ + bower.commands.install().on('end', function (installed){ + console.log(installed); + cb(); + }); +}); + +gulp.task('lint', function(){ + return gulp.src(['./*.js', './lib/*.js']) + .pipe(jshint()) + .pipe(jshint.reporter('default')); +}); + +gulp.task('clean', ['lint'], function(cb) { + del([ DEST ], cb); +}); + +gulp.task('build', ['clean'], function () { + return build('index', 'ethereum'); +}); + +gulp.task('buildQt', ['clean'], function () { + return build('index_qt', 'ethereum'); +}); + +gulp.task('buildDev', ['clean'], function () { + return buildDev('index', 'ethereum'); +}); + +gulp.task('uglify', ['build'], function(){ + return uglifyFile('ethereum'); +}); + +gulp.task('uglifyQt', ['buildQt'], function () { + return uglifyFile('ethereum'); +}); + +gulp.task('watch', function() { + gulp.watch(['./lib/*.js'], ['lint', 'prepare', 'build']); +}); + +gulp.task('default', ['bower', 'lint', 'build', 'uglify']); +gulp.task('qt', ['bower', 'lint', 'buildQt', 'uglifyQt']); +gulp.task('dev', ['bower', 'lint', 'buildDev']); + diff --git a/cmd/ethtest/index.js b/cmd/ethtest/index.js new file mode 100644 index 0000000000..c2de7e735e --- /dev/null +++ b/cmd/ethtest/index.js @@ -0,0 +1,8 @@ +var web3 = require('./lib/main'); +web3.providers.WebSocketProvider = require('./lib/websocket'); +web3.providers.HttpRpcProvider = require('./lib/httprpc'); +web3.providers.QtProvider = require('./lib/qt'); +web3.providers.AutoProvider = require('./lib/autoprovider'); +web3.contract = require('./lib/contract'); + +module.exports = web3; diff --git a/cmd/ethtest/index_qt.js b/cmd/ethtest/index_qt.js new file mode 100644 index 0000000000..d5e47597e4 --- /dev/null +++ b/cmd/ethtest/index_qt.js @@ -0,0 +1,5 @@ +var web3 = require('./lib/main'); +web3.providers.QtProvider = require('./lib/qt'); +web3.contract = require('./lib/contract'); + +module.exports = web3; diff --git a/cmd/ethtest/lib/abi.js b/cmd/ethtest/lib/abi.js new file mode 100644 index 0000000000..2cff503d38 --- /dev/null +++ b/cmd/ethtest/lib/abi.js @@ -0,0 +1,218 @@ +/* + This file is part of ethereum.js. + + ethereum.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ethereum.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with ethereum.js. If not, see . +*/ +/** @file abi.js + * @authors: + * Marek Kotewicz + * Gav Wood + * @date 2014 + */ + +// TODO: make these be actually accurate instead of falling back onto JS's doubles. +var hexToDec = function (hex) { + return parseInt(hex, 16).toString(); +}; + +var decToHex = function (dec) { + return parseInt(dec).toString(16); +}; + +var findIndex = function (array, callback) { + var end = false; + var i = 0; + for (; i < array.length && !end; i++) { + end = callback(array[i]); + } + return end ? i - 1 : -1; +}; + +var findMethodIndex = function (json, methodName) { + return findIndex(json, function (method) { + return method.name === methodName; + }); +}; + +var padLeft = function (string, chars) { + return Array(chars - string.length + 1).join("0") + string; +}; + +var setupInputTypes = function () { + var prefixedType = function (prefix) { + return function (type, value) { + var expected = prefix; + if (type.indexOf(expected) !== 0) { + return false; + } + + var padding = parseInt(type.slice(expected.length)) / 8; + if (typeof value === "number") + value = value.toString(16); + else if (value.indexOf('0x') === 0) + value = value.substr(2); + else + value = (+value).toString(16); + return padLeft(value, padding * 2); + }; + }; + + var namedType = function (name, padding, formatter) { + return function (type, value) { + if (type !== name) { + return false; + } + + return padLeft(formatter ? formatter(value) : value, padding * 2); + }; + }; + + var formatBool = function (value) { + return value ? '0x1' : '0x0'; + }; + + return [ + prefixedType('uint'), + prefixedType('int'), + prefixedType('hash'), + namedType('address', 20), + namedType('bool', 1, formatBool), + ]; +}; + +var inputTypes = setupInputTypes(); + +var toAbiInput = function (json, methodName, params) { + var bytes = ""; + var index = findMethodIndex(json, methodName); + + if (index === -1) { + return; + } + + bytes = "0x" + padLeft(index.toString(16), 2); + var method = json[index]; + + for (var i = 0; i < method.inputs.length; i++) { + var found = false; + for (var j = 0; j < inputTypes.length && !found; j++) { + found = inputTypes[j](method.inputs[i].type, params[i]); + } + if (!found) { + console.error('unsupported json type: ' + method.inputs[i].type); + } + bytes += found; + } + return bytes; +}; + +var setupOutputTypes = function () { + var prefixedType = function (prefix) { + return function (type) { + var expected = prefix; + if (type.indexOf(expected) !== 0) { + return -1; + } + + var padding = parseInt(type.slice(expected.length)) / 8; + return padding * 2; + }; + }; + + var namedType = function (name, padding) { + return function (type) { + return name === type ? padding * 2 : -1; + }; + }; + + var formatInt = function (value) { + return value.length <= 8 ? +parseInt(value, 16) : hexToDec(value); + }; + + var formatHash = function (value) { + return "0x" + value; + }; + + var formatBool = function (value) { + return value === '1' ? true : false; + }; + + return [ + { padding: prefixedType('uint'), format: formatInt }, + { padding: prefixedType('int'), format: formatInt }, + { padding: prefixedType('hash'), format: formatHash }, + { padding: namedType('address', 20) }, + { padding: namedType('bool', 1), format: formatBool } + ]; +}; + +var outputTypes = setupOutputTypes(); + +var fromAbiOutput = function (json, methodName, output) { + var index = findMethodIndex(json, methodName); + + if (index === -1) { + return; + } + + output = output.slice(2); + + var result = []; + var method = json[index]; + for (var i = 0; i < method.outputs.length; i++) { + var padding = -1; + for (var j = 0; j < outputTypes.length && padding === -1; j++) { + padding = outputTypes[j].padding(method.outputs[i].type); + } + + if (padding === -1) { + // not found output parsing + continue; + } + var res = output.slice(0, padding); + var formatter = outputTypes[j - 1].format; + result.push(formatter ? formatter(res) : ("0x" + res)); + output = output.slice(padding); + } + + return result; +}; + +var inputParser = function (json) { + var parser = {}; + json.forEach(function (method) { + parser[method.name] = function () { + var params = Array.prototype.slice.call(arguments); + return toAbiInput(json, method.name, params); + }; + }); + + return parser; +}; + +var outputParser = function (json) { + var parser = {}; + json.forEach(function (method) { + parser[method.name] = function (output) { + return fromAbiOutput(json, method.name, output); + }; + }); + + return parser; +}; + +module.exports = { + inputParser: inputParser, + outputParser: outputParser +}; diff --git a/cmd/ethtest/lib/autoprovider.js b/cmd/ethtest/lib/autoprovider.js new file mode 100644 index 0000000000..bfbc3ab6e1 --- /dev/null +++ b/cmd/ethtest/lib/autoprovider.js @@ -0,0 +1,103 @@ +/* + This file is part of ethereum.js. + + ethereum.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ethereum.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with ethereum.js. If not, see . +*/ +/** @file autoprovider.js + * @authors: + * Marek Kotewicz + * Marian Oancea + * @date 2014 + */ + +/* + * @brief if qt object is available, uses QtProvider, + * if not tries to connect over websockets + * if it fails, it uses HttpRpcProvider + */ + +// TODO: work out which of the following two lines it is supposed to be... +//if (process.env.NODE_ENV !== 'build') { +if ("build" !== 'build') {/* + var WebSocket = require('ws'); // jshint ignore:line + var web3 = require('./main.js'); // jshint ignore:line +*/} + +var AutoProvider = function (userOptions) { + if (web3.haveProvider()) { + return; + } + + // before we determine what provider we are, we have to cache request + this.sendQueue = []; + this.onmessageQueue = []; + + if (navigator.qt) { + this.provider = new web3.providers.QtProvider(); + return; + } + + userOptions = userOptions || {}; + var options = { + httprpc: userOptions.httprpc || 'http://localhost:8080', + websockets: userOptions.websockets || 'ws://localhost:40404/eth' + }; + + var self = this; + var closeWithSuccess = function (success) { + ws.close(); + if (success) { + self.provider = new web3.providers.WebSocketProvider(options.websockets); + } else { + self.provider = new web3.providers.HttpRpcProvider(options.httprpc); + self.poll = self.provider.poll.bind(self.provider); + } + self.sendQueue.forEach(function (payload) { + self.provider(payload); + }); + self.onmessageQueue.forEach(function (handler) { + self.provider.onmessage = handler; + }); + }; + + var ws = new WebSocket(options.websockets); + + ws.onopen = function() { + closeWithSuccess(true); + }; + + ws.onerror = function() { + closeWithSuccess(false); + }; +}; + +AutoProvider.prototype.send = function (payload) { + if (this.provider) { + this.provider.send(payload); + return; + } + this.sendQueue.push(payload); +}; + +Object.defineProperty(AutoProvider.prototype, 'onmessage', { + set: function (handler) { + if (this.provider) { + this.provider.onmessage = handler; + return; + } + this.onmessageQueue.push(handler); + } +}); + +module.exports = AutoProvider; diff --git a/cmd/ethtest/lib/contract.js b/cmd/ethtest/lib/contract.js new file mode 100644 index 0000000000..17b077484b --- /dev/null +++ b/cmd/ethtest/lib/contract.js @@ -0,0 +1,65 @@ +/* + This file is part of ethereum.js. + + ethereum.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ethereum.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with ethereum.js. If not, see . +*/ +/** @file contract.js + * @authors: + * Marek Kotewicz + * @date 2014 + */ + +// TODO: work out which of the following two lines it is supposed to be... +//if (process.env.NODE_ENV !== 'build') { +if ("build" !== 'build') {/* + var web3 = require('./web3'); // jshint ignore:line +*/} +var abi = require('./abi'); + +var contract = function (address, desc) { + var inputParser = abi.inputParser(desc); + var outputParser = abi.outputParser(desc); + + var contract = {}; + + desc.forEach(function (method) { + contract[method.name] = function () { + var params = Array.prototype.slice.call(arguments); + var parsed = inputParser[method.name].apply(null, params); + + var onSuccess = function (result) { + return outputParser[method.name](result); + }; + + return { + call: function (extra) { + extra = extra || {}; + extra.to = address; + extra.data = parsed; + return web3.eth.call(extra).then(onSuccess); + }, + transact: function (extra) { + extra = extra || {}; + extra.to = address; + extra.data = parsed; + return web3.eth.transact(extra).then(onSuccess); + } + }; + }; + }); + + return contract; +}; + +module.exports = contract; diff --git a/cmd/ethtest/lib/httprpc.js b/cmd/ethtest/lib/httprpc.js new file mode 100644 index 0000000000..ee6b5c3070 --- /dev/null +++ b/cmd/ethtest/lib/httprpc.js @@ -0,0 +1,95 @@ +/* + This file is part of ethereum.js. + + ethereum.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ethereum.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with ethereum.js. If not, see . +*/ +/** @file httprpc.js + * @authors: + * Marek Kotewicz + * Marian Oancea + * @date 2014 + */ + +// TODO: work out which of the following two lines it is supposed to be... +//if (process.env.NODE_ENV !== 'build') { +if ("build" !== "build") {/* + var XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest; // jshint ignore:line +*/} + +var HttpRpcProvider = function (host) { + this.handlers = []; + this.host = host; +}; + +function formatJsonRpcObject(object) { + return { + jsonrpc: '2.0', + method: object.call, + params: object.args, + id: object._id + }; +} + +function formatJsonRpcMessage(message) { + var object = JSON.parse(message); + + return { + _id: object.id, + data: object.result, + error: object.error + }; +} + +HttpRpcProvider.prototype.sendRequest = function (payload, cb) { + var data = formatJsonRpcObject(payload); + + var request = new XMLHttpRequest(); + request.open("POST", this.host, true); + request.send(JSON.stringify(data)); + request.onreadystatechange = function () { + if (request.readyState === 4 && cb) { + cb(request); + } + }; +}; + +HttpRpcProvider.prototype.send = function (payload) { + var self = this; + this.sendRequest(payload, function (request) { + self.handlers.forEach(function (handler) { + handler.call(self, formatJsonRpcMessage(request.responseText)); + }); + }); +}; + +HttpRpcProvider.prototype.poll = function (payload, id) { + var self = this; + this.sendRequest(payload, function (request) { + var parsed = JSON.parse(request.responseText); + if (parsed.error || (parsed.result instanceof Array ? parsed.result.length === 0 : !parsed.result)) { + return; + } + self.handlers.forEach(function (handler) { + handler.call(self, {_event: payload.call, _id: id, data: parsed.result}); + }); + }); +}; + +Object.defineProperty(HttpRpcProvider.prototype, "onmessage", { + set: function (handler) { + this.handlers.push(handler); + } +}); + +module.exports = HttpRpcProvider; diff --git a/cmd/ethtest/lib/main.js b/cmd/ethtest/lib/main.js new file mode 100644 index 0000000000..59c60cfa81 --- /dev/null +++ b/cmd/ethtest/lib/main.js @@ -0,0 +1,494 @@ +/* + This file is part of ethereum.js. + + ethereum.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ethereum.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with ethereum.js. If not, see . +*/ +/** @file main.js + * @authors: + * Jeffrey Wilcke + * Marek Kotewicz + * Marian Oancea + * Gav Wood + * @date 2014 + */ + +function flattenPromise (obj) { + if (obj instanceof Promise) { + return Promise.resolve(obj); + } + + if (obj instanceof Array) { + return new Promise(function (resolve) { + var promises = obj.map(function (o) { + return flattenPromise(o); + }); + + return Promise.all(promises).then(function (res) { + for (var i = 0; i < obj.length; i++) { + obj[i] = res[i]; + } + resolve(obj); + }); + }); + } + + if (obj instanceof Object) { + return new Promise(function (resolve) { + var keys = Object.keys(obj); + var promises = keys.map(function (key) { + return flattenPromise(obj[key]); + }); + + return Promise.all(promises).then(function (res) { + for (var i = 0; i < keys.length; i++) { + obj[keys[i]] = res[i]; + } + resolve(obj); + }); + }); + } + + return Promise.resolve(obj); +} + +var web3Methods = function () { + return [ + { name: 'sha3', call: 'web3_sha3' } + ]; +}; + +var ethMethods = function () { + var blockCall = function (args) { + return typeof args[0] === "string" ? "eth_blockByHash" : "eth_blockByNumber"; + }; + + var transactionCall = function (args) { + return typeof args[0] === "string" ? 'eth_transactionByHash' : 'eth_transactionByNumber'; + }; + + var uncleCall = function (args) { + return typeof args[0] === "string" ? 'eth_uncleByHash' : 'eth_uncleByNumber'; + }; + + var methods = [ + { name: 'balanceAt', call: 'eth_balanceAt' }, + { name: 'stateAt', call: 'eth_stateAt' }, + { name: 'storageAt', call: 'eth_storageAt' }, + { name: 'countAt', call: 'eth_countAt'}, + { name: 'codeAt', call: 'eth_codeAt' }, + { name: 'transact', call: 'eth_transact' }, + { name: 'call', call: 'eth_call' }, + { name: 'block', call: blockCall }, + { name: 'transaction', call: transactionCall }, + { name: 'uncle', call: uncleCall }, + { name: 'compilers', call: 'eth_compilers' }, + { name: 'lll', call: 'eth_lll' }, + { name: 'solidity', call: 'eth_solidity' }, + { name: 'serpent', call: 'eth_serpent' }, + { name: 'logs', call: 'eth_logs' } + ]; + return methods; +}; + +var ethProperties = function () { + return [ + { name: 'coinbase', getter: 'eth_coinbase', setter: 'eth_setCoinbase' }, + { name: 'listening', getter: 'eth_listening', setter: 'eth_setListening' }, + { name: 'mining', getter: 'eth_mining', setter: 'eth_setMining' }, + { name: 'gasPrice', getter: 'eth_gasPrice' }, + { name: 'account', getter: 'eth_account' }, + { name: 'accounts', getter: 'eth_accounts' }, + { name: 'peerCount', getter: 'eth_peerCount' }, + { name: 'defaultBlock', getter: 'eth_defaultBlock', setter: 'eth_setDefaultBlock' }, + { name: 'number', getter: 'eth_number'} + ]; +}; + +var dbMethods = function () { + return [ + { name: 'put', call: 'db_put' }, + { name: 'get', call: 'db_get' }, + { name: 'putString', call: 'db_putString' }, + { name: 'getString', call: 'db_getString' } + ]; +}; + +var shhMethods = function () { + return [ + { name: 'post', call: 'shh_post' }, + { name: 'newIdentity', call: 'shh_newIdentity' }, + { name: 'haveIdentity', call: 'shh_haveIdentity' }, + { name: 'newGroup', call: 'shh_newGroup' }, + { name: 'addToGroup', call: 'shh_addToGroup' } + ]; +}; + +var ethWatchMethods = function () { + var newFilter = function (args) { + return typeof args[0] === 'string' ? 'eth_newFilterString' : 'eth_newFilter'; + }; + + return [ + { name: 'newFilter', call: newFilter }, + { name: 'uninstallFilter', call: 'eth_uninstallFilter' }, + { name: 'getMessages', call: 'eth_filterLogs' } + ]; +}; + +var shhWatchMethods = function () { + return [ + { name: 'newFilter', call: 'shh_newFilter' }, + { name: 'uninstallFilter', call: 'shh_uninstallFilter' }, + { name: 'getMessage', call: 'shh_getMessages' } + ]; +}; + +var setupMethods = function (obj, methods) { + methods.forEach(function (method) { + obj[method.name] = function () { + return flattenPromise(Array.prototype.slice.call(arguments)).then(function (args) { + var call = typeof method.call === "function" ? method.call(args) : method.call; + return {call: call, args: args}; + }).then(function (request) { + return new Promise(function (resolve, reject) { + web3.provider.send(request, function (err, result) { + if (!err) { + resolve(result); + return; + } + reject(err); + }); + }); + }).catch(function(err) { + console.error(err); + }); + }; + }); +}; + +var setupProperties = function (obj, properties) { + properties.forEach(function (property) { + var proto = {}; + proto.get = function () { + return new Promise(function(resolve, reject) { + web3.provider.send({call: property.getter}, function(err, result) { + if (!err) { + resolve(result); + return; + } + reject(err); + }); + }); + }; + if (property.setter) { + proto.set = function (val) { + return flattenPromise([val]).then(function (args) { + return new Promise(function (resolve) { + web3.provider.send({call: property.setter, args: args}, function (err, result) { + if (!err) { + resolve(result); + return; + } + reject(err); + }); + }); + }).catch(function (err) { + console.error(err); + }); + }; + } + Object.defineProperty(obj, property.name, proto); + }); +}; + +// TODO: import from a dependency, don't duplicate. +var hexToDec = function (hex) { + return parseInt(hex, 16).toString(); +}; + +var decToHex = function (dec) { + return parseInt(dec).toString(16); +}; + + +var web3 = { + _callbacks: {}, + _events: {}, + providers: {}, + + toAscii: function(hex) { + // Find termination + var str = ""; + var i = 0, l = hex.length; + if (hex.substring(0, 2) === '0x') + i = 2; + for(; i < l; i+=2) { + var code = hex.charCodeAt(i); + if(code === 0) { + break; + } + + str += String.fromCharCode(parseInt(hex.substr(i, 2), 16)); + } + + return str; + }, + + fromAscii: function(str, pad) { + pad = pad === undefined ? 32 : pad; + var hex = this.toHex(str); + while(hex.length < pad*2) + hex += "00"; + return "0x" + hex; + }, + + toDecimal: function (val) { + return hexToDec(val.substring(2)); + }, + + fromDecimal: function (val) { + return "0x" + decToHex(val); + }, + + toEth: function(str) { + var val = typeof str === "string" ? str.indexOf('0x') == 0 ? parseInt(str.substr(2), 16) : parseInt(str) : str; + var unit = 0; + var units = [ 'wei', 'Kwei', 'Mwei', 'Gwei', 'szabo', 'finney', 'ether', 'grand', 'Mether', 'Gether', 'Tether', 'Pether', 'Eether', 'Zether', 'Yether', 'Nether', 'Dether', 'Vether', 'Uether' ]; + while (val > 3000 && unit < units.length - 1) + { + val /= 1000; + unit++; + } + var s = val.toString().length < val.toFixed(2).length ? val.toString() : val.toFixed(2); + while (true) { + var o = s; + s = s.replace(/(\d)(\d\d\d[\.\,])/, function($0, $1, $2) { return $1 + ',' + $2; }); + if (o == s) + break; + } + return s + ' ' + units[unit]; + }, + + eth: { + prototype: Object(), // jshint ignore:line + watch: function (params) { + return new Filter(params, ethWatch); + } + }, + + db: { + prototype: Object() // jshint ignore:line + }, + + shh: { + prototype: Object(), // jshint ignore:line + watch: function (params) { + return new Filter(params, shhWatch); + } + }, + + on: function(event, id, cb) { + if(web3._events[event] === undefined) { + web3._events[event] = {}; + } + + web3._events[event][id] = cb; + return this; + }, + + off: function(event, id) { + if(web3._events[event] !== undefined) { + delete web3._events[event][id]; + } + + return this; + }, + + trigger: function(event, id, data) { + var callbacks = web3._events[event]; + if (!callbacks || !callbacks[id]) { + return; + } + var cb = callbacks[id]; + cb(data); + } +}; + +setupMethods(web3, web3Methods()); +setupMethods(web3.eth, ethMethods()); +setupProperties(web3.eth, ethProperties()); +setupMethods(web3.db, dbMethods()); +setupMethods(web3.shh, shhMethods()); + +var ethWatch = { + changed: 'eth_changed' +}; +setupMethods(ethWatch, ethWatchMethods()); +var shhWatch = { + changed: 'shh_changed' +}; +setupMethods(shhWatch, shhWatchMethods()); + +var ProviderManager = function() { + this.queued = []; + this.polls = []; + this.ready = false; + this.provider = undefined; + this.id = 1; + + var self = this; + var poll = function () { + if (self.provider && self.provider.poll) { + self.polls.forEach(function (data) { + data.data._id = self.id; + self.id++; + self.provider.poll(data.data, data.id); + }); + } + setTimeout(poll, 12000); + }; + poll(); +}; + +ProviderManager.prototype.send = function(data, cb) { + data._id = this.id; + if (cb) { + web3._callbacks[data._id] = cb; + } + + data.args = data.args || []; + this.id++; + + if(this.provider !== undefined) { + this.provider.send(data); + } else { + console.warn("provider is not set"); + this.queued.push(data); + } +}; + +ProviderManager.prototype.set = function(provider) { + if(this.provider !== undefined && this.provider.unload !== undefined) { + this.provider.unload(); + } + + this.provider = provider; + this.ready = true; +}; + +ProviderManager.prototype.sendQueued = function() { + for(var i = 0; this.queued.length; i++) { + // Resend + this.send(this.queued[i]); + } +}; + +ProviderManager.prototype.installed = function() { + return this.provider !== undefined; +}; + +ProviderManager.prototype.startPolling = function (data, pollId) { + if (!this.provider || !this.provider.poll) { + return; + } + this.polls.push({data: data, id: pollId}); +}; + +ProviderManager.prototype.stopPolling = function (pollId) { + for (var i = this.polls.length; i--;) { + var poll = this.polls[i]; + if (poll.id === pollId) { + this.polls.splice(i, 1); + } + } +}; + +web3.provider = new ProviderManager(); + +web3.setProvider = function(provider) { + provider.onmessage = messageHandler; + web3.provider.set(provider); + web3.provider.sendQueued(); +}; + +web3.haveProvider = function() { + return !!web3.provider.provider; +}; + +var Filter = function(options, impl) { + this.impl = impl; + this.callbacks = []; + + var self = this; + this.promise = impl.newFilter(options); + this.promise.then(function (id) { + self.id = id; + web3.on(impl.changed, id, self.trigger.bind(self)); + web3.provider.startPolling({call: impl.changed, args: [id]}, id); + }); +}; + +Filter.prototype.arrived = function(callback) { + this.changed(callback); +}; + +Filter.prototype.changed = function(callback) { + var self = this; + this.promise.then(function(id) { + self.callbacks.push(callback); + }); +}; + +Filter.prototype.trigger = function(messages) { + for(var i = 0; i < this.callbacks.length; i++) { + this.callbacks[i].call(this, messages); + } +}; + +Filter.prototype.uninstall = function() { + var self = this; + this.promise.then(function (id) { + self.impl.uninstallFilter(id); + web3.provider.stopPolling(id); + web3.off(impl.changed, id); + }); +}; + +Filter.prototype.messages = function() { + var self = this; + return this.promise.then(function (id) { + return self.impl.getMessages(id); + }); +}; + +Filter.prototype.logs = function () { + return this.messages(); +}; + +function messageHandler(data) { + if(data._event !== undefined) { + web3.trigger(data._event, data._id, data.data); + return; + } + + if(data._id) { + var cb = web3._callbacks[data._id]; + if (cb) { + cb.call(this, data.error, data.data); + delete web3._callbacks[data._id]; + } + } +} + +module.exports = web3; diff --git a/cmd/ethtest/lib/qt.js b/cmd/ethtest/lib/qt.js new file mode 100644 index 0000000000..f022395476 --- /dev/null +++ b/cmd/ethtest/lib/qt.js @@ -0,0 +1,45 @@ +/* + This file is part of ethereum.js. + + ethereum.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ethereum.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with ethereum.js. If not, see . +*/ +/** @file qt.js + * @authors: + * Jeffrey Wilcke + * Marek Kotewicz + * @date 2014 + */ + +var QtProvider = function() { + this.handlers = []; + + var self = this; + navigator.qt.onmessage = function (message) { + self.handlers.forEach(function (handler) { + handler.call(self, JSON.parse(message.data)); + }); + }; +}; + +QtProvider.prototype.send = function(payload) { + navigator.qt.postMessage(JSON.stringify(payload)); +}; + +Object.defineProperty(QtProvider.prototype, "onmessage", { + set: function(handler) { + this.handlers.push(handler); + } +}); + +module.exports = QtProvider; diff --git a/cmd/ethtest/lib/websocket.js b/cmd/ethtest/lib/websocket.js new file mode 100644 index 0000000000..24a0725313 --- /dev/null +++ b/cmd/ethtest/lib/websocket.js @@ -0,0 +1,78 @@ +/* + This file is part of ethereum.js. + + ethereum.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ethereum.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with ethereum.js. If not, see . +*/ +/** @file websocket.js + * @authors: + * Jeffrey Wilcke + * Marek Kotewicz + * Marian Oancea + * @date 2014 + */ + +// TODO: work out which of the following two lines it is supposed to be... +//if (process.env.NODE_ENV !== 'build') { +if ("build" !== "build") {/* + var WebSocket = require('ws'); // jshint ignore:line +*/} + +var WebSocketProvider = function(host) { + // onmessage handlers + this.handlers = []; + // queue will be filled with messages if send is invoked before the ws is ready + this.queued = []; + this.ready = false; + + this.ws = new WebSocket(host); + + var self = this; + this.ws.onmessage = function(event) { + for(var i = 0; i < self.handlers.length; i++) { + self.handlers[i].call(self, JSON.parse(event.data), event); + } + }; + + this.ws.onopen = function() { + self.ready = true; + + for(var i = 0; i < self.queued.length; i++) { + // Resend + self.send(self.queued[i]); + } + }; +}; + +WebSocketProvider.prototype.send = function(payload) { + if(this.ready) { + var data = JSON.stringify(payload); + + this.ws.send(data); + } else { + this.queued.push(payload); + } +}; + +WebSocketProvider.prototype.onMessage = function(handler) { + this.handlers.push(handler); +}; + +WebSocketProvider.prototype.unload = function() { + this.ws.close(); +}; +Object.defineProperty(WebSocketProvider.prototype, "onmessage", { + set: function(provider) { this.onMessage(provider); } +}); + +module.exports = WebSocketProvider; diff --git a/cmd/ethtest/package.json b/cmd/ethtest/package.json new file mode 100644 index 0000000000..24141ea2e4 --- /dev/null +++ b/cmd/ethtest/package.json @@ -0,0 +1,67 @@ +{ + "name": "ethereum.js", + "namespace": "ethereum", + "version": "0.0.5", + "description": "Ethereum Compatible JavaScript API", + "main": "./index.js", + "directories": { + "lib": "./lib" + }, + "dependencies": { + "es6-promise": "*", + "ws": "*", + "xmlhttprequest": "*" + }, + "devDependencies": { + "bower": ">=1.3.0", + "browserify": ">=6.0", + "del": ">=0.1.1", + "envify": "^3.0.0", + "exorcist": "^0.1.6", + "gulp": ">=3.4.0", + "gulp-jshint": ">=1.5.0", + "gulp-rename": ">=1.2.0", + "gulp-uglify": ">=1.0.0", + "jshint": ">=2.5.0", + "uglifyify": "^2.6.0", + "unreachable-branch-transform": "^0.1.0", + "vinyl-source-stream": "^1.0.0" + }, + "scripts": { + "build": "gulp", + "watch": "gulp watch", + "lint": "gulp lint" + }, + "repository": { + "type": "git", + "url": "https://github.com/ethereum/ethereum.js.git" + }, + "homepage": "https://github.com/ethereum/ethereum.js", + "bugs": { + "url": "https://github.com/ethereum/ethereum.js/issues" + }, + "keywords": [ + "ethereum", + "javascript", + "API" + ], + "author": "ethdev.com", + "authors": [ + { + "name": "Jeffery Wilcke", + "email": "jeff@ethdev.com", + "url": "https://github.com/obscuren" + }, + { + "name": "Marek Kotewicz", + "email": "marek@ethdev.com", + "url": "https://github.com/debris" + }, + { + "name": "Marian Oancea", + "email": "marian@ethdev.com", + "url": "https://github.com/cubedro" + } + ], + "license": "LGPL-3.0" +} From 4051c0333f43765a7414a4e0e8ac51e7148b0646 Mon Sep 17 00:00:00 2001 From: obscuren Date: Mon, 22 Dec 2014 13:23:11 +0100 Subject: [PATCH 023/132] Added whisper js api --- cmd/mist/assets/qml/browser.qml | 40 ++++++- cmd/mist/assets/qml/views/whisper.qml | 2 +- cmd/mist/gui.go | 64 +++++----- cmd/mist/ui_lib.go | 162 ++++++++++++-------------- ui/qt/qwhisper/message.go | 4 +- ui/qt/qwhisper/whisper.go | 9 +- whisper/whisper.go | 2 +- 7 files changed, 153 insertions(+), 130 deletions(-) diff --git a/cmd/mist/assets/qml/browser.qml b/cmd/mist/assets/qml/browser.qml index 26fef0377e..867260507c 100644 --- a/cmd/mist/assets/qml/browser.qml +++ b/cmd/mist/assets/qml/browser.qml @@ -59,15 +59,18 @@ Rectangle { } Component.onCompleted: { - //webview.url = "http://etherian.io" - webview.url = "file:///Users/jeffrey/test.html" + webview.url = "http://etherian.io" } signal messages(var messages, int id); onMessages: { // Bit of a cheat to get proper JSON var m = JSON.parse(JSON.parse(JSON.stringify(messages))) - webview.postEvent("messages", [m, id]); + webview.postEvent("messages", id, m); + } + + function onShhMessage(message, id) { + webview.postEvent("shhChanged", id, message) } Item { @@ -328,6 +331,33 @@ Rectangle { require(1); eth.uninstallFilter(data.args[0]) break; + + + case "shhNewFilter": + require(1); + var id = shh.watch(data.args[0], window); + postData(data._id, id); + break; + + case "newIdentity": + postData(data._id, shh.newIdentity()) + break + + case "post": + require(1); + var params = data.args[0]; + var fields = ["payload", "to", "from"]; + for(var i = 0; i < fields.length; i++) { + params[fields[i]] = params[fields[i]] || ""; + } + if(typeof params.payload === "object") { params.payload = params.payload.join(""); } + params.topics = params.topics || []; + params.priority = params.priority || 1000; + params.ttl = params.ttl || 100; + + console.log(JSON.stringify(params)) + shh.post(params.payload, params.to, params.from, params.topics, params.priority, params.ttl); + break; } } catch(e) { console.log(data.call + ": " + e) @@ -349,8 +379,8 @@ Rectangle { function postData(seed, data) { webview.experimental.postMessage(JSON.stringify({data: data, _id: seed})) } - function postEvent(event, data) { - webview.experimental.postMessage(JSON.stringify({data: data, _event: event})) + function postEvent(event, id, data) { + webview.experimental.postMessage(JSON.stringify({data: data, _id: id, _event: event})) } function onWatchedCb(data, id) { diff --git a/cmd/mist/assets/qml/views/whisper.qml b/cmd/mist/assets/qml/views/whisper.qml index 80d4013011..ffe3916665 100644 --- a/cmd/mist/assets/qml/views/whisper.qml +++ b/cmd/mist/assets/qml/views/whisper.qml @@ -24,7 +24,7 @@ Rectangle { var t = shh.watch({}, root) } - function onMessage(message) { + function onShhMessage(message, i) { whisperModel.insert(0, {from: message.from, payload: eth.toAscii(message.payload)}) } diff --git a/cmd/mist/gui.go b/cmd/mist/gui.go index e858d7c61c..1152f0dcd0 100644 --- a/cmd/mist/gui.go +++ b/cmd/mist/gui.go @@ -43,38 +43,6 @@ import ( "gopkg.in/qml.v1" ) -/* -func LoadExtension(path string) (uintptr, error) { - lib, err := ffi.NewLibrary(path) - if err != nil { - return 0, err - } - - so, err := lib.Fct("sharedObject", ffi.Pointer, nil) - if err != nil { - return 0, err - } - - ptr := so() - - err = lib.Close() - if err != nil { - return 0, err - } - - return ptr.Interface().(uintptr), nil -} -*/ -/* - vec, errr := LoadExtension("/Users/jeffrey/Desktop/build-libqmltest-Desktop_Qt_5_2_1_clang_64bit-Debug/liblibqmltest_debug.dylib") - fmt.Printf("Fetched vec with addr: %#x\n", vec) - if errr != nil { - fmt.Println(errr) - } else { - context.SetVar("vec", (unsafe.Pointer)(vec)) - } -*/ - var guilogger = logger.NewLogger("GUI") type Gui struct { @@ -535,3 +503,35 @@ func (gui *Gui) privateKey() string { func (gui *Gui) address() []byte { return gui.eth.KeyManager().Address() } + +/* +func LoadExtension(path string) (uintptr, error) { + lib, err := ffi.NewLibrary(path) + if err != nil { + return 0, err + } + + so, err := lib.Fct("sharedObject", ffi.Pointer, nil) + if err != nil { + return 0, err + } + + ptr := so() + + err = lib.Close() + if err != nil { + return 0, err + } + + return ptr.Interface().(uintptr), nil +} +*/ +/* + vec, errr := LoadExtension("/Users/jeffrey/Desktop/build-libqmltest-Desktop_Qt_5_2_1_clang_64bit-Debug/liblibqmltest_debug.dylib") + fmt.Printf("Fetched vec with addr: %#x\n", vec) + if errr != nil { + fmt.Println(errr) + } else { + context.SetVar("vec", (unsafe.Pointer)(vec)) + } +*/ diff --git a/cmd/mist/ui_lib.go b/cmd/mist/ui_lib.go index fd4ffcb84e..4a92f64796 100644 --- a/cmd/mist/ui_lib.go +++ b/cmd/mist/ui_lib.go @@ -225,6 +225,83 @@ func (self *UiLib) StartDebugger() { dbWindow.Show() } +func (self *UiLib) Transact(params map[string]interface{}) (string, error) { + object := mapToTxParams(params) + + return self.JSXEth.Transact( + object["from"], + object["to"], + object["value"], + object["gas"], + object["gasPrice"], + object["data"], + ) +} + +func (self *UiLib) Compile(code string) (string, error) { + bcode, err := ethutil.Compile(code, false) + if err != nil { + return err.Error(), err + } + + return ethutil.Bytes2Hex(bcode), err +} + +func (self *UiLib) Call(params map[string]interface{}) (string, error) { + object := mapToTxParams(params) + + return self.JSXEth.Execute( + object["to"], + object["value"], + object["gas"], + object["gasPrice"], + object["data"], + ) +} + +func (self *UiLib) AddLocalTransaction(to, data, gas, gasPrice, value string) int { + return self.miner.AddLocalTx(&miner.LocalTx{ + To: ethutil.Hex2Bytes(to), + Data: ethutil.Hex2Bytes(data), + Gas: gas, + GasPrice: gasPrice, + Value: value, + }) - 1 +} + +func (self *UiLib) RemoveLocalTransaction(id int) { + self.miner.RemoveLocalTx(id) +} + +func (self *UiLib) SetGasPrice(price string) { + self.miner.MinAcceptedGasPrice = ethutil.Big(price) +} + +func (self *UiLib) ToggleMining() bool { + if !self.miner.Mining() { + self.miner.Start() + + return true + } else { + self.miner.Stop() + + return false + } +} + +func (self *UiLib) ToHex(data string) string { + return "0x" + ethutil.Bytes2Hex([]byte(data)) +} + +func (self *UiLib) ToAscii(data string) string { + start := 0 + if len(data) > 1 && data[0:2] == "0x" { + start = 2 + } + return string(ethutil.Hex2Bytes(data[start:])) +} + +/// Ethereum filter methods func (self *UiLib) NewFilter(object map[string]interface{}) (id int) { filter := qt.NewFilterFromMap(object, self.eth) filter.MessageCallback = func(messages state.Messages) { @@ -312,88 +389,3 @@ func mapToTxParams(object map[string]interface{}) map[string]string { return conv } - -func (self *UiLib) Transact(params map[string]interface{}) (string, error) { - object := mapToTxParams(params) - - return self.JSXEth.Transact( - object["from"], - object["to"], - object["value"], - object["gas"], - object["gasPrice"], - object["data"], - ) -} - -func (self *UiLib) Compile(code string) (string, error) { - bcode, err := ethutil.Compile(code, false) - if err != nil { - return err.Error(), err - } - - return ethutil.Bytes2Hex(bcode), err -} - -func (self *UiLib) Call(params map[string]interface{}) (string, error) { - object := mapToTxParams(params) - - return self.JSXEth.Execute( - object["to"], - object["value"], - object["gas"], - object["gasPrice"], - object["data"], - ) -} - -func (self *UiLib) AddLocalTransaction(to, data, gas, gasPrice, value string) int { - return self.miner.AddLocalTx(&miner.LocalTx{ - To: ethutil.Hex2Bytes(to), - Data: ethutil.Hex2Bytes(data), - Gas: gas, - GasPrice: gasPrice, - Value: value, - }) - 1 -} - -func (self *UiLib) RemoveLocalTransaction(id int) { - self.miner.RemoveLocalTx(id) -} - -func (self *UiLib) SetGasPrice(price string) { - self.miner.MinAcceptedGasPrice = ethutil.Big(price) -} - -func (self *UiLib) ToggleMining() bool { - if !self.miner.Mining() { - self.miner.Start() - - return true - } else { - self.miner.Stop() - - return false - } -} - -func (self *UiLib) ToHex(data string) string { - return "0x" + ethutil.Bytes2Hex([]byte(data)) -} - -func (self *UiLib) ToAscii(data string) string { - start := 0 - if len(data) > 1 && data[0:2] == "0x" { - start = 2 - } - return string(ethutil.Hex2Bytes(data[start:])) -} - -/* -// XXX Refactor me & MOVE -func (self *Ethereum) InstallFilter(filter *core.Filter) (id int) { - return self.filterManager.InstallFilter(filter) -} -func (self *Ethereum) UninstallFilter(id int) { self.filterManager.UninstallFilter(id) } -func (self *Ethereum) GetFilter(id int) *core.Filter { return self.filterManager.GetFilter(id) } -*/ diff --git a/ui/qt/qwhisper/message.go b/ui/qt/qwhisper/message.go index 07505ba09b..c876473996 100644 --- a/ui/qt/qwhisper/message.go +++ b/ui/qt/qwhisper/message.go @@ -8,7 +8,7 @@ import ( type Message struct { ref *whisper.Message - Flags byte + Flags int32 Payload string From string } @@ -16,7 +16,7 @@ type Message struct { func ToQMessage(msg *whisper.Message) *Message { return &Message{ ref: msg, - Flags: msg.Flags, + Flags: int32(msg.Flags), Payload: ethutil.Bytes2Hex(msg.Payload), From: ethutil.Bytes2Hex(crypto.FromECDSAPub(msg.Recover())), } diff --git a/ui/qt/qwhisper/whisper.go b/ui/qt/qwhisper/whisper.go index 6fb00cdac9..62676daf5e 100644 --- a/ui/qt/qwhisper/whisper.go +++ b/ui/qt/qwhisper/whisper.go @@ -33,9 +33,9 @@ func (self *Whisper) SetView(view qml.Object) { self.view = view } -func (self *Whisper) Post(data string, to, from string, topics []string, pow, ttl uint32) { +func (self *Whisper) Post(data, to, from string, topics []string, priority, ttl uint32) { msg := whisper.NewMessage(fromHex(data)) - envelope, err := msg.Seal(time.Duration(pow), whisper.Opts{ + envelope, err := msg.Seal(time.Duration(priority*100000), whisper.Opts{ Ttl: time.Duration(ttl), To: crypto.ToECDSAPub(fromHex(to)), From: crypto.ToECDSA(fromHex(from)), @@ -64,13 +64,14 @@ func (self *Whisper) HasIdentity(key string) bool { func (self *Whisper) Watch(opts map[string]interface{}, view *qml.Common) int { filter := filterFromMap(opts) + var i int filter.Fn = func(msg *whisper.Message) { if view != nil { - view.Call("onMessage", ToQMessage(msg)) + view.Call("onShhMessage", ToQMessage(msg), i) } } - i := self.Whisper.Watch(filter) + i = self.Whisper.Watch(filter) self.watches[i] = &Watch{} return i diff --git a/whisper/whisper.go b/whisper/whisper.go index 9721ca9f9a..ffcdd7d409 100644 --- a/whisper/whisper.go +++ b/whisper/whisper.go @@ -175,7 +175,7 @@ func (self *Whisper) add(envelope *Envelope) error { if !self.expiry[envelope.Expiry].Has(hash) { self.expiry[envelope.Expiry].Add(hash) - self.postEvent(envelope) + go self.postEvent(envelope) } return nil From e32f7baa0d5d949a84a3b29c57220f837eae356a Mon Sep 17 00:00:00 2001 From: obscuren Date: Mon, 22 Dec 2014 14:59:52 +0100 Subject: [PATCH 024/132] Concat and pad data --- cmd/mist/assets/qml/browser.qml | 5 +++-- cmd/mist/assets/qml/views/whisper.qml | 2 +- ui/qt/qwhisper/whisper.go | 9 +++++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/cmd/mist/assets/qml/browser.qml b/cmd/mist/assets/qml/browser.qml index 867260507c..1425f60c0e 100644 --- a/cmd/mist/assets/qml/browser.qml +++ b/cmd/mist/assets/qml/browser.qml @@ -59,7 +59,8 @@ Rectangle { } Component.onCompleted: { - webview.url = "http://etherian.io" + //webview.url = "http://etherian.io" + webview.url = "file:///Users/jeffrey/test.html" } signal messages(var messages, int id); @@ -350,7 +351,7 @@ Rectangle { for(var i = 0; i < fields.length; i++) { params[fields[i]] = params[fields[i]] || ""; } - if(typeof params.payload === "object") { params.payload = params.payload.join(""); } + if(typeof params.payload !== "object") { params.payload = [params.payload]; } //params.payload = params.payload.join(""); } params.topics = params.topics || []; params.priority = params.priority || 1000; params.ttl = params.ttl || 100; diff --git a/cmd/mist/assets/qml/views/whisper.qml b/cmd/mist/assets/qml/views/whisper.qml index ffe3916665..56c4f1b070 100644 --- a/cmd/mist/assets/qml/views/whisper.qml +++ b/cmd/mist/assets/qml/views/whisper.qml @@ -52,7 +52,7 @@ Rectangle { Button { text: "Send" onClicked: { - shh.post(eth.toHex(data.text), "", identity, topics.text.split(","), 500, 50) + shh.post([eth.toHex(data.text)], "", identity, topics.text.split(","), 500, 50) } } } diff --git a/ui/qt/qwhisper/whisper.go b/ui/qt/qwhisper/whisper.go index 62676daf5e..0627acd298 100644 --- a/ui/qt/qwhisper/whisper.go +++ b/ui/qt/qwhisper/whisper.go @@ -33,8 +33,13 @@ func (self *Whisper) SetView(view qml.Object) { self.view = view } -func (self *Whisper) Post(data, to, from string, topics []string, priority, ttl uint32) { - msg := whisper.NewMessage(fromHex(data)) +func (self *Whisper) Post(payload []string, to, from string, topics []string, priority, ttl uint32) { + var data []byte + for _, d := range payload { + data = append(data, fromHex(d)...) + } + + msg := whisper.NewMessage(data) envelope, err := msg.Seal(time.Duration(priority*100000), whisper.Opts{ Ttl: time.Duration(ttl), To: crypto.ToECDSAPub(fromHex(to)), From 4b52cd512d3c54451e680fcc6c3d67d059065bec Mon Sep 17 00:00:00 2001 From: obscuren Date: Mon, 22 Dec 2014 15:01:52 +0100 Subject: [PATCH 025/132] Removal of "debug" url :) --- cmd/mist/assets/qml/browser.qml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/mist/assets/qml/browser.qml b/cmd/mist/assets/qml/browser.qml index 1425f60c0e..abaab4f15c 100644 --- a/cmd/mist/assets/qml/browser.qml +++ b/cmd/mist/assets/qml/browser.qml @@ -59,8 +59,7 @@ Rectangle { } Component.onCompleted: { - //webview.url = "http://etherian.io" - webview.url = "file:///Users/jeffrey/test.html" + webview.url = "http://etherian.io" } signal messages(var messages, int id); From 4cd79d8ddd7608d60344b13fe4bda7315429d1d9 Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 23 Dec 2014 13:48:44 +0100 Subject: [PATCH 026/132] Refactored block & Transaction * Includes new rlp decoder --- cmd/ethereum/repl/repl.go | 6 - cmd/utils/cmd.go | 2 +- cmd/utils/vm_env.go | 12 +- core/block_manager.go | 86 +++--- core/chain_manager.go | 134 +++++---- core/filter.go | 13 +- core/genesis.go | 65 ++--- core/types/block.go | 586 ++++++++++++++------------------------ core/types/block_test.go | 23 ++ core/types/transaction.go | 121 ++++---- core/vm_env.go | 12 +- eth/backend.go | 2 +- eth/protocol.go | 2 +- miner/miner.go | 10 +- pow/block.go | 2 +- pow/ezp/pow.go | 4 +- xeth/js_types.go | 20 +- xeth/pipe.go | 2 +- xeth/vm_env.go | 12 +- 19 files changed, 498 insertions(+), 616 deletions(-) create mode 100644 core/types/block_test.go diff --git a/cmd/ethereum/repl/repl.go b/cmd/ethereum/repl/repl.go index 4a7880ff42..822aaa19d5 100644 --- a/cmd/ethereum/repl/repl.go +++ b/cmd/ethereum/repl/repl.go @@ -86,12 +86,6 @@ func (self *JSRepl) Stop() { } func (self *JSRepl) parseInput(code string) { - defer func() { - if r := recover(); r != nil { - fmt.Println("[native] error", r) - } - }() - value, err := self.re.Run(code) if err != nil { fmt.Println(err) diff --git a/cmd/utils/cmd.go b/cmd/utils/cmd.go index 3e3ac617af..2b24ac5321 100644 --- a/cmd/utils/cmd.go +++ b/cmd/utils/cmd.go @@ -325,7 +325,7 @@ func BlockDo(ethereum *eth.Ethereum, hash []byte) error { return fmt.Errorf("unknown block %x", hash) } - parent := ethereum.ChainManager().GetBlock(block.PrevHash) + parent := ethereum.ChainManager().GetBlock(block.ParentHash()) _, err := ethereum.BlockManager().TransitionState(parent.State(), parent, block) if err != nil { diff --git a/cmd/utils/vm_env.go b/cmd/utils/vm_env.go index 461a797c2d..be6249e82d 100644 --- a/cmd/utils/vm_env.go +++ b/cmd/utils/vm_env.go @@ -30,15 +30,15 @@ func NewEnv(state *state.StateDB, block *types.Block, transactor []byte, value * } func (self *VMEnv) Origin() []byte { return self.transactor } -func (self *VMEnv) BlockNumber() *big.Int { return self.block.Number } -func (self *VMEnv) PrevHash() []byte { return self.block.PrevHash } -func (self *VMEnv) Coinbase() []byte { return self.block.Coinbase } -func (self *VMEnv) Time() int64 { return self.block.Time } -func (self *VMEnv) Difficulty() *big.Int { return self.block.Difficulty } +func (self *VMEnv) BlockNumber() *big.Int { return self.block.Number() } +func (self *VMEnv) PrevHash() []byte { return self.block.ParentHash() } +func (self *VMEnv) Coinbase() []byte { return self.block.Coinbase() } +func (self *VMEnv) Time() int64 { return self.block.Time() } +func (self *VMEnv) Difficulty() *big.Int { return self.block.Difficulty() } func (self *VMEnv) BlockHash() []byte { return self.block.Hash() } +func (self *VMEnv) GasLimit() *big.Int { return self.block.GasLimit() } func (self *VMEnv) Value() *big.Int { return self.value } func (self *VMEnv) State() *state.StateDB { return self.state } -func (self *VMEnv) GasLimit() *big.Int { return self.block.GasLimit } func (self *VMEnv) Depth() int { return self.depth } func (self *VMEnv) SetDepth(i int) { self.depth = i } func (self *VMEnv) AddLog(log state.Log) { diff --git a/core/block_manager.go b/core/block_manager.go index b60cecc29a..c61cf65046 100644 --- a/core/block_manager.go +++ b/core/block_manager.go @@ -17,6 +17,7 @@ import ( "github.com/ethereum/go-ethereum/pow" "github.com/ethereum/go-ethereum/pow/ezp" "github.com/ethereum/go-ethereum/state" + "gopkg.in/fatih/set.v0" ) var statelogger = logger.NewLogger("BLOCK") @@ -82,8 +83,8 @@ func NewBlockManager(txpool *TxPool, chainManager *ChainManager, eventMux *event } func (sm *BlockManager) TransitionState(statedb *state.StateDB, parent, block *types.Block) (receipts types.Receipts, err error) { - coinbase := statedb.GetOrNewStateObject(block.Coinbase) - coinbase.SetGasPool(block.CalcGasLimit(parent)) + coinbase := statedb.GetOrNewStateObject(block.Header().Coinbase) + coinbase.SetGasPool(CalcGasLimit(parent, block)) // Process the transactions on to current block receipts, _, _, _, err = sm.ApplyTransactions(coinbase, statedb, block, block.Transactions(), false) @@ -156,7 +157,7 @@ done: } block.Reward = cumulativeSum - block.GasUsed = totalUsedGas + block.Header().GasUsed = totalUsedGas return receipts, handled, unhandled, erroneous, err } @@ -166,14 +167,15 @@ func (sm *BlockManager) Process(block *types.Block) (td *big.Int, msgs state.Mes sm.mutex.Lock() defer sm.mutex.Unlock() - if sm.bc.HasBlock(block.Hash()) { - return nil, nil, &KnownBlockError{block.Number, block.Hash()} + header := block.Header() + if sm.bc.HasBlock(header.Hash()) { + return nil, nil, &KnownBlockError{header.Number, header.Hash()} } - if !sm.bc.HasBlock(block.PrevHash) { - return nil, nil, ParentError(block.PrevHash) + if !sm.bc.HasBlock(header.ParentHash) { + return nil, nil, ParentError(header.ParentHash) } - parent := sm.bc.GetBlock(block.PrevHash) + parent := sm.bc.GetBlock(header.ParentHash) return sm.ProcessWithParent(block, parent) } @@ -181,7 +183,7 @@ func (sm *BlockManager) Process(block *types.Block) (td *big.Int, msgs state.Mes func (sm *BlockManager) ProcessWithParent(block, parent *types.Block) (td *big.Int, messages state.Messages, err error) { sm.lastAttemptedBlock = block - state := parent.State().Copy() + state := state.New(parent.Trie().Copy()) // Defer the Undo on the Trie. If the block processing happened // we don't want to undo but since undo only happens on dirty @@ -199,23 +201,23 @@ func (sm *BlockManager) ProcessWithParent(block, parent *types.Block) (td *big.I return } + header := block.Header() + rbloom := types.CreateBloom(receipts) - if bytes.Compare(rbloom, block.LogsBloom) != 0 { + if bytes.Compare(rbloom, header.Bloom) != 0 { err = fmt.Errorf("unable to replicate block's bloom=%x", rbloom) return } txSha := types.DeriveSha(block.Transactions()) - if bytes.Compare(txSha, block.TxSha) != 0 { - err = fmt.Errorf("validating transaction root. received=%x got=%x", block.TxSha, txSha) + if bytes.Compare(txSha, header.TxHash) != 0 { + err = fmt.Errorf("validating transaction root. received=%x got=%x", header.TxHash, txSha) return } receiptSha := types.DeriveSha(receipts) - if bytes.Compare(receiptSha, block.ReceiptSha) != 0 { - //chainlogger.Debugf("validating receipt root. received=%x got=%x", block.ReceiptSha, receiptSha) - fmt.Printf("%x\n", ethutil.Encode(receipts)) - err = fmt.Errorf("validating receipt root. received=%x got=%x", block.ReceiptSha, receiptSha) + if bytes.Compare(receiptSha, header.ReceiptHash) != 0 { + err = fmt.Errorf("validating receipt root. received=%x got=%x", header.ReceiptHash, receiptSha) return } @@ -225,8 +227,8 @@ func (sm *BlockManager) ProcessWithParent(block, parent *types.Block) (td *big.I state.Update(ethutil.Big0) - if !block.State().Cmp(state) { - err = fmt.Errorf("invalid merkle root. received=%x got=%x", block.Root(), state.Root()) + if !bytes.Equal(header.Root, state.Root()) { + err = fmt.Errorf("invalid merkle root. received=%x got=%x", header.Root, state.Root()) return } @@ -238,7 +240,7 @@ func (sm *BlockManager) ProcessWithParent(block, parent *types.Block) (td *big.I messages := state.Manifest().Messages state.Manifest().Reset() - chainlogger.Infof("Processed block #%d (%x...)\n", block.Number, block.Hash()[0:4]) + chainlogger.Infof("Processed block #%d (%x...)\n", header.Number, block.Hash()[0:4]) sm.txpool.RemoveSet(block.Transactions()) @@ -250,14 +252,14 @@ func (sm *BlockManager) ProcessWithParent(block, parent *types.Block) (td *big.I func (sm *BlockManager) CalculateTD(block *types.Block) (*big.Int, bool) { uncleDiff := new(big.Int) - for _, uncle := range block.Uncles { + for _, uncle := range block.Uncles() { uncleDiff = uncleDiff.Add(uncleDiff, uncle.Difficulty) } // TD(genesis_block) = 0 and TD(B) = TD(B.parent) + sum(u.difficulty for u in B.uncles) + B.difficulty td := new(big.Int) td = td.Add(sm.bc.Td(), uncleDiff) - td = td.Add(td, block.Difficulty) + td = td.Add(td, block.Header().Difficulty) // The new TD will only be accepted if the new difficulty is // is greater than the previous. @@ -273,13 +275,13 @@ func (sm *BlockManager) CalculateTD(block *types.Block) (*big.Int, bool) { // Validation validates easy over difficult (dagger takes longer time = difficult) func (sm *BlockManager) ValidateBlock(block, parent *types.Block) error { expd := CalcDifficulty(block, parent) - if expd.Cmp(block.Difficulty) < 0 { - return fmt.Errorf("Difficulty check failed for block %v, %v", block.Difficulty, expd) + if expd.Cmp(block.Header().Difficulty) < 0 { + return fmt.Errorf("Difficulty check failed for block %v, %v", block.Header().Difficulty, expd) } - diff := block.Time - parent.Time + diff := block.Header().Time - parent.Header().Time if diff < 0 { - return ValidationError("Block timestamp less then prev block %v (%v - %v)", diff, block.Time, sm.bc.CurrentBlock().Time) + return ValidationError("Block timestamp less then prev block %v (%v - %v)", diff, block.Header().Time, sm.bc.CurrentBlock().Header().Time) } /* XXX @@ -291,7 +293,7 @@ func (sm *BlockManager) ValidateBlock(block, parent *types.Block) error { // Verify the nonce of the block. Return an error if it's not valid if !sm.Pow.Verify(block /*block.HashNoNonce(), block.Difficulty, block.Nonce*/) { - return ValidationError("Block's nonce is invalid (= %v)", ethutil.Bytes2Hex(block.Nonce)) + return ValidationError("Block's nonce is invalid (= %v)", ethutil.Bytes2Hex(block.Header().Nonce)) } return nil @@ -300,24 +302,28 @@ func (sm *BlockManager) ValidateBlock(block, parent *types.Block) error { func (sm *BlockManager) AccumelateRewards(statedb *state.StateDB, block, parent *types.Block) error { reward := new(big.Int).Set(BlockReward) - knownUncles := ethutil.Set(parent.Uncles) - nonces := ethutil.NewSet(block.Nonce) - for _, uncle := range block.Uncles { + knownUncles := set.New() + for _, uncle := range parent.Uncles() { + knownUncles.Add(uncle.Hash()) + } + + nonces := ethutil.NewSet(block.Header().Nonce) + for _, uncle := range block.Uncles() { if nonces.Include(uncle.Nonce) { // Error not unique return UncleError("Uncle not unique") } - uncleParent := sm.bc.GetBlock(uncle.PrevHash) + uncleParent := sm.bc.GetBlock(uncle.ParentHash) if uncleParent == nil { - return UncleError(fmt.Sprintf("Uncle's parent unknown (%x)", uncle.PrevHash[0:4])) + return UncleError(fmt.Sprintf("Uncle's parent unknown (%x)", uncle.ParentHash[0:4])) } - if uncleParent.Number.Cmp(new(big.Int).Sub(parent.Number, big.NewInt(6))) < 0 { + if uncleParent.Header().Number.Cmp(new(big.Int).Sub(parent.Header().Number, big.NewInt(6))) < 0 { return UncleError("Uncle too old") } - if knownUncles.Include(uncle.Hash()) { + if knownUncles.Has(uncle.Hash()) { return UncleError("Uncle in chain") } @@ -333,15 +339,15 @@ func (sm *BlockManager) AccumelateRewards(statedb *state.StateDB, block, parent } // Get the account associated with the coinbase - account := statedb.GetAccount(block.Coinbase) + account := statedb.GetAccount(block.Header().Coinbase) // Reward amount of ether to the coinbase address account.AddAmount(reward) statedb.Manifest().AddMessage(&state.Message{ - To: block.Coinbase, + To: block.Header().Coinbase, Input: nil, Origin: nil, - Block: block.Hash(), Timestamp: block.Time, Coinbase: block.Coinbase, Number: block.Number, + Block: block.Hash(), Timestamp: int64(block.Header().Time), Coinbase: block.Header().Coinbase, Number: block.Header().Number, Value: new(big.Int).Add(reward, block.Reward), }) @@ -349,15 +355,15 @@ func (sm *BlockManager) AccumelateRewards(statedb *state.StateDB, block, parent } func (sm *BlockManager) GetMessages(block *types.Block) (messages []*state.Message, err error) { - if !sm.bc.HasBlock(block.PrevHash) { - return nil, ParentError(block.PrevHash) + if !sm.bc.HasBlock(block.Header().ParentHash) { + return nil, ParentError(block.Header().ParentHash) } sm.lastAttemptedBlock = block var ( - parent = sm.bc.GetBlock(block.PrevHash) - state = parent.State().Copy() + parent = sm.bc.GetBlock(block.Header().ParentHash) + state = state.New(parent.Trie().Copy()) ) defer state.Reset() diff --git a/core/chain_manager.go b/core/chain_manager.go index e6268c01e0..e35c4aa3a6 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -1,6 +1,7 @@ package core import ( + "bytes" "fmt" "math/big" "sync" @@ -9,11 +10,13 @@ import ( "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/logger" + "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/state" ) var chainlogger = logger.NewLogger("CHAIN") +/* func AddTestNetFunds(block *types.Block) { for _, addr := range []string{ "51ba59315b3a95761d0863b05ccc7a7f54703d99", @@ -31,20 +34,41 @@ func AddTestNetFunds(block *types.Block) { block.State().UpdateStateObject(account) } } +*/ func CalcDifficulty(block, parent *types.Block) *big.Int { diff := new(big.Int) - adjust := new(big.Int).Rsh(parent.Difficulty, 10) - if block.Time >= parent.Time+5 { - diff.Sub(parent.Difficulty, adjust) + bh, ph := block.Header(), parent.Header() + adjust := new(big.Int).Rsh(ph.Difficulty, 10) + if bh.Time >= ph.Time+5 { + diff.Sub(ph.Difficulty, adjust) } else { - diff.Add(parent.Difficulty, adjust) + diff.Add(ph.Difficulty, adjust) } return diff } +func CalcGasLimit(parent, block *types.Block) *big.Int { + if block.Number().Cmp(big.NewInt(0)) == 0 { + return ethutil.BigPow(10, 6) + } + + // ((1024-1) * parent.gasLimit + (gasUsed * 6 / 5)) / 1024 + + previous := new(big.Int).Mul(big.NewInt(1024-1), parent.GasLimit()) + current := new(big.Rat).Mul(new(big.Rat).SetInt(parent.GasUsed()), big.NewRat(6, 5)) + curInt := new(big.Int).Div(current.Num(), current.Denom()) + + result := new(big.Int).Add(previous, curInt) + result.Div(result, big.NewInt(1024)) + + min := big.NewInt(125000) + + return ethutil.BigMax(min, result) +} + type ChainManager struct { //eth EthManager processor types.BlockProcessor @@ -90,7 +114,7 @@ func (self *ChainManager) CurrentBlock() *types.Block { func NewChainManager(mux *event.TypeMux) *ChainManager { bc := &ChainManager{} - bc.genesisBlock = types.NewBlockFromBytes(ethutil.Encode(Genesis)) + bc.genesisBlock = GenesisBlock() bc.eventMux = mux bc.setLastBlock() @@ -112,7 +136,7 @@ func (self *ChainManager) SetProcessor(proc types.BlockProcessor) { } func (self *ChainManager) State() *state.StateDB { - return self.CurrentBlock().State() + return state.New(self.CurrentBlock().Trie()) } func (self *ChainManager) TransState() *state.StateDB { @@ -122,13 +146,11 @@ func (self *ChainManager) TransState() *state.StateDB { func (bc *ChainManager) setLastBlock() { data, _ := ethutil.Config.Db.Get([]byte("LastBlock")) if len(data) != 0 { - // Prep genesis - AddTestNetFunds(bc.genesisBlock) - - block := types.NewBlockFromBytes(data) - bc.currentBlock = block + var block types.Block + rlp.Decode(bytes.NewReader(data), &block) + bc.currentBlock = &block bc.lastBlockHash = block.Hash() - bc.lastBlockNumber = block.Number.Uint64() + bc.lastBlockNumber = block.Header().Number.Uint64() // Set the last know difficulty (might be 0x0 as initial value, Genesis) bc.td = ethutil.BigD(ethutil.Config.Db.LastKnownTD()) @@ -144,27 +166,28 @@ func (bc *ChainManager) NewBlock(coinbase []byte) *types.Block { bc.mu.RLock() defer bc.mu.RUnlock() - var root interface{} - hash := ZeroHash256 + var root []byte + parentHash := ZeroHash256 if bc.CurrentBlock != nil { - root = bc.currentBlock.Root() - hash = bc.lastBlockHash + root = bc.currentBlock.Header().Root + parentHash = bc.lastBlockHash } - block := types.CreateBlock( - root, - hash, + block := types.NewBlock( + parentHash, coinbase, + root, ethutil.BigPow(2, 32), nil, "") parent := bc.currentBlock if parent != nil { - block.Difficulty = CalcDifficulty(block, parent) - block.Number = new(big.Int).Add(bc.currentBlock.Number, ethutil.Big1) - block.GasLimit = block.CalcGasLimit(bc.currentBlock) + header := block.Header() + header.Difficulty = CalcDifficulty(block, parent) + header.Number = new(big.Int).Add(parent.Header().Number, ethutil.Big1) + header.GasLimit = CalcGasLimit(parent, block) } @@ -175,9 +198,6 @@ func (bc *ChainManager) Reset() { bc.mu.Lock() defer bc.mu.Unlock() - AddTestNetFunds(bc.genesisBlock) - - bc.genesisBlock.Trie().Sync() // Prepare the genesis block bc.write(bc.genesisBlock) bc.insert(bc.genesisBlock) @@ -193,18 +213,20 @@ func (self *ChainManager) Export() []byte { self.mu.RLock() defer self.mu.RUnlock() - chainlogger.Infof("exporting %v blocks...\n", self.currentBlock.Number) + chainlogger.Infof("exporting %v blocks...\n", self.currentBlock.Header().Number) - blocks := make([]*types.Block, int(self.currentBlock.Number.Int64())+1) - for block := self.currentBlock; block != nil; block = self.GetBlock(block.PrevHash) { - blocks[block.Number.Int64()] = block + blocks := make([]*types.Block, int(self.currentBlock.NumberU64())+1) + for block := self.currentBlock; block != nil; block = self.GetBlock(block.Header().ParentHash) { + blocks[block.NumberU64()] = block } + //fmt.Println(blocks) + return nil return ethutil.Encode(blocks) } func (bc *ChainManager) insert(block *types.Block) { - encodedBlock := block.RlpEncode() + encodedBlock := ethutil.Encode(block) ethutil.Config.Db.Put([]byte("LastBlock"), encodedBlock) bc.currentBlock = block bc.lastBlockHash = block.Hash() @@ -213,7 +235,7 @@ func (bc *ChainManager) insert(block *types.Block) { func (bc *ChainManager) write(block *types.Block) { bc.writeBlockInfo(block) - encodedBlock := block.RlpEncode() + encodedBlock := ethutil.Encode(block) ethutil.Config.Db.Put(block.Hash(), encodedBlock) } @@ -238,11 +260,11 @@ func (self *ChainManager) GetBlockHashesFromHash(hash []byte, max uint64) (chain for i := uint64(0); i < max; i++ { chain = append(chain, block.Hash()) - if block.Number.Cmp(ethutil.Big0) <= 0 { + if block.Header().Number.Cmp(ethutil.Big0) <= 0 { break } - block = self.GetBlock(block.PrevHash) + block = self.GetBlock(block.Header().ParentHash) } return @@ -253,8 +275,13 @@ func (self *ChainManager) GetBlock(hash []byte) *types.Block { if len(data) == 0 { return nil } + var block types.Block + if err := rlp.Decode(bytes.NewReader(data), &block); err != nil { + fmt.Println(err) + return nil + } - return types.NewBlockFromBytes(data) + return &block } func (self *ChainManager) GetBlockByNumber(num uint64) *types.Block { @@ -262,13 +289,13 @@ func (self *ChainManager) GetBlockByNumber(num uint64) *types.Block { defer self.mu.RUnlock() block := self.currentBlock - for ; block != nil; block = self.GetBlock(block.PrevHash) { - if block.Number.Uint64() == num { + for ; block != nil; block = self.GetBlock(block.Header().ParentHash) { + if block.Header().Number.Uint64() == num { break } } - if block != nil && block.Number.Uint64() == 0 && num != 0 { + if block != nil && block.Header().Number.Uint64() == 0 && num != 0 { return nil } @@ -281,40 +308,28 @@ func (bc *ChainManager) setTotalDifficulty(td *big.Int) { } func (self *ChainManager) CalcTotalDiff(block *types.Block) (*big.Int, error) { - parent := self.GetBlock(block.PrevHash) + parent := self.GetBlock(block.Header().ParentHash) if parent == nil { - return nil, fmt.Errorf("Unable to calculate total diff without known parent %x", block.PrevHash) + return nil, fmt.Errorf("Unable to calculate total diff without known parent %x", block.Header().ParentHash) } - parentTd := parent.BlockInfo().TD + parentTd := parent.Td uncleDiff := new(big.Int) - for _, uncle := range block.Uncles { + for _, uncle := range block.Uncles() { uncleDiff = uncleDiff.Add(uncleDiff, uncle.Difficulty) } td := new(big.Int) td = td.Add(parentTd, uncleDiff) - td = td.Add(td, block.Difficulty) + td = td.Add(td, block.Header().Difficulty) return td, nil } -func (bc *ChainManager) BlockInfo(block *types.Block) types.BlockInfo { - bi := types.BlockInfo{} - data, _ := ethutil.Config.Db.Get(append(block.Hash(), []byte("Info")...)) - bi.RlpDecode(data) - - return bi -} - // Unexported method for writing extra non-essential block info to the db func (bc *ChainManager) writeBlockInfo(block *types.Block) { bc.lastBlockNumber++ - bi := types.BlockInfo{Number: bc.lastBlockNumber, Hash: block.Hash(), Parent: block.PrevHash, TD: bc.td} - - // For now we use the block hash with the words "info" appended as key - ethutil.Config.Db.Put(append(block.Hash(), []byte("Info")...), bi.RlpEncode()) } func (bc *ChainManager) Stop() { @@ -331,7 +346,8 @@ func (self *ChainManager) InsertChain(chain types.Blocks) error { continue } - chainlogger.Infof("block #%v process failed (%x)\n", block.Number, block.Hash()[:4]) + h := block.Header() + chainlogger.Infof("block #%v process failed (%x)\n", h.Number, h.Hash()[:4]) chainlogger.Infoln(block) chainlogger.Infoln(err) return err @@ -339,16 +355,16 @@ func (self *ChainManager) InsertChain(chain types.Blocks) error { self.mu.Lock() { - self.write(block) + cblock := self.currentBlock if td.Cmp(self.td) > 0 { - if block.Number.Cmp(new(big.Int).Add(self.currentBlock.Number, ethutil.Big1)) < 0 { - chainlogger.Infof("Split detected. New head #%v (%x), was #%v (%x)\n", block.Number, block.Hash()[:4], self.currentBlock.Number, self.currentBlock.Hash()[:4]) + if block.Header().Number.Cmp(new(big.Int).Add(cblock.Header().Number, ethutil.Big1)) < 0 { + chainlogger.Infof("Split detected. New head #%v (%x), was #%v (%x)\n", block.Header().Number, block.Hash()[:4], cblock.Header().Number, cblock.Hash()[:4]) } self.setTotalDifficulty(td) self.insert(block) - self.transState = self.currentBlock.State().Copy() + self.transState = state.New(cblock.Trie().Copy()) } } diff --git a/core/filter.go b/core/filter.go index fb992782df..7c34748df4 100644 --- a/core/filter.go +++ b/core/filter.go @@ -76,13 +76,14 @@ func (self *Filter) SetSkip(skip int) { // Run filters messages with the current parameters set func (self *Filter) Find() []*state.Message { + earliestBlock := self.eth.ChainManager().CurrentBlock() var earliestBlockNo uint64 = uint64(self.earliest) if self.earliest == -1 { - earliestBlockNo = self.eth.ChainManager().CurrentBlock().Number.Uint64() + earliestBlockNo = earliestBlock.NumberU64() } var latestBlockNo uint64 = uint64(self.latest) if self.latest == -1 { - latestBlockNo = self.eth.ChainManager().CurrentBlock().Number.Uint64() + latestBlockNo = earliestBlock.NumberU64() } var ( @@ -93,7 +94,7 @@ func (self *Filter) Find() []*state.Message { for i := 0; !quit && block != nil; i++ { // Quit on latest switch { - case block.Number.Uint64() == earliestBlockNo, block.Number.Uint64() == 0: + case block.NumberU64() == earliestBlockNo, block.NumberU64() == 0: quit = true case self.max <= len(messages): break @@ -113,7 +114,7 @@ func (self *Filter) Find() []*state.Message { messages = append(messages, self.FilterMessages(msgs)...) } - block = self.eth.ChainManager().GetBlock(block.PrevHash) + block = self.eth.ChainManager().GetBlock(block.ParentHash()) } skip := int(math.Min(float64(len(messages)), float64(self.skip))) @@ -176,7 +177,7 @@ func (self *Filter) bloomFilter(block *types.Block) bool { var fromIncluded, toIncluded bool if len(self.from) > 0 { for _, from := range self.from { - if types.BloomLookup(block.LogsBloom, from) || bytes.Equal(block.Coinbase, from) { + if types.BloomLookup(block.Bloom(), from) || bytes.Equal(block.Coinbase(), from) { fromIncluded = true break } @@ -187,7 +188,7 @@ func (self *Filter) bloomFilter(block *types.Block) bool { if len(self.to) > 0 { for _, to := range self.to { - if types.BloomLookup(block.LogsBloom, ethutil.U256(new(big.Int).Add(ethutil.Big1, ethutil.BigD(to))).Bytes()) || bytes.Equal(block.Coinbase, to) { + if types.BloomLookup(block.Bloom(), ethutil.U256(new(big.Int).Add(ethutil.Big1, ethutil.BigD(to))).Bytes()) || bytes.Equal(block.Coinbase(), to) { toIncluded = true break } diff --git a/core/genesis.go b/core/genesis.go index 707154759a..51afa314e5 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -3,8 +3,10 @@ package core import ( "math/big" + "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethutil" + "github.com/ethereum/go-ethereum/state" ) /* @@ -17,36 +19,35 @@ var ZeroHash512 = make([]byte, 64) var EmptyShaList = crypto.Sha3(ethutil.Encode([]interface{}{})) var EmptyListRoot = crypto.Sha3(ethutil.Encode("")) -var GenesisHeader = []interface{}{ - // Previous hash (none) - ZeroHash256, - // Empty uncles - EmptyShaList, - // Coinbase - ZeroHash160, - // Root state - EmptyShaList, - // tx root - EmptyListRoot, - // receipt root - EmptyListRoot, - // bloom - ZeroHash512, - // Difficulty - //ethutil.BigPow(2, 22), - big.NewInt(131072), - // Number - ethutil.Big0, - // Block upper gas bound - big.NewInt(1000000), - // Block gas used - ethutil.Big0, - // Time - ethutil.Big0, - // Extra - nil, - // Nonce - crypto.Sha3(big.NewInt(42).Bytes()), -} +func GenesisBlock() *types.Block { + genesis := types.NewBlock(ZeroHash256, ZeroHash160, EmptyListRoot, big.NewInt(131072), crypto.Sha3(big.NewInt(42).Bytes()), "") + genesis.Header().Number = ethutil.Big0 + genesis.Header().GasLimit = big.NewInt(1000000) + genesis.Header().GasUsed = ethutil.Big0 + genesis.Header().Time = 0 -var Genesis = []interface{}{GenesisHeader, []interface{}{}, []interface{}{}} + genesis.SetUncles([]*types.Header{}) + genesis.SetTransactions(types.Transactions{}) + genesis.SetReceipts(types.Receipts{}) + + statedb := state.New(genesis.Trie()) + for _, addr := range []string{ + "51ba59315b3a95761d0863b05ccc7a7f54703d99", + "e4157b34ea9615cfbde6b4fda419828124b70c78", + "b9c015918bdaba24b4ff057a92a3873d6eb201be", + "6c386a4b26f73c802f34673f7248bb118f97424a", + "cd2a3d9f938e13cd947ec05abc7fe734df8dd826", + "2ef47100e0787b915105fd5e3f4ff6752079d5cb", + "e6716f9544a56c530d868e4bfbacb172315bdead", + "1a26338f0d905e295fccb71fa9ea849ffa12aaf4", + } { + codedAddr := ethutil.Hex2Bytes(addr) + account := statedb.GetAccount(codedAddr) + account.SetBalance(ethutil.Big("1606938044258990275541962092341162602522202993782792835301376")) //ethutil.BigPow(2, 200) + statedb.UpdateStateObject(account) + } + statedb.Sync() + genesis.Header().Root = statedb.Root() + + return genesis +} diff --git a/core/types/block.go b/core/types/block.go index 2d889f35f4..b0fcbdd9b0 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -9,41 +9,233 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethutil" + "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/state" "github.com/ethereum/go-ethereum/trie" ) -type BlockInfo struct { - Number uint64 - Hash []byte - Parent []byte - TD *big.Int +type Header struct { + // Hash to the previous block + ParentHash ethutil.Bytes + // Uncles of this block + UncleHash []byte + // The coin base address + Coinbase []byte + // Block Trie state + Root []byte + // Tx sha + TxHash []byte + // Receipt sha + ReceiptHash []byte + // Bloom + Bloom []byte + // Difficulty for the current block + Difficulty *big.Int + // The block number + Number *big.Int + // Gas limit + GasLimit *big.Int + // Gas used + GasUsed *big.Int + // Creation time + Time uint64 + // Extra data + Extra string + // Block Nonce for verification + Nonce ethutil.Bytes } -func (bi *BlockInfo) RlpDecode(data []byte) { - decoder := ethutil.NewValueFromBytes(data) +func (self *Header) rlpData(withNonce bool) []interface{} { + fields := []interface{}{self.ParentHash, self.UncleHash, self.Coinbase, self.Root, self.TxHash, self.ReceiptHash, self.Bloom, self.Difficulty, self.Number, self.GasLimit, self.GasUsed, self.Time, self.Extra} + if withNonce { + fields = append(fields, self.Nonce) + } - bi.Number = decoder.Get(0).Uint() - bi.Hash = decoder.Get(1).Bytes() - bi.Parent = decoder.Get(2).Bytes() - bi.TD = decoder.Get(3).BigInt() + return fields } -func (bi *BlockInfo) RlpEncode() []byte { - return ethutil.Encode([]interface{}{bi.Number, bi.Hash, bi.Parent, bi.TD}) +func (self *Header) RlpData() interface{} { + return self.rlpData(true) +} + +func (self *Header) Hash() []byte { + return crypto.Sha3(ethutil.Encode(self.rlpData(true))) +} + +func (self *Header) HashNoNonce() []byte { + return crypto.Sha3(ethutil.Encode(self.rlpData(false))) +} + +type Block struct { + header *Header + uncles []*Header + transactions Transactions + Td *big.Int + + receipts Receipts + Reward *big.Int +} + +func NewBlock(parentHash []byte, coinbase []byte, root []byte, difficulty *big.Int, nonce []byte, extra string) *Block { + header := &Header{ + Root: root, + ParentHash: parentHash, + Coinbase: coinbase, + Difficulty: difficulty, + Nonce: nonce, + Time: uint64(time.Now().Unix()), + Extra: extra, + GasUsed: new(big.Int), + GasLimit: new(big.Int), + } + + block := &Block{header: header, Reward: new(big.Int)} + + return block +} + +func NewBlockWithHeader(header *Header) *Block { + return &Block{header: header} +} + +func (self *Block) DecodeRLP(s *rlp.Stream) error { + if _, err := s.List(); err != nil { + return err + } + + var header Header + if err := s.Decode(&header); err != nil { + return err + } + + var transactions []*Transaction + if err := s.Decode(&transactions); err != nil { + return err + } + + var uncleHeaders []*Header + if err := s.Decode(&uncleHeaders); err != nil { + return err + } + + var tdBytes []byte + if err := s.Decode(&tdBytes); err != nil { + // If this block comes from the network that's fine. If loaded from disk it should be there + // Blocks don't store their Td when propagated over the network + } else { + self.Td = ethutil.BigD(tdBytes) + } + + if err := s.ListEnd(); err != nil { + return err + } + + self.header = &header + self.uncles = uncleHeaders + self.transactions = transactions + + return nil +} + +func (self *Block) Header() *Header { + return self.header +} + +func (self *Block) Uncles() []*Header { + return self.uncles +} + +func (self *Block) SetUncles(uncleHeaders []*Header) { + self.uncles = uncleHeaders + self.header.UncleHash = crypto.Sha3(ethutil.Encode(uncleHeaders)) +} + +func (self *Block) Transactions() Transactions { + return self.transactions +} + +func (self *Block) Transaction(hash []byte) *Transaction { + for _, transaction := range self.transactions { + if bytes.Equal(hash, transaction.Hash()) { + return transaction + } + } + return nil +} + +func (self *Block) SetTransactions(transactions Transactions) { + self.transactions = transactions + self.header.TxHash = DeriveSha(transactions) +} + +func (self *Block) Receipts() Receipts { + return self.receipts +} + +func (self *Block) SetReceipts(receipts Receipts) { + self.receipts = receipts + self.header.ReceiptHash = DeriveSha(receipts) + self.header.Bloom = CreateBloom(receipts) +} + +func (self *Block) RlpData() interface{} { + return []interface{}{self.header, self.transactions, self.uncles} +} + +func (self *Block) RlpDataForStorage() interface{} { + return []interface{}{self.header, self.transactions, self.uncles, self.Td /* TODO receipts */} +} + +// Header accessors (add as you need them) +func (self *Block) Number() *big.Int { return self.header.Number } +func (self *Block) NumberU64() uint64 { return self.header.Number.Uint64() } +func (self *Block) ParentHash() []byte { return self.header.ParentHash } +func (self *Block) Bloom() []byte { return self.header.Bloom } +func (self *Block) Coinbase() []byte { return self.header.Coinbase } +func (self *Block) Time() int64 { return int64(self.header.Time) } +func (self *Block) GasLimit() *big.Int { return self.header.GasLimit } +func (self *Block) GasUsed() *big.Int { return self.header.GasUsed } +func (self *Block) Hash() []byte { return self.header.Hash() } +func (self *Block) Trie() *trie.Trie { return trie.New(ethutil.Config.Db, self.header.Root) } +func (self *Block) State() *state.StateDB { return state.New(self.Trie()) } +func (self *Block) Size() ethutil.StorageSize { return ethutil.StorageSize(len(ethutil.Encode(self))) } + +// Implement block.Pow +func (self *Block) Difficulty() *big.Int { return self.header.Difficulty } +func (self *Block) N() []byte { return self.header.Nonce } +func (self *Block) HashNoNonce() []byte { + return crypto.Sha3(ethutil.Encode(self.header.rlpData(false))) +} + +func (self *Block) String() string { + return fmt.Sprintf(`BLOCK(%x): Size: %v { +%v +%v +%v +} +`, self.header.Hash(), self.Size(), self.header, self.uncles, self.transactions) +} + +func (self *Header) String() string { + return fmt.Sprintf(`ParentHash: %x +UncleHash: %x +Coinbase: %x +Root: %x +TxSha %x +ReceiptSha: %x +Bloom: %x +Difficulty: %v +Number: %v +GasLimit: %v +GasUsed: %v +Time: %v +Extra: %v +Nonce: %x +`, self.ParentHash, self.UncleHash, self.Coinbase, self.Root, self.TxHash, self.ReceiptHash, self.Bloom, self.Difficulty, self.Number, self.GasLimit, self.GasUsed, self.Time, self.Extra, self.Nonce) } type Blocks []*Block -func (self Blocks) AsSet() ethutil.UniqueSet { - set := make(ethutil.UniqueSet) - for _, block := range self { - set.Insert(block.Hash()) - } - - return set -} - type BlockBy func(b1, b2 *Block) bool func (self BlockBy) Sort(blocks Blocks) { @@ -65,352 +257,4 @@ func (self blockSorter) Swap(i, j int) { } func (self blockSorter) Less(i, j int) bool { return self.by(self.blocks[i], self.blocks[j]) } -func Number(b1, b2 *Block) bool { return b1.Number.Cmp(b2.Number) < 0 } - -type Block struct { - // Hash to the previous block - PrevHash ethutil.Bytes - // Uncles of this block - Uncles Blocks - UncleSha []byte - // The coin base address - Coinbase []byte - // Block Trie state - //state *ethutil.Trie - state *state.StateDB - // Difficulty for the current block - Difficulty *big.Int - // Creation time - Time int64 - // The block number - Number *big.Int - // Gas limit - GasLimit *big.Int - // Gas used - GasUsed *big.Int - // Extra data - Extra string - // Block Nonce for verification - Nonce ethutil.Bytes - // List of transactions and/or contracts - transactions Transactions - receipts Receipts - TxSha, ReceiptSha []byte - LogsBloom []byte - - Reward *big.Int -} - -func NewBlockFromBytes(raw []byte) *Block { - block := &Block{} - block.RlpDecode(raw) - - return block -} - -// New block takes a raw encoded string -func NewBlockFromRlpValue(rlpValue *ethutil.Value) *Block { - block := &Block{} - block.RlpValueDecode(rlpValue) - - return block -} - -func CreateBlock(root interface{}, - prevHash []byte, - base []byte, - Difficulty *big.Int, - Nonce []byte, - extra string) *Block { - - block := &Block{ - PrevHash: prevHash, - Coinbase: base, - Difficulty: Difficulty, - Nonce: Nonce, - Time: time.Now().Unix(), - Extra: extra, - UncleSha: nil, - GasUsed: new(big.Int), - GasLimit: new(big.Int), - } - block.SetUncles([]*Block{}) - - block.state = state.New(trie.New(ethutil.Config.Db, root)) - - return block -} - -// Returns a hash of the block -func (block *Block) Hash() ethutil.Bytes { - return crypto.Sha3(ethutil.NewValue(block.header()).Encode()) - //return crypto.Sha3(block.Value().Encode()) -} - -func (block *Block) HashNoNonce() []byte { - return crypto.Sha3(ethutil.Encode(block.miningHeader())) -} - -func (block *Block) State() *state.StateDB { - return block.state -} - -func (block *Block) Transactions() Transactions { - return block.transactions -} - -func (block *Block) CalcGasLimit(parent *Block) *big.Int { - if block.Number.Cmp(big.NewInt(0)) == 0 { - return ethutil.BigPow(10, 6) - } - - // ((1024-1) * parent.gasLimit + (gasUsed * 6 / 5)) / 1024 - - previous := new(big.Int).Mul(big.NewInt(1024-1), parent.GasLimit) - current := new(big.Rat).Mul(new(big.Rat).SetInt(parent.GasUsed), big.NewRat(6, 5)) - curInt := new(big.Int).Div(current.Num(), current.Denom()) - - result := new(big.Int).Add(previous, curInt) - result.Div(result, big.NewInt(1024)) - - min := big.NewInt(125000) - - return ethutil.BigMax(min, result) -} - -func (block *Block) BlockInfo() BlockInfo { - bi := BlockInfo{} - data, _ := ethutil.Config.Db.Get(append(block.Hash(), []byte("Info")...)) - bi.RlpDecode(data) - - return bi -} - -func (self *Block) GetTransaction(hash []byte) *Transaction { - for _, tx := range self.transactions { - if bytes.Compare(tx.Hash(), hash) == 0 { - return tx - } - } - - return nil -} - -// Sync the block's state and contract respectively -func (block *Block) Sync() { - block.state.Sync() -} - -func (block *Block) Undo() { - // Sync the block state itself - block.state.Reset() -} - -/////// Block Encoding -func (block *Block) rlpReceipts() interface{} { - // Marshal the transactions of this block - encR := make([]interface{}, len(block.receipts)) - for i, r := range block.receipts { - // Cast it to a string (safe) - encR[i] = r.RlpData() - } - - return encR -} - -func (block *Block) rlpUncles() interface{} { - // Marshal the transactions of this block - uncles := make([]interface{}, len(block.Uncles)) - for i, uncle := range block.Uncles { - // Cast it to a string (safe) - uncles[i] = uncle.header() - } - - return uncles -} - -func (block *Block) SetUncles(uncles []*Block) { - block.Uncles = uncles - block.UncleSha = crypto.Sha3(ethutil.Encode(block.rlpUncles())) -} - -func (self *Block) SetReceipts(receipts Receipts) { - self.receipts = receipts - self.ReceiptSha = DeriveSha(receipts) - self.LogsBloom = CreateBloom(receipts) -} - -func (self *Block) SetTransactions(txs Transactions) { - self.transactions = txs - self.TxSha = DeriveSha(txs) -} - -func (block *Block) Value() *ethutil.Value { - return ethutil.NewValue([]interface{}{block.header(), block.transactions, block.rlpUncles()}) -} - -func (block *Block) RlpEncode() []byte { - // Encode a slice interface which contains the header and the list of - // transactions. - return block.Value().Encode() -} - -func (block *Block) RlpDecode(data []byte) { - rlpValue := ethutil.NewValueFromBytes(data) - block.RlpValueDecode(rlpValue) -} - -func (block *Block) RlpValueDecode(decoder *ethutil.Value) { - block.setHeader(decoder.Get(0)) - - // Tx list might be empty if this is an uncle. Uncles only have their - // header set. - if decoder.Get(1).IsNil() == false { // Yes explicitness - //receipts := decoder.Get(1) - //block.receipts = make([]*Receipt, receipts.Len()) - txs := decoder.Get(1) - block.transactions = make(Transactions, txs.Len()) - for i := 0; i < txs.Len(); i++ { - block.transactions[i] = NewTransactionFromValue(txs.Get(i)) - //receipt := NewRecieptFromValue(receipts.Get(i)) - //block.transactions[i] = receipt.Tx - //block.receipts[i] = receipt - } - - } - - if decoder.Get(2).IsNil() == false { // Yes explicitness - uncles := decoder.Get(2) - block.Uncles = make([]*Block, uncles.Len()) - for i := 0; i < uncles.Len(); i++ { - block.Uncles[i] = NewUncleBlockFromValue(uncles.Get(i)) - } - } - -} - -func (self *Block) setHeader(header *ethutil.Value) { - self.PrevHash = header.Get(0).Bytes() - self.UncleSha = header.Get(1).Bytes() - self.Coinbase = header.Get(2).Bytes() - self.state = state.New(trie.New(ethutil.Config.Db, header.Get(3).Val)) - self.TxSha = header.Get(4).Bytes() - self.ReceiptSha = header.Get(5).Bytes() - self.LogsBloom = header.Get(6).Bytes() - self.Difficulty = header.Get(7).BigInt() - self.Number = header.Get(8).BigInt() - self.GasLimit = header.Get(9).BigInt() - self.GasUsed = header.Get(10).BigInt() - self.Time = int64(header.Get(11).BigInt().Uint64()) - self.Extra = header.Get(12).Str() - self.Nonce = header.Get(13).Bytes() -} - -func NewUncleBlockFromValue(header *ethutil.Value) *Block { - block := &Block{} - block.setHeader(header) - - return block -} - -func (block *Block) Trie() *trie.Trie { - return block.state.Trie -} - -func (block *Block) Root() interface{} { - return block.state.Root() -} - -func (block *Block) Diff() *big.Int { - return block.Difficulty -} - -func (self *Block) Receipts() []*Receipt { - return self.receipts -} - -func (block *Block) miningHeader() []interface{} { - return []interface{}{ - // Sha of the previous block - block.PrevHash, - // Sha of uncles - block.UncleSha, - // Coinbase address - block.Coinbase, - // root state - block.Root(), - // tx root - block.TxSha, - // Sha of tx - block.ReceiptSha, - // Bloom - block.LogsBloom, - // Current block Difficulty - block.Difficulty, - // The block number - block.Number, - // Block upper gas bound - block.GasLimit, - // Block gas used - block.GasUsed, - // Time the block was found? - block.Time, - // Extra data - block.Extra, - } -} - -func (block *Block) header() []interface{} { - return append(block.miningHeader(), block.Nonce) -} - -func (block *Block) String() string { - return fmt.Sprintf(` - BLOCK(%x): Size: %v - PrevHash: %x - UncleSha: %x - Coinbase: %x - Root: %x - TxSha %x - ReceiptSha: %x - Bloom: %x - Difficulty: %v - Number: %v - MaxLimit: %v - GasUsed: %v - Time: %v - Extra: %v - Nonce: %x - NumTx: %v -`, - block.Hash(), - block.Size(), - block.PrevHash, - block.UncleSha, - block.Coinbase, - block.Root(), - block.TxSha, - block.ReceiptSha, - block.LogsBloom, - block.Difficulty, - block.Number, - block.GasLimit, - block.GasUsed, - block.Time, - block.Extra, - block.Nonce, - len(block.transactions), - ) -} - -func (self *Block) Size() ethutil.StorageSize { - return ethutil.StorageSize(len(self.RlpEncode())) -} - -// Implement RlpEncodable -func (self *Block) RlpData() interface{} { - return []interface{}{self.header(), self.transactions, self.rlpUncles()} -} - -// Implement pow.Block -func (self *Block) N() []byte { return self.Nonce } +func Number(b1, b2 *Block) bool { return b1.Header().Number.Cmp(b2.Header().Number) < 0 } diff --git a/core/types/block_test.go b/core/types/block_test.go new file mode 100644 index 0000000000..c85708975f --- /dev/null +++ b/core/types/block_test.go @@ -0,0 +1,23 @@ +package types + +import ( + "bytes" + "testing" + + "github.com/ethereum/go-ethereum/ethdb" + "github.com/ethereum/go-ethereum/ethutil" + "github.com/ethereum/go-ethereum/rlp" +) + +func init() { + ethutil.ReadConfig(".ethtest", "/tmp/ethtest", "") + ethutil.Config.Db, _ = ethdb.NewMemDatabase() +} + +func TestNewBlock(t *testing.T) { + block := GenesisBlock() + data := ethutil.Encode(block) + + var genesis Block + err := rlp.Decode(bytes.NewReader(data), &genesis) +} diff --git a/core/types/transaction.go b/core/types/transaction.go index 3a87f78443..c2f7df7a70 100644 --- a/core/types/transaction.go +++ b/core/types/transaction.go @@ -1,11 +1,13 @@ package types import ( + "bytes" "fmt" "math/big" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethutil" + "github.com/ethereum/go-ethereum/rlp" "github.com/obscuren/secp256k1-go" ) @@ -14,22 +16,22 @@ func IsContractAddr(addr []byte) bool { } type Transaction struct { - nonce uint64 - recipient []byte - value *big.Int - gas *big.Int - gasPrice *big.Int - data []byte - v byte - r, s []byte + AccountNonce uint64 + Recipient []byte + Amount *big.Int + GasAmount *big.Int + Price *big.Int + Payload []byte + V uint64 + R, S []byte } -func NewContractCreationTx(value, gas, gasPrice *big.Int, script []byte) *Transaction { - return &Transaction{recipient: nil, value: value, gas: gas, gasPrice: gasPrice, data: script} +func NewContractCreationTx(Amount, gasAmount, price *big.Int, data []byte) *Transaction { + return NewTransactionMessage(nil, Amount, gasAmount, price, data) } -func NewTransactionMessage(to []byte, value, gas, gasPrice *big.Int, data []byte) *Transaction { - return &Transaction{recipient: to, value: value, gasPrice: gasPrice, gas: gas, data: data} +func NewTransactionMessage(to []byte, Amount, gasAmount, price *big.Int, data []byte) *Transaction { + return &Transaction{Recipient: to, Amount: Amount, Price: price, GasAmount: gasAmount, Payload: data} } func NewTransactionFromBytes(data []byte) *Transaction { @@ -39,7 +41,7 @@ func NewTransactionFromBytes(data []byte) *Transaction { return tx } -func NewTransactionFromValue(val *ethutil.Value) *Transaction { +func NewTransactionFromAmount(val *ethutil.Value) *Transaction { tx := &Transaction{} tx.RlpValueDecode(val) @@ -47,33 +49,33 @@ func NewTransactionFromValue(val *ethutil.Value) *Transaction { } func (tx *Transaction) Hash() []byte { - data := []interface{}{tx.nonce, tx.gasPrice, tx.gas, tx.recipient, tx.value, tx.data} + data := []interface{}{tx.AccountNonce, tx.Price, tx.GasAmount, tx.Recipient, tx.Amount, tx.Payload} - return crypto.Sha3(ethutil.NewValue(data).Encode()) + return crypto.Sha3(ethutil.Encode(data)) } func (self *Transaction) Data() []byte { - return self.data + return self.Payload } func (self *Transaction) Gas() *big.Int { - return self.gas + return self.GasAmount } func (self *Transaction) GasPrice() *big.Int { - return self.gasPrice + return self.Price } func (self *Transaction) Value() *big.Int { - return self.value + return self.Amount } func (self *Transaction) Nonce() uint64 { - return self.nonce + return self.AccountNonce } -func (self *Transaction) SetNonce(nonce uint64) { - self.nonce = nonce +func (self *Transaction) SetNonce(AccountNonce uint64) { + self.AccountNonce = AccountNonce } func (self *Transaction) From() []byte { @@ -81,13 +83,13 @@ func (self *Transaction) From() []byte { } func (self *Transaction) To() []byte { - return self.recipient + return self.Recipient } func (tx *Transaction) Curve() (v byte, r []byte, s []byte) { - v = tx.v - r = ethutil.LeftPadBytes(tx.r, 32) - s = ethutil.LeftPadBytes(tx.s, 32) + v = byte(tx.V) + r = ethutil.LeftPadBytes(tx.R, 32) + s = ethutil.LeftPadBytes(tx.S, 32) return } @@ -130,42 +132,37 @@ func (tx *Transaction) Sign(privk []byte) error { sig := tx.Signature(privk) - tx.r = sig[:32] - tx.s = sig[32:64] - tx.v = sig[64] + 27 + tx.R = sig[:32] + tx.S = sig[32:64] + tx.V = uint64(sig[64] + 27) return nil } func (tx *Transaction) RlpData() interface{} { - data := []interface{}{tx.nonce, tx.gasPrice, tx.gas, tx.recipient, tx.value, tx.data} + data := []interface{}{tx.AccountNonce, tx.Price, tx.GasAmount, tx.Recipient, tx.Amount, tx.Payload} - return append(data, tx.v, new(big.Int).SetBytes(tx.r).Bytes(), new(big.Int).SetBytes(tx.s).Bytes()) -} - -func (tx *Transaction) RlpValue() *ethutil.Value { - return ethutil.NewValue(tx.RlpData()) + return append(data, tx.V, new(big.Int).SetBytes(tx.R).Bytes(), new(big.Int).SetBytes(tx.S).Bytes()) } func (tx *Transaction) RlpEncode() []byte { - return tx.RlpValue().Encode() + return ethutil.Encode(tx) } func (tx *Transaction) RlpDecode(data []byte) { - tx.RlpValueDecode(ethutil.NewValueFromBytes(data)) + rlp.Decode(bytes.NewReader(data), tx) } func (tx *Transaction) RlpValueDecode(decoder *ethutil.Value) { - tx.nonce = decoder.Get(0).Uint() - tx.gasPrice = decoder.Get(1).BigInt() - tx.gas = decoder.Get(2).BigInt() - tx.recipient = decoder.Get(3).Bytes() - tx.value = decoder.Get(4).BigInt() - tx.data = decoder.Get(5).Bytes() - tx.v = byte(decoder.Get(6).Uint()) - - tx.r = decoder.Get(7).Bytes() - tx.s = decoder.Get(8).Bytes() + tx.AccountNonce = decoder.Get(0).Uint() + tx.Price = decoder.Get(1).BigInt() + tx.GasAmount = decoder.Get(2).BigInt() + tx.Recipient = decoder.Get(3).Bytes() + tx.Amount = decoder.Get(4).BigInt() + tx.Payload = decoder.Get(5).Bytes() + tx.V = decoder.Get(6).Uint() + tx.R = decoder.Get(7).Bytes() + tx.S = decoder.Get(8).Bytes() } func (tx *Transaction) String() string { @@ -174,10 +171,10 @@ func (tx *Transaction) String() string { Contract: %v From: %x To: %x - Nonce: %v - GasPrice: %v - Gas: %v - Value: %v + AccountNonce: %v + GasAmountPrice: %v + GasAmount: %v + Amount: %v Data: 0x%x V: 0x%x R: 0x%x @@ -185,17 +182,17 @@ func (tx *Transaction) String() string { Hex: %x `, tx.Hash(), - len(tx.recipient) == 0, + len(tx.Recipient) == 0, tx.From(), - tx.recipient, - tx.nonce, - tx.gasPrice, - tx.gas, - tx.value, - tx.data, - tx.v, - tx.r, - tx.s, + tx.Recipient, + tx.AccountNonce, + tx.Price, + tx.GasAmount, + tx.Amount, + tx.Payload, + tx.V, + tx.R, + tx.S, ethutil.Encode(tx), ) } @@ -220,5 +217,5 @@ func (s Transactions) GetRlp(i int) []byte { return ethutil.Rlp(s[i]) } type TxByNonce struct{ Transactions } func (s TxByNonce) Less(i, j int) bool { - return s.Transactions[i].nonce < s.Transactions[j].nonce + return s.Transactions[i].AccountNonce < s.Transactions[j].AccountNonce } diff --git a/core/vm_env.go b/core/vm_env.go index ad63ecf9c6..209115eabf 100644 --- a/core/vm_env.go +++ b/core/vm_env.go @@ -24,15 +24,15 @@ func NewEnv(state *state.StateDB, msg Message, block *types.Block) *VMEnv { } func (self *VMEnv) Origin() []byte { return self.msg.From() } -func (self *VMEnv) BlockNumber() *big.Int { return self.block.Number } -func (self *VMEnv) PrevHash() []byte { return self.block.PrevHash } -func (self *VMEnv) Coinbase() []byte { return self.block.Coinbase } -func (self *VMEnv) Time() int64 { return self.block.Time } -func (self *VMEnv) Difficulty() *big.Int { return self.block.Difficulty } +func (self *VMEnv) BlockNumber() *big.Int { return self.block.Number() } +func (self *VMEnv) PrevHash() []byte { return self.block.ParentHash() } +func (self *VMEnv) Coinbase() []byte { return self.block.Coinbase() } +func (self *VMEnv) Time() int64 { return self.block.Time() } +func (self *VMEnv) Difficulty() *big.Int { return self.block.Difficulty() } func (self *VMEnv) BlockHash() []byte { return self.block.Hash() } +func (self *VMEnv) GasLimit() *big.Int { return self.block.GasLimit() } func (self *VMEnv) Value() *big.Int { return self.msg.Value() } func (self *VMEnv) State() *state.StateDB { return self.state } -func (self *VMEnv) GasLimit() *big.Int { return self.block.GasLimit } func (self *VMEnv) Depth() int { return self.depth } func (self *VMEnv) SetDepth(i int) { self.depth = i } func (self *VMEnv) AddLog(log state.Log) { diff --git a/eth/backend.go b/eth/backend.go index 0aad6a5141..383cda46f4 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -235,7 +235,7 @@ func (self *Ethereum) blockBroadcastLoop() { // automatically stops if unsubscribe for obj := range self.txSub.Chan() { event := obj.(core.NewMinedBlockEvent) - self.server.Broadcast("eth", NewBlockMsg, event.Block.Value().Val) + self.server.Broadcast("eth", NewBlockMsg, event.Block.RlpData()) } } diff --git a/eth/protocol.go b/eth/protocol.go index 3b6f95d440..963d417940 100644 --- a/eth/protocol.go +++ b/eth/protocol.go @@ -172,7 +172,7 @@ func (self *ethProtocol) handle() error { } block := self.chainManager.GetBlock(hash) if block != nil { - blocks = append(blocks, block.Value().Raw()) + blocks = append(blocks, block.RlpData()) } } return self.rw.EncodeMsg(BlocksMsg, blocks...) diff --git a/miner/miner.go b/miner/miner.go index d909c228b7..c9a6922bb5 100644 --- a/miner/miner.go +++ b/miner/miner.go @@ -56,7 +56,7 @@ type Miner struct { eth *eth.Ethereum events event.Subscription - uncles types.Blocks + uncles []*types.Header localTxs map[int]*LocalTx localTxId int @@ -184,9 +184,9 @@ func (self *Miner) mine() { block.SetUncles(self.uncles) } - parent := chainMan.GetBlock(block.PrevHash) - coinbase := block.State().GetOrNewStateObject(block.Coinbase) - coinbase.SetGasPool(block.CalcGasLimit(parent)) + parent := chainMan.GetBlock(block.ParentHash()) + coinbase := block.State().GetOrNewStateObject(block.Coinbase()) + coinbase.SetGasPool(core.CalcGasLimit(parent, block)) transactions := self.finiliseTxs() @@ -211,7 +211,7 @@ func (self *Miner) mine() { // Find a valid nonce nonce := self.pow.Search(block, self.powQuitCh) if nonce != nil { - block.Nonce = nonce + block.Header().Nonce = nonce err := chainMan.InsertChain(types.Blocks{block}) if err != nil { minerlogger.Infoln(err) diff --git a/pow/block.go b/pow/block.go index 4759e19fb3..62df2b5ff5 100644 --- a/pow/block.go +++ b/pow/block.go @@ -3,7 +3,7 @@ package pow import "math/big" type Block interface { - Diff() *big.Int + Difficulty() *big.Int HashNoNonce() []byte N() []byte } diff --git a/pow/ezp/pow.go b/pow/ezp/pow.go index f669f8aa4a..f9f27326fa 100644 --- a/pow/ezp/pow.go +++ b/pow/ezp/pow.go @@ -35,7 +35,7 @@ func (pow *EasyPow) Turbo(on bool) { func (pow *EasyPow) Search(block pow.Block, stop <-chan struct{}) []byte { r := rand.New(rand.NewSource(time.Now().UnixNano())) hash := block.HashNoNonce() - diff := block.Diff() + diff := block.Difficulty() i := int64(0) start := time.Now().UnixNano() t := time.Now() @@ -89,5 +89,5 @@ func verify(hash []byte, diff *big.Int, nonce []byte) bool { } func Verify(block pow.Block) bool { - return verify(block.HashNoNonce(), block.Diff(), block.N()) + return verify(block.HashNoNonce(), block.Difficulty(), block.N()) } diff --git a/xeth/js_types.go b/xeth/js_types.go index 04018f6a5f..4bb1f4e7da 100644 --- a/xeth/js_types.go +++ b/xeth/js_types.go @@ -42,21 +42,21 @@ func NewJSBlock(block *types.Block) *JSBlock { } txlist := ethutil.NewList(ptxs) - puncles := make([]*JSBlock, len(block.Uncles)) - for i, uncle := range block.Uncles { - puncles[i] = NewJSBlock(uncle) + puncles := make([]*JSBlock, len(block.Uncles())) + for i, uncle := range block.Uncles() { + puncles[i] = NewJSBlock(types.NewBlockWithHeader(uncle)) } ulist := ethutil.NewList(puncles) return &JSBlock{ ref: block, Size: block.Size().String(), - Number: int(block.Number.Uint64()), GasUsed: block.GasUsed.String(), - GasLimit: block.GasLimit.String(), Hash: ethutil.Bytes2Hex(block.Hash()), + Number: int(block.NumberU64()), GasUsed: block.GasUsed().String(), + GasLimit: block.GasLimit().String(), Hash: ethutil.Bytes2Hex(block.Hash()), Transactions: txlist, Uncles: ulist, - Time: block.Time, - Coinbase: ethutil.Bytes2Hex(block.Coinbase), - PrevHash: ethutil.Bytes2Hex(block.PrevHash), - Bloom: ethutil.Bytes2Hex(block.LogsBloom), + Time: block.Time(), + Coinbase: ethutil.Bytes2Hex(block.Coinbase()), + PrevHash: ethutil.Bytes2Hex(block.ParentHash()), + Bloom: ethutil.Bytes2Hex(block.Bloom()), Raw: block.String(), } } @@ -70,7 +70,7 @@ func (self *JSBlock) ToString() string { } func (self *JSBlock) GetTransaction(hash string) *JSTransaction { - tx := self.ref.GetTransaction(ethutil.Hex2Bytes(hash)) + tx := self.ref.Transaction(ethutil.Hex2Bytes(hash)) if tx == nil { return nil } diff --git a/xeth/pipe.go b/xeth/pipe.go index 06820cc865..775d5cfc58 100644 --- a/xeth/pipe.go +++ b/xeth/pipe.go @@ -140,7 +140,7 @@ func (self *XEth) Transact(key *crypto.KeyPair, to []byte, value, gas, price *et // Do some pre processing for our "pre" events and hooks block := self.chainManager.NewBlock(key.Address()) coinbase := state.GetStateObject(key.Address()) - coinbase.SetGasPool(block.GasLimit) + coinbase.SetGasPool(block.GasLimit()) self.blockManager.ApplyTransactions(coinbase, state, block, types.Transactions{tx}, true) err := self.obj.TxPool().Add(tx) diff --git a/xeth/vm_env.go b/xeth/vm_env.go index 7fb674a94b..7633e0640c 100644 --- a/xeth/vm_env.go +++ b/xeth/vm_env.go @@ -28,15 +28,15 @@ func NewEnv(state *state.StateDB, block *types.Block, value *big.Int, sender []b } func (self *VMEnv) Origin() []byte { return self.sender } -func (self *VMEnv) BlockNumber() *big.Int { return self.block.Number } -func (self *VMEnv) PrevHash() []byte { return self.block.PrevHash } -func (self *VMEnv) Coinbase() []byte { return self.block.Coinbase } -func (self *VMEnv) Time() int64 { return self.block.Time } -func (self *VMEnv) Difficulty() *big.Int { return self.block.Difficulty } +func (self *VMEnv) BlockNumber() *big.Int { return self.block.Number() } +func (self *VMEnv) PrevHash() []byte { return self.block.ParentHash() } +func (self *VMEnv) Coinbase() []byte { return self.block.Coinbase() } +func (self *VMEnv) Time() int64 { return self.block.Time() } +func (self *VMEnv) Difficulty() *big.Int { return self.block.Difficulty() } func (self *VMEnv) BlockHash() []byte { return self.block.Hash() } +func (self *VMEnv) GasLimit() *big.Int { return self.block.GasLimit() } func (self *VMEnv) Value() *big.Int { return self.value } func (self *VMEnv) State() *state.StateDB { return self.state } -func (self *VMEnv) GasLimit() *big.Int { return self.block.GasLimit } func (self *VMEnv) Depth() int { return self.depth } func (self *VMEnv) SetDepth(i int) { self.depth = i } func (self *VMEnv) AddLog(log state.Log) { From 9e5257b83b8572077b9c26e4ae9a9443f765bf6e Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 23 Dec 2014 14:33:15 +0100 Subject: [PATCH 027/132] Chain importer --- cmd/ethereum/flags.go | 2 ++ cmd/ethereum/main.go | 28 +++++++++++++++++++++++++++- core/block_manager.go | 4 ++-- core/chain_manager.go | 5 ----- core/types/block.go | 36 +++++++++++++++++++++--------------- core/types/transaction.go | 28 ++++++++++++++-------------- 6 files changed, 66 insertions(+), 37 deletions(-) diff --git a/cmd/ethereum/flags.go b/cmd/ethereum/flags.go index 72f1db4589..d27b739c36 100644 --- a/cmd/ethereum/flags.go +++ b/cmd/ethereum/flags.go @@ -58,6 +58,7 @@ var ( DumpHash string DumpNumber int VmType int + ImportChain string ) // flags specific to cli client @@ -104,6 +105,7 @@ func Init() { flag.BoolVar(&DiffTool, "difftool", false, "creates output for diff'ing. Sets LogLevel=0") flag.StringVar(&DiffType, "diff", "all", "sets the level of diff output [vm, all]. Has no effect if difftool=false") flag.BoolVar(&ShowGenesis, "genesis", false, "Dump the genesis block") + flag.StringVar(&ImportChain, "chain", "", "Imports fiven chain") flag.BoolVar(&Dump, "dump", false, "output the ethereum state in JSON format. Sub args [number, hash]") flag.StringVar(&DumpHash, "hash", "", "specify arg in hex") diff --git a/cmd/ethereum/main.go b/cmd/ethereum/main.go index fff9aedf87..f16244a2d3 100644 --- a/cmd/ethereum/main.go +++ b/cmd/ethereum/main.go @@ -18,6 +18,7 @@ package main import ( + "bytes" "fmt" "os" "runtime" @@ -26,6 +27,7 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/logger" + "github.com/ethereum/go-ethereum/rlp" ) const ( @@ -38,6 +40,10 @@ var clilogger = logger.NewLogger("CLI") func main() { runtime.GOMAXPROCS(runtime.NumCPU()) + defer func() { + logger.Flush() + }() + utils.HandleInterrupt() // precedence: code-internal flag default < config file < environment variables < command line @@ -112,6 +118,27 @@ func main() { utils.StartMining(ethereum) } + if len(ImportChain) > 0 { + clilogger.Infof("importing chain '%s'\n", ImportChain) + c, err := ethutil.ReadAllFile(ImportChain) + if err != nil { + clilogger.Infoln(err) + return + } + var chain types.Blocks + if err := rlp.Decode(bytes.NewReader([]byte(c)), &chain); err != nil { + clilogger.Infoln(err) + return + } + + ethereum.ChainManager().Reset() + if err := ethereum.ChainManager().InsertChain(chain); err != nil { + clilogger.Infoln(err) + return + } + clilogger.Infof("imported %d blocks\n", len(chain)) + } + // better reworked as cases if StartJsConsole { InitJsConsole(ethereum) @@ -131,5 +158,4 @@ func main() { // this blocks the thread ethereum.WaitForShutdown() - logger.Flush() } diff --git a/core/block_manager.go b/core/block_manager.go index c61cf65046..ef2113bfbe 100644 --- a/core/block_manager.go +++ b/core/block_manager.go @@ -304,7 +304,7 @@ func (sm *BlockManager) AccumelateRewards(statedb *state.StateDB, block, parent knownUncles := set.New() for _, uncle := range parent.Uncles() { - knownUncles.Add(uncle.Hash()) + knownUncles.Add(string(uncle.Hash())) } nonces := ethutil.NewSet(block.Header().Nonce) @@ -323,7 +323,7 @@ func (sm *BlockManager) AccumelateRewards(statedb *state.StateDB, block, parent return UncleError("Uncle too old") } - if knownUncles.Has(uncle.Hash()) { + if knownUncles.Has(string(uncle.Hash())) { return UncleError("Uncle in chain") } diff --git a/core/chain_manager.go b/core/chain_manager.go index e35c4aa3a6..fe687e5015 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -204,9 +204,6 @@ func (bc *ChainManager) Reset() { bc.currentBlock = bc.genesisBlock bc.setTotalDifficulty(ethutil.Big("0")) - - // Set the last know difficulty (might be 0x0 as initial value, Genesis) - bc.td = ethutil.BigD(ethutil.Config.Db.LastKnownTD()) } func (self *ChainManager) Export() []byte { @@ -219,9 +216,7 @@ func (self *ChainManager) Export() []byte { for block := self.currentBlock; block != nil; block = self.GetBlock(block.Header().ParentHash) { blocks[block.NumberU64()] = block } - //fmt.Println(blocks) - return nil return ethutil.Encode(blocks) } diff --git a/core/types/block.go b/core/types/block.go index b0fcbdd9b0..940f2402ee 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -209,28 +209,34 @@ func (self *Block) HashNoNonce() []byte { func (self *Block) String() string { return fmt.Sprintf(`BLOCK(%x): Size: %v { +Header: +[ %v +] +Transactions: %v +Uncles: %v } -`, self.header.Hash(), self.Size(), self.header, self.uncles, self.transactions) +`, self.header.Hash(), self.Size(), self.header, self.transactions, self.uncles) } func (self *Header) String() string { - return fmt.Sprintf(`ParentHash: %x -UncleHash: %x -Coinbase: %x -Root: %x -TxSha %x -ReceiptSha: %x -Bloom: %x -Difficulty: %v -Number: %v -GasLimit: %v -GasUsed: %v -Time: %v -Extra: %v -Nonce: %x + return fmt.Sprintf(` + ParentHash: %x + UncleHash: %x + Coinbase: %x + Root: %x + TxSha %x + ReceiptSha: %x + Bloom: %x + Difficulty: %v + Number: %v + GasLimit: %v + GasUsed: %v + Time: %v + Extra: %v + Nonce: %x `, self.ParentHash, self.UncleHash, self.Coinbase, self.Root, self.TxHash, self.ReceiptHash, self.Bloom, self.Difficulty, self.Number, self.GasLimit, self.GasUsed, self.Time, self.Extra, self.Nonce) } diff --git a/core/types/transaction.go b/core/types/transaction.go index c2f7df7a70..59244adc3d 100644 --- a/core/types/transaction.go +++ b/core/types/transaction.go @@ -17,10 +17,10 @@ func IsContractAddr(addr []byte) bool { type Transaction struct { AccountNonce uint64 + Price *big.Int + GasLimit *big.Int Recipient []byte Amount *big.Int - GasAmount *big.Int - Price *big.Int Payload []byte V uint64 R, S []byte @@ -31,7 +31,7 @@ func NewContractCreationTx(Amount, gasAmount, price *big.Int, data []byte) *Tran } func NewTransactionMessage(to []byte, Amount, gasAmount, price *big.Int, data []byte) *Transaction { - return &Transaction{Recipient: to, Amount: Amount, Price: price, GasAmount: gasAmount, Payload: data} + return &Transaction{Recipient: to, Amount: Amount, Price: price, GasLimit: gasAmount, Payload: data} } func NewTransactionFromBytes(data []byte) *Transaction { @@ -49,7 +49,7 @@ func NewTransactionFromAmount(val *ethutil.Value) *Transaction { } func (tx *Transaction) Hash() []byte { - data := []interface{}{tx.AccountNonce, tx.Price, tx.GasAmount, tx.Recipient, tx.Amount, tx.Payload} + data := []interface{}{tx.AccountNonce, tx.Price, tx.GasLimit, tx.Recipient, tx.Amount, tx.Payload} return crypto.Sha3(ethutil.Encode(data)) } @@ -59,7 +59,7 @@ func (self *Transaction) Data() []byte { } func (self *Transaction) Gas() *big.Int { - return self.GasAmount + return self.GasLimit } func (self *Transaction) GasPrice() *big.Int { @@ -140,7 +140,7 @@ func (tx *Transaction) Sign(privk []byte) error { } func (tx *Transaction) RlpData() interface{} { - data := []interface{}{tx.AccountNonce, tx.Price, tx.GasAmount, tx.Recipient, tx.Amount, tx.Payload} + data := []interface{}{tx.AccountNonce, tx.Price, tx.GasLimit, tx.Recipient, tx.Amount, tx.Payload} return append(data, tx.V, new(big.Int).SetBytes(tx.R).Bytes(), new(big.Int).SetBytes(tx.S).Bytes()) } @@ -156,7 +156,7 @@ func (tx *Transaction) RlpDecode(data []byte) { func (tx *Transaction) RlpValueDecode(decoder *ethutil.Value) { tx.AccountNonce = decoder.Get(0).Uint() tx.Price = decoder.Get(1).BigInt() - tx.GasAmount = decoder.Get(2).BigInt() + tx.GasLimit = decoder.Get(2).BigInt() tx.Recipient = decoder.Get(3).Bytes() tx.Amount = decoder.Get(4).BigInt() tx.Payload = decoder.Get(5).Bytes() @@ -171,23 +171,23 @@ func (tx *Transaction) String() string { Contract: %v From: %x To: %x - AccountNonce: %v - GasAmountPrice: %v - GasAmount: %v - Amount: %v + Nonce: %v + GasPrice: %v + GasLimit %v + Value: %v Data: 0x%x V: 0x%x R: 0x%x S: 0x%x Hex: %x - `, +`, tx.Hash(), len(tx.Recipient) == 0, tx.From(), - tx.Recipient, + tx.To(), tx.AccountNonce, tx.Price, - tx.GasAmount, + tx.GasLimit, tx.Amount, tx.Payload, tx.V, From e2e3fa3d11b37c8a22ebafe9c02dfd8089ac4d51 Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 23 Dec 2014 14:44:45 +0100 Subject: [PATCH 028/132] Updated Mist to use new blocks --- cmd/mist/gui.go | 8 ++++---- cmd/mist/html_container.go | 2 +- cmd/mist/qml_container.go | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/mist/gui.go b/cmd/mist/gui.go index 1152f0dcd0..e5e18bbaa8 100644 --- a/cmd/mist/gui.go +++ b/cmd/mist/gui.go @@ -221,7 +221,7 @@ func (gui *Gui) setInitialChain(ancientBlocks bool) { sBlk := gui.eth.ChainManager().LastBlockHash() blk := gui.eth.ChainManager().GetBlock(sBlk) for ; blk != nil; blk = gui.eth.ChainManager().GetBlock(sBlk) { - sBlk = blk.PrevHash + sBlk = blk.ParentHash() gui.processBlock(blk, true) } @@ -322,7 +322,7 @@ func (gui *Gui) readPreviousTransactions() { } func (gui *Gui) processBlock(block *types.Block, initial bool) { - name := strings.Trim(gui.pipe.World().Config().Get("NameReg").Storage(block.Coinbase).Str(), "\x00") + name := strings.Trim(gui.pipe.World().Config().Get("NameReg").Storage(block.Coinbase()).Str(), "\x00") b := xeth.NewJSBlock(block) b.Name = name @@ -400,7 +400,7 @@ func (gui *Gui) update() { switch ev := ev.(type) { case core.NewBlockEvent: gui.processBlock(ev.Block, false) - if bytes.Compare(ev.Block.Coinbase, gui.address()) == 0 { + if bytes.Compare(ev.Block.Coinbase(), gui.address()) == 0 { gui.setWalletValue(gui.eth.ChainManager().State().GetBalance(gui.address()), nil) } @@ -438,7 +438,7 @@ func (gui *Gui) update() { case <-peerUpdateTicker.C: gui.setPeerInfo() case <-generalUpdateTicker.C: - statusText := "#" + gui.eth.ChainManager().CurrentBlock().Number.String() + statusText := "#" + gui.eth.ChainManager().CurrentBlock().Number().String() lastBlockLabel.Set("text", statusText) miningLabel.Set("text", "Mining @ "+strconv.FormatInt(gui.uiLib.miner.GetPow().GetHashrate(), 10)+"Khash") diff --git a/cmd/mist/html_container.go b/cmd/mist/html_container.go index b3fc219fad..bd11ccd57e 100644 --- a/cmd/mist/html_container.go +++ b/cmd/mist/html_container.go @@ -139,7 +139,7 @@ func (app *HtmlApplication) Window() *qml.Window { } func (app *HtmlApplication) NewBlock(block *types.Block) { - b := &xeth.JSBlock{Number: int(block.BlockInfo().Number), Hash: ethutil.Bytes2Hex(block.Hash())} + b := &xeth.JSBlock{Number: int(block.NumberU64()), Hash: ethutil.Bytes2Hex(block.Hash())} app.webView.Call("onNewBlockCb", b) } diff --git a/cmd/mist/qml_container.go b/cmd/mist/qml_container.go index a0a46f9b10..ed24737d0e 100644 --- a/cmd/mist/qml_container.go +++ b/cmd/mist/qml_container.go @@ -66,7 +66,7 @@ func (app *QmlApplication) NewWatcher(quitChan chan bool) { // Events func (app *QmlApplication) NewBlock(block *types.Block) { - pblock := &xeth.JSBlock{Number: int(block.BlockInfo().Number), Hash: ethutil.Bytes2Hex(block.Hash())} + pblock := &xeth.JSBlock{Number: int(block.NumberU64()), Hash: ethutil.Bytes2Hex(block.Hash())} app.win.Call("onNewBlockCb", pblock) } From 1382e8d84bf039e8f5588f07029255d0f901cf44 Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 23 Dec 2014 14:50:04 +0100 Subject: [PATCH 029/132] Delete current chain for reset --- core/chain_manager.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/chain_manager.go b/core/chain_manager.go index fe687e5015..485c195d5e 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -198,6 +198,10 @@ func (bc *ChainManager) Reset() { bc.mu.Lock() defer bc.mu.Unlock() + for block := bc.currentBlock; block != nil; block = bc.GetBlock(block.Header().ParentHash) { + ethutil.Config.Db.Delete(block.Hash()) + } + // Prepare the genesis block bc.write(bc.genesisBlock) bc.insert(bc.genesisBlock) From 34f72ddb3d5a01d6c45c75604bc030c287d51fb2 Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 23 Dec 2014 15:18:48 +0100 Subject: [PATCH 030/132] Decode from stream directly --- cmd/ethereum/main.go | 5 ++--- ethdb/database.go | 4 ++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/cmd/ethereum/main.go b/cmd/ethereum/main.go index f16244a2d3..12e22a4388 100644 --- a/cmd/ethereum/main.go +++ b/cmd/ethereum/main.go @@ -18,7 +18,6 @@ package main import ( - "bytes" "fmt" "os" "runtime" @@ -120,13 +119,13 @@ func main() { if len(ImportChain) > 0 { clilogger.Infof("importing chain '%s'\n", ImportChain) - c, err := ethutil.ReadAllFile(ImportChain) + fh, err := os.OpenFile(ImportChain, os.O_RDONLY, os.ModePerm) if err != nil { clilogger.Infoln(err) return } var chain types.Blocks - if err := rlp.Decode(bytes.NewReader([]byte(c)), &chain); err != nil { + if err := rlp.Decode(fh, &chain); err != nil { clilogger.Infoln(err) return } diff --git a/ethdb/database.go b/ethdb/database.go index 19aa83466e..47ddec9c02 100644 --- a/ethdb/database.go +++ b/ethdb/database.go @@ -71,6 +71,10 @@ func (self *LDBDatabase) NewIterator() iterator.Iterator { return self.db.NewIterator(nil, nil) } +func (self *LDBDatabase) Write(batch *leveldb.Batch) error { + return self.db.Write(batch, nil) +} + func (self *LDBDatabase) Close() { // Close the leveldb database self.db.Close() From 7d2353f24dad8bba8914b4014117fe73248c211c Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 23 Dec 2014 15:31:03 +0100 Subject: [PATCH 031/132] Close the file --- cmd/ethereum/main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/ethereum/main.go b/cmd/ethereum/main.go index 12e22a4388..d704140d45 100644 --- a/cmd/ethereum/main.go +++ b/cmd/ethereum/main.go @@ -124,6 +124,8 @@ func main() { clilogger.Infoln(err) return } + defer fh.Close() + var chain types.Blocks if err := rlp.Decode(fh, &chain); err != nil { clilogger.Infoln(err) From 1054c155db8ac59b97b81fa7a7a20f2239eb1e82 Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 23 Dec 2014 15:37:03 +0100 Subject: [PATCH 032/132] Moved import to utils --- cmd/ethereum/main.go | 20 ++------------------ cmd/utils/cmd.go | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/cmd/ethereum/main.go b/cmd/ethereum/main.go index d704140d45..2e0a5663ab 100644 --- a/cmd/ethereum/main.go +++ b/cmd/ethereum/main.go @@ -26,7 +26,6 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/rlp" ) const ( @@ -118,26 +117,11 @@ func main() { } if len(ImportChain) > 0 { - clilogger.Infof("importing chain '%s'\n", ImportChain) - fh, err := os.OpenFile(ImportChain, os.O_RDONLY, os.ModePerm) + err := utils.ImportChain(ethereum, ImportChain) if err != nil { clilogger.Infoln(err) - return } - defer fh.Close() - - var chain types.Blocks - if err := rlp.Decode(fh, &chain); err != nil { - clilogger.Infoln(err) - return - } - - ethereum.ChainManager().Reset() - if err := ethereum.ChainManager().InsertChain(chain); err != nil { - clilogger.Infoln(err) - return - } - clilogger.Infof("imported %d blocks\n", len(chain)) + return } // better reworked as cases diff --git a/cmd/utils/cmd.go b/cmd/utils/cmd.go index 2b24ac5321..c0a5d1c972 100644 --- a/cmd/utils/cmd.go +++ b/cmd/utils/cmd.go @@ -13,6 +13,7 @@ import ( "runtime" "bitbucket.org/kardianos/osext" + "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/eth" "github.com/ethereum/go-ethereum/ethdb" @@ -20,6 +21,7 @@ import ( "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/miner" "github.com/ethereum/go-ethereum/p2p" + "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/rpc" "github.com/ethereum/go-ethereum/xeth" ) @@ -335,3 +337,25 @@ func BlockDo(ethereum *eth.Ethereum, hash []byte) error { return nil } + +func ImportChain(ethereum *eth.Ethereum, fn string) error { + clilogger.Infof("importing chain '%s'\n", ImportChain) + fh, err := os.OpenFile(fn, os.O_RDONLY, os.ModePerm) + if err != nil { + return err + } + defer fh.Close() + + var chain types.Blocks + if err := rlp.Decode(fh, &chain); err != nil { + return err + } + + ethereum.ChainManager().Reset() + if err := ethereum.ChainManager().InsertChain(chain); err != nil { + return err + } + clilogger.Infof("imported %d blocks\n", len(chain)) + + return nil +} From f468a9a0e236f8467012ffe35c1d8ff58e30a81a Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 23 Dec 2014 15:46:46 +0100 Subject: [PATCH 033/132] Enable websockets for mist. Closes #218 --- cmd/mist/main.go | 4 ++++ cmd/utils/websockets.go | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/cmd/mist/main.go b/cmd/mist/main.go index eaf0af0c77..5f809f1c5b 100644 --- a/cmd/mist/main.go +++ b/cmd/mist/main.go @@ -69,6 +69,10 @@ func run() error { utils.StartRpc(ethereum, RpcPort) } + if StartWebSockets { + utils.StartWebSockets(ethereum) + } + gui := NewWindow(ethereum, config, clientIdentity, KeyRing, LogLevel) gui.stdLog = stdLog diff --git a/cmd/utils/websockets.go b/cmd/utils/websockets.go index d3ba50e789..cf9ebba922 100644 --- a/cmd/utils/websockets.go +++ b/cmd/utils/websockets.go @@ -3,10 +3,13 @@ package utils import ( "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/ethutil" + "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/websocket" "github.com/ethereum/go-ethereum/xeth" ) +var wslogger = logger.NewLogger("WS") + func args(v ...interface{}) []interface{} { return v } @@ -106,6 +109,8 @@ func (self *WebSocketServer) Serv() { } func StartWebSockets(eth *eth.Ethereum) { + wslogger.Infoln("Starting WebSockets") + sock := NewWebSocketServer(eth) go sock.Serv() } From 780abaec988df302e0c98f1a35e9af35b5623746 Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 23 Dec 2014 18:35:36 +0100 Subject: [PATCH 034/132] Switched to new trie --- cmd/ethereum/main.go | 6 ++--- cmd/utils/cmd.go | 2 +- core/block_manager.go | 1 + core/genesis.go | 2 +- core/types/block.go | 4 ++-- core/types/derive_sha.go | 8 +++---- javascript/types.go | 8 +++---- ptrie/fullnode.go | 7 ++++++ ptrie/trie.go | 25 +++++++++++++++----- ptrie/trie_test.go | 2 +- state/dump.go | 26 +++++++++++---------- state/state_object.go | 42 ++++++++++++++++++++-------------- state/{state.go => statedb.go} | 37 +++++++++++++++--------------- xeth/hexface.go | 8 +++---- 14 files changed, 105 insertions(+), 73 deletions(-) rename state/{state.go => statedb.go} (91%) diff --git a/cmd/ethereum/main.go b/cmd/ethereum/main.go index 2e0a5663ab..e4070aa472 100644 --- a/cmd/ethereum/main.go +++ b/cmd/ethereum/main.go @@ -21,6 +21,7 @@ import ( "fmt" "os" "runtime" + "time" "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/core/types" @@ -97,9 +98,6 @@ func main() { os.Exit(1) } - // block.GetRoot() does not exist - //fmt.Printf("RLP: %x\nstate: %x\nhash: %x\n", ethutil.Rlp(block), block.GetRoot(), block.Hash()) - // Leave the Println. This needs clean output for piping fmt.Printf("%s\n", block.State().Dump()) @@ -117,10 +115,12 @@ func main() { } if len(ImportChain) > 0 { + start := time.Now() err := utils.ImportChain(ethereum, ImportChain) if err != nil { clilogger.Infoln(err) } + clilogger.Infoln("export done in", time.Since(start)) return } diff --git a/cmd/utils/cmd.go b/cmd/utils/cmd.go index c0a5d1c972..466c513835 100644 --- a/cmd/utils/cmd.go +++ b/cmd/utils/cmd.go @@ -339,7 +339,7 @@ func BlockDo(ethereum *eth.Ethereum, hash []byte) error { } func ImportChain(ethereum *eth.Ethereum, fn string) error { - clilogger.Infof("importing chain '%s'\n", ImportChain) + clilogger.Infof("importing chain '%s'\n", fn) fh, err := os.OpenFile(fn, os.O_RDONLY, os.ModePerm) if err != nil { return err diff --git a/core/block_manager.go b/core/block_manager.go index ef2113bfbe..1b9da12692 100644 --- a/core/block_manager.go +++ b/core/block_manager.go @@ -217,6 +217,7 @@ func (sm *BlockManager) ProcessWithParent(block, parent *types.Block) (td *big.I receiptSha := types.DeriveSha(receipts) if bytes.Compare(receiptSha, header.ReceiptHash) != 0 { + fmt.Println("receipts", receipts) err = fmt.Errorf("validating receipt root. received=%x got=%x", header.ReceiptHash, receiptSha) return } diff --git a/core/genesis.go b/core/genesis.go index 51afa314e5..10b40516ff 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -20,7 +20,7 @@ var EmptyShaList = crypto.Sha3(ethutil.Encode([]interface{}{})) var EmptyListRoot = crypto.Sha3(ethutil.Encode("")) func GenesisBlock() *types.Block { - genesis := types.NewBlock(ZeroHash256, ZeroHash160, EmptyListRoot, big.NewInt(131072), crypto.Sha3(big.NewInt(42).Bytes()), "") + genesis := types.NewBlock(ZeroHash256, ZeroHash160, nil, big.NewInt(131072), crypto.Sha3(big.NewInt(42).Bytes()), "") genesis.Header().Number = ethutil.Big0 genesis.Header().GasLimit = big.NewInt(1000000) genesis.Header().GasUsed = ethutil.Big0 diff --git a/core/types/block.go b/core/types/block.go index 940f2402ee..054767d671 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -9,9 +9,9 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethutil" + "github.com/ethereum/go-ethereum/ptrie" "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/state" - "github.com/ethereum/go-ethereum/trie" ) type Header struct { @@ -196,7 +196,7 @@ func (self *Block) Time() int64 { return int64(self.header.Time) } func (self *Block) GasLimit() *big.Int { return self.header.GasLimit } func (self *Block) GasUsed() *big.Int { return self.header.GasUsed } func (self *Block) Hash() []byte { return self.header.Hash() } -func (self *Block) Trie() *trie.Trie { return trie.New(ethutil.Config.Db, self.header.Root) } +func (self *Block) Trie() *ptrie.Trie { return ptrie.New(self.header.Root, ethutil.Config.Db) } func (self *Block) State() *state.StateDB { return state.New(self.Trie()) } func (self *Block) Size() ethutil.StorageSize { return ethutil.StorageSize(len(ethutil.Encode(self))) } diff --git a/core/types/derive_sha.go b/core/types/derive_sha.go index 1897ff198f..0beb196709 100644 --- a/core/types/derive_sha.go +++ b/core/types/derive_sha.go @@ -2,7 +2,7 @@ package types import ( "github.com/ethereum/go-ethereum/ethutil" - "github.com/ethereum/go-ethereum/trie" + "github.com/ethereum/go-ethereum/ptrie" ) type DerivableList interface { @@ -11,10 +11,10 @@ type DerivableList interface { } func DeriveSha(list DerivableList) []byte { - trie := trie.New(ethutil.Config.Db, "") + trie := ptrie.New(nil, ethutil.Config.Db) for i := 0; i < list.Len(); i++ { - trie.Update(string(ethutil.NewValue(i).Encode()), string(list.GetRlp(i))) + trie.Update(ethutil.Encode(i), list.GetRlp(i)) } - return trie.GetRoot() + return trie.Root() } diff --git a/javascript/types.go b/javascript/types.go index cf5a6677bc..ce1d9995a4 100644 --- a/javascript/types.go +++ b/javascript/types.go @@ -18,11 +18,11 @@ type JSStateObject struct { func (self *JSStateObject) EachStorage(call otto.FunctionCall) otto.Value { cb := call.Argument(0) - self.JSObject.EachStorage(func(key string, value *ethutil.Value) { - value.Decode() - cb.Call(self.eth.toVal(self), self.eth.toVal(key), self.eth.toVal(ethutil.Bytes2Hex(value.Bytes()))) - }) + it := self.JSObject.Trie().Iterator() + for it.Next() { + cb.Call(self.eth.toVal(self), self.eth.toVal(ethutil.Bytes2Hex(it.Key)), self.eth.toVal(ethutil.Bytes2Hex(it.Value))) + } return otto.UndefinedValue() } diff --git a/ptrie/fullnode.go b/ptrie/fullnode.go index 7a7f7d22d4..d6b0745ec1 100644 --- a/ptrie/fullnode.go +++ b/ptrie/fullnode.go @@ -1,5 +1,7 @@ package ptrie +import "fmt" + type FullNode struct { trie *Trie nodes [17]Node @@ -56,6 +58,11 @@ func (self *FullNode) RlpData() interface{} { } func (self *FullNode) set(k byte, value Node) { + if _, ok := value.(*ValueNode); ok && k != 16 { + fmt.Println(value, k) + panic(":(") + } + self.nodes[int(k)] = value } diff --git a/ptrie/trie.go b/ptrie/trie.go index 9fe9ea52a5..d8135f36ce 100644 --- a/ptrie/trie.go +++ b/ptrie/trie.go @@ -19,7 +19,7 @@ func ParanoiaCheck(t1 *Trie, backend Backend) (bool, *Trie) { t2.Update(it.Key, it.Value) } - return bytes.Compare(t2.Hash(), t1.Hash()) == 0, t2 + return bytes.Equal(t2.Hash(), t1.Hash()), t2 } type Trie struct { @@ -49,14 +49,17 @@ func (self *Trie) Iterator() *Iterator { return NewIterator(self) } +func (self *Trie) Copy() *Trie { + return New(self.roothash, self.cache.backend) +} + // Legacy support func (self *Trie) Root() []byte { return self.Hash() } func (self *Trie) Hash() []byte { var hash []byte if self.root != nil { - //hash = self.root.Hash().([]byte) t := self.root.Hash() - if byts, ok := t.([]byte); ok { + if byts, ok := t.([]byte); ok && len(byts) > 0 { hash = byts } else { hash = crypto.Sha3(ethutil.Encode(self.root.RlpData())) @@ -73,6 +76,9 @@ func (self *Trie) Hash() []byte { return hash } func (self *Trie) Commit() { + self.mu.Lock() + defer self.mu.Unlock() + // Hash first self.Hash() @@ -81,10 +87,15 @@ func (self *Trie) Commit() { // Reset should only be called if the trie has been hashed func (self *Trie) Reset() { + self.mu.Lock() + defer self.mu.Unlock() + self.cache.Reset() - revision := self.revisions.Remove(self.revisions.Back()).([]byte) - self.roothash = revision + if self.revisions.Len() > 0 { + revision := self.revisions.Remove(self.revisions.Back()).([]byte) + self.roothash = revision + } value := ethutil.NewValueFromBytes(self.cache.Get(self.roothash)) self.root = self.mknode(value) } @@ -173,7 +184,7 @@ func (self *Trie) insert(node Node, key []byte, value Node) Node { return cpy default: - panic("Invalid node") + panic(fmt.Sprintf("%T: invalid node: %v", node, node)) } } @@ -274,6 +285,8 @@ func (self *Trie) delete(node Node, key []byte) Node { func (self *Trie) mknode(value *ethutil.Value) Node { l := value.Len() switch l { + case 0: + return nil case 2: return NewShortNode(self, trie.CompactDecode(string(value.Get(0).Bytes())), self.mknode(value.Get(1))) case 17: diff --git a/ptrie/trie_test.go b/ptrie/trie_test.go index 5b1c641401..63a8ed36e6 100644 --- a/ptrie/trie_test.go +++ b/ptrie/trie_test.go @@ -141,7 +141,7 @@ func TestReplication(t *testing.T) { trie2 := New(trie.roothash, trie.cache.backend) if string(trie2.GetString("horse")) != "stallion" { - t.Error("expected to have harse => stallion") + t.Error("expected to have horse => stallion") } hash := trie2.Hash() diff --git a/state/dump.go b/state/dump.go index c1f5ecf3a0..40ecff50ce 100644 --- a/state/dump.go +++ b/state/dump.go @@ -22,22 +22,23 @@ type World struct { func (self *StateDB) Dump() []byte { world := World{ - Root: ethutil.Bytes2Hex(self.Trie.GetRoot()), + Root: ethutil.Bytes2Hex(self.trie.Root()), Accounts: make(map[string]Account), } - self.Trie.NewIterator().Each(func(key string, value *ethutil.Value) { - stateObject := NewStateObjectFromBytes([]byte(key), value.Bytes()) + it := self.trie.Iterator() + for it.Next() { + stateObject := NewStateObjectFromBytes(it.Key, it.Value) account := Account{Balance: stateObject.balance.String(), Nonce: stateObject.Nonce, Root: ethutil.Bytes2Hex(stateObject.Root()), CodeHash: ethutil.Bytes2Hex(stateObject.codeHash)} account.Storage = make(map[string]string) - stateObject.EachStorage(func(key string, value *ethutil.Value) { - value.Decode() - account.Storage[ethutil.Bytes2Hex([]byte(key))] = ethutil.Bytes2Hex(value.Bytes()) - }) - world.Accounts[ethutil.Bytes2Hex([]byte(key))] = account - }) + storageIt := stateObject.State.trie.Iterator() + for storageIt.Next() { + account.Storage[ethutil.Bytes2Hex(it.Key)] = ethutil.Bytes2Hex(it.Value) + } + world.Accounts[ethutil.Bytes2Hex(it.Key)] = account + } json, err := json.MarshalIndent(world, "", " ") if err != nil { @@ -50,7 +51,8 @@ func (self *StateDB) Dump() []byte { // Debug stuff func (self *StateObject) CreateOutputForDiff() { fmt.Printf("%x %x %x %x\n", self.Address(), self.State.Root(), self.balance.Bytes(), self.Nonce) - self.EachStorage(func(addr string, value *ethutil.Value) { - fmt.Printf("%x %x\n", addr, value.Bytes()) - }) + it := self.State.trie.Iterator() + for it.Next() { + fmt.Printf("%x %x\n", it.Key, it.Value) + } } diff --git a/state/state_object.go b/state/state_object.go index b8af4e702a..420ad97570 100644 --- a/state/state_object.go +++ b/state/state_object.go @@ -6,7 +6,7 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethutil" - "github.com/ethereum/go-ethereum/trie" + "github.com/ethereum/go-ethereum/ptrie" ) type Code []byte @@ -62,7 +62,7 @@ func NewStateObject(addr []byte) *StateObject { address := ethutil.Address(addr) object := &StateObject{address: address, balance: new(big.Int), gasPool: new(big.Int)} - object.State = New(trie.New(ethutil.Config.Db, "")) + object.State = New(ptrie.New(nil, ethutil.Config.Db)) //New(trie.New(ethutil.Config.Db, "")) object.storage = make(Storage) object.gasPool = new(big.Int) @@ -72,7 +72,7 @@ func NewStateObject(addr []byte) *StateObject { func NewContract(address []byte, balance *big.Int, root []byte) *StateObject { contract := NewStateObject(address) contract.balance = balance - contract.State = New(trie.New(ethutil.Config.Db, string(root))) + contract.State = New(ptrie.New(nil, ethutil.Config.Db)) //New(trie.New(ethutil.Config.Db, string(root))) return contract } @@ -89,12 +89,12 @@ func (self *StateObject) MarkForDeletion() { statelogger.DebugDetailf("%x: #%d %v (deletion)\n", self.Address(), self.Nonce, self.balance) } -func (c *StateObject) GetAddr(addr []byte) *ethutil.Value { - return ethutil.NewValueFromBytes([]byte(c.State.Trie.Get(string(addr)))) +func (c *StateObject) getAddr(addr []byte) *ethutil.Value { + return ethutil.NewValueFromBytes([]byte(c.State.trie.Get(addr))) } -func (c *StateObject) SetAddr(addr []byte, value interface{}) { - c.State.Trie.Update(string(addr), string(ethutil.NewValue(value).Encode())) +func (c *StateObject) setAddr(addr []byte, value interface{}) { + c.State.trie.Update(addr, ethutil.Encode(value)) } func (self *StateObject) GetStorage(key *big.Int) *ethutil.Value { @@ -113,7 +113,7 @@ func (self *StateObject) GetState(k []byte) *ethutil.Value { value := self.storage[string(key)] if value == nil { - value = self.GetAddr(key) + value = self.getAddr(key) if !value.IsNil() { self.storage[string(key)] = value @@ -128,6 +128,7 @@ func (self *StateObject) SetState(k []byte, value *ethutil.Value) { self.storage[string(key)] = value.Copy() } +/* // Iterate over each storage address and yield callback func (self *StateObject) EachStorage(cb trie.EachCallback) { // First loop over the uncommit/cached values in storage @@ -145,23 +146,26 @@ func (self *StateObject) EachStorage(cb trie.EachCallback) { } }) } +*/ func (self *StateObject) Sync() { for key, value := range self.storage { if value.Len() == 0 { - self.State.Trie.Delete(string(key)) + self.State.trie.Delete([]byte(key)) continue } - self.SetAddr([]byte(key), value) + self.setAddr([]byte(key), value) } - valid, t2 := trie.ParanoiaCheck(self.State.Trie) - if !valid { - statelogger.Infof("Warn: PARANOIA: Different state storage root during copy %x vs %x\n", self.State.Root(), t2.GetRoot()) + /* + valid, t2 := ptrie.ParanoiaCheck(self.State.trie, ethutil.Config.Db) + if !valid { + statelogger.Infof("Warn: PARANOIA: Different state storage root during copy %x vs %x\n", self.State.Root(), t2.Root()) - self.State.Trie = t2 - } + self.State.trie = t2 + } + */ } func (c *StateObject) GetInstr(pc *big.Int) *ethutil.Value { @@ -276,8 +280,12 @@ func (c *StateObject) Init() Code { return c.InitCode } +func (self *StateObject) Trie() *ptrie.Trie { + return self.State.trie +} + func (self *StateObject) Root() []byte { - return self.State.Trie.GetRoot() + return self.Trie().Root() } func (self *StateObject) SetCode(code []byte) { @@ -302,7 +310,7 @@ func (c *StateObject) RlpDecode(data []byte) { c.Nonce = decoder.Get(0).Uint() c.balance = decoder.Get(1).BigInt() - c.State = New(trie.New(ethutil.Config.Db, decoder.Get(2).Interface())) + c.State = New(ptrie.New(decoder.Get(2).Bytes(), ethutil.Config.Db)) //New(trie.New(ethutil.Config.Db, decoder.Get(2).Interface())) c.storage = make(map[string]*ethutil.Value) c.gasPool = new(big.Int) diff --git a/state/state.go b/state/statedb.go similarity index 91% rename from state/state.go rename to state/statedb.go index f77da72f07..6a11fc328f 100644 --- a/state/state.go +++ b/state/statedb.go @@ -1,11 +1,12 @@ package state import ( + "bytes" "math/big" "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/trie" + "github.com/ethereum/go-ethereum/ptrie" ) var statelogger = logger.NewLogger("STATE") @@ -16,8 +17,8 @@ var statelogger = logger.NewLogger("STATE") // * Contracts // * Accounts type StateDB struct { - // The trie for this structure - Trie *trie.Trie + //Trie *trie.Trie + trie *ptrie.Trie stateObjects map[string]*StateObject @@ -29,8 +30,8 @@ type StateDB struct { } // Create a new state from a given trie -func New(trie *trie.Trie) *StateDB { - return &StateDB{Trie: trie, stateObjects: make(map[string]*StateObject), manifest: NewManifest(), refund: make(map[string]*big.Int)} +func New(trie *ptrie.Trie) *StateDB { + return &StateDB{trie: trie, stateObjects: make(map[string]*StateObject), manifest: NewManifest(), refund: make(map[string]*big.Int)} } func (self *StateDB) EmptyLogs() { @@ -140,12 +141,12 @@ func (self *StateDB) UpdateStateObject(stateObject *StateObject) { ethutil.Config.Db.Put(stateObject.CodeHash(), stateObject.Code) } - self.Trie.Update(string(addr), string(stateObject.RlpEncode())) + self.trie.Update(addr, stateObject.RlpEncode()) } // Delete the given state object and delete it from the state trie func (self *StateDB) DeleteStateObject(stateObject *StateObject) { - self.Trie.Delete(string(stateObject.Address())) + self.trie.Delete(stateObject.Address()) delete(self.stateObjects, string(stateObject.Address())) } @@ -159,7 +160,7 @@ func (self *StateDB) GetStateObject(addr []byte) *StateObject { return stateObject } - data := self.Trie.Get(string(addr)) + data := self.trie.Get(addr) if len(data) == 0 { return nil } @@ -206,12 +207,12 @@ func (self *StateDB) GetAccount(addr []byte) *StateObject { // func (s *StateDB) Cmp(other *StateDB) bool { - return s.Trie.Cmp(other.Trie) + return bytes.Equal(s.trie.Root(), other.trie.Root()) } func (self *StateDB) Copy() *StateDB { - if self.Trie != nil { - state := New(self.Trie.Copy()) + if self.trie != nil { + state := New(self.trie.Copy()) for k, stateObject := range self.stateObjects { state.stateObjects[k] = stateObject.Copy() } @@ -235,19 +236,19 @@ func (self *StateDB) Set(state *StateDB) { panic("Tried setting 'state' to nil through 'Set'") } - self.Trie = state.Trie + self.trie = state.trie self.stateObjects = state.stateObjects self.refund = state.refund self.logs = state.logs } func (s *StateDB) Root() []byte { - return s.Trie.GetRoot() + return s.trie.Root() } // Resets the trie and all siblings func (s *StateDB) Reset() { - s.Trie.Undo() + s.trie.Reset() // Reset all nested states for _, stateObject := range s.stateObjects { @@ -272,7 +273,7 @@ func (s *StateDB) Sync() { stateObject.State.Sync() } - s.Trie.Sync() + s.trie.Commit() s.Empty() } @@ -304,11 +305,11 @@ func (self *StateDB) Update(gasUsed *big.Int) { // FIXME trie delete is broken if deleted { - valid, t2 := trie.ParanoiaCheck(self.Trie) + valid, t2 := ptrie.ParanoiaCheck(self.trie, ethutil.Config.Db) if !valid { - statelogger.Infof("Warn: PARANOIA: Different state root during copy %x vs %x\n", self.Trie.GetRoot(), t2.GetRoot()) + statelogger.Infof("Warn: PARANOIA: Different state root during copy %x vs %x\n", self.trie.Root(), t2.Root()) - self.Trie = t2 + self.trie = t2 } } } diff --git a/xeth/hexface.go b/xeth/hexface.go index 6c084f947c..c3d8cef864 100644 --- a/xeth/hexface.go +++ b/xeth/hexface.go @@ -138,10 +138,10 @@ type KeyVal struct { func (self *JSXEth) EachStorage(addr string) string { var values []KeyVal object := self.World().SafeGet(ethutil.Hex2Bytes(addr)) - object.EachStorage(func(name string, value *ethutil.Value) { - value.Decode() - values = append(values, KeyVal{ethutil.Bytes2Hex([]byte(name)), ethutil.Bytes2Hex(value.Bytes())}) - }) + it := object.Trie().Iterator() + for it.Next() { + values = append(values, KeyVal{ethutil.Bytes2Hex(it.Key), ethutil.Bytes2Hex(it.Value)}) + } valuesJson, err := json.Marshal(values) if err != nil { From fb1edd05f40bad04f2514d1463b5593dc51e9f77 Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 24 Dec 2014 11:20:43 +0100 Subject: [PATCH 035/132] Removed the deferred reset --- core/block_manager.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/core/block_manager.go b/core/block_manager.go index 1b9da12692..8a5455306c 100644 --- a/core/block_manager.go +++ b/core/block_manager.go @@ -185,12 +185,6 @@ func (sm *BlockManager) ProcessWithParent(block, parent *types.Block) (td *big.I state := state.New(parent.Trie().Copy()) - // Defer the Undo on the Trie. If the block processing happened - // we don't want to undo but since undo only happens on dirty - // nodes this won't happen because Commit would have been called - // before that. - defer state.Reset() - // Block validation if err = sm.ValidateBlock(block, parent); err != nil { return From 7ba9fe4d5d46d4a9373327d52d1c0e82d5933bc1 Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 24 Dec 2014 11:29:58 +0100 Subject: [PATCH 036/132] Reset peer during download on disc --- peer.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/peer.go b/peer.go index 13f0239d45..ceb49a5afa 100644 --- a/peer.go +++ b/peer.go @@ -412,6 +412,12 @@ func (p *Peer) HandleInbound() { //} case wire.MsgDiscTy: + blockPool := p.ethereum.blockPool + if blockPool.peer == p { + blockPool.peer = nil + blockPool.td = ethutil.Big0 + } + p.Stop() peerlogger.Infoln("Disconnect peer: ", DiscReason(msg.Data.Get(0).Uint())) case wire.MsgPingTy: From c9f963a77e6e728c90e08c0e0008f1dc40df1fe0 Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 24 Dec 2014 11:30:04 +0100 Subject: [PATCH 037/132] Bump --- cmd/ethereum/main.go | 2 +- cmd/mist/main.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/ethereum/main.go b/cmd/ethereum/main.go index 2a3c460546..30107c1457 100644 --- a/cmd/ethereum/main.go +++ b/cmd/ethereum/main.go @@ -30,7 +30,7 @@ import ( const ( ClientIdentifier = "Ethereum(G)" - Version = "0.7.10" + Version = "0.7.11" ) var clilogger = logger.NewLogger("CLI") diff --git a/cmd/mist/main.go b/cmd/mist/main.go index eaf0af0c77..c6dc801715 100644 --- a/cmd/mist/main.go +++ b/cmd/mist/main.go @@ -31,7 +31,7 @@ import ( const ( ClientIdentifier = "Mist" - Version = "0.7.10" + Version = "0.7.11" ) var ethereum *eth.Ethereum From 58d477f7a676563c5237df9c0cfd20ddba5df03c Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 24 Dec 2014 14:47:50 +0100 Subject: [PATCH 038/132] Fixed a bug where keys where serialised twice --- ptrie/fullnode.go | 5 +++-- ptrie/iterator.go | 2 +- ptrie/node.go | 4 ++-- ptrie/trie.go | 24 +++++++++++++++++------- 4 files changed, 23 insertions(+), 12 deletions(-) diff --git a/ptrie/fullnode.go b/ptrie/fullnode.go index d6b0745ec1..4dd98049d5 100644 --- a/ptrie/fullnode.go +++ b/ptrie/fullnode.go @@ -23,7 +23,9 @@ func (self *FullNode) Branches() []Node { func (self *FullNode) Copy() Node { nnode := NewFullNode(self.trie) for i, node := range self.nodes { - nnode.nodes[i] = node + if node != nil { + nnode.nodes[i] = node + } } return nnode @@ -60,7 +62,6 @@ func (self *FullNode) RlpData() interface{} { func (self *FullNode) set(k byte, value Node) { if _, ok := value.(*ValueNode); ok && k != 16 { fmt.Println(value, k) - panic(":(") } self.nodes[int(k)] = value diff --git a/ptrie/iterator.go b/ptrie/iterator.go index 5714bdbc8a..787ba09c02 100644 --- a/ptrie/iterator.go +++ b/ptrie/iterator.go @@ -14,7 +14,7 @@ type Iterator struct { } func NewIterator(trie *Trie) *Iterator { - return &Iterator{trie: trie, Key: []byte{0}} + return &Iterator{trie: trie, Key: make([]byte, 32)} } func (self *Iterator) Next() bool { diff --git a/ptrie/node.go b/ptrie/node.go index 2c85dbce72..ab90a1a021 100644 --- a/ptrie/node.go +++ b/ptrie/node.go @@ -17,7 +17,7 @@ type Node interface { func (self *ValueNode) String() string { return self.fstring("") } func (self *FullNode) String() string { return self.fstring("") } func (self *ShortNode) String() string { return self.fstring("") } -func (self *ValueNode) fstring(ind string) string { return fmt.Sprintf("%s ", self.data) } +func (self *ValueNode) fstring(ind string) string { return fmt.Sprintf("%x ", self.data) } func (self *HashNode) fstring(ind string) string { return fmt.Sprintf("%x ", self.key) } // Full node @@ -36,5 +36,5 @@ func (self *FullNode) fstring(ind string) string { // Short node func (self *ShortNode) fstring(ind string) string { - return fmt.Sprintf("[ %s: %v ] ", self.key, self.value.fstring(ind+" ")) + return fmt.Sprintf("[ %x: %v ] ", self.key, self.value.fstring(ind+" ")) } diff --git a/ptrie/trie.go b/ptrie/trie.go index d8135f36ce..5c83b57d05 100644 --- a/ptrie/trie.go +++ b/ptrie/trie.go @@ -215,7 +215,7 @@ func (self *Trie) get(node Node, key []byte) Node { } func (self *Trie) delete(node Node, key []byte) Node { - if len(key) == 0 { + if len(key) == 0 && node == nil { return nil } @@ -234,7 +234,9 @@ func (self *Trie) delete(node Node, key []byte) Node { nkey := append(k, child.Key()...) n = NewShortNode(self, nkey, child.Value()) case *FullNode: - n = NewShortNode(self, node.key, child) + sn := NewShortNode(self, node.Key(), child) + sn.key = node.key + n = sn } return n @@ -275,9 +277,10 @@ func (self *Trie) delete(node Node, key []byte) Node { } return nnode - + case nil: + return nil default: - panic("Invalid node") + panic(fmt.Sprintf("%T: invalid node: %v (%v)", node, node, key)) } } @@ -288,7 +291,10 @@ func (self *Trie) mknode(value *ethutil.Value) Node { case 0: return nil case 2: - return NewShortNode(self, trie.CompactDecode(string(value.Get(0).Bytes())), self.mknode(value.Get(1))) + // A value node may consists of 2 bytes. + if value.Get(0).Len() != 0 { + return NewShortNode(self, trie.CompactDecode(string(value.Get(0).Bytes())), self.mknode(value.Get(1))) + } case 17: fnode := NewFullNode(self) for i := 0; i < l; i++ { @@ -297,9 +303,9 @@ func (self *Trie) mknode(value *ethutil.Value) Node { return fnode case 32: return &HashNode{value.Bytes()} - default: - return &ValueNode{self, value.Bytes()} } + + return &ValueNode{self, value.Bytes()} } func (self *Trie) trans(node Node) Node { @@ -323,3 +329,7 @@ func (self *Trie) store(node Node) interface{} { return node.RlpData() } + +func (self *Trie) PrintRoot() { + fmt.Println(self.root) +} From dc7c584a4de371e449752dce5b5e90b26c83d0bb Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 24 Dec 2014 14:54:06 +0100 Subject: [PATCH 039/132] export => import --- cmd/ethereum/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/ethereum/main.go b/cmd/ethereum/main.go index 3f9a2a8381..7efee31e78 100644 --- a/cmd/ethereum/main.go +++ b/cmd/ethereum/main.go @@ -120,7 +120,7 @@ func main() { if err != nil { clilogger.Infoln(err) } - clilogger.Infoln("export done in", time.Since(start)) + clilogger.Infoln("import done in", time.Since(start)) return } From ce68ac695981523aca5cf83e051597f46070547d Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 30 Dec 2014 13:18:19 +0100 Subject: [PATCH 040/132] Updated miner to new block api --- miner/miner.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/miner/miner.go b/miner/miner.go index c9a6922bb5..aefcadab80 100644 --- a/miner/miner.go +++ b/miner/miner.go @@ -190,9 +190,11 @@ func (self *Miner) mine() { transactions := self.finiliseTxs() + state := block.State() + // Accumulate all valid transactions and apply them to the new state // Error may be ignored. It's not important during mining - receipts, txs, _, erroneous, err := blockManager.ApplyTransactions(coinbase, block.State(), block, transactions, true) + receipts, txs, _, erroneous, err := blockManager.ApplyTransactions(coinbase, state, block, transactions, true) if err != nil { minerlogger.Debugln(err) } @@ -202,9 +204,10 @@ func (self *Miner) mine() { block.SetReceipts(receipts) // Accumulate the rewards included for this block - blockManager.AccumelateRewards(block.State(), block, parent) + blockManager.AccumelateRewards(state, block, parent) - block.State().Update(ethutil.Big0) + state.Update(ethutil.Big0) + block.SetRoot(state.Root()) minerlogger.Infof("Mining on block. Includes %v transactions", len(transactions)) From 2f8a45cd8b2f565359f2c955145047acca2a2433 Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 30 Dec 2014 13:32:01 +0100 Subject: [PATCH 041/132] Fixed chain test & added new chain --- _data/chain1 | Bin 175331 -> 18036 bytes _data/chain2 | Bin 28118 -> 6125 bytes core/chain_manager_test.go | 47 ++++++++++++++++++++++++++----------- core/helper_test.go | 6 ++--- core/types/block.go | 1 + 5 files changed, 37 insertions(+), 17 deletions(-) diff --git a/_data/chain1 b/_data/chain1 index ef392e001ebe06696541a637ab993565bda9d485..809a55f1a6010b951e28e03b17ea0eb0d9528212 100755 GIT binary patch literal 18036 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%0DP;n3Rf)J)FO%u3GMMI~4lf?s>Ok zdi>Rw^!rzm5PN7b62*2!+H^2FTf!t4yE$FU^|!skEhEEQx5I-pOJ>J+)^|~$1W3;L za&qpGFX|GcFkSr_I3y@?lQOVZ>F(E;hHsAjXF)rI2GD}CBLYA}H7`(X;fOb(1ObL! z1_7!O`<&ia4P-Jy&3O(s>c3>>dfn|U-v94W46(_Yr*_cm^&7X0SQ@iUAOvN7CHrPY zkBIRM0XOw3RJS;$!+h+ry68&F^uzKwt{Su4*(Js|h<&nP9xvW_s+%|s+8H!}4isu{ zQ2+}6_u$$NjwtIy3@WOulZ*rIE zJ>AFZ;)?+73>rWS%CQZyuv%0DP=+$7?q)+@4%#M1Wm1&LkB%evUhRF$jqgN(kL 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 MZa$GB3Jnea1NmrF+yDRo diff --git a/_data/chain2 b/_data/chain2 index 48ed4d5ea9e7eb28dffea79a515762c9e457fce4..3e9d2971a9670a7ba81a50b24fd91685c73c5ffa 100755 GIT binary patch literal 6125 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 diff --git a/core/chain_manager_test.go b/core/chain_manager_test.go index 52be8b0eab..6e85bae9a1 100644 --- a/core/chain_manager_test.go +++ b/core/chain_manager_test.go @@ -2,7 +2,9 @@ package core import ( "fmt" + "os" "path" + "reflect" "runtime" "testing" @@ -10,6 +12,7 @@ import ( "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/event" + "github.com/ethereum/go-ethereum/rlp" //logpkg "github.com/ethereum/go-ethereum/logger" ) @@ -30,20 +33,19 @@ func init() { ethutil.Config.Db = db } -func loadChain(fn string, t *testing.T) types.Blocks { - c1, err := ethutil.ReadAllFile(path.Join("..", "_data", fn)) +func loadChain(fn string, t *testing.T) (types.Blocks, error) { + fh, err := os.OpenFile(path.Join("..", "_data", fn), os.O_RDONLY, os.ModePerm) if err != nil { - fmt.Println(err) - t.FailNow() + return nil, err } - value := ethutil.NewValueFromBytes([]byte(c1)) - blocks := make(types.Blocks, value.Len()) - it := value.NewIterator() - for it.Next() { - blocks[it.Idx()] = types.NewBlockFromRlpValue(it.Value()) + defer fh.Close() + + var chain types.Blocks + if err := rlp.Decode(fh, &chain); err != nil { + return nil, err } - return blocks + return chain, nil } func insertChain(done chan bool, chainMan *ChainManager, chain types.Blocks, t *testing.T) { @@ -56,11 +58,21 @@ func insertChain(done chan bool, chainMan *ChainManager, chain types.Blocks, t * } func TestChainInsertions(t *testing.T) { - chain1 := loadChain("chain1", t) - chain2 := loadChain("chain2", t) + chain1, err := loadChain("chain1", t) + if err != nil { + fmt.Println(err) + t.FailNow() + } + + chain2, err := loadChain("chain2", t) + if err != nil { + fmt.Println(err) + t.FailNow() + } + var eventMux event.TypeMux chainMan := NewChainManager(&eventMux) - txPool := NewTxPool(chainMan, nil, &eventMux) + txPool := NewTxPool(chainMan, &eventMux) blockMan := NewBlockManager(txPool, chainMan, &eventMux) chainMan.SetProcessor(blockMan) @@ -73,5 +85,12 @@ func TestChainInsertions(t *testing.T) { for i := 0; i < max; i++ { <-done } - fmt.Println(chainMan.CurrentBlock()) + + if reflect.DeepEqual(chain2[len(chain2)-1], chainMan.CurrentBlock()) { + t.Error("chain2 is canonical and shouldn't be") + } + + if !reflect.DeepEqual(chain1[len(chain1)-1], chainMan.CurrentBlock()) { + t.Error("chain1 isn't canonical and should be") + } } diff --git a/core/helper_test.go b/core/helper_test.go index b340144fdd..b8bf254d76 100644 --- a/core/helper_test.go +++ b/core/helper_test.go @@ -9,7 +9,7 @@ import ( "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/wire" + "github.com/ethereum/go-ethereum/p2p" ) // Implement our EthTest Manager @@ -54,11 +54,11 @@ func (tm *TestManager) TxPool() *TxPool { func (tm *TestManager) EventMux() *event.TypeMux { return tm.eventMux } -func (tm *TestManager) Broadcast(msgType wire.MsgType, data []interface{}) { +func (tm *TestManager) Broadcast(msgType p2p.Msg, data []interface{}) { fmt.Println("Broadcast not implemented") } -func (tm *TestManager) ClientIdentity() wire.ClientIdentity { +func (tm *TestManager) ClientIdentity() p2p.ClientIdentity { return nil } func (tm *TestManager) KeyManager() *crypto.KeyManager { diff --git a/core/types/block.go b/core/types/block.go index 054767d671..7b4695f733 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -199,6 +199,7 @@ func (self *Block) Hash() []byte { return self.header.Hash() } func (self *Block) Trie() *ptrie.Trie { return ptrie.New(self.header.Root, ethutil.Config.Db) } func (self *Block) State() *state.StateDB { return state.New(self.Trie()) } func (self *Block) Size() ethutil.StorageSize { return ethutil.StorageSize(len(ethutil.Encode(self))) } +func (self *Block) SetRoot(root []byte) { self.header.Root = root } // Implement block.Pow func (self *Block) Difficulty() *big.Int { return self.header.Difficulty } From 8df689bd448390c44ee2c344314257a5987a2e97 Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 30 Dec 2014 15:42:26 +0100 Subject: [PATCH 042/132] Chain tests --- _data/invalid1 | Bin 0 -> 36072 bytes _data/{chain1 => valid1} | Bin _data/{chain2 => valid2} | Bin _data/valid3 | Bin 0 -> 14712 bytes _data/valid4 | Bin 0 -> 12496 bytes core/chain_manager_test.go | 53 +++++++++++++++++++++++++++++++++---- 6 files changed, 48 insertions(+), 5 deletions(-) create mode 100755 _data/invalid1 rename _data/{chain1 => valid1} (100%) rename _data/{chain2 => valid2} (100%) create mode 100755 _data/valid3 create mode 100755 _data/valid4 diff --git a/_data/invalid1 b/_data/invalid1 new file mode 100755 index 0000000000000000000000000000000000000000..9c24b13e8e8f7f54c6a8434781e8a958bd56bd3e GIT binary patch literal 36072 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 literal 0 HcmV?d00001 diff --git a/_data/chain1 b/_data/valid1 similarity index 100% rename from _data/chain1 rename to _data/valid1 diff --git a/_data/chain2 b/_data/valid2 similarity index 100% rename from _data/chain2 rename to _data/valid2 diff --git a/_data/valid3 b/_data/valid3 new file mode 100755 index 0000000000000000000000000000000000000000..685bc9fd7b38505d26c9d16223c9a55f23abcdf3 GIT binary patch literal 14712 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 literal 0 HcmV?d00001 diff --git a/_data/valid4 b/_data/valid4 new file mode 100755 index 0000000000000000000000000000000000000000..fc016057fa38e5c4f2f88129159540398f5cc1f9 GIT binary patch literal 12496 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 literal 0 HcmV?d00001 diff --git a/core/chain_manager_test.go b/core/chain_manager_test.go index 6e85bae9a1..1087189015 100644 --- a/core/chain_manager_test.go +++ b/core/chain_manager_test.go @@ -6,6 +6,7 @@ import ( "path" "reflect" "runtime" + "strconv" "testing" "github.com/ethereum/go-ethereum/core/types" @@ -13,15 +14,15 @@ import ( "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/rlp" - //logpkg "github.com/ethereum/go-ethereum/logger" ) //var Logger logpkg.LogSystem + //var Log = logpkg.NewLogger("TEST") func init() { runtime.GOMAXPROCS(runtime.NumCPU()) - //Logger = logpkg.NewStdLogSystem(os.Stdout, log.LstdFlags, logpkg.InfoLevel) + //Logger = logpkg.NewStdLogSystem(os.Stdout, log.LstdFlags, logpkg.DebugLevel) //logpkg.AddLogSystem(Logger) ethutil.ReadConfig("/tmp/ethtest", "/tmp/ethtest", "ETH") @@ -50,21 +51,22 @@ func loadChain(fn string, t *testing.T) (types.Blocks, error) { func insertChain(done chan bool, chainMan *ChainManager, chain types.Blocks, t *testing.T) { err := chainMan.InsertChain(chain) + done <- true if err != nil { fmt.Println(err) t.FailNow() } - done <- true } func TestChainInsertions(t *testing.T) { - chain1, err := loadChain("chain1", t) + chain1, err := loadChain("valid1", t) if err != nil { fmt.Println(err) t.FailNow() } + fmt.Println(len(chain1)) - chain2, err := loadChain("chain2", t) + chain2, err := loadChain("valid2", t) if err != nil { fmt.Println(err) t.FailNow() @@ -94,3 +96,44 @@ func TestChainInsertions(t *testing.T) { t.Error("chain1 isn't canonical and should be") } } + +func TestChainMultipleInsertions(t *testing.T) { + const max = 4 + chains := make([]types.Blocks, max) + var longest int + for i := 0; i < max; i++ { + var err error + name := "valid" + strconv.Itoa(i+1) + chains[i], err = loadChain(name, t) + if len(chains[i]) >= len(chains[longest]) { + longest = i + } + fmt.Println("loaded", name, "with a length of", len(chains[i])) + if err != nil { + fmt.Println(err) + t.FailNow() + } + } + + var eventMux event.TypeMux + chainMan := NewChainManager(&eventMux) + txPool := NewTxPool(chainMan, &eventMux) + blockMan := NewBlockManager(txPool, chainMan, &eventMux) + chainMan.SetProcessor(blockMan) + done := make(chan bool, max) + for i, chain := range chains { + var i int = i + go func() { + insertChain(done, chainMan, chain, t) + fmt.Println(i, "done") + }() + } + + for i := 0; i < max; i++ { + <-done + } + + if !reflect.DeepEqual(chains[longest][len(chains[longest])-1], chainMan.CurrentBlock()) { + t.Error("Invalid canonical chain") + } +} From 1085960ed8550eb64ae7031b43b1174c8f1c8f94 Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 30 Dec 2014 15:58:40 +0100 Subject: [PATCH 043/132] fixed trie --- cmd/evm/main.go | 4 ++-- tests/helper/trie.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/evm/main.go b/cmd/evm/main.go index 2bdfdfa9f3..66bba72893 100644 --- a/cmd/evm/main.go +++ b/cmd/evm/main.go @@ -37,8 +37,8 @@ import ( "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/logger" + "github.com/ethereum/go-ethereum/ptrie" "github.com/ethereum/go-ethereum/state" - "github.com/ethereum/go-ethereum/trie" "github.com/ethereum/go-ethereum/vm" ) @@ -65,7 +65,7 @@ func main() { ethutil.ReadConfig("/tmp/evmtest", "/tmp/evm", "") db, _ := ethdb.NewMemDatabase() - statedb := state.New(trie.New(db, "")) + statedb := state.New(ptrie.New(nil, db)) sender := statedb.NewStateObject([]byte("sender")) receiver := statedb.NewStateObject([]byte("receiver")) //receiver.SetCode([]byte(*code)) diff --git a/tests/helper/trie.go b/tests/helper/trie.go index 32432cc7a5..3cfb0bbe5e 100644 --- a/tests/helper/trie.go +++ b/tests/helper/trie.go @@ -1,6 +1,6 @@ package helper -import "github.com/ethereum/go-ethereum/trie" +import "github.com/ethereum/go-ethereum/ptrie" type MemDatabase struct { db map[string][]byte @@ -24,8 +24,8 @@ func (db *MemDatabase) Print() {} func (db *MemDatabase) Close() {} func (db *MemDatabase) LastKnownTD() []byte { return nil } -func NewTrie() *trie.Trie { +func NewTrie() *ptrie.Trie { db, _ := NewMemDatabase() - return trie.New(db, "") + return ptrie.New(nil, db) } From 29c887ef2c39e91951e1ae14e7c4276334c434a4 Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 30 Dec 2014 16:16:02 +0100 Subject: [PATCH 044/132] Removed incorrect range check for push --- vm/closure.go | 17 +++++++---------- vm/vm_debug.go | 5 +++-- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/vm/closure.go b/vm/closure.go index 97b31ada04..df216f2aed 100644 --- a/vm/closure.go +++ b/vm/closure.go @@ -1,8 +1,10 @@ package vm import ( + "math" "math/big" + "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/state" ) @@ -51,19 +53,14 @@ func (c *Closure) GetByte(x uint64) byte { } func (c *Closure) GetBytes(x, y int) []byte { - if x >= len(c.Code) || y >= len(c.Code) { - return nil - } - - return c.Code[x : x+y] + return c.GetRangeValue(uint64(x), uint64(y)) } -func (c *Closure) GetRangeValue(x, y uint64) []byte { - if x >= uint64(len(c.Code)) || y >= uint64(len(c.Code)) { - return nil - } +func (c *Closure) GetRangeValue(x, size uint64) []byte { + x = uint64(math.Min(float64(x), float64(len(c.Code)))) + y := uint64(math.Min(float64(x+size), float64(len(c.Code)))) - return c.Code[x : x+y] + return ethutil.LeftPadBytes(c.Code[x:y], int(size)) } func (c *Closure) Return(ret []byte) []byte { diff --git a/vm/vm_debug.go b/vm/vm_debug.go index aa3291e66f..2ee13c516f 100644 --- a/vm/vm_debug.go +++ b/vm/vm_debug.go @@ -716,7 +716,8 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * //a := big.NewInt(int64(op) - int64(PUSH1) + 1) a := uint64(op - PUSH1 + 1) //pc.Add(pc, ethutil.Big1) - val := ethutil.BigD(closure.GetRangeValue(pc+1, a)) + byts := closure.GetRangeValue(pc+1, a) + val := ethutil.BigD(byts) // Push value to stack stack.Push(val) pc += a @@ -724,7 +725,7 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * step += int(op) - int(PUSH1) + 1 - self.Printf(" => 0x%x", val.Bytes()) + self.Printf(" => 0x%x", byts) case POP: stack.Pop() case DUP1, DUP2, DUP3, DUP4, DUP5, DUP6, DUP7, DUP8, DUP9, DUP10, DUP11, DUP12, DUP13, DUP14, DUP15, DUP16: From 2ebf33ac1cd41277a296176198cfde9085948c0c Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 30 Dec 2014 16:17:56 +0100 Subject: [PATCH 045/132] removed variable --- vm/vm_debug.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/vm/vm_debug.go b/vm/vm_debug.go index 2ee13c516f..9a538c9406 100644 --- a/vm/vm_debug.go +++ b/vm/vm_debug.go @@ -713,15 +713,11 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * // 0x50 range case PUSH1, PUSH2, PUSH3, PUSH4, PUSH5, PUSH6, PUSH7, PUSH8, PUSH9, PUSH10, PUSH11, PUSH12, PUSH13, PUSH14, PUSH15, PUSH16, PUSH17, PUSH18, PUSH19, PUSH20, PUSH21, PUSH22, PUSH23, PUSH24, PUSH25, PUSH26, PUSH27, PUSH28, PUSH29, PUSH30, PUSH31, PUSH32: - //a := big.NewInt(int64(op) - int64(PUSH1) + 1) a := uint64(op - PUSH1 + 1) - //pc.Add(pc, ethutil.Big1) byts := closure.GetRangeValue(pc+1, a) - val := ethutil.BigD(byts) // Push value to stack - stack.Push(val) + stack.Push(ethutil.BigD(byts)) pc += a - //pc.Add(pc, a.Sub(a, big.NewInt(1))) step += int(op) - int(PUSH1) + 1 From cc5e621fc4d80269c335001528667e668ae267ee Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 30 Dec 2014 16:18:46 +0100 Subject: [PATCH 046/132] updated tests --- tests/files/StateTests/stInitCodeTest.json | 76 ++++++- .../StateTests/stSystemOperationsTest.json | 188 +++++++++++++++++- tests/files/TrieTests/trietest.json | 55 +++++ .../VMTests/RandomTests/201412231524.json | 46 +++++ .../VMTests/RandomTests/201412231526.json | 46 +++++ .../VMTests/RandomTests/201412231529.json | 46 +++++ .../VMTests/RandomTests/201412231535.json | 46 +++++ .../VMTests/RandomTests/201412231543.json | 46 +++++ .../VMTests/RandomTests/201412231544.json | 46 +++++ .../VMTests/RandomTests/201412231545.json | 46 +++++ .../VMTests/RandomTests/201412231546.json | 46 +++++ .../VMTests/RandomTests/201412231549.json | 46 +++++ .../VMTests/RandomTests/201412231551.json | 46 +++++ .../VMTests/RandomTests/201412231552.json | 46 +++++ .../VMTests/RandomTests/201412231553.json | 46 +++++ .../VMTests/RandomTests/201412231556.json | 46 +++++ .../VMTests/RandomTests/201412231557.json | 46 +++++ .../VMTests/RandomTests/201412231558.json | 46 +++++ .../VMTests/RandomTests/201412231559.json | 46 +++++ .../VMTests/RandomTests/201412231601.json | 46 +++++ .../VMTests/RandomTests/201412231602.json | 53 +++++ .../VMTests/RandomTests/201412231604.json | 46 +++++ .../VMTests/RandomTests/201412231606.json | 46 +++++ .../VMTests/RandomTests/201412231610.json | 46 +++++ .../VMTests/RandomTests/201412231611.json | 46 +++++ .../VMTests/RandomTests/201412231612.json | 46 +++++ .../VMTests/RandomTests/201412231613.json | 46 +++++ .../VMTests/RandomTests/201412231616.json | 53 +++++ .../VMTests/RandomTests/201412231617.json | 46 +++++ .../VMTests/RandomTests/201412231619.json | 46 +++++ .../VMTests/RandomTests/201412231620.json | 46 +++++ .../VMTests/RandomTests/201412231622.json | 46 +++++ .../VMTests/RandomTests/201412231623.json | 46 +++++ .../VMTests/RandomTests/201412231625.json | 46 +++++ .../VMTests/RandomTests/201412231626.json | 46 +++++ .../VMTests/RandomTests/201412231627.json | 46 +++++ .../VMTests/RandomTests/201412231629.json | 46 +++++ .../VMTests/RandomTests/201412231630.json | 46 +++++ .../VMTests/RandomTests/201412231631.json | 53 +++++ .../VMTests/RandomTests/201412231632.json | 46 +++++ .../VMTests/RandomTests/201412231633.json | 46 +++++ .../VMTests/RandomTests/201412231634.json | 46 +++++ .../VMTests/RandomTests/201412231635.json | 46 +++++ .../VMTests/RandomTests/201412231637.json | 46 +++++ .../VMTests/RandomTests/201412231638.json | 46 +++++ .../VMTests/RandomTests/201412231641.json | 46 +++++ .../VMTests/RandomTests/201412231642.json | 46 +++++ .../VMTests/RandomTests/201412231646.json | 46 +++++ .../VMTests/RandomTests/201412231647.json | 46 +++++ .../VMTests/RandomTests/201412231648.json | 46 +++++ .../VMTests/RandomTests/201412231649.json | 46 +++++ .../VMTests/RandomTests/201412231650.json | 46 +++++ .../VMTests/RandomTests/201412231652.json | 46 +++++ .../VMTests/RandomTests/201412231655.json | 46 +++++ .../VMTests/RandomTests/201412231656.json | 46 +++++ .../VMTests/RandomTests/201412231657.json | 46 +++++ .../VMTests/RandomTests/201412231700.json | 46 +++++ .../VMTests/RandomTests/201412231706.json | 46 +++++ .../VMTests/RandomTests/201412231707.json | 31 +++ .../VMTests/RandomTests/201412231708.json | 46 +++++ .../VMTests/RandomTests/201412231711.json | 46 +++++ .../VMTests/RandomTests/201412231712.json | 46 +++++ .../VMTests/RandomTests/201412231714.json | 46 +++++ .../VMTests/RandomTests/201412231715.json | 46 +++++ .../VMTests/RandomTests/201412231717.json | 46 +++++ .../VMTests/RandomTests/201412231723.json | 46 +++++ .../VMTests/RandomTests/201412231727.json | 46 +++++ .../VMTests/RandomTests/201412232225.json | 46 +++++ .../VMTests/RandomTests/201412232226.json | 31 +++ .../VMTests/RandomTests/201412232228.json | 46 +++++ .../VMTests/RandomTests/201412232230.json | 46 +++++ .../VMTests/RandomTests/201412232231.json | 46 +++++ .../VMTests/RandomTests/201412232232.json | 46 +++++ .../VMTests/RandomTests/201412232233.json | 46 +++++ .../VMTests/RandomTests/201412232234.json | 46 +++++ .../VMTests/RandomTests/201412232235.json | 53 +++++ .../VMTests/RandomTests/201412232236.json | 46 +++++ .../VMTests/RandomTests/201412232237.json | 46 +++++ .../VMTests/RandomTests/201412232238.json | 46 +++++ .../VMTests/RandomTests/201412232239.json | 46 +++++ .../VMTests/RandomTests/201412232240.json | 46 +++++ .../VMTests/RandomTests/201412232241.json | 46 +++++ .../VMTests/RandomTests/201412232242.json | 46 +++++ .../VMTests/RandomTests/201412232243.json | 46 +++++ .../VMTests/RandomTests/201412232244.json | 46 +++++ .../VMTests/RandomTests/201412232245.json | 46 +++++ .../VMTests/RandomTests/201412232246.json | 46 +++++ .../VMTests/RandomTests/201412232247.json | 46 +++++ .../VMTests/RandomTests/201412232248.json | 46 +++++ .../VMTests/RandomTests/201412232249.json | 46 +++++ .../VMTests/RandomTests/201412232250.json | 46 +++++ .../VMTests/RandomTests/201412232252.json | 46 +++++ .../VMTests/RandomTests/201412232253.json | 53 +++++ .../VMTests/RandomTests/201412232254.json | 46 +++++ .../VMTests/RandomTests/201412232255.json | 46 +++++ .../VMTests/RandomTests/201412232256.json | 53 +++++ .../VMTests/RandomTests/201412232257.json | 46 +++++ .../VMTests/RandomTests/201412232258.json | 46 +++++ .../VMTests/RandomTests/201412232300.json | 46 +++++ .../VMTests/RandomTests/201412232301.json | 46 +++++ .../VMTests/RandomTests/201412232303.json | 46 +++++ .../VMTests/RandomTests/201412232304.json | 46 +++++ .../VMTests/RandomTests/201412232305.json | 46 +++++ .../VMTests/RandomTests/201412232306.json | 46 +++++ .../VMTests/RandomTests/201412232307.json | 46 +++++ .../VMTests/RandomTests/201412232308.json | 46 +++++ .../VMTests/RandomTests/201412232309.json | 46 +++++ .../VMTests/RandomTests/201412232311.json | 46 +++++ .../VMTests/RandomTests/201412232312.json | 31 +++ .../VMTests/RandomTests/201412232313.json | 46 +++++ .../VMTests/RandomTests/201412232314.json | 46 +++++ .../VMTests/RandomTests/201412232317.json | 46 +++++ .../VMTests/RandomTests/201412232318.json | 46 +++++ .../VMTests/RandomTests/201412232319.json | 46 +++++ .../VMTests/RandomTests/201412232320.json | 46 +++++ .../VMTests/RandomTests/201412232321.json | 31 +++ .../VMTests/RandomTests/201412232323.json | 46 +++++ .../VMTests/RandomTests/201412232324.json | 46 +++++ .../VMTests/RandomTests/201412232327.json | 46 +++++ .../VMTests/RandomTests/201412232328.json | 46 +++++ .../VMTests/RandomTests/201412232330.json | 46 +++++ .../VMTests/RandomTests/201412232331.json | 46 +++++ .../VMTests/RandomTests/201412232335.json | 46 +++++ .../VMTests/RandomTests/201412232336.json | 46 +++++ .../VMTests/RandomTests/201412232338.json | 46 +++++ .../VMTests/RandomTests/201412232341.json | 46 +++++ .../VMTests/RandomTests/201412232342.json | 46 +++++ .../VMTests/RandomTests/201412232343.json | 46 +++++ .../VMTests/RandomTests/201412232345.json | 46 +++++ .../VMTests/RandomTests/201412232348.json | 31 +++ .../VMTests/RandomTests/201412232349.json | 46 +++++ .../VMTests/RandomTests/201412232351.json | 46 +++++ .../VMTests/RandomTests/201412232352.json | 31 +++ .../VMTests/RandomTests/201412232353.json | 46 +++++ .../VMTests/RandomTests/201412232354.json | 46 +++++ .../VMTests/RandomTests/201412232355.json | 46 +++++ .../VMTests/RandomTests/201412232356.json | 46 +++++ .../VMTests/RandomTests/201412232357.json | 46 +++++ .../VMTests/RandomTests/201412232358.json | 46 +++++ .../VMTests/RandomTests/201412232359.json | 31 +++ .../VMTests/RandomTests/201412240001.json | 46 +++++ .../VMTests/RandomTests/201412240002.json | 46 +++++ .../VMTests/RandomTests/201412240004.json | 31 +++ .../VMTests/RandomTests/201412240005.json | 46 +++++ .../VMTests/RandomTests/201412240006.json | 46 +++++ .../VMTests/RandomTests/201412240007.json | 46 +++++ .../VMTests/RandomTests/201412240010.json | 46 +++++ .../VMTests/RandomTests/201412240011.json | 46 +++++ .../VMTests/RandomTests/201412240012.json | 46 +++++ .../VMTests/RandomTests/201412240013.json | 46 +++++ .../VMTests/RandomTests/201412240014.json | 46 +++++ .../VMTests/RandomTests/201412240015.json | 46 +++++ .../VMTests/RandomTests/201412240016.json | 46 +++++ .../VMTests/RandomTests/201412240017.json | 46 +++++ .../VMTests/RandomTests/201412240019.json | 46 +++++ .../VMTests/RandomTests/201412240020.json | 46 +++++ .../VMTests/RandomTests/201412240021.json | 46 +++++ .../VMTests/RandomTests/201412240022.json | 46 +++++ .../VMTests/RandomTests/201412240023.json | 46 +++++ .../VMTests/RandomTests/201412240024.json | 46 +++++ .../VMTests/RandomTests/201412240025.json | 46 +++++ .../VMTests/RandomTests/201412240026.json | 46 +++++ .../VMTests/RandomTests/201412240028.json | 46 +++++ .../VMTests/RandomTests/201412240030.json | 31 +++ .../VMTests/RandomTests/201412240031.json | 46 +++++ .../VMTests/RandomTests/201412240032.json | 31 +++ .../VMTests/RandomTests/201412240034.json | 46 +++++ .../VMTests/RandomTests/201412240035.json | 31 +++ .../VMTests/RandomTests/201412240037.json | 46 +++++ .../VMTests/RandomTests/201412240039.json | 46 +++++ .../VMTests/RandomTests/201412240040.json | 46 +++++ .../VMTests/RandomTests/201412240041.json | 46 +++++ .../VMTests/RandomTests/201412240042.json | 46 +++++ .../VMTests/RandomTests/201412240044.json | 46 +++++ .../VMTests/RandomTests/201412240045.json | 31 +++ .../VMTests/RandomTests/201412240047.json | 46 +++++ .../VMTests/RandomTests/201412240051.json | 46 +++++ .../VMTests/RandomTests/201412240052.json | 46 +++++ .../VMTests/RandomTests/201412240053.json | 46 +++++ .../VMTests/RandomTests/201412240054.json | 46 +++++ .../VMTests/RandomTests/201412240055.json | 46 +++++ .../VMTests/RandomTests/201412240056.json | 46 +++++ .../VMTests/RandomTests/201412240058.json | 46 +++++ .../VMTests/RandomTests/201412240059.json | 31 +++ .../VMTests/RandomTests/201412240100.json | 46 +++++ .../VMTests/RandomTests/201412240101.json | 46 +++++ .../VMTests/RandomTests/201412240103.json | 46 +++++ .../VMTests/RandomTests/201412240104.json | 46 +++++ .../VMTests/RandomTests/201412240105.json | 46 +++++ .../VMTests/RandomTests/201412240106.json | 46 +++++ .../VMTests/RandomTests/201412240107.json | 46 +++++ .../VMTests/RandomTests/201412240110.json | 46 +++++ .../VMTests/RandomTests/201412240111.json | 46 +++++ .../VMTests/RandomTests/201412240112.json | 46 +++++ .../VMTests/RandomTests/201412240113.json | 46 +++++ .../VMTests/RandomTests/201412240115.json | 46 +++++ .../VMTests/RandomTests/201412240116.json | 46 +++++ .../VMTests/RandomTests/201412240117.json | 31 +++ .../VMTests/RandomTests/201412240119.json | 46 +++++ .../VMTests/RandomTests/201412240120.json | 46 +++++ .../VMTests/RandomTests/201412240121.json | 46 +++++ .../VMTests/RandomTests/201412240122.json | 46 +++++ .../VMTests/RandomTests/201412240123.json | 46 +++++ .../VMTests/RandomTests/201412240124.json | 31 +++ .../VMTests/RandomTests/201412240125.json | 46 +++++ .../VMTests/RandomTests/201412240126.json | 46 +++++ .../VMTests/RandomTests/201412240127.json | 46 +++++ .../VMTests/RandomTests/201412240128.json | 46 +++++ .../VMTests/RandomTests/201412240129.json | 46 +++++ .../VMTests/RandomTests/201412240130.json | 46 +++++ .../VMTests/RandomTests/201412240131.json | 31 +++ .../VMTests/RandomTests/201412240132.json | 46 +++++ .../VMTests/RandomTests/201412240133.json | 46 +++++ .../VMTests/RandomTests/201412240134.json | 46 +++++ .../VMTests/RandomTests/201412240136.json | 31 +++ .../VMTests/RandomTests/201412240137.json | 46 +++++ .../VMTests/RandomTests/201412240138.json | 46 +++++ .../VMTests/RandomTests/201412240139.json | 46 +++++ .../VMTests/RandomTests/201412240140.json | 46 +++++ .../VMTests/RandomTests/201412240141.json | 46 +++++ .../VMTests/RandomTests/201412240142.json | 46 +++++ .../VMTests/RandomTests/201412240148.json | 46 +++++ .../VMTests/RandomTests/201412240149.json | 46 +++++ .../VMTests/RandomTests/201412240150.json | 46 +++++ .../VMTests/RandomTests/201412240151.json | 46 +++++ .../VMTests/RandomTests/201412240152.json | 46 +++++ .../VMTests/RandomTests/201412240153.json | 46 +++++ .../VMTests/RandomTests/201412240154.json | 46 +++++ .../VMTests/RandomTests/201412240155.json | 46 +++++ .../VMTests/RandomTests/201412240156.json | 46 +++++ .../VMTests/RandomTests/201412240157.json | 46 +++++ .../VMTests/RandomTests/201412240158.json | 53 +++++ .../VMTests/RandomTests/201412240159.json | 46 +++++ .../VMTests/RandomTests/201412240201.json | 46 +++++ .../VMTests/RandomTests/201412240202.json | 46 +++++ .../VMTests/RandomTests/201412240204.json | 46 +++++ tests/files/index.js | 8 +- 237 files changed, 10825 insertions(+), 14 deletions(-) create mode 100644 tests/files/VMTests/RandomTests/201412231524.json create mode 100644 tests/files/VMTests/RandomTests/201412231526.json create mode 100644 tests/files/VMTests/RandomTests/201412231529.json create mode 100644 tests/files/VMTests/RandomTests/201412231535.json create mode 100644 tests/files/VMTests/RandomTests/201412231543.json create mode 100644 tests/files/VMTests/RandomTests/201412231544.json create mode 100644 tests/files/VMTests/RandomTests/201412231545.json create mode 100644 tests/files/VMTests/RandomTests/201412231546.json create mode 100644 tests/files/VMTests/RandomTests/201412231549.json create mode 100644 tests/files/VMTests/RandomTests/201412231551.json create mode 100644 tests/files/VMTests/RandomTests/201412231552.json create mode 100644 tests/files/VMTests/RandomTests/201412231553.json create mode 100644 tests/files/VMTests/RandomTests/201412231556.json create mode 100644 tests/files/VMTests/RandomTests/201412231557.json create mode 100644 tests/files/VMTests/RandomTests/201412231558.json create mode 100644 tests/files/VMTests/RandomTests/201412231559.json create mode 100644 tests/files/VMTests/RandomTests/201412231601.json create mode 100644 tests/files/VMTests/RandomTests/201412231602.json create mode 100644 tests/files/VMTests/RandomTests/201412231604.json create mode 100644 tests/files/VMTests/RandomTests/201412231606.json create mode 100644 tests/files/VMTests/RandomTests/201412231610.json create mode 100644 tests/files/VMTests/RandomTests/201412231611.json create mode 100644 tests/files/VMTests/RandomTests/201412231612.json create mode 100644 tests/files/VMTests/RandomTests/201412231613.json create mode 100644 tests/files/VMTests/RandomTests/201412231616.json create mode 100644 tests/files/VMTests/RandomTests/201412231617.json create mode 100644 tests/files/VMTests/RandomTests/201412231619.json create mode 100644 tests/files/VMTests/RandomTests/201412231620.json create mode 100644 tests/files/VMTests/RandomTests/201412231622.json create mode 100644 tests/files/VMTests/RandomTests/201412231623.json create mode 100644 tests/files/VMTests/RandomTests/201412231625.json create mode 100644 tests/files/VMTests/RandomTests/201412231626.json create mode 100644 tests/files/VMTests/RandomTests/201412231627.json create mode 100644 tests/files/VMTests/RandomTests/201412231629.json create mode 100644 tests/files/VMTests/RandomTests/201412231630.json create mode 100644 tests/files/VMTests/RandomTests/201412231631.json create mode 100644 tests/files/VMTests/RandomTests/201412231632.json create mode 100644 tests/files/VMTests/RandomTests/201412231633.json create mode 100644 tests/files/VMTests/RandomTests/201412231634.json create mode 100644 tests/files/VMTests/RandomTests/201412231635.json create mode 100644 tests/files/VMTests/RandomTests/201412231637.json create mode 100644 tests/files/VMTests/RandomTests/201412231638.json create mode 100644 tests/files/VMTests/RandomTests/201412231641.json create mode 100644 tests/files/VMTests/RandomTests/201412231642.json create mode 100644 tests/files/VMTests/RandomTests/201412231646.json create mode 100644 tests/files/VMTests/RandomTests/201412231647.json create mode 100644 tests/files/VMTests/RandomTests/201412231648.json create mode 100644 tests/files/VMTests/RandomTests/201412231649.json create mode 100644 tests/files/VMTests/RandomTests/201412231650.json create mode 100644 tests/files/VMTests/RandomTests/201412231652.json create mode 100644 tests/files/VMTests/RandomTests/201412231655.json create mode 100644 tests/files/VMTests/RandomTests/201412231656.json create mode 100644 tests/files/VMTests/RandomTests/201412231657.json create mode 100644 tests/files/VMTests/RandomTests/201412231700.json create mode 100644 tests/files/VMTests/RandomTests/201412231706.json create mode 100644 tests/files/VMTests/RandomTests/201412231707.json create mode 100644 tests/files/VMTests/RandomTests/201412231708.json create mode 100644 tests/files/VMTests/RandomTests/201412231711.json create mode 100644 tests/files/VMTests/RandomTests/201412231712.json create mode 100644 tests/files/VMTests/RandomTests/201412231714.json create mode 100644 tests/files/VMTests/RandomTests/201412231715.json create mode 100644 tests/files/VMTests/RandomTests/201412231717.json create mode 100644 tests/files/VMTests/RandomTests/201412231723.json create mode 100644 tests/files/VMTests/RandomTests/201412231727.json create mode 100644 tests/files/VMTests/RandomTests/201412232225.json create mode 100644 tests/files/VMTests/RandomTests/201412232226.json create mode 100644 tests/files/VMTests/RandomTests/201412232228.json create mode 100644 tests/files/VMTests/RandomTests/201412232230.json create mode 100644 tests/files/VMTests/RandomTests/201412232231.json create mode 100644 tests/files/VMTests/RandomTests/201412232232.json create mode 100644 tests/files/VMTests/RandomTests/201412232233.json create mode 100644 tests/files/VMTests/RandomTests/201412232234.json create mode 100644 tests/files/VMTests/RandomTests/201412232235.json create mode 100644 tests/files/VMTests/RandomTests/201412232236.json create mode 100644 tests/files/VMTests/RandomTests/201412232237.json create mode 100644 tests/files/VMTests/RandomTests/201412232238.json create mode 100644 tests/files/VMTests/RandomTests/201412232239.json create mode 100644 tests/files/VMTests/RandomTests/201412232240.json create mode 100644 tests/files/VMTests/RandomTests/201412232241.json create mode 100644 tests/files/VMTests/RandomTests/201412232242.json create mode 100644 tests/files/VMTests/RandomTests/201412232243.json create mode 100644 tests/files/VMTests/RandomTests/201412232244.json create mode 100644 tests/files/VMTests/RandomTests/201412232245.json create mode 100644 tests/files/VMTests/RandomTests/201412232246.json create mode 100644 tests/files/VMTests/RandomTests/201412232247.json create mode 100644 tests/files/VMTests/RandomTests/201412232248.json create mode 100644 tests/files/VMTests/RandomTests/201412232249.json create mode 100644 tests/files/VMTests/RandomTests/201412232250.json create mode 100644 tests/files/VMTests/RandomTests/201412232252.json create mode 100644 tests/files/VMTests/RandomTests/201412232253.json create mode 100644 tests/files/VMTests/RandomTests/201412232254.json create mode 100644 tests/files/VMTests/RandomTests/201412232255.json create mode 100644 tests/files/VMTests/RandomTests/201412232256.json create mode 100644 tests/files/VMTests/RandomTests/201412232257.json create mode 100644 tests/files/VMTests/RandomTests/201412232258.json create mode 100644 tests/files/VMTests/RandomTests/201412232300.json create mode 100644 tests/files/VMTests/RandomTests/201412232301.json create mode 100644 tests/files/VMTests/RandomTests/201412232303.json create mode 100644 tests/files/VMTests/RandomTests/201412232304.json create mode 100644 tests/files/VMTests/RandomTests/201412232305.json create mode 100644 tests/files/VMTests/RandomTests/201412232306.json create mode 100644 tests/files/VMTests/RandomTests/201412232307.json create mode 100644 tests/files/VMTests/RandomTests/201412232308.json create mode 100644 tests/files/VMTests/RandomTests/201412232309.json create mode 100644 tests/files/VMTests/RandomTests/201412232311.json create mode 100644 tests/files/VMTests/RandomTests/201412232312.json create mode 100644 tests/files/VMTests/RandomTests/201412232313.json create mode 100644 tests/files/VMTests/RandomTests/201412232314.json create mode 100644 tests/files/VMTests/RandomTests/201412232317.json create mode 100644 tests/files/VMTests/RandomTests/201412232318.json create mode 100644 tests/files/VMTests/RandomTests/201412232319.json create mode 100644 tests/files/VMTests/RandomTests/201412232320.json create mode 100644 tests/files/VMTests/RandomTests/201412232321.json create mode 100644 tests/files/VMTests/RandomTests/201412232323.json create mode 100644 tests/files/VMTests/RandomTests/201412232324.json create mode 100644 tests/files/VMTests/RandomTests/201412232327.json create mode 100644 tests/files/VMTests/RandomTests/201412232328.json create mode 100644 tests/files/VMTests/RandomTests/201412232330.json create mode 100644 tests/files/VMTests/RandomTests/201412232331.json create mode 100644 tests/files/VMTests/RandomTests/201412232335.json create mode 100644 tests/files/VMTests/RandomTests/201412232336.json create mode 100644 tests/files/VMTests/RandomTests/201412232338.json create mode 100644 tests/files/VMTests/RandomTests/201412232341.json create mode 100644 tests/files/VMTests/RandomTests/201412232342.json create mode 100644 tests/files/VMTests/RandomTests/201412232343.json create mode 100644 tests/files/VMTests/RandomTests/201412232345.json create mode 100644 tests/files/VMTests/RandomTests/201412232348.json create mode 100644 tests/files/VMTests/RandomTests/201412232349.json create mode 100644 tests/files/VMTests/RandomTests/201412232351.json create mode 100644 tests/files/VMTests/RandomTests/201412232352.json create mode 100644 tests/files/VMTests/RandomTests/201412232353.json create mode 100644 tests/files/VMTests/RandomTests/201412232354.json create mode 100644 tests/files/VMTests/RandomTests/201412232355.json create mode 100644 tests/files/VMTests/RandomTests/201412232356.json create mode 100644 tests/files/VMTests/RandomTests/201412232357.json create mode 100644 tests/files/VMTests/RandomTests/201412232358.json create mode 100644 tests/files/VMTests/RandomTests/201412232359.json create mode 100644 tests/files/VMTests/RandomTests/201412240001.json create mode 100644 tests/files/VMTests/RandomTests/201412240002.json create mode 100644 tests/files/VMTests/RandomTests/201412240004.json create mode 100644 tests/files/VMTests/RandomTests/201412240005.json create mode 100644 tests/files/VMTests/RandomTests/201412240006.json create mode 100644 tests/files/VMTests/RandomTests/201412240007.json create mode 100644 tests/files/VMTests/RandomTests/201412240010.json create mode 100644 tests/files/VMTests/RandomTests/201412240011.json create mode 100644 tests/files/VMTests/RandomTests/201412240012.json create mode 100644 tests/files/VMTests/RandomTests/201412240013.json create mode 100644 tests/files/VMTests/RandomTests/201412240014.json create mode 100644 tests/files/VMTests/RandomTests/201412240015.json create mode 100644 tests/files/VMTests/RandomTests/201412240016.json create mode 100644 tests/files/VMTests/RandomTests/201412240017.json create mode 100644 tests/files/VMTests/RandomTests/201412240019.json create mode 100644 tests/files/VMTests/RandomTests/201412240020.json create mode 100644 tests/files/VMTests/RandomTests/201412240021.json create mode 100644 tests/files/VMTests/RandomTests/201412240022.json create mode 100644 tests/files/VMTests/RandomTests/201412240023.json create mode 100644 tests/files/VMTests/RandomTests/201412240024.json create mode 100644 tests/files/VMTests/RandomTests/201412240025.json create mode 100644 tests/files/VMTests/RandomTests/201412240026.json create mode 100644 tests/files/VMTests/RandomTests/201412240028.json create mode 100644 tests/files/VMTests/RandomTests/201412240030.json create mode 100644 tests/files/VMTests/RandomTests/201412240031.json create mode 100644 tests/files/VMTests/RandomTests/201412240032.json create mode 100644 tests/files/VMTests/RandomTests/201412240034.json create mode 100644 tests/files/VMTests/RandomTests/201412240035.json create mode 100644 tests/files/VMTests/RandomTests/201412240037.json create mode 100644 tests/files/VMTests/RandomTests/201412240039.json create mode 100644 tests/files/VMTests/RandomTests/201412240040.json create mode 100644 tests/files/VMTests/RandomTests/201412240041.json create mode 100644 tests/files/VMTests/RandomTests/201412240042.json create mode 100644 tests/files/VMTests/RandomTests/201412240044.json create mode 100644 tests/files/VMTests/RandomTests/201412240045.json create mode 100644 tests/files/VMTests/RandomTests/201412240047.json create mode 100644 tests/files/VMTests/RandomTests/201412240051.json create mode 100644 tests/files/VMTests/RandomTests/201412240052.json create mode 100644 tests/files/VMTests/RandomTests/201412240053.json create mode 100644 tests/files/VMTests/RandomTests/201412240054.json create mode 100644 tests/files/VMTests/RandomTests/201412240055.json create mode 100644 tests/files/VMTests/RandomTests/201412240056.json create mode 100644 tests/files/VMTests/RandomTests/201412240058.json create mode 100644 tests/files/VMTests/RandomTests/201412240059.json create mode 100644 tests/files/VMTests/RandomTests/201412240100.json create mode 100644 tests/files/VMTests/RandomTests/201412240101.json create mode 100644 tests/files/VMTests/RandomTests/201412240103.json create mode 100644 tests/files/VMTests/RandomTests/201412240104.json create mode 100644 tests/files/VMTests/RandomTests/201412240105.json create mode 100644 tests/files/VMTests/RandomTests/201412240106.json create mode 100644 tests/files/VMTests/RandomTests/201412240107.json create mode 100644 tests/files/VMTests/RandomTests/201412240110.json create mode 100644 tests/files/VMTests/RandomTests/201412240111.json create mode 100644 tests/files/VMTests/RandomTests/201412240112.json create mode 100644 tests/files/VMTests/RandomTests/201412240113.json create mode 100644 tests/files/VMTests/RandomTests/201412240115.json create mode 100644 tests/files/VMTests/RandomTests/201412240116.json create mode 100644 tests/files/VMTests/RandomTests/201412240117.json create mode 100644 tests/files/VMTests/RandomTests/201412240119.json create mode 100644 tests/files/VMTests/RandomTests/201412240120.json create mode 100644 tests/files/VMTests/RandomTests/201412240121.json create mode 100644 tests/files/VMTests/RandomTests/201412240122.json create mode 100644 tests/files/VMTests/RandomTests/201412240123.json create mode 100644 tests/files/VMTests/RandomTests/201412240124.json create mode 100644 tests/files/VMTests/RandomTests/201412240125.json create mode 100644 tests/files/VMTests/RandomTests/201412240126.json create mode 100644 tests/files/VMTests/RandomTests/201412240127.json create mode 100644 tests/files/VMTests/RandomTests/201412240128.json create mode 100644 tests/files/VMTests/RandomTests/201412240129.json create mode 100644 tests/files/VMTests/RandomTests/201412240130.json create mode 100644 tests/files/VMTests/RandomTests/201412240131.json create mode 100644 tests/files/VMTests/RandomTests/201412240132.json create mode 100644 tests/files/VMTests/RandomTests/201412240133.json create mode 100644 tests/files/VMTests/RandomTests/201412240134.json create mode 100644 tests/files/VMTests/RandomTests/201412240136.json create mode 100644 tests/files/VMTests/RandomTests/201412240137.json create mode 100644 tests/files/VMTests/RandomTests/201412240138.json create mode 100644 tests/files/VMTests/RandomTests/201412240139.json create mode 100644 tests/files/VMTests/RandomTests/201412240140.json create mode 100644 tests/files/VMTests/RandomTests/201412240141.json create mode 100644 tests/files/VMTests/RandomTests/201412240142.json create mode 100644 tests/files/VMTests/RandomTests/201412240148.json create mode 100644 tests/files/VMTests/RandomTests/201412240149.json create mode 100644 tests/files/VMTests/RandomTests/201412240150.json create mode 100644 tests/files/VMTests/RandomTests/201412240151.json create mode 100644 tests/files/VMTests/RandomTests/201412240152.json create mode 100644 tests/files/VMTests/RandomTests/201412240153.json create mode 100644 tests/files/VMTests/RandomTests/201412240154.json create mode 100644 tests/files/VMTests/RandomTests/201412240155.json create mode 100644 tests/files/VMTests/RandomTests/201412240156.json create mode 100644 tests/files/VMTests/RandomTests/201412240157.json create mode 100644 tests/files/VMTests/RandomTests/201412240158.json create mode 100644 tests/files/VMTests/RandomTests/201412240159.json create mode 100644 tests/files/VMTests/RandomTests/201412240201.json create mode 100644 tests/files/VMTests/RandomTests/201412240202.json create mode 100644 tests/files/VMTests/RandomTests/201412240204.json diff --git a/tests/files/StateTests/stInitCodeTest.json b/tests/files/StateTests/stInitCodeTest.json index 67aa42853b..1c4670cef3 100644 --- a/tests/files/StateTests/stInitCodeTest.json +++ b/tests/files/StateTests/stInitCodeTest.json @@ -588,7 +588,7 @@ } }, "transaction" : { - "data" : "0x600a80600c6000396000f200600160008035811a8100", + "data" : "0x600a80600c6000396000f300600160008035811a8100", "gasLimit" : "599", "gasPrice" : "1", "nonce" : "0", @@ -642,7 +642,7 @@ } }, "transaction" : { - "data" : "0x600a80600c6000396000f200600160008035811a8100", + "data" : "0x600a80600c6000396000f300600160008035811a8100", "gasLimit" : "590", "gasPrice" : "3", "nonce" : "0", @@ -651,6 +651,60 @@ "value" : "1" } }, + "StackUnderFlowContractCreation" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "1000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : { + "balance" : "0", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "9000", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "10000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "0x6000f1", + "gasLimit" : "1000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "", + "value" : "0" + } + }, "TransactionContractCreation" : { "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", @@ -696,7 +750,7 @@ } }, "transaction" : { - "data" : "0x600a80600c6000396000f200600160008035811a8100", + "data" : "0x600a80600c6000396000f300600160008035811a8100", "gasLimit" : "599", "gasPrice" : "1", "nonce" : "0", @@ -716,10 +770,10 @@ }, "logs" : [ ], - "out" : "0x", + "out" : "0xff600160008035811a81", "post" : { "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "1000", + "balance" : "653", "code" : "0x", "nonce" : "0", "storage" : { @@ -727,13 +781,13 @@ }, "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : { "balance" : "1", - "code" : "0x", + "code" : "0xff600160008035811a81", "nonce" : "0", "storage" : { } }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "8999", + "balance" : "9346", "code" : "0x", "nonce" : "1", "storage" : { @@ -750,7 +804,7 @@ } }, "transaction" : { - "data" : "0x600a80600c6000396000f200ff600160008035811a81", + "data" : "0x600a80600c6000396000f300ff600160008035811a81", "gasLimit" : "1000", "gasPrice" : "1", "nonce" : "0", @@ -804,7 +858,7 @@ } }, "transaction" : { - "data" : "0x600a80600c600039600000f20000600160008035811a81", + "data" : "0x600a80600c600039600000f30000600160008035811a81", "gasLimit" : "1000", "gasPrice" : "1", "nonce" : "0", @@ -858,7 +912,7 @@ } }, "transaction" : { - "data" : "0x600a80600c6000396000fff2ffff600160008035811a81", + "data" : "0x600a80600c6000396000fff3ffff600160008035811a81", "gasLimit" : "1000", "gasPrice" : "1", "nonce" : "0", @@ -867,4 +921,4 @@ "value" : "1" } } -} \ No newline at end of file +} diff --git a/tests/files/StateTests/stSystemOperationsTest.json b/tests/files/StateTests/stSystemOperationsTest.json index 612331ae36..e92c8d9adb 100644 --- a/tests/files/StateTests/stSystemOperationsTest.json +++ b/tests/files/StateTests/stSystemOperationsTest.json @@ -5826,5 +5826,191 @@ "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "value" : "100000" } + }, + "callValue" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "10000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000100000", + "code" : "0x34600055", + "nonce" : "0", + "storage" : { + "0x" : "0x0186a0" + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "802", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "999999999999899198", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "code" : "0x34600055", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000000000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "10000000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "100000" + } + }, + "callerAccountBalance" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "10000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000100000", + "code" : "0x3331600055", + "nonce" : "0", + "storage" : { + "0x" : "0x0de0b6b3a6c9e2e0" + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "822", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "999999999999899178", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "code" : "0x3331600055", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000000000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "10000000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "100000" + } + }, + "currentAccountBalance" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "10000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000100000", + "code" : "0x3031600055", + "nonce" : "0", + "storage" : { + "0x" : "0x0de0b6b3a76586a0" + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "822", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "999999999999899178", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "code" : "0x3031600055", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000000000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "10000000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "100000" + } } -} \ No newline at end of file +} diff --git a/tests/files/TrieTests/trietest.json b/tests/files/TrieTests/trietest.json index ce5c2d191b..d871a8a813 100644 --- a/tests/files/TrieTests/trietest.json +++ b/tests/files/TrieTests/trietest.json @@ -12,6 +12,61 @@ ], "root": "0x5991bb8c6514148a29db676a14ac506cd2cd5775ace63c30a4fe457715e9ac84" }, + "branchingTests": { + "in":[ + ["0x04110d816c380812a427968ece99b1c963dfbce6", "something"], + ["0x095e7baea6a6c7c4c2dfeb977efac326af552d87", "something"], + ["0x0a517d755cebbf66312b30fff713666a9cb917e0", "something"], + ["0x24dd378f51adc67a50e339e8031fe9bd4aafab36", "something"], + ["0x293f982d000532a7861ab122bdc4bbfd26bf9030", "something"], + ["0x2cf5732f017b0cf1b1f13a1478e10239716bf6b5", "something"], + ["0x31c640b92c21a1f1465c91070b4b3b4d6854195f", "something"], + ["0x37f998764813b136ddf5a754f34063fd03065e36", "something"], + ["0x37fa399a749c121f8a15ce77e3d9f9bec8020d7a", "something"], + ["0x4f36659fa632310b6ec438dea4085b522a2dd077", "something"], + ["0x62c01474f089b07dae603491675dc5b5748f7049", "something"], + ["0x729af7294be595a0efd7d891c9e51f89c07950c7", "something"], + ["0x83e3e5a16d3b696a0314b30b2534804dd5e11197", "something"], + ["0x8703df2417e0d7c59d063caa9583cb10a4d20532", "something"], + ["0x8dffcd74e5b5923512916c6a64b502689cfa65e1", "something"], + ["0x95a4d7cccb5204733874fa87285a176fe1e9e240", "something"], + ["0x99b2fcba8120bedd048fe79f5262a6690ed38c39", "something"], + ["0xa4202b8b8afd5354e3e40a219bdc17f6001bf2cf", "something"], + ["0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "something"], + ["0xa9647f4a0a14042d91dc33c0328030a7157c93ae", "something"], + ["0xaa6cffe5185732689c18f37a7f86170cb7304c2a", "something"], + ["0xaae4a2e3c51c04606dcb3723456e58f3ed214f45", "something"], + ["0xc37a43e940dfb5baf581a0b82b351d48305fc885", "something"], + ["0xd2571607e241ecf590ed94b12d87c94babe36db6", "something"], + ["0xf735071cbee190d76b704ce68384fc21e389fbe7", "something"], + ["0x04110d816c380812a427968ece99b1c963dfbce6", null], + ["0x095e7baea6a6c7c4c2dfeb977efac326af552d87", null], + ["0x0a517d755cebbf66312b30fff713666a9cb917e0", null], + ["0x24dd378f51adc67a50e339e8031fe9bd4aafab36", null], + ["0x293f982d000532a7861ab122bdc4bbfd26bf9030", null], + ["0x2cf5732f017b0cf1b1f13a1478e10239716bf6b5", null], + ["0x31c640b92c21a1f1465c91070b4b3b4d6854195f", null], + ["0x37f998764813b136ddf5a754f34063fd03065e36", null], + ["0x37fa399a749c121f8a15ce77e3d9f9bec8020d7a", null], + ["0x4f36659fa632310b6ec438dea4085b522a2dd077", null], + ["0x62c01474f089b07dae603491675dc5b5748f7049", null], + ["0x729af7294be595a0efd7d891c9e51f89c07950c7", null], + ["0x83e3e5a16d3b696a0314b30b2534804dd5e11197", null], + ["0x8703df2417e0d7c59d063caa9583cb10a4d20532", null], + ["0x8dffcd74e5b5923512916c6a64b502689cfa65e1", null], + ["0x95a4d7cccb5204733874fa87285a176fe1e9e240", null], + ["0x99b2fcba8120bedd048fe79f5262a6690ed38c39", null], + ["0xa4202b8b8afd5354e3e40a219bdc17f6001bf2cf", null], + ["0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", null], + ["0xa9647f4a0a14042d91dc33c0328030a7157c93ae", null], + ["0xaa6cffe5185732689c18f37a7f86170cb7304c2a", null], + ["0xaae4a2e3c51c04606dcb3723456e58f3ed214f45", null], + ["0xc37a43e940dfb5baf581a0b82b351d48305fc885", null], + ["0xd2571607e241ecf590ed94b12d87c94babe36db6", null], + ["0xf735071cbee190d76b704ce68384fc21e389fbe7", null] + ], + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421" + }, "jeff": { "in": [ ["0x0000000000000000000000000000000000000000000000000000000000000045", "0x22b224a1420a802ab51d326e29fa98e34c4f24ea"], diff --git a/tests/files/VMTests/RandomTests/201412231524.json b/tests/files/VMTests/RandomTests/201412231524.json new file mode 100644 index 0000000000..87796042cf --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231524.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x63705a0b6b69a11044518876953776", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x63705a0b6b69a11044518876953776", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x63705a0b6b69a11044518876953776", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231526.json b/tests/files/VMTests/RandomTests/201412231526.json new file mode 100644 index 0000000000..17758b8d89 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231526.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x5b6ca284a383618e389e20848652", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x5b6ca284a383618e389e20848652", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x5b6ca284a383618e389e20848652", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231529.json b/tests/files/VMTests/RandomTests/201412231529.json new file mode 100644 index 0000000000..782e78a1c4 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231529.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6a5a558f440b6d7530533a356b7589", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6a5a558f440b6d7530533a356b7589", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6a5a558f440b6d7530533a356b7589", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231535.json b/tests/files/VMTests/RandomTests/201412231535.json new file mode 100644 index 0000000000..fc661805d9 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231535.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x68931051429d9b75069160636bff", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x68931051429d9b75069160636bff", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x68931051429d9b75069160636bff", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231543.json b/tests/files/VMTests/RandomTests/201412231543.json new file mode 100644 index 0000000000..2a6d004ae8 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231543.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x5a385968087df24038513535", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9996", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x5a385968087df24038513535", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x5a385968087df24038513535", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231544.json b/tests/files/VMTests/RandomTests/201412231544.json new file mode 100644 index 0000000000..4925a5abde --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231544.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x3463823507", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x3463823507", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x3463823507", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231545.json b/tests/files/VMTests/RandomTests/201412231545.json new file mode 100644 index 0000000000..ad2b3a27e9 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231545.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x66a3535b8b8af38a658b3b", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x66a3535b8b8af38a658b3b", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x66a3535b8b8af38a658b3b", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231546.json b/tests/files/VMTests/RandomTests/201412231546.json new file mode 100644 index 0000000000..58e7cd2d1e --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231546.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x63794554ff426ef0a18a8a9c6e137a8c", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x63794554ff426ef0a18a8a9c6e137a8c", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x63794554ff426ef0a18a8a9c6e137a8c", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231549.json b/tests/files/VMTests/RandomTests/201412231549.json new file mode 100644 index 0000000000..51a58e1a39 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231549.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x66509a88803091046789893377", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x66509a88803091046789893377", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x66509a88803091046789893377", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231551.json b/tests/files/VMTests/RandomTests/201412231551.json new file mode 100644 index 0000000000..fe7fad0628 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231551.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x426a507bf0a09c7b6a381314", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x426a507bf0a09c7b6a381314", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x426a507bf0a09c7b6a381314", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231552.json b/tests/files/VMTests/RandomTests/201412231552.json new file mode 100644 index 0000000000..4d3acf6c21 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231552.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x306383a29e826a05865054039f36", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x306383a29e826a05865054039f36", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x306383a29e826a05865054039f36", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231553.json b/tests/files/VMTests/RandomTests/201412231553.json new file mode 100644 index 0000000000..52d885a00c --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231553.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x66691196a4a00209506d8290855570", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x66691196a4a00209506d8290855570", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x66691196a4a00209506d8290855570", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231556.json b/tests/files/VMTests/RandomTests/201412231556.json new file mode 100644 index 0000000000..334f6644c1 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231556.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x645b7753a4806e848481311373338b66", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x645b7753a4806e848481311373338b66", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x645b7753a4806e848481311373338b66", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231557.json b/tests/files/VMTests/RandomTests/201412231557.json new file mode 100644 index 0000000000..7992fb0031 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231557.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x386609796d5a7b53", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x386609796d5a7b53", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x386609796d5a7b53", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231558.json b/tests/files/VMTests/RandomTests/201412231558.json new file mode 100644 index 0000000000..ef3b6ae10a --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231558.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x67767162694473797350685804", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x67767162694473797350685804", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x67767162694473797350685804", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231559.json b/tests/files/VMTests/RandomTests/201412231559.json new file mode 100644 index 0000000000..fe298915b1 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231559.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x33666b7c09ff376d", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x33666b7c09ff376d", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x33666b7c09ff376d", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231601.json b/tests/files/VMTests/RandomTests/201412231601.json new file mode 100644 index 0000000000..09aa5b75b1 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231601.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x4368696e44388f615b36", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4368696e44388f615b36", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4368696e44388f615b36", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231602.json b/tests/files/VMTests/RandomTests/201412231602.json new file mode 100644 index 0000000000..95e1ca48bb --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231602.json @@ -0,0 +1,53 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x323b42196b09660754097135335b", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9995", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x323b42196b09660754097135335b", + "nonce" : "0", + "storage" : { + } + }, + "cd1722f3947def4cf144679da39c4c32bdc35681" : { + "balance" : "0", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x323b42196b09660754097135335b", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231604.json b/tests/files/VMTests/RandomTests/201412231604.json new file mode 100644 index 0000000000..6516f112b8 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231604.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6050693b0185f01830385835", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6050693b0185f01830385835", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6050693b0185f01830385835", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231606.json b/tests/files/VMTests/RandomTests/201412231606.json new file mode 100644 index 0000000000..93d737617d --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231606.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x3a1563a385690668348e438532", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9996", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x3a1563a385690668348e438532", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x3a1563a385690668348e438532", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231610.json b/tests/files/VMTests/RandomTests/201412231610.json new file mode 100644 index 0000000000..c0c1941ac0 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231610.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x65329f329e31786a9905527af3", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x65329f329e31786a9905527af3", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x65329f329e31786a9905527af3", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231611.json b/tests/files/VMTests/RandomTests/201412231611.json new file mode 100644 index 0000000000..be169fdd37 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231611.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x648b099057166169", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x648b099057166169", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x648b099057166169", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231612.json b/tests/files/VMTests/RandomTests/201412231612.json new file mode 100644 index 0000000000..272360cedc --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231612.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x648b418282a168170b7b", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x648b418282a168170b7b", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x648b418282a168170b7b", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231613.json b/tests/files/VMTests/RandomTests/201412231613.json new file mode 100644 index 0000000000..5e573c9c3e --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231613.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6168616716912009f154", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6168616716912009f154", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6168616716912009f154", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231616.json b/tests/files/VMTests/RandomTests/201412231616.json new file mode 100644 index 0000000000..4668a5fa2c --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231616.json @@ -0,0 +1,53 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x44315a426414", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9976", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0000000000000000000000000000000000000100" : { + "balance" : "0", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x44315a426414", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x44315a426414", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231617.json b/tests/files/VMTests/RandomTests/201412231617.json new file mode 100644 index 0000000000..319d75badb --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231617.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x366e5279a28d1262769a6a535a9c9558", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x366e5279a28d1262769a6a535a9c9558", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x366e5279a28d1262769a6a535a9c9558", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231619.json b/tests/files/VMTests/RandomTests/201412231619.json new file mode 100644 index 0000000000..47dd53b736 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231619.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x305b6a96a1928e7c9c56076d", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x305b6a96a1928e7c9c56076d", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x305b6a96a1928e7c9c56076d", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231620.json b/tests/files/VMTests/RandomTests/201412231620.json new file mode 100644 index 0000000000..a34fc6960a --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231620.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x426c105531797997035a87408b18", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x426c105531797997035a87408b18", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x426c105531797997035a87408b18", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231622.json b/tests/files/VMTests/RandomTests/201412231622.json new file mode 100644 index 0000000000..e7b4a3ddef --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231622.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x336d0284979d526c2032f187667f17", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x336d0284979d526c2032f187667f17", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x336d0284979d526c2032f187667f17", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231623.json b/tests/files/VMTests/RandomTests/201412231623.json new file mode 100644 index 0000000000..5aea43ebe8 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231623.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x436b748c52f188780b108c6b96", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x436b748c52f188780b108c6b96", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x436b748c52f188780b108c6b96", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231625.json b/tests/files/VMTests/RandomTests/201412231625.json new file mode 100644 index 0000000000..d1be27e2d0 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231625.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x69578e0b9af2098244338a6b9e", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x69578e0b9af2098244338a6b9e", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x69578e0b9af2098244338a6b9e", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231626.json b/tests/files/VMTests/RandomTests/201412231626.json new file mode 100644 index 0000000000..81c9941241 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231626.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x698d73727651077b193857669659986c", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x698d73727651077b193857669659986c", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x698d73727651077b193857669659986c", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231627.json b/tests/files/VMTests/RandomTests/201412231627.json new file mode 100644 index 0000000000..22db4ecd5a --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231627.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x61a3746479129d", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x61a3746479129d", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x61a3746479129d", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231629.json b/tests/files/VMTests/RandomTests/201412231629.json new file mode 100644 index 0000000000..0766e10c89 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231629.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x638a058c78639b13", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x638a058c78639b13", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x638a058c78639b13", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231630.json b/tests/files/VMTests/RandomTests/201412231630.json new file mode 100644 index 0000000000..67cf142294 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231630.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x41655674197220", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x41655674197220", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x41655674197220", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231631.json b/tests/files/VMTests/RandomTests/201412231631.json new file mode 100644 index 0000000000..11062c07e3 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231631.json @@ -0,0 +1,53 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6009316459a059", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9978", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0000000000000000000000000000000000000009" : { + "balance" : "0", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6009316459a059", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6009316459a059", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231632.json b/tests/files/VMTests/RandomTests/201412231632.json new file mode 100644 index 0000000000..93c1344b98 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231632.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x443318426c6f956f0b336e78383c4369", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9995", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x443318426c6f956f0b336e78383c4369", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x443318426c6f956f0b336e78383c4369", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231633.json b/tests/files/VMTests/RandomTests/201412231633.json new file mode 100644 index 0000000000..f014bd1e2d --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231633.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6473698a7f1340658e56", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6473698a7f1340658e56", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6473698a7f1340658e56", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231634.json b/tests/files/VMTests/RandomTests/201412231634.json new file mode 100644 index 0000000000..c7727700c8 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231634.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x65719aa3181753653597138b8e", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x65719aa3181753653597138b8e", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x65719aa3181753653597138b8e", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231635.json b/tests/files/VMTests/RandomTests/201412231635.json new file mode 100644 index 0000000000..c9c5212622 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231635.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x69798d6e9141115b131a6e6c1386", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x69798d6e9141115b131a6e6c1386", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x69798d6e9141115b131a6e6c1386", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231637.json b/tests/files/VMTests/RandomTests/201412231637.json new file mode 100644 index 0000000000..bdd16f0ff6 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231637.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x641378737e82670a328d789167", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x641378737e82670a328d789167", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x641378737e82670a328d789167", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231638.json b/tests/files/VMTests/RandomTests/201412231638.json new file mode 100644 index 0000000000..80b936ea64 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231638.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6045646b557c87", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6045646b557c87", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6045646b557c87", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231641.json b/tests/files/VMTests/RandomTests/201412231641.json new file mode 100644 index 0000000000..29e23a5137 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231641.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6272118c6d703a868015017b97162052", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6272118c6d703a868015017b97162052", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6272118c6d703a868015017b97162052", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231642.json b/tests/files/VMTests/RandomTests/201412231642.json new file mode 100644 index 0000000000..a09f74c74b --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231642.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6b19134596f284a0353360996b6939", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6b19134596f284a0353360996b6939", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6b19134596f284a0353360996b6939", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231646.json b/tests/files/VMTests/RandomTests/201412231646.json new file mode 100644 index 0000000000..071f396d5f --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231646.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x65951208a181326c767c9977396385", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x65951208a181326c767c9977396385", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x65951208a181326c767c9977396385", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231647.json b/tests/files/VMTests/RandomTests/201412231647.json new file mode 100644 index 0000000000..9abe830e29 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231647.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6a9f6ca23b118650a19f3a5167a0a459", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6a9f6ca23b118650a19f3a5167a0a459", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6a9f6ca23b118650a19f3a5167a0a459", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231648.json b/tests/files/VMTests/RandomTests/201412231648.json new file mode 100644 index 0000000000..0950d81113 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231648.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x403211545b6567326896", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9975", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x403211545b6567326896", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x403211545b6567326896", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231649.json b/tests/files/VMTests/RandomTests/201412231649.json new file mode 100644 index 0000000000..a5fd738f49 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231649.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x36586333a18e", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x36586333a18e", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x36586333a18e", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231650.json b/tests/files/VMTests/RandomTests/201412231650.json new file mode 100644 index 0000000000..9195dda7c3 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231650.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x698640897c149c02068770698888", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x698640897c149c02068770698888", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x698640897c149c02068770698888", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231652.json b/tests/files/VMTests/RandomTests/201412231652.json new file mode 100644 index 0000000000..1e0d270e08 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231652.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x66086c52a2970b6e658ff067", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x66086c52a2970b6e658ff067", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x66086c52a2970b6e658ff067", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231655.json b/tests/files/VMTests/RandomTests/201412231655.json new file mode 100644 index 0000000000..7cb1a645d4 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231655.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x33596a089c13547908f3ff8473", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x33596a089c13547908f3ff8473", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x33596a089c13547908f3ff8473", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231656.json b/tests/files/VMTests/RandomTests/201412231656.json new file mode 100644 index 0000000000..002adc177f --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231656.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x658a3a577683633433698e0b92325815", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9996", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x658a3a577683633433698e0b92325815", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x658a3a577683633433698e0b92325815", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231657.json b/tests/files/VMTests/RandomTests/201412231657.json new file mode 100644 index 0000000000..2c2d93ece6 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231657.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x677af1721211348a9669433c930b8493", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x677af1721211348a9669433c930b8493", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x677af1721211348a9669433c930b8493", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231700.json b/tests/files/VMTests/RandomTests/201412231700.json new file mode 100644 index 0000000000..d15f99283b --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231700.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x633c7060a16b38441a3a428f6f5a5680", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x633c7060a16b38441a3a428f6f5a5680", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x633c7060a16b38441a3a428f6f5a5680", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231706.json b/tests/files/VMTests/RandomTests/201412231706.json new file mode 100644 index 0000000000..19fd77e9f2 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231706.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6333557d6567168f658a", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6333557d6567168f658a", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6333557d6567168f658a", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231707.json b/tests/files/VMTests/RandomTests/201412231707.json new file mode 100644 index 0000000000..0dbe95db29 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231707.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x440b6b0716", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x440b6b0716", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231708.json b/tests/files/VMTests/RandomTests/201412231708.json new file mode 100644 index 0000000000..f2f44c9803 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231708.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x404342416670057b", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9995", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x404342416670057b", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x404342416670057b", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231711.json b/tests/files/VMTests/RandomTests/201412231711.json new file mode 100644 index 0000000000..086226a33b --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231711.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x64836b3c80336d72433566867b570b76", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x64836b3c80336d72433566867b570b76", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x64836b3c80336d72433566867b570b76", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231712.json b/tests/files/VMTests/RandomTests/201412231712.json new file mode 100644 index 0000000000..0e460d2555 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231712.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x334160506964656e099f950258", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9996", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x334160506964656e099f950258", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x334160506964656e099f950258", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231714.json b/tests/files/VMTests/RandomTests/201412231714.json new file mode 100644 index 0000000000..540d8aaec1 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231714.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x683a017b5334920742625a69588483", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x683a017b5334920742625a69588483", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x683a017b5334920742625a69588483", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231715.json b/tests/files/VMTests/RandomTests/201412231715.json new file mode 100644 index 0000000000..96662a2121 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231715.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x628f190b6276399b5440647c3b7136", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9976", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x628f190b6276399b5440647c3b7136", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x628f190b6276399b5440647c3b7136", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231717.json b/tests/files/VMTests/RandomTests/201412231717.json new file mode 100644 index 0000000000..46303f2e4c --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231717.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x609b6c3a715134389e7d40301aff", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x609b6c3a715134389e7d40301aff", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x609b6c3a715134389e7d40301aff", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231723.json b/tests/files/VMTests/RandomTests/201412231723.json new file mode 100644 index 0000000000..f00ef52395 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231723.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6911699262109b5982168768456836", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6911699262109b5982168768456836", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6911699262109b5982168768456836", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412231727.json b/tests/files/VMTests/RandomTests/201412231727.json new file mode 100644 index 0000000000..3a20f94fef --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412231727.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x66ff3c049d079833672059996fa1", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x66ff3c049d079833672059996fa1", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x66ff3c049d079833672059996fa1", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232225.json b/tests/files/VMTests/RandomTests/201412232225.json new file mode 100644 index 0000000000..610e96357b --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232225.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6431703c0aa36a6d9da05791", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6431703c0aa36a6d9da05791", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6431703c0aa36a6d9da05791", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232226.json b/tests/files/VMTests/RandomTests/201412232226.json new file mode 100644 index 0000000000..dd49687bdb --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232226.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x624314060b38", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x624314060b38", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232228.json b/tests/files/VMTests/RandomTests/201412232228.json new file mode 100644 index 0000000000..f310618c57 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232228.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6565877c6056136a7e670967", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6565877c6056136a7e670967", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6565877c6056136a7e670967", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232230.json b/tests/files/VMTests/RandomTests/201412232230.json new file mode 100644 index 0000000000..c692af1a30 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232230.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x458010546b909b3b42049d2012", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9976", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x458010546b909b3b42049d2012", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x458010546b909b3b42049d2012", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232231.json b/tests/files/VMTests/RandomTests/201412232231.json new file mode 100644 index 0000000000..a6f68ee386 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232231.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x621690786a6692556c510a8862107e", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x621690786a6692556c510a8862107e", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x621690786a6692556c510a8862107e", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232232.json b/tests/files/VMTests/RandomTests/201412232232.json new file mode 100644 index 0000000000..ced426ebf7 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232232.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x698d99f10970f07020ff825063619317", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x698d99f10970f07020ff825063619317", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x698d99f10970f07020ff825063619317", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232233.json b/tests/files/VMTests/RandomTests/201412232233.json new file mode 100644 index 0000000000..6f2685b554 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232233.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6341409a85368162177e", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9996", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6341409a85368162177e", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6341409a85368162177e", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232234.json b/tests/files/VMTests/RandomTests/201412232234.json new file mode 100644 index 0000000000..148480178e --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232234.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x4463190344", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4463190344", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4463190344", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232235.json b/tests/files/VMTests/RandomTests/201412232235.json new file mode 100644 index 0000000000..24e84b4f61 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232235.json @@ -0,0 +1,53 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x4031620143", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9978", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4031620143", + "nonce" : "0", + "storage" : { + } + }, + "c63e079ee08998b6045136a8ce6635c7912ec0b6" : { + "balance" : "0", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4031620143", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232236.json b/tests/files/VMTests/RandomTests/201412232236.json new file mode 100644 index 0000000000..bd8cf6a8d0 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232236.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x33698b6f60084314598655", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x33698b6f60084314598655", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x33698b6f60084314598655", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232237.json b/tests/files/VMTests/RandomTests/201412232237.json new file mode 100644 index 0000000000..7431224db6 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232237.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6615431505719a756a803a9b03", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6615431505719a756a803a9b03", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6615431505719a756a803a9b03", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232238.json b/tests/files/VMTests/RandomTests/201412232238.json new file mode 100644 index 0000000000..fe57fadc47 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232238.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x638f9f9b6c623412", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x638f9f9b6c623412", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x638f9f9b6c623412", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232239.json b/tests/files/VMTests/RandomTests/201412232239.json new file mode 100644 index 0000000000..6954e5552b --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232239.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x3266049b39391235", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x3266049b39391235", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x3266049b39391235", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232240.json b/tests/files/VMTests/RandomTests/201412232240.json new file mode 100644 index 0000000000..016007e5d6 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232240.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6354996306699a91179702", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6354996306699a91179702", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6354996306699a91179702", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232241.json b/tests/files/VMTests/RandomTests/201412232241.json new file mode 100644 index 0000000000..e06f002561 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232241.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6667703417606679651a6f8e", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6667703417606679651a6f8e", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6667703417606679651a6f8e", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232242.json b/tests/files/VMTests/RandomTests/201412232242.json new file mode 100644 index 0000000000..187beecc99 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232242.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x5a627678", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x5a627678", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x5a627678", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232243.json b/tests/files/VMTests/RandomTests/201412232243.json new file mode 100644 index 0000000000..9c4debb695 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232243.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x32681550a4907a8e7305", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x32681550a4907a8e7305", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x32681550a4907a8e7305", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232244.json b/tests/files/VMTests/RandomTests/201412232244.json new file mode 100644 index 0000000000..2221e2d098 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232244.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x32628c38", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x32628c38", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x32628c38", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232245.json b/tests/files/VMTests/RandomTests/201412232245.json new file mode 100644 index 0000000000..744d0c09be --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232245.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6b9371f376696fa17f15816789446e06", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6b9371f376696fa17f15816789446e06", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6b9371f376696fa17f15816789446e06", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232246.json b/tests/files/VMTests/RandomTests/201412232246.json new file mode 100644 index 0000000000..10570bd098 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232246.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x627fa209666832659b6612", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x627fa209666832659b6612", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x627fa209666832659b6612", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232247.json b/tests/files/VMTests/RandomTests/201412232247.json new file mode 100644 index 0000000000..5a4e4b8c8c --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232247.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x65647255418f7f644408", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x65647255418f7f644408", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x65647255418f7f644408", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232248.json b/tests/files/VMTests/RandomTests/201412232248.json new file mode 100644 index 0000000000..090cfd12b5 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232248.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6254938f669a177382456f", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6254938f669a177382456f", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6254938f669a177382456f", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232249.json b/tests/files/VMTests/RandomTests/201412232249.json new file mode 100644 index 0000000000..dae482455c --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232249.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x5868f00502361950688f", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x5868f00502361950688f", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x5868f00502361950688f", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232250.json b/tests/files/VMTests/RandomTests/201412232250.json new file mode 100644 index 0000000000..78ad035781 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232250.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x606262556d", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x606262556d", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x606262556d", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232252.json b/tests/files/VMTests/RandomTests/201412232252.json new file mode 100644 index 0000000000..6ec63467a0 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232252.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x626c6f0a63f08d", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x626c6f0a63f08d", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x626c6f0a63f08d", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232253.json b/tests/files/VMTests/RandomTests/201412232253.json new file mode 100644 index 0000000000..2af0327d5a --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232253.json @@ -0,0 +1,53 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6370199c7142383b4165196164", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9994", + "logs" : [ + ], + "out" : "0x", + "post" : { + "000000000000000000000000000000000000000d" : { + "balance" : "0", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6370199c7142383b4165196164", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6370199c7142383b4165196164", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232254.json b/tests/files/VMTests/RandomTests/201412232254.json new file mode 100644 index 0000000000..fd81675757 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232254.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x615833336c39a47d997244066a743740", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x615833336c39a47d997244066a743740", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x615833336c39a47d997244066a743740", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232255.json b/tests/files/VMTests/RandomTests/201412232255.json new file mode 100644 index 0000000000..afdb01d7f4 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232255.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x426c343b76548989536320300175", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x426c343b76548989536320300175", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x426c343b76548989536320300175", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232256.json b/tests/files/VMTests/RandomTests/201412232256.json new file mode 100644 index 0000000000..20ae3118b1 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232256.json @@ -0,0 +1,53 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x3a609a316439f38370", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9977", + "logs" : [ + ], + "out" : "0x", + "post" : { + "000000000000000000000000000000000000009a" : { + "balance" : "0", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x3a609a316439f38370", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x3a609a316439f38370", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232257.json b/tests/files/VMTests/RandomTests/201412232257.json new file mode 100644 index 0000000000..c55291821f --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232257.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x63818808146c71949e8430744411", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x63818808146c71949e8430744411", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x63818808146c71949e8430744411", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232258.json b/tests/files/VMTests/RandomTests/201412232258.json new file mode 100644 index 0000000000..446b11a8fb --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232258.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x336441839b081364091a9d03", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x336441839b081364091a9d03", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x336441839b081364091a9d03", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232300.json b/tests/files/VMTests/RandomTests/201412232300.json new file mode 100644 index 0000000000..777dfdee60 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232300.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x42336a98a03b816642831584", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x42336a98a03b816642831584", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x42336a98a03b816642831584", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232301.json b/tests/files/VMTests/RandomTests/201412232301.json new file mode 100644 index 0000000000..1904566d8f --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232301.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6a67189e8545a236998870a36d5792", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6a67189e8545a236998870a36d5792", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6a67189e8545a236998870a36d5792", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232303.json b/tests/files/VMTests/RandomTests/201412232303.json new file mode 100644 index 0000000000..950cbdb9e3 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232303.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x669937456d60798d6b019b17f09a", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x669937456d60798d6b019b17f09a", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x669937456d60798d6b019b17f09a", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232304.json b/tests/files/VMTests/RandomTests/201412232304.json new file mode 100644 index 0000000000..ca840ed47e --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232304.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x61191965ff3b07f0", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x61191965ff3b07f0", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x61191965ff3b07f0", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232305.json b/tests/files/VMTests/RandomTests/201412232305.json new file mode 100644 index 0000000000..a18a42c3e5 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232305.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x38156d0978a30b33655113a245588992", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x38156d0978a30b33655113a245588992", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x38156d0978a30b33655113a245588992", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232306.json b/tests/files/VMTests/RandomTests/201412232306.json new file mode 100644 index 0000000000..b565d84c0d --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232306.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x3a660739441536366e548167797b9e", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9976", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x3a660739441536366e548167797b9e", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x3a660739441536366e548167797b9e", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232307.json b/tests/files/VMTests/RandomTests/201412232307.json new file mode 100644 index 0000000000..12ceb63e40 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232307.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x3a596596315259", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x3a596596315259", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x3a596596315259", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232308.json b/tests/files/VMTests/RandomTests/201412232308.json new file mode 100644 index 0000000000..7e6a515110 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232308.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x68747b45999d950a1369688e6f6e", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x68747b45999d950a1369688e6f6e", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x68747b45999d950a1369688e6f6e", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232309.json b/tests/files/VMTests/RandomTests/201412232309.json new file mode 100644 index 0000000000..5dbbe3376b --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232309.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x5b6bf07aa4813b1389f0207e14", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x5b6bf07aa4813b1389f0207e14", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x5b6bf07aa4813b1389f0207e14", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232311.json b/tests/files/VMTests/RandomTests/201412232311.json new file mode 100644 index 0000000000..4e2cca5dce --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232311.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x3659608b0452638303", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9993", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x3659608b0452638303", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x3659608b0452638303", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232312.json b/tests/files/VMTests/RandomTests/201412232312.json new file mode 100644 index 0000000000..d70461cfd6 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232312.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x5a0b73807b793b", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x5a0b73807b793b", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232313.json b/tests/files/VMTests/RandomTests/201412232313.json new file mode 100644 index 0000000000..19ee3e8b95 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232313.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x610b89336c956951a03597619d8801", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x610b89336c956951a03597619d8801", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x610b89336c956951a03597619d8801", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232314.json b/tests/files/VMTests/RandomTests/201412232314.json new file mode 100644 index 0000000000..ac7c63297f --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232314.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6244169d620b9e93690770", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6244169d620b9e93690770", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6244169d620b9e93690770", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232317.json b/tests/files/VMTests/RandomTests/201412232317.json new file mode 100644 index 0000000000..b16ef5077f --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232317.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x3854627693", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9978", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x3854627693", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x3854627693", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232318.json b/tests/files/VMTests/RandomTests/201412232318.json new file mode 100644 index 0000000000..9c227c2a6d --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232318.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x596b6e19676c0237f0a47f7b39", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x596b6e19676c0237f0a47f7b39", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x596b6e19676c0237f0a47f7b39", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232319.json b/tests/files/VMTests/RandomTests/201412232319.json new file mode 100644 index 0000000000..53837b6413 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232319.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x69853b20959c5af0838d3842663250", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x69853b20959c5af0838d3842663250", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x69853b20959c5af0838d3842663250", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232320.json b/tests/files/VMTests/RandomTests/201412232320.json new file mode 100644 index 0000000000..87e41146f9 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232320.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x69637511458a923a99425b68993b6169", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x69637511458a923a99425b68993b6169", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x69637511458a923a99425b68993b6169", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232321.json b/tests/files/VMTests/RandomTests/201412232321.json new file mode 100644 index 0000000000..b415205d66 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232321.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x3a0b7176", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x3a0b7176", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232323.json b/tests/files/VMTests/RandomTests/201412232323.json new file mode 100644 index 0000000000..e089db9369 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232323.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x653c8a5591898e6d3b4364806d023714", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x653c8a5591898e6d3b4364806d023714", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x653c8a5591898e6d3b4364806d023714", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232324.json b/tests/files/VMTests/RandomTests/201412232324.json new file mode 100644 index 0000000000..29852711f5 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232324.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x64f187a10b95667b5a6a", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x64f187a10b95667b5a6a", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x64f187a10b95667b5a6a", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232327.json b/tests/files/VMTests/RandomTests/201412232327.json new file mode 100644 index 0000000000..f6ea120fb5 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232327.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x5b306a91608b949b07349c8951", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x5b306a91608b949b07349c8951", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x5b306a91608b949b07349c8951", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232328.json b/tests/files/VMTests/RandomTests/201412232328.json new file mode 100644 index 0000000000..b5ed168d00 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232328.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x606c456e74418b673c39335159456af3", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x606c456e74418b673c39335159456af3", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x606c456e74418b673c39335159456af3", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232330.json b/tests/files/VMTests/RandomTests/201412232330.json new file mode 100644 index 0000000000..c260f35ec1 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232330.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x583830696d6d4398a35b86608e", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9996", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x583830696d6d4398a35b86608e", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x583830696d6d4398a35b86608e", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232331.json b/tests/files/VMTests/RandomTests/201412232331.json new file mode 100644 index 0000000000..ec4f5cf324 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232331.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x65635a9840643b6b6b30970536659786", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x65635a9840643b6b6b30970536659786", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x65635a9840643b6b6b30970536659786", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232335.json b/tests/files/VMTests/RandomTests/201412232335.json new file mode 100644 index 0000000000..e9894c621f --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232335.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x67f1821654409b73036481f36613", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x67f1821654409b73036481f36613", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x67f1821654409b73036481f36613", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232336.json b/tests/files/VMTests/RandomTests/201412232336.json new file mode 100644 index 0000000000..6fd26bc5c7 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232336.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6a675a67316d869b93758b916191", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6a675a67316d869b93758b916191", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6a675a67316d869b93758b916191", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232338.json b/tests/files/VMTests/RandomTests/201412232338.json new file mode 100644 index 0000000000..07a4c3489a --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232338.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x636664690267a085518b8f7986", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x636664690267a085518b8f7986", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x636664690267a085518b8f7986", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232341.json b/tests/files/VMTests/RandomTests/201412232341.json new file mode 100644 index 0000000000..4979c02852 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232341.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x406d1732976170a436736f206104f1", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x406d1732976170a436736f206104f1", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x406d1732976170a436736f206104f1", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232342.json b/tests/files/VMTests/RandomTests/201412232342.json new file mode 100644 index 0000000000..23122711dd --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232342.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x656b439a6e830b44106b43745411", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9996", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x656b439a6e830b44106b43745411", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x656b439a6e830b44106b43745411", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232343.json b/tests/files/VMTests/RandomTests/201412232343.json new file mode 100644 index 0000000000..22f293187c --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232343.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x3264633c34545265f0a267916d", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x3264633c34545265f0a267916d", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x3264633c34545265f0a267916d", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232345.json b/tests/files/VMTests/RandomTests/201412232345.json new file mode 100644 index 0000000000..0a7ca313f3 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232345.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x33505b6b3240458e869237774370", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9996", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x33505b6b3240458e869237774370", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x33505b6b3240458e869237774370", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232348.json b/tests/files/VMTests/RandomTests/201412232348.json new file mode 100644 index 0000000000..6a630a206e --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232348.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x400b40ff", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x400b40ff", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232349.json b/tests/files/VMTests/RandomTests/201412232349.json new file mode 100644 index 0000000000..5abc60d571 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232349.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x621a8e7a698d209a9457993831f2", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x621a8e7a698d209a9457993831f2", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x621a8e7a698d209a9457993831f2", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232351.json b/tests/files/VMTests/RandomTests/201412232351.json new file mode 100644 index 0000000000..c42707c041 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232351.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x5b6c11303b937a750885a06d8bf1", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x5b6c11303b937a750885a06d8bf1", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x5b6c11303b937a750885a06d8bf1", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232352.json b/tests/files/VMTests/RandomTests/201412232352.json new file mode 100644 index 0000000000..c91bab832b --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232352.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x410b", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x410b", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232353.json b/tests/files/VMTests/RandomTests/201412232353.json new file mode 100644 index 0000000000..2ddd8bb0e5 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232353.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x63338b4367805a6d7691519d403c506b", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9996", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x63338b4367805a6d7691519d403c506b", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x63338b4367805a6d7691519d403c506b", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232354.json b/tests/files/VMTests/RandomTests/201412232354.json new file mode 100644 index 0000000000..2e3332259d --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232354.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x66895a35159e1242695377", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x66895a35159e1242695377", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x66895a35159e1242695377", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232355.json b/tests/files/VMTests/RandomTests/201412232355.json new file mode 100644 index 0000000000..b7951de1e3 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232355.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x62868d685967a159076a39", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x62868d685967a159076a39", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x62868d685967a159076a39", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232356.json b/tests/files/VMTests/RandomTests/201412232356.json new file mode 100644 index 0000000000..23f796d25a --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232356.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x306ef08b8f387255096581203a6e3b5a", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x306ef08b8f387255096581203a6e3b5a", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x306ef08b8f387255096581203a6e3b5a", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232357.json b/tests/files/VMTests/RandomTests/201412232357.json new file mode 100644 index 0000000000..51a5588855 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232357.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x4563154564", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4563154564", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4563154564", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232358.json b/tests/files/VMTests/RandomTests/201412232358.json new file mode 100644 index 0000000000..346a08a81f --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232358.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x607467780a35a43c9b1a", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x607467780a35a43c9b1a", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x607467780a35a43c9b1a", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412232359.json b/tests/files/VMTests/RandomTests/201412232359.json new file mode 100644 index 0000000000..3a51d6cd81 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412232359.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x63777703320b6d86f352", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x63777703320b6d86f352", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240001.json b/tests/files/VMTests/RandomTests/201412240001.json new file mode 100644 index 0000000000..4fc212c6c0 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240001.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x4463446c3172666c318655", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4463446c3172666c318655", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4463446c3172666c318655", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240002.json b/tests/files/VMTests/RandomTests/201412240002.json new file mode 100644 index 0000000000..7e65c1ee3e --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240002.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x42657d6e3b593c", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x42657d6e3b593c", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x42657d6e3b593c", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240004.json b/tests/files/VMTests/RandomTests/201412240004.json new file mode 100644 index 0000000000..47b38fd28c --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240004.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6153030b7b", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6153030b7b", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240005.json b/tests/files/VMTests/RandomTests/201412240005.json new file mode 100644 index 0000000000..e387cce6b2 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240005.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x5b6cf234675b5162730291176e01", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x5b6cf234675b5162730291176e01", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x5b6cf234675b5162730291176e01", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240006.json b/tests/files/VMTests/RandomTests/201412240006.json new file mode 100644 index 0000000000..aecb337baf --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240006.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x61864162457c", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x61864162457c", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x61864162457c", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240007.json b/tests/files/VMTests/RandomTests/201412240007.json new file mode 100644 index 0000000000..85f6ace5eb --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240007.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6692a19ea30aa17e6a7b6351418c8e", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6692a19ea30aa17e6a7b6351418c8e", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6692a19ea30aa17e6a7b6351418c8e", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240010.json b/tests/files/VMTests/RandomTests/201412240010.json new file mode 100644 index 0000000000..add2acbeef --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240010.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x583066060b85637c8e", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x583066060b85637c8e", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x583066060b85637c8e", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240011.json b/tests/files/VMTests/RandomTests/201412240011.json new file mode 100644 index 0000000000..1b4d8c88b2 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240011.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x3836643095353652676d", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9996", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x3836643095353652676d", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x3836643095353652676d", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240012.json b/tests/files/VMTests/RandomTests/201412240012.json new file mode 100644 index 0000000000..0469b08eaa --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240012.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6780a4019a829659446653510185f2", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6780a4019a829659446653510185f2", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6780a4019a829659446653510185f2", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240013.json b/tests/files/VMTests/RandomTests/201412240013.json new file mode 100644 index 0000000000..249196e8d0 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240013.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x657da3560988606b777a77128f12", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x657da3560988606b777a77128f12", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x657da3560988606b777a77128f12", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240014.json b/tests/files/VMTests/RandomTests/201412240014.json new file mode 100644 index 0000000000..c95992dcfb --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240014.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x637a809755695692921272116d9d8b", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x637a809755695692921272116d9d8b", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x637a809755695692921272116d9d8b", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240015.json b/tests/files/VMTests/RandomTests/201412240015.json new file mode 100644 index 0000000000..0443ae12f5 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240015.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x596a6fa050678e6491885a95", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x596a6fa050678e6491885a95", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x596a6fa050678e6491885a95", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240016.json b/tests/files/VMTests/RandomTests/201412240016.json new file mode 100644 index 0000000000..63534bf530 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240016.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x40406c30114210346a1a9b30721292", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x40406c30114210346a1a9b30721292", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x40406c30114210346a1a9b30721292", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240017.json b/tests/files/VMTests/RandomTests/201412240017.json new file mode 100644 index 0000000000..bc97885436 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240017.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x648610a31a9d6330", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x648610a31a9d6330", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x648610a31a9d6330", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240019.json b/tests/files/VMTests/RandomTests/201412240019.json new file mode 100644 index 0000000000..b9e91d6b59 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240019.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x636f93019840326887a4108f52", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9996", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x636f93019840326887a4108f52", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x636f93019840326887a4108f52", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240020.json b/tests/files/VMTests/RandomTests/201412240020.json new file mode 100644 index 0000000000..469541b726 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240020.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x608268357e7d3308836d40", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x608268357e7d3308836d40", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x608268357e7d3308836d40", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240021.json b/tests/files/VMTests/RandomTests/201412240021.json new file mode 100644 index 0000000000..f336bd0c6e --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240021.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x44506276", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x44506276", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x44506276", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240022.json b/tests/files/VMTests/RandomTests/201412240022.json new file mode 100644 index 0000000000..34040d50b4 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240022.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x386a78800a30078e3132a207", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x386a78800a30078e3132a207", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x386a78800a30078e3132a207", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240023.json b/tests/files/VMTests/RandomTests/201412240023.json new file mode 100644 index 0000000000..59ebb5276a --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240023.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x66587a629c69345a5465f1984532", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9978", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x66587a629c69345a5465f1984532", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x66587a629c69345a5465f1984532", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240024.json b/tests/files/VMTests/RandomTests/201412240024.json new file mode 100644 index 0000000000..8a38487146 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240024.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x59649368198f", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x59649368198f", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x59649368198f", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240025.json b/tests/files/VMTests/RandomTests/201412240025.json new file mode 100644 index 0000000000..224784e079 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240025.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x5a64428f1789666655f0", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x5a64428f1789666655f0", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x5a64428f1789666655f0", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240026.json b/tests/files/VMTests/RandomTests/201412240026.json new file mode 100644 index 0000000000..e3591cc051 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240026.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x676a16558b78588c886471", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x676a16558b78588c886471", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x676a16558b78588c886471", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240028.json b/tests/files/VMTests/RandomTests/201412240028.json new file mode 100644 index 0000000000..1289b31894 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240028.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x689c098116ff14a4f1136c74379b", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x689c098116ff14a4f1136c74379b", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x689c098116ff14a4f1136c74379b", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240030.json b/tests/files/VMTests/RandomTests/201412240030.json new file mode 100644 index 0000000000..ea21a15a13 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240030.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x607e0b336d18533463", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x607e0b336d18533463", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240031.json b/tests/files/VMTests/RandomTests/201412240031.json new file mode 100644 index 0000000000..a59e7139a8 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240031.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6558838b0404595a1634676d", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9995", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6558838b0404595a1634676d", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6558838b0404595a1634676d", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240032.json b/tests/files/VMTests/RandomTests/201412240032.json new file mode 100644 index 0000000000..4f2ed42537 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240032.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x330b6b73", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x330b6b73", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240034.json b/tests/files/VMTests/RandomTests/201412240034.json new file mode 100644 index 0000000000..0dc11d5622 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240034.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x4535416b597c9e0415a4320a9f44", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9996", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4535416b597c9e0415a4320a9f44", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4535416b597c9e0415a4320a9f44", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240035.json b/tests/files/VMTests/RandomTests/201412240035.json new file mode 100644 index 0000000000..b1cdfaf49c --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240035.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6698173681448d7b5b0b", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6698173681448d7b5b0b", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240037.json b/tests/files/VMTests/RandomTests/201412240037.json new file mode 100644 index 0000000000..12a0c50176 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240037.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x659859849f9859681945", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x659859849f9859681945", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x659859849f9859681945", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240039.json b/tests/files/VMTests/RandomTests/201412240039.json new file mode 100644 index 0000000000..949caeafd8 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240039.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x63316053033569836a065a", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x63316053033569836a065a", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x63316053033569836a065a", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240040.json b/tests/files/VMTests/RandomTests/201412240040.json new file mode 100644 index 0000000000..098b397f98 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240040.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x66459e3511a39d1466868b1a7e5b", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x66459e3511a39d1466868b1a7e5b", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x66459e3511a39d1466868b1a7e5b", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240041.json b/tests/files/VMTests/RandomTests/201412240041.json new file mode 100644 index 0000000000..b4214c4ff1 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240041.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x638536ff74683a076f7d648e5261", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x638536ff74683a076f7d648e5261", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x638536ff74683a076f7d648e5261", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240042.json b/tests/files/VMTests/RandomTests/201412240042.json new file mode 100644 index 0000000000..7a7711682f --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240042.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x626f8a571965155943", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x626f8a571965155943", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x626f8a571965155943", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240044.json b/tests/files/VMTests/RandomTests/201412240044.json new file mode 100644 index 0000000000..fbb10dd942 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240044.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x4569761168a085ff08527b", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4569761168a085ff08527b", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4569761168a085ff08527b", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240045.json b/tests/files/VMTests/RandomTests/201412240045.json new file mode 100644 index 0000000000..2c19c86675 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240045.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x440b7d521009763c", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x440b7d521009763c", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240047.json b/tests/files/VMTests/RandomTests/201412240047.json new file mode 100644 index 0000000000..93210a7126 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240047.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x66350780181278f3675a5564a4a03b8d", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x66350780181278f3675a5564a4a03b8d", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x66350780181278f3675a5564a4a03b8d", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240051.json b/tests/files/VMTests/RandomTests/201412240051.json new file mode 100644 index 0000000000..df5777d587 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240051.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x34687b343b1679186e09", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x34687b343b1679186e09", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x34687b343b1679186e09", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240052.json b/tests/files/VMTests/RandomTests/201412240052.json new file mode 100644 index 0000000000..1b2dac5d6e --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240052.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x646e303b8f516b62715952a08143", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x646e303b8f516b62715952a08143", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x646e303b8f516b62715952a08143", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240053.json b/tests/files/VMTests/RandomTests/201412240053.json new file mode 100644 index 0000000000..3bf5674f3b --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240053.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x43665a1935346e75", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x43665a1935346e75", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x43665a1935346e75", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240054.json b/tests/files/VMTests/RandomTests/201412240054.json new file mode 100644 index 0000000000..d3d79807b8 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240054.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x62417cf166f27f169737789a6c9c0b", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x62417cf166f27f169737789a6c9c0b", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x62417cf166f27f169737789a6c9c0b", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240055.json b/tests/files/VMTests/RandomTests/201412240055.json new file mode 100644 index 0000000000..23101221b9 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240055.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x659f32357bf28c306b459d9395068a", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x659f32357bf28c306b459d9395068a", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x659f32357bf28c306b459d9395068a", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240056.json b/tests/files/VMTests/RandomTests/201412240056.json new file mode 100644 index 0000000000..16703dd22e --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240056.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x3067309a427d917340", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x3067309a427d917340", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x3067309a427d917340", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240058.json b/tests/files/VMTests/RandomTests/201412240058.json new file mode 100644 index 0000000000..e503a12010 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240058.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x446a509893399956357f397c", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x446a509893399956357f397c", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x446a509893399956357f397c", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240059.json b/tests/files/VMTests/RandomTests/201412240059.json new file mode 100644 index 0000000000..dc87049050 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240059.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x651994649651940b", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x651994649651940b", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240100.json b/tests/files/VMTests/RandomTests/201412240100.json new file mode 100644 index 0000000000..cf7080e616 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240100.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6875f1151657436c6b9c690162", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6875f1151657436c6b9c690162", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6875f1151657436c6b9c690162", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240101.json b/tests/files/VMTests/RandomTests/201412240101.json new file mode 100644 index 0000000000..121d7d20c6 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240101.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x689863403864640984ff6612046552", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x689863403864640984ff6612046552", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x689863403864640984ff6612046552", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240103.json b/tests/files/VMTests/RandomTests/201412240103.json new file mode 100644 index 0000000000..48ed88b8d0 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240103.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x646b6272f1386837a175019344", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x646b6272f1386837a175019344", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x646b6272f1386837a175019344", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240104.json b/tests/files/VMTests/RandomTests/201412240104.json new file mode 100644 index 0000000000..51ae819e0f --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240104.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x5b64808c6c94", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x5b64808c6c94", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x5b64808c6c94", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240105.json b/tests/files/VMTests/RandomTests/201412240105.json new file mode 100644 index 0000000000..1efb2ca7bf --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240105.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x30368013638a7e613350675b0b6552", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9993", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x30368013638a7e613350675b0b6552", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x30368013638a7e613350675b0b6552", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240106.json b/tests/files/VMTests/RandomTests/201412240106.json new file mode 100644 index 0000000000..a4625e3a3c --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240106.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6aa0148488059a767a88828d6752", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6aa0148488059a767a88828d6752", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6aa0148488059a767a88828d6752", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240107.json b/tests/files/VMTests/RandomTests/201412240107.json new file mode 100644 index 0000000000..cd84f56b05 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240107.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6b50533490793104f2923c68126858", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6b50533490793104f2923c68126858", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6b50533490793104f2923c68126858", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240110.json b/tests/files/VMTests/RandomTests/201412240110.json new file mode 100644 index 0000000000..d817941a39 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240110.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x44697507709b52f0835389", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x44697507709b52f0835389", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x44697507709b52f0835389", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240111.json b/tests/files/VMTests/RandomTests/201412240111.json new file mode 100644 index 0000000000..0e5d2061ec --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240111.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x306e5af3368764706e1985938b928711", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x306e5af3368764706e1985938b928711", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x306e5af3368764706e1985938b928711", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240112.json b/tests/files/VMTests/RandomTests/201412240112.json new file mode 100644 index 0000000000..bc76f4449c --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240112.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6991a114026998746040f26c40536c", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6991a114026998746040f26c40536c", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6991a114026998746040f26c40536c", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240113.json b/tests/files/VMTests/RandomTests/201412240113.json new file mode 100644 index 0000000000..224e2279a9 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240113.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x34684076f38370533393", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x34684076f38370533393", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x34684076f38370533393", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240115.json b/tests/files/VMTests/RandomTests/201412240115.json new file mode 100644 index 0000000000..c23b358080 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240115.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x34336a630542a1f34074139f90", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x34336a630542a1f34074139f90", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x34336a630542a1f34074139f90", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240116.json b/tests/files/VMTests/RandomTests/201412240116.json new file mode 100644 index 0000000000..d6e9dcad98 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240116.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x416b77018c6a3b6085418f6a3a", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x416b77018c6a3b6085418f6a3a", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x416b77018c6a3b6085418f6a3a", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240117.json b/tests/files/VMTests/RandomTests/201412240117.json new file mode 100644 index 0000000000..c91bab832b --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240117.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x410b", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x410b", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240119.json b/tests/files/VMTests/RandomTests/201412240119.json new file mode 100644 index 0000000000..5628640206 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240119.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x633207887d65508510", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x633207887d65508510", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x633207887d65508510", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240120.json b/tests/files/VMTests/RandomTests/201412240120.json new file mode 100644 index 0000000000..d9bd81435e --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240120.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x59156d8e8866166a03526fa040670296", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x59156d8e8866166a03526fa040670296", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x59156d8e8866166a03526fa040670296", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240121.json b/tests/files/VMTests/RandomTests/201412240121.json new file mode 100644 index 0000000000..95faf8f007 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240121.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x58455a13326590", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9994", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x58455a13326590", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x58455a13326590", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240122.json b/tests/files/VMTests/RandomTests/201412240122.json new file mode 100644 index 0000000000..6ccd3a9ae3 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240122.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x659a573a376ef262059e590a4364a471", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9989", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x659a573a376ef262059e590a4364a471", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x659a573a376ef262059e590a4364a471", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240123.json b/tests/files/VMTests/RandomTests/201412240123.json new file mode 100644 index 0000000000..9ddf2dffaa --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240123.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x659e394455318d66389b386c", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x659e394455318d66389b386c", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x659e394455318d66389b386c", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240124.json b/tests/files/VMTests/RandomTests/201412240124.json new file mode 100644 index 0000000000..a29e0c49e9 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240124.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x440b7967049a94453c8d8077a16769", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x440b7967049a94453c8d8077a16769", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240125.json b/tests/files/VMTests/RandomTests/201412240125.json new file mode 100644 index 0000000000..1b71caa619 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240125.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x627642376c8d87185a5406328950840a", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x627642376c8d87185a5406328950840a", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x627642376c8d87185a5406328950840a", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240126.json b/tests/files/VMTests/RandomTests/201412240126.json new file mode 100644 index 0000000000..fe4e1f7512 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240126.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x386d5bf08365179b18898f58559776", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x386d5bf08365179b18898f58559776", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x386d5bf08365179b18898f58559776", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240127.json b/tests/files/VMTests/RandomTests/201412240127.json new file mode 100644 index 0000000000..61f14cda70 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240127.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x34677d137f571a8450", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x34677d137f571a8450", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x34677d137f571a8450", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240128.json b/tests/files/VMTests/RandomTests/201412240128.json new file mode 100644 index 0000000000..2807e44209 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240128.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x44625056", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x44625056", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x44625056", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240129.json b/tests/files/VMTests/RandomTests/201412240129.json new file mode 100644 index 0000000000..eb993999e6 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240129.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x69388e2091a41aa4417055697442", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x69388e2091a41aa4417055697442", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x69388e2091a41aa4417055697442", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240130.json b/tests/files/VMTests/RandomTests/201412240130.json new file mode 100644 index 0000000000..df14911a98 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240130.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6991949e36033412978f906513890653", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6991949e36033412978f906513890653", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6991949e36033412978f906513890653", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240131.json b/tests/files/VMTests/RandomTests/201412240131.json new file mode 100644 index 0000000000..1d393795b9 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240131.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60550b7a689d617c666b113573140a", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60550b7a689d617c666b113573140a", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240132.json b/tests/files/VMTests/RandomTests/201412240132.json new file mode 100644 index 0000000000..996cceb38c --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240132.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x4030687074850654657477", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4030687074850654657477", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4030687074850654657477", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240133.json b/tests/files/VMTests/RandomTests/201412240133.json new file mode 100644 index 0000000000..2ed09c3087 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240133.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x664011374176203b65036770", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x664011374176203b65036770", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x664011374176203b65036770", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240134.json b/tests/files/VMTests/RandomTests/201412240134.json new file mode 100644 index 0000000000..1b95fc3566 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240134.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x63336f042068628d417f7966", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x63336f042068628d417f7966", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x63336f042068628d417f7966", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240136.json b/tests/files/VMTests/RandomTests/201412240136.json new file mode 100644 index 0000000000..1711a25184 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240136.json @@ -0,0 +1,31 @@ +{ + "randomVMtest" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6698059a329a72900b", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6698059a329a72900b", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240137.json b/tests/files/VMTests/RandomTests/201412240137.json new file mode 100644 index 0000000000..b712123638 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240137.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x32430268f380158b93517e", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9996", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x32430268f380158b93517e", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x32430268f380158b93517e", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240138.json b/tests/files/VMTests/RandomTests/201412240138.json new file mode 100644 index 0000000000..13ee5245a0 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240138.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x586738973b57f26b95", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x586738973b57f26b95", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x586738973b57f26b95", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240139.json b/tests/files/VMTests/RandomTests/201412240139.json new file mode 100644 index 0000000000..ef5719cc28 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240139.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6018646d166ca3", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6018646d166ca3", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6018646d166ca3", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240140.json b/tests/files/VMTests/RandomTests/201412240140.json new file mode 100644 index 0000000000..50af4ddb5a --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240140.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x4542687b369e528b4479", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4542687b369e528b4479", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x4542687b369e528b4479", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240141.json b/tests/files/VMTests/RandomTests/201412240141.json new file mode 100644 index 0000000000..d30c379a94 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240141.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x3a663bf314860414", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x3a663bf314860414", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x3a663bf314860414", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240142.json b/tests/files/VMTests/RandomTests/201412240142.json new file mode 100644 index 0000000000..f0d652a41e --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240142.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x426d16f1420890106a6164558c7551", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x426d16f1420890106a6164558c7551", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x426d16f1420890106a6164558c7551", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240148.json b/tests/files/VMTests/RandomTests/201412240148.json new file mode 100644 index 0000000000..04ab40ea8f --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240148.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x666e3994068640536445710b", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x666e3994068640536445710b", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x666e3994068640536445710b", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240149.json b/tests/files/VMTests/RandomTests/201412240149.json new file mode 100644 index 0000000000..6b6006f78e --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240149.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x446c7e94116bf2168107398b1639", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x446c7e94116bf2168107398b1639", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x446c7e94116bf2168107398b1639", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240150.json b/tests/files/VMTests/RandomTests/201412240150.json new file mode 100644 index 0000000000..d098717123 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240150.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x66516185a4ff78406d90057a819345", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x66516185a4ff78406d90057a819345", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x66516185a4ff78406d90057a819345", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240151.json b/tests/files/VMTests/RandomTests/201412240151.json new file mode 100644 index 0000000000..610739e5c0 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240151.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6b6d8f998e8d739789868365766e408b", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6b6d8f998e8d739789868365766e408b", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6b6d8f998e8d739789868365766e408b", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240152.json b/tests/files/VMTests/RandomTests/201412240152.json new file mode 100644 index 0000000000..bb2942d65b --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240152.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x63076f9d3866a17f41958939", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x63076f9d3866a17f41958939", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x63076f9d3866a17f41958939", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240153.json b/tests/files/VMTests/RandomTests/201412240153.json new file mode 100644 index 0000000000..b773adc8ed --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240153.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x40617b3c1668929167f3", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9996", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x40617b3c1668929167f3", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x40617b3c1668929167f3", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240154.json b/tests/files/VMTests/RandomTests/201412240154.json new file mode 100644 index 0000000000..f22abf009c --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240154.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x65a4f29b9d028b66959158", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x65a4f29b9d028b66959158", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x65a4f29b9d028b66959158", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240155.json b/tests/files/VMTests/RandomTests/201412240155.json new file mode 100644 index 0000000000..c616e6e132 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240155.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x426b8d795802900176423a7a63", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x426b8d795802900176423a7a63", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x426b8d795802900176423a7a63", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240156.json b/tests/files/VMTests/RandomTests/201412240156.json new file mode 100644 index 0000000000..e5d7d42bc5 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240156.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x595a65173745917f", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x595a65173745917f", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x595a65173745917f", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240157.json b/tests/files/VMTests/RandomTests/201412240157.json new file mode 100644 index 0000000000..9760e6fae8 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240157.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x699e52966c9a9175f17d1067813859", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x699e52966c9a9175f17d1067813859", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x699e52966c9a9175f17d1067813859", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240158.json b/tests/files/VMTests/RandomTests/201412240158.json new file mode 100644 index 0000000000..dbcb6e1e3b --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240158.json @@ -0,0 +1,53 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x677e6e5841a45096a215316a1601", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9977", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0000000000000000000000000000000000000000" : { + "balance" : "0", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x677e6e5841a45096a215316a1601", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x677e6e5841a45096a215316a1601", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240159.json b/tests/files/VMTests/RandomTests/201412240159.json new file mode 100644 index 0000000000..99c475b29b --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240159.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x68919c56988603750974666d6b098e5a", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x68919c56988603750974666d6b098e5a", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x68919c56988603750974666d6b098e5a", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240201.json b/tests/files/VMTests/RandomTests/201412240201.json new file mode 100644 index 0000000000..f9b8c54396 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240201.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x343569541588518d719563f3", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x343569541588518d719563f3", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x343569541588518d719563f3", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240202.json b/tests/files/VMTests/RandomTests/201412240202.json new file mode 100644 index 0000000000..aff74db9e6 --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240202.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x6292797167197b1205344281", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9998", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6292797167197b1205344281", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x6292797167197b1205344281", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/VMTests/RandomTests/201412240204.json b/tests/files/VMTests/RandomTests/201412240204.json new file mode 100644 index 0000000000..27ae65712b --- /dev/null +++ b/tests/files/VMTests/RandomTests/201412240204.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x65878e80f142515a65159511", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9997", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x65878e80f142515a65159511", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x65878e80f142515a65159511", + "nonce" : "0", + "storage" : { + } + } + } + } +} diff --git a/tests/files/index.js b/tests/files/index.js index 34a03d8b2b..99c19aa132 100644 --- a/tests/files/index.js +++ b/tests/files/index.js @@ -4,8 +4,11 @@ module.exports = { hexencode: require('./BasicTests/hexencodetest'), keyaddrtests: require('./BasicTests/keyaddrtest'), rlptest: require('./BasicTests/rlptest'), - trietest: require('./TrieTests/trietest'), - trietestnextprev: require('./TrieTests/trietestnextprev'), + trieTests: { + trietest: require('./TrieTests/trietest'), + trietestnextprev: require('./TrieTests/trietestnextprev'), + trieanyorder: require('./TrieTests/trieanyorder') + }, txtest: require('./BasicTests/txtest'), StateTests: { stExample: require('./StateTests/stExample.json'), @@ -13,6 +16,7 @@ module.exports = { stLogTests: require('./StateTests/stLogTests.json'), stPreCompiledContracts: require('./StateTests/stPreCompiledContracts'), stRecursiveCreate: require('./StateTests/stRecursiveCreate'), + stRefundTest: require('./StateTests/stRefundTest'), stSpecial: require('./StateTests/stSpecialTest'), stSystemOperationsTest: require('./StateTests/stSystemOperationsTest'), stTransactionTest: require('./StateTests/stTransactionTest') From 138ab26b8c29db00022fb6afbca153f3c1928d00 Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 30 Dec 2014 17:09:43 +0100 Subject: [PATCH 047/132] SIGNEXTEND missing from stack check --- vm/vm_debug.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/vm_debug.go b/vm/vm_debug.go index 2ee13c516f..a4e97ad488 100644 --- a/vm/vm_debug.go +++ b/vm/vm_debug.go @@ -140,7 +140,7 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * // Stack checks only case ISZERO, CALLDATALOAD, POP, JUMP, NOT: // 1 require(1) - case ADD, SUB, DIV, SDIV, MOD, SMOD, LT, GT, SLT, SGT, EQ, AND, OR, XOR, BYTE: // 2 + case ADD, SUB, DIV, SDIV, MOD, SMOD, LT, GT, SLT, SGT, EQ, AND, OR, XOR, BYTE, SIGNEXTEND: // 2 require(2) case ADDMOD, MULMOD: // 3 require(3) From 89244981a8a9f190a6afc74ec2c584692f04dcdd Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 30 Dec 2014 17:09:54 +0100 Subject: [PATCH 048/132] Additional checking on gas --- cmd/ethtest/main.go | 11 +++-- .../files/VMTests/RandomTests/randomTest.json | 46 ------------------- 2 files changed, 8 insertions(+), 49 deletions(-) delete mode 100644 tests/files/VMTests/RandomTests/randomTest.json diff --git a/cmd/ethtest/main.go b/cmd/ethtest/main.go index 94ab779dba..96ef94e401 100644 --- a/cmd/ethtest/main.go +++ b/cmd/ethtest/main.go @@ -95,10 +95,15 @@ func RunVmTest(js string) (failed int) { failed = 1 } - gexp := ethutil.Big(test.Gas) - if gexp.Cmp(gas) != 0 { - log.Printf("%s's gas failed. Expected %v, got %v\n", name, gexp, gas) + if len(test.Gas) == 0 && err == nil { + log.Printf("0 gas indicates error but no error given by VM") failed = 1 + } else { + gexp := ethutil.Big(test.Gas) + if gexp.Cmp(gas) != 0 { + log.Printf("%s's gas failed. Expected %v, got %v\n", name, gexp, gas) + failed = 1 + } } for addr, account := range test.Post { diff --git a/tests/files/VMTests/RandomTests/randomTest.json b/tests/files/VMTests/RandomTests/randomTest.json deleted file mode 100644 index dad2ee4a22..0000000000 --- a/tests/files/VMTests/RandomTests/randomTest.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x675545", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9999", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x675545", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x675545", - "nonce" : "0", - "storage" : { - } - } - } - } -} \ No newline at end of file From 16460b0048b738b0474bc1556d0df469f64bcf26 Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 30 Dec 2014 17:16:28 +0100 Subject: [PATCH 049/132] Fixed gas check for vm test --- tests/vm/gh_test.go | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/tests/vm/gh_test.go b/tests/vm/gh_test.go index 1efda7fe00..e06b0ed824 100644 --- a/tests/vm/gh_test.go +++ b/tests/vm/gh_test.go @@ -107,7 +107,9 @@ func RunVmTest(p string, t *testing.T) { logs state.Logs ) - if len(test.Exec) > 0 { + isVmTest := len(test.Exec) > 0 + + if isVmTest { ret, logs, gas, err = helper.RunVm(statedb, env, test.Exec) } else { ret, logs, gas, err = helper.RunState(statedb, env, test.Transaction) @@ -124,10 +126,14 @@ func RunVmTest(p string, t *testing.T) { t.Errorf("%s's return failed. Expected %x, got %x\n", name, rexp, ret) } - if len(test.Gas) > 0 { - gexp := ethutil.Big(test.Gas) - if gexp.Cmp(gas) != 0 { - t.Errorf("%s's gas failed. Expected %v, got %v\n", name, gexp, gas) + if isVmTest { + if len(test.Gas) == 0 && err == nil { + t.Errorf("%s's gas unspecified, indicating an error. VM returned (incorrectly) successfull") + } else { + gexp := ethutil.Big(test.Gas) + if gexp.Cmp(gas) != 0 { + t.Errorf("%s's gas failed. Expected %v, got %v\n", name, gexp, gas) + } } } From 4b4e0821027cb5a82eaa04dcd89b1cad4a05af4e Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 31 Dec 2014 10:32:53 +0100 Subject: [PATCH 050/132] JUMPI never 'require' checked. --- vm/vm_debug.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/vm_debug.go b/vm/vm_debug.go index 933fb7b12a..1e1b85e6db 100644 --- a/vm/vm_debug.go +++ b/vm/vm_debug.go @@ -140,7 +140,7 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * // Stack checks only case ISZERO, CALLDATALOAD, POP, JUMP, NOT: // 1 require(1) - case ADD, SUB, DIV, SDIV, MOD, SMOD, LT, GT, SLT, SGT, EQ, AND, OR, XOR, BYTE, SIGNEXTEND: // 2 + case JUMPI, ADD, SUB, DIV, SDIV, MOD, SMOD, LT, GT, SLT, SGT, EQ, AND, OR, XOR, BYTE, SIGNEXTEND: // 2 require(2) case ADDMOD, MULMOD: // 3 require(3) From 4547a05a689e6a0f29dd2d90e840e84de7f564f4 Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 31 Dec 2014 11:12:40 +0100 Subject: [PATCH 051/132] Minor improvements * Moved gas and mem size to its own function --- vm/stack.go | 6 + vm/vm_debug.go | 325 +++++++++++++++++++++++++------------------------ 2 files changed, 169 insertions(+), 162 deletions(-) diff --git a/vm/stack.go b/vm/stack.go index 6091479cb7..b9eaa10cd4 100644 --- a/vm/stack.go +++ b/vm/stack.go @@ -91,6 +91,12 @@ func (st *Stack) Get(amount *big.Int) []*big.Int { return nil } +func (st *Stack) require(n int) { + if st.Len() < n { + panic(fmt.Sprintf("stack underflow (%d <=> %d)", st.Len(), n)) + } +} + func (st *Stack) Print() { fmt.Println("### stack ###") if len(st.data) > 0 { diff --git a/vm/vm_debug.go b/vm/vm_debug.go index 1e1b85e6db..8829a9de0b 100644 --- a/vm/vm_debug.go +++ b/vm/vm_debug.go @@ -49,15 +49,11 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * }) closure := NewClosure(msg, caller, me, code, gas, price) - if p := Precompiled[string(me.Address())]; p != nil { - return self.RunPrecompiled(p, callData, closure) - } - if self.Recoverable { // Recover from any require exception defer func() { if r := recover(); r != nil { - self.Endl() + self.Printf(" %v", r).Endl() closure.UseGas(closure.Gas) @@ -69,6 +65,10 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * }() } + if p := Precompiled[string(me.Address())]; p != nil { + return self.RunPrecompiled(p, callData, closure) + } + var ( op OpCode @@ -79,11 +79,6 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * step = 0 prevStep = 0 statedb = self.env.State() - require = func(m int) { - if stack.Len() < m { - panic(fmt.Sprintf("%04v (%v) stack err size = %d, required = %d", pc, op, stack.Len(), m)) - } - } jump = func(from uint64, to *big.Int) { p := to.Uint64() @@ -124,160 +119,11 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * // Get the memory location of pc op = closure.GetOp(pc) - gas := new(big.Int) - addStepGasUsage := func(amount *big.Int) { - if amount.Cmp(ethutil.Big0) >= 0 { - gas.Add(gas, amount) - } - } + self.Printf("(pc) %-3d -o- %-14s (m) %-4d (s) %-4d ", pc, op.String(), mem.Len(), stack.Len()) - addStepGasUsage(GasStep) + newMemSize, gas := self.calculateGasAndSize(closure, caller, op, statedb, mem, stack) - var newMemSize *big.Int = ethutil.Big0 - var additionalGas *big.Int = new(big.Int) - // Stack Check, memory resize & gas phase - switch op { - // Stack checks only - case ISZERO, CALLDATALOAD, POP, JUMP, NOT: // 1 - require(1) - case JUMPI, ADD, SUB, DIV, SDIV, MOD, SMOD, LT, GT, SLT, SGT, EQ, AND, OR, XOR, BYTE, SIGNEXTEND: // 2 - require(2) - case ADDMOD, MULMOD: // 3 - require(3) - case SWAP1, SWAP2, SWAP3, SWAP4, SWAP5, SWAP6, SWAP7, SWAP8, SWAP9, SWAP10, SWAP11, SWAP12, SWAP13, SWAP14, SWAP15, SWAP16: - n := int(op - SWAP1 + 2) - require(n) - case DUP1, DUP2, DUP3, DUP4, DUP5, DUP6, DUP7, DUP8, DUP9, DUP10, DUP11, DUP12, DUP13, DUP14, DUP15, DUP16: - n := int(op - DUP1 + 1) - require(n) - case LOG0, LOG1, LOG2, LOG3, LOG4: - n := int(op - LOG0) - require(n + 2) - - gas.Set(GasLog) - addStepGasUsage(new(big.Int).Mul(big.NewInt(int64(n)), GasLog)) - - mSize, mStart := stack.Peekn() - addStepGasUsage(mSize) - - newMemSize = calcMemSize(mStart, mSize) - case EXP: - require(2) - - gas.Set(big.NewInt(int64(len(stack.data[stack.Len()-2].Bytes()) + 1))) - // Gas only - case STOP: - gas.Set(ethutil.Big0) - case SUICIDE: - require(1) - - gas.Set(ethutil.Big0) - case SLOAD: - require(1) - - gas.Set(GasSLoad) - // Memory resize & Gas - case SSTORE: - require(2) - - var mult *big.Int - y, x := stack.Peekn() - val := statedb.GetState(closure.Address(), x.Bytes()) - if len(val) == 0 && len(y.Bytes()) > 0 { - // 0 => non 0 - mult = ethutil.Big3 - } else if len(val) > 0 && len(y.Bytes()) == 0 { - statedb.Refund(caller.Address(), GasSStoreRefund) - - mult = ethutil.Big0 - } else { - // non 0 => non 0 (or 0 => 0) - mult = ethutil.Big1 - } - gas.Set(new(big.Int).Mul(mult, GasSStore)) - case BALANCE: - require(1) - gas.Set(GasBalance) - case MSTORE: - require(2) - newMemSize = calcMemSize(stack.Peek(), u256(32)) - case MLOAD: - require(1) - - newMemSize = calcMemSize(stack.Peek(), u256(32)) - case MSTORE8: - require(2) - newMemSize = calcMemSize(stack.Peek(), u256(1)) - case RETURN: - require(2) - - newMemSize = calcMemSize(stack.Peek(), stack.data[stack.Len()-2]) - case SHA3: - require(2) - gas.Set(GasSha) - newMemSize = calcMemSize(stack.Peek(), stack.data[stack.Len()-2]) - additionalGas.Set(stack.data[stack.Len()-2]) - case CALLDATACOPY: - require(2) - - newMemSize = calcMemSize(stack.Peek(), stack.data[stack.Len()-3]) - additionalGas.Set(stack.data[stack.Len()-3]) - case CODECOPY: - require(3) - - newMemSize = calcMemSize(stack.Peek(), stack.data[stack.Len()-3]) - additionalGas.Set(stack.data[stack.Len()-3]) - case EXTCODECOPY: - require(4) - - newMemSize = calcMemSize(stack.data[stack.Len()-2], stack.data[stack.Len()-4]) - additionalGas.Set(stack.data[stack.Len()-4]) - case CALL, CALLCODE: - require(7) - gas.Set(GasCall) - addStepGasUsage(stack.data[stack.Len()-1]) - - x := calcMemSize(stack.data[stack.Len()-6], stack.data[stack.Len()-7]) - y := calcMemSize(stack.data[stack.Len()-4], stack.data[stack.Len()-5]) - - newMemSize = ethutil.BigMax(x, y) - case CREATE: - require(3) - gas.Set(GasCreate) - - newMemSize = calcMemSize(stack.data[stack.Len()-2], stack.data[stack.Len()-3]) - } - - switch op { - case CALLDATACOPY, CODECOPY, EXTCODECOPY: - additionalGas.Add(additionalGas, u256(31)) - additionalGas.Div(additionalGas, u256(32)) - addStepGasUsage(additionalGas) - case SHA3: - additionalGas.Add(additionalGas, u256(31)) - additionalGas.Div(additionalGas, u256(32)) - additionalGas.Mul(additionalGas, GasSha3Byte) - addStepGasUsage(additionalGas) - } - - if newMemSize.Cmp(ethutil.Big0) > 0 { - newMemSize.Add(newMemSize, u256(31)) - newMemSize.Div(newMemSize, u256(32)) - newMemSize.Mul(newMemSize, u256(32)) - - if newMemSize.Cmp(u256(int64(mem.Len()))) > 0 { - memGasUsage := new(big.Int).Sub(newMemSize, u256(int64(mem.Len()))) - memGasUsage.Mul(GasMemory, memGasUsage) - memGasUsage.Div(memGasUsage, u256(32)) - - addStepGasUsage(memGasUsage) - - } - - } - - self.Printf("(pc) %-3d -o- %-14s", pc, op.String()) - self.Printf(" (m) %-4d (s) %-4d (g) %-3v (%v)", mem.Len(), stack.Len(), gas, closure.Gas) + self.Printf("(g) %-3v (%v)", gas, closure.Gas) if !closure.UseGas(gas) { self.Endl() @@ -939,6 +785,161 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * } } +func (self *DebugVm) calculateGasAndSize(closure *Closure, caller ClosureRef, op OpCode, statedb *state.StateDB, mem *Memory, stack *Stack) (*big.Int, *big.Int) { + gas := new(big.Int) + addStepGasUsage := func(amount *big.Int) { + if amount.Cmp(ethutil.Big0) >= 0 { + gas.Add(gas, amount) + } + } + + addStepGasUsage(GasStep) + + var newMemSize *big.Int = ethutil.Big0 + var additionalGas *big.Int = new(big.Int) + // Stack Check, memory resize & gas phase + switch op { + // Stack checks only + case ISZERO, CALLDATALOAD, POP, JUMP, NOT: // 1 + stack.require(1) + case JUMPI, ADD, SUB, DIV, SDIV, MOD, SMOD, LT, GT, SLT, SGT, EQ, AND, OR, XOR, BYTE, SIGNEXTEND: // 2 + stack.require(2) + case ADDMOD, MULMOD: // 3 + stack.require(3) + case SWAP1, SWAP2, SWAP3, SWAP4, SWAP5, SWAP6, SWAP7, SWAP8, SWAP9, SWAP10, SWAP11, SWAP12, SWAP13, SWAP14, SWAP15, SWAP16: + n := int(op - SWAP1 + 2) + stack.require(n) + case DUP1, DUP2, DUP3, DUP4, DUP5, DUP6, DUP7, DUP8, DUP9, DUP10, DUP11, DUP12, DUP13, DUP14, DUP15, DUP16: + n := int(op - DUP1 + 1) + stack.require(n) + case LOG0, LOG1, LOG2, LOG3, LOG4: + n := int(op - LOG0) + stack.require(n + 2) + + gas.Set(GasLog) + addStepGasUsage(new(big.Int).Mul(big.NewInt(int64(n)), GasLog)) + + mSize, mStart := stack.Peekn() + addStepGasUsage(mSize) + + newMemSize = calcMemSize(mStart, mSize) + case EXP: + stack.require(2) + + gas.Set(big.NewInt(int64(len(stack.data[stack.Len()-2].Bytes()) + 1))) + // Gas only + case STOP: + gas.Set(ethutil.Big0) + case SUICIDE: + stack.require(1) + + gas.Set(ethutil.Big0) + case SLOAD: + stack.require(1) + + gas.Set(GasSLoad) + // Memory resize & Gas + case SSTORE: + stack.require(2) + + var mult *big.Int + y, x := stack.Peekn() + val := statedb.GetState(closure.Address(), x.Bytes()) + if len(val) == 0 && len(y.Bytes()) > 0 { + // 0 => non 0 + mult = ethutil.Big3 + } else if len(val) > 0 && len(y.Bytes()) == 0 { + statedb.Refund(caller.Address(), GasSStoreRefund) + + mult = ethutil.Big0 + } else { + // non 0 => non 0 (or 0 => 0) + mult = ethutil.Big1 + } + gas.Set(new(big.Int).Mul(mult, GasSStore)) + case BALANCE: + stack.require(1) + gas.Set(GasBalance) + case MSTORE: + stack.require(2) + newMemSize = calcMemSize(stack.Peek(), u256(32)) + case MLOAD: + stack.require(1) + + newMemSize = calcMemSize(stack.Peek(), u256(32)) + case MSTORE8: + stack.require(2) + newMemSize = calcMemSize(stack.Peek(), u256(1)) + case RETURN: + stack.require(2) + + newMemSize = calcMemSize(stack.Peek(), stack.data[stack.Len()-2]) + case SHA3: + stack.require(2) + gas.Set(GasSha) + newMemSize = calcMemSize(stack.Peek(), stack.data[stack.Len()-2]) + additionalGas.Set(stack.data[stack.Len()-2]) + case CALLDATACOPY: + stack.require(2) + + newMemSize = calcMemSize(stack.Peek(), stack.data[stack.Len()-3]) + additionalGas.Set(stack.data[stack.Len()-3]) + case CODECOPY: + stack.require(3) + + newMemSize = calcMemSize(stack.Peek(), stack.data[stack.Len()-3]) + additionalGas.Set(stack.data[stack.Len()-3]) + case EXTCODECOPY: + stack.require(4) + + newMemSize = calcMemSize(stack.data[stack.Len()-2], stack.data[stack.Len()-4]) + additionalGas.Set(stack.data[stack.Len()-4]) + case CALL, CALLCODE: + stack.require(7) + gas.Set(GasCall) + addStepGasUsage(stack.data[stack.Len()-1]) + + x := calcMemSize(stack.data[stack.Len()-6], stack.data[stack.Len()-7]) + y := calcMemSize(stack.data[stack.Len()-4], stack.data[stack.Len()-5]) + + newMemSize = ethutil.BigMax(x, y) + case CREATE: + stack.require(3) + gas.Set(GasCreate) + + newMemSize = calcMemSize(stack.data[stack.Len()-2], stack.data[stack.Len()-3]) + } + + switch op { + case CALLDATACOPY, CODECOPY, EXTCODECOPY: + additionalGas.Add(additionalGas, u256(31)) + additionalGas.Div(additionalGas, u256(32)) + addStepGasUsage(additionalGas) + case SHA3: + additionalGas.Add(additionalGas, u256(31)) + additionalGas.Div(additionalGas, u256(32)) + additionalGas.Mul(additionalGas, GasSha3Byte) + addStepGasUsage(additionalGas) + } + + if newMemSize.Cmp(ethutil.Big0) > 0 { + newMemSize.Add(newMemSize, u256(31)) + newMemSize.Div(newMemSize, u256(32)) + newMemSize.Mul(newMemSize, u256(32)) + + if newMemSize.Cmp(u256(int64(mem.Len()))) > 0 { + memGasUsage := new(big.Int).Sub(newMemSize, u256(int64(mem.Len()))) + memGasUsage.Mul(GasMemory, memGasUsage) + memGasUsage.Div(memGasUsage, u256(32)) + + addStepGasUsage(memGasUsage) + } + + } + + return newMemSize, gas +} + func (self *DebugVm) RunPrecompiled(p *PrecompiledAccount, callData []byte, closure *Closure) (ret []byte, err error) { gas := p.Gas(len(callData)) if closure.UseGas(gas) { From a4dc12f12c7a06f5e28d5b1e760249875ef7a8c5 Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 31 Dec 2014 11:21:39 +0100 Subject: [PATCH 052/132] Additional comments and added name to error output --- tests/vm/gh_test.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/vm/gh_test.go b/tests/vm/gh_test.go index e06b0ed824..f1e4d1acc8 100644 --- a/tests/vm/gh_test.go +++ b/tests/vm/gh_test.go @@ -108,17 +108,16 @@ func RunVmTest(p string, t *testing.T) { ) isVmTest := len(test.Exec) > 0 - if isVmTest { ret, logs, gas, err = helper.RunVm(statedb, env, test.Exec) } else { ret, logs, gas, err = helper.RunState(statedb, env, test.Transaction) } - // When an error is returned it doesn't always mean the tests fails. - // Have to come up with some conditional failing mechanism. + // Log the error if there is one. Error does not mean failing test. + // A test fails if err != nil and post params are specified in the test. if err != nil { - helper.Log.Infoln(err) + helper.Log.Infof("%s's: %v\n", name, err) } rexp := helper.FromHex(test.Out) @@ -160,7 +159,6 @@ func RunVmTest(p string, t *testing.T) { } if len(test.Logs) > 0 { - // Logs within the test itself aren't correct, missing empty fields (32 0s) for i, log := range test.Logs { genBloom := ethutil.LeftPadBytes(types.LogsBloom(state.Logs{logs[i]}).Bytes(), 64) if !bytes.Equal(genBloom, ethutil.Hex2Bytes(log.BloomF)) { From b619b244c7c4c36215d805beac3a954b7966c9a4 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 2 Jan 2015 11:16:30 +0100 Subject: [PATCH 053/132] Fixed tests --- core/chain_manager_test.go | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/core/chain_manager_test.go b/core/chain_manager_test.go index 1087189015..1e0ec34361 100644 --- a/core/chain_manager_test.go +++ b/core/chain_manager_test.go @@ -27,6 +27,9 @@ func init() { ethutil.ReadConfig("/tmp/ethtest", "/tmp/ethtest", "ETH") +} + +func reset() { db, err := ethdb.NewMemDatabase() if err != nil { panic("Could not create mem-db, failing") @@ -51,20 +54,21 @@ func loadChain(fn string, t *testing.T) (types.Blocks, error) { func insertChain(done chan bool, chainMan *ChainManager, chain types.Blocks, t *testing.T) { err := chainMan.InsertChain(chain) - done <- true if err != nil { fmt.Println(err) t.FailNow() } + done <- true } func TestChainInsertions(t *testing.T) { + reset() + chain1, err := loadChain("valid1", t) if err != nil { fmt.Println(err) t.FailNow() } - fmt.Println(len(chain1)) chain2, err := loadChain("valid2", t) if err != nil { @@ -98,6 +102,8 @@ func TestChainInsertions(t *testing.T) { } func TestChainMultipleInsertions(t *testing.T) { + reset() + const max = 4 chains := make([]types.Blocks, max) var longest int @@ -114,7 +120,6 @@ func TestChainMultipleInsertions(t *testing.T) { t.FailNow() } } - var eventMux event.TypeMux chainMan := NewChainManager(&eventMux) txPool := NewTxPool(chainMan, &eventMux) @@ -122,7 +127,9 @@ func TestChainMultipleInsertions(t *testing.T) { chainMan.SetProcessor(blockMan) done := make(chan bool, max) for i, chain := range chains { - var i int = i + // XXX the go routine would otherwise reference the same (chain[3]) variable and fail + i := i + chain := chain go func() { insertChain(done, chainMan, chain, t) fmt.Println(i, "done") From 1c7e8e909321acf9f5ed3ed2bca37acd577ddf9c Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 2 Jan 2015 11:16:42 +0100 Subject: [PATCH 054/132] Set TD to block once processed --- core/chain_manager.go | 1 + 1 file changed, 1 insertion(+) diff --git a/core/chain_manager.go b/core/chain_manager.go index 485c195d5e..780242f56e 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -351,6 +351,7 @@ func (self *ChainManager) InsertChain(chain types.Blocks) error { chainlogger.Infoln(err) return err } + block.Td = td self.mu.Lock() { From 1cc86c07a00a2ad7b13c56f4eeb62fbb3e7c5f6d Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 2 Jan 2015 11:16:52 +0100 Subject: [PATCH 055/132] Deleted --- core/simple_pow.go | 1 - 1 file changed, 1 deletion(-) delete mode 100644 core/simple_pow.go diff --git a/core/simple_pow.go b/core/simple_pow.go deleted file mode 100644 index 9a8bc9592b..0000000000 --- a/core/simple_pow.go +++ /dev/null @@ -1 +0,0 @@ -package core From 0972bdeda238cfb64de7e639ebf9849bc81bb2bb Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 2 Jan 2015 12:07:26 +0100 Subject: [PATCH 056/132] Fixed using new trie iterator API --- cmd/mist/debugger.go | 8 +++++--- cmd/mist/gui.go | 36 +++++++++++++++++------------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/cmd/mist/debugger.go b/cmd/mist/debugger.go index a7a286e235..0e97a6652c 100644 --- a/cmd/mist/debugger.go +++ b/cmd/mist/debugger.go @@ -309,9 +309,11 @@ func (d *Debugger) halting(pc int, op vm.OpCode, mem *vm.Memory, stack *vm.Stack d.win.Root().Call("setStack", val.String()) } - stateObject.EachStorage(func(key string, node *ethutil.Value) { - d.win.Root().Call("setStorage", storeVal{fmt.Sprintf("% x", key), fmt.Sprintf("% x", node.Str())}) - }) + it := stateObject.Trie().Iterator() + for it.Next() { + d.win.Root().Call("setStorage", storeVal{fmt.Sprintf("% x", it.Key), fmt.Sprintf("% x", it.Value)}) + + } stackFrameAt := new(big.Int).SetBytes(mem.Get(0, 32)) psize := mem.Len() - int(new(big.Int).SetBytes(mem.Get(0, 32)).Uint64()) diff --git a/cmd/mist/gui.go b/cmd/mist/gui.go index e5e18bbaa8..98ca70b162 100644 --- a/cmd/mist/gui.go +++ b/cmd/mist/gui.go @@ -231,35 +231,33 @@ func (gui *Gui) loadAddressBook() { view := gui.getObjectByName("infoView") nameReg := gui.pipe.World().Config().Get("NameReg") if nameReg != nil { - nameReg.EachStorage(func(name string, value *ethutil.Value) { - if name[0] != 0 { - value.Decode() - - view.Call("addAddress", struct{ Name, Address string }{name, ethutil.Bytes2Hex(value.Bytes())}) + it := nameReg.Trie().Iterator() + for it.Next() { + if it.Key[0] != 0 { + view.Call("addAddress", struct{ Name, Address string }{string(it.Key), ethutil.Bytes2Hex(it.Value)}) } - }) + + } } } func (self *Gui) loadMergedMiningOptions() { view := self.getObjectByName("mergedMiningModel") - nameReg := self.pipe.World().Config().Get("MergeMining") - if nameReg != nil { + mergeMining := self.pipe.World().Config().Get("MergeMining") + if mergeMining != nil { i := 0 - nameReg.EachStorage(func(name string, value *ethutil.Value) { - if name[0] != 0 { - value.Decode() + it := mergeMining.Trie().Iterator() + for it.Next() { + view.Call("addMergedMiningOption", struct { + Checked bool + Name, Address string + Id, ItemId int + }{false, string(it.Key), ethutil.Bytes2Hex(it.Value), 0, i}) - view.Call("addMergedMiningOption", struct { - Checked bool - Name, Address string - Id, ItemId int - }{false, name, ethutil.Bytes2Hex(value.Bytes()), 0, i}) + i++ - i++ - } - }) + } } } From 477a6d426cd798f036df85b15d73935060503a48 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 2 Jan 2015 12:07:54 +0100 Subject: [PATCH 057/132] Added a query interface for world state --- core/chain_manager.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/core/chain_manager.go b/core/chain_manager.go index 780242f56e..d623c170bc 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -16,6 +16,10 @@ import ( var chainlogger = logger.NewLogger("CHAIN") +type StateQuery interface { + GetAccount(addr []byte) *state.StateObject +} + /* func AddTestNetFunds(block *types.Block) { for _, addr := range []string{ @@ -376,3 +380,8 @@ func (self *ChainManager) InsertChain(chain types.Blocks) error { return nil } + +// Satisfy state query interface +func (self *ChainManager) GetAccount(addr []byte) *state.StateObject { + return self.State().GetAccount(addr) +} From 48d2a8b8ee9621810a988e3561e4213749c54da7 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 2 Jan 2015 12:09:38 +0100 Subject: [PATCH 058/132] Refactored tx pool and added extra fields to block * chain manager sets td on block + td output w/ String * added tx pool tests for removing/adding/validating * tx pool now uses a set for txs instead of list.List --- core/transaction_pool.go | 130 +++++++++------------------------- core/transaction_pool_test.go | 82 +++++++++++++++++++++ core/types/block.go | 4 +- core/types/transaction.go | 5 ++ 4 files changed, 123 insertions(+), 98 deletions(-) create mode 100644 core/transaction_pool_test.go diff --git a/core/transaction_pool.go b/core/transaction_pool.go index 1149d4cfb8..4f91f35755 100644 --- a/core/transaction_pool.go +++ b/core/transaction_pool.go @@ -1,16 +1,13 @@ package core import ( - "bytes" - "container/list" "fmt" "math/big" - "sync" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/state" + "gopkg.in/fatih/set.v0" ) var txplogger = logger.NewLogger("TXP") @@ -26,86 +23,50 @@ const ( minGasPrice = 1000000 ) -var MinGasPrice = big.NewInt(10000000000000) - -func EachTx(pool *list.List, it func(*types.Transaction, *list.Element) bool) { - for e := pool.Front(); e != nil; e = e.Next() { - if it(e.Value.(*types.Transaction), e) { - break - } - } -} - -func FindTx(pool *list.List, finder func(*types.Transaction, *list.Element) bool) *types.Transaction { - for e := pool.Front(); e != nil; e = e.Next() { - if tx, ok := e.Value.(*types.Transaction); ok { - if finder(tx, e) { - return tx - } - } - } - - return nil -} - type TxProcessor interface { ProcessTransaction(tx *types.Transaction) } // The tx pool a thread safe transaction pool handler. In order to // guarantee a non blocking pool we use a queue channel which can be -// independently read without needing access to the actual pool. If the -// pool is being drained or synced for whatever reason the transactions -// will simple queue up and handled when the mutex is freed. +// independently read without needing access to the actual pool. type TxPool struct { - // The mutex for accessing the Tx pool. - mutex sync.Mutex // Queueing channel for reading and writing incoming // transactions to queueChan chan *types.Transaction // Quiting channel quit chan bool // The actual pool - pool *list.List + //pool *list.List + pool *set.Set SecondaryProcessor TxProcessor subscribers []chan TxMsg - chainManager *ChainManager - eventMux *event.TypeMux + stateQuery StateQuery + eventMux *event.TypeMux } -func NewTxPool(chainManager *ChainManager, eventMux *event.TypeMux) *TxPool { +func NewTxPool(stateQuery StateQuery, eventMux *event.TypeMux) *TxPool { return &TxPool{ - pool: list.New(), - queueChan: make(chan *types.Transaction, txPoolQueueSize), - quit: make(chan bool), - chainManager: chainManager, - eventMux: eventMux, + pool: set.New(), + queueChan: make(chan *types.Transaction, txPoolQueueSize), + quit: make(chan bool), + stateQuery: stateQuery, + eventMux: eventMux, } } -// Blocking function. Don't use directly. Use QueueTransaction instead func (pool *TxPool) addTransaction(tx *types.Transaction) { - pool.mutex.Lock() - defer pool.mutex.Unlock() - pool.pool.PushBack(tx) + pool.pool.Add(tx) // Broadcast the transaction to the rest of the peers pool.eventMux.Post(TxPreEvent{tx}) } func (pool *TxPool) ValidateTransaction(tx *types.Transaction) error { - // Get the last block so we can retrieve the sender and receiver from - // the merkle trie - block := pool.chainManager.CurrentBlock - // Something has gone horribly wrong if this happens - if block == nil { - return fmt.Errorf("No last block on the block chain") - } - if len(tx.To()) != 0 && len(tx.To()) != 20 { return fmt.Errorf("Invalid recipient. len = %d", len(tx.To())) } @@ -120,7 +81,7 @@ func (pool *TxPool) ValidateTransaction(tx *types.Transaction) error { if senderAddr == nil { return fmt.Errorf("invalid sender") } - sender := pool.chainManager.State().GetAccount(senderAddr) + sender := pool.stateQuery.GetAccount(senderAddr) totAmount := new(big.Int).Set(tx.Value()) // Make sure there's enough in the sender's account. Having insufficient @@ -129,19 +90,12 @@ func (pool *TxPool) ValidateTransaction(tx *types.Transaction) error { return fmt.Errorf("Insufficient amount in sender's (%x) account", tx.From()) } - // Increment the nonce making each tx valid only once to prevent replay - // attacks - return nil } func (self *TxPool) Add(tx *types.Transaction) error { hash := tx.Hash() - foundTx := FindTx(self.pool, func(tx *types.Transaction, e *list.Element) bool { - return bytes.Compare(tx.Hash(), hash) == 0 - }) - - if foundTx != nil { + if self.pool.Has(tx) { return fmt.Errorf("Known transaction (%x)", hash[0:4]) } @@ -161,7 +115,7 @@ func (self *TxPool) Add(tx *types.Transaction) error { } func (self *TxPool) Size() int { - return self.pool.Len() + return self.pool.Size() } func (self *TxPool) AddTransactions(txs []*types.Transaction) { @@ -175,63 +129,47 @@ func (self *TxPool) AddTransactions(txs []*types.Transaction) { } func (pool *TxPool) GetTransactions() []*types.Transaction { - pool.mutex.Lock() - defer pool.mutex.Unlock() - - txList := make([]*types.Transaction, pool.pool.Len()) + txList := make([]*types.Transaction, pool.Size()) i := 0 - for e := pool.pool.Front(); e != nil; e = e.Next() { - tx := e.Value.(*types.Transaction) - - txList[i] = tx - + pool.pool.Each(func(v interface{}) bool { + txList[i] = v.(*types.Transaction) i++ - } + + return true + }) return txList } -func (pool *TxPool) RemoveInvalid(state *state.StateDB) { - pool.mutex.Lock() - defer pool.mutex.Unlock() - - for e := pool.pool.Front(); e != nil; e = e.Next() { - tx := e.Value.(*types.Transaction) - sender := state.GetAccount(tx.From()) +func (pool *TxPool) RemoveInvalid(query StateQuery) { + var removedTxs types.Transactions + pool.pool.Each(func(v interface{}) bool { + tx := v.(*types.Transaction) + sender := query.GetAccount(tx.From()) err := pool.ValidateTransaction(tx) if err != nil || sender.Nonce >= tx.Nonce() { - pool.pool.Remove(e) + removedTxs = append(removedTxs, tx) } - } + + return true + }) + pool.RemoveSet(removedTxs) } func (self *TxPool) RemoveSet(txs types.Transactions) { - self.mutex.Lock() - defer self.mutex.Unlock() - for _, tx := range txs { - EachTx(self.pool, func(t *types.Transaction, element *list.Element) bool { - if t == tx { - self.pool.Remove(element) - return true // To stop the loop - } - return false - }) + self.pool.Remove(tx) } } func (pool *TxPool) Flush() []*types.Transaction { txList := pool.GetTransactions() - - // Recreate a new list all together - // XXX Is this the fastest way? - pool.pool = list.New() + pool.pool.Clear() return txList } func (pool *TxPool) Start() { - //go pool.queueHandler() } func (pool *TxPool) Stop() { diff --git a/core/transaction_pool_test.go b/core/transaction_pool_test.go new file mode 100644 index 0000000000..296c6bd8a6 --- /dev/null +++ b/core/transaction_pool_test.go @@ -0,0 +1,82 @@ +package core + +import ( + "crypto/ecdsa" + "testing" + + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/ethutil" + "github.com/ethereum/go-ethereum/event" + "github.com/ethereum/go-ethereum/state" +) + +// State query interface +type stateQuery struct{} + +func (self stateQuery) GetAccount(addr []byte) *state.StateObject { + return state.NewStateObject(addr) +} + +// State query interface +type invalidStateQuery struct{} + +func (self invalidStateQuery) GetAccount(addr []byte) *state.StateObject { + o := state.NewStateObject(addr) + o.Nonce++ + return o +} + +func transaction() *types.Transaction { + return types.NewTransactionMessage(make([]byte, 20), ethutil.Big0, ethutil.Big0, ethutil.Big0, nil) +} + +func setup() (*TxPool, *ecdsa.PrivateKey) { + var m event.TypeMux + key, _ := crypto.GenerateKey() + return NewTxPool(stateQuery{}, &m), key +} + +func TestTxAdding(t *testing.T) { + pool, key := setup() + tx1 := transaction() + tx1.SignECDSA(key) + err := pool.Add(tx1) + if err != nil { + t.Error(err) + } + + err = pool.Add(tx1) + if err == nil { + t.Error("added tx twice") + } +} + +func TestAddInvalidTx(t *testing.T) { + pool, _ := setup() + tx1 := transaction() + err := pool.Add(tx1) + if err == nil { + t.Error("expected error") + } +} + +func TestRemoveSet(t *testing.T) { + pool, _ := setup() + tx1 := transaction() + pool.pool.Add(tx1) + pool.RemoveSet(types.Transactions{tx1}) + if pool.Size() > 0 { + t.Error("expected pool size to be 0") + } +} + +func TestRemoveInvalid(t *testing.T) { + pool, _ := setup() + tx1 := transaction() + pool.pool.Add(tx1) + pool.RemoveInvalid(invalidStateQuery{}) + if pool.Size() > 0 { + t.Error("expected pool size to be 0") + } +} diff --git a/core/types/block.go b/core/types/block.go index 7b4695f733..b59044bfce 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -209,7 +209,7 @@ func (self *Block) HashNoNonce() []byte { } func (self *Block) String() string { - return fmt.Sprintf(`BLOCK(%x): Size: %v { + return fmt.Sprintf(`BLOCK(%x): Size: %v TD: %v { Header: [ %v @@ -219,7 +219,7 @@ Transactions: Uncles: %v } -`, self.header.Hash(), self.Size(), self.header, self.transactions, self.uncles) +`, self.header.Hash(), self.Size(), self.Td, self.header, self.transactions, self.uncles) } func (self *Header) String() string { diff --git a/core/types/transaction.go b/core/types/transaction.go index 59244adc3d..83d76648fd 100644 --- a/core/types/transaction.go +++ b/core/types/transaction.go @@ -2,6 +2,7 @@ package types import ( "bytes" + "crypto/ecdsa" "fmt" "math/big" @@ -139,6 +140,10 @@ func (tx *Transaction) Sign(privk []byte) error { return nil } +func (tx *Transaction) SignECDSA(key *ecdsa.PrivateKey) error { + return tx.Sign(crypto.FromECDSA(key)) +} + func (tx *Transaction) RlpData() interface{} { data := []interface{}{tx.AccountNonce, tx.Price, tx.GasLimit, tx.Recipient, tx.Amount, tx.Payload} From 6cf61039cfdac2595528adb86978465881838c7f Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 2 Jan 2015 12:18:23 +0100 Subject: [PATCH 059/132] Added tests for valid transactions --- core/transaction_pool_test.go | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/core/transaction_pool_test.go b/core/transaction_pool_test.go index 296c6bd8a6..1214ad9030 100644 --- a/core/transaction_pool_test.go +++ b/core/transaction_pool_test.go @@ -18,15 +18,6 @@ func (self stateQuery) GetAccount(addr []byte) *state.StateObject { return state.NewStateObject(addr) } -// State query interface -type invalidStateQuery struct{} - -func (self invalidStateQuery) GetAccount(addr []byte) *state.StateObject { - o := state.NewStateObject(addr) - o.Nonce++ - return o -} - func transaction() *types.Transaction { return types.NewTransactionMessage(make([]byte, 20), ethutil.Big0, ethutil.Big0, ethutil.Big0, nil) } @@ -72,11 +63,19 @@ func TestRemoveSet(t *testing.T) { } func TestRemoveInvalid(t *testing.T) { - pool, _ := setup() + pool, key := setup() tx1 := transaction() pool.pool.Add(tx1) - pool.RemoveInvalid(invalidStateQuery{}) + pool.RemoveInvalid(stateQuery{}) if pool.Size() > 0 { t.Error("expected pool size to be 0") } + + tx1.SetNonce(1) + tx1.SignECDSA(key) + pool.pool.Add(tx1) + pool.RemoveInvalid(stateQuery{}) + if pool.Size() != 1 { + t.Error("expected pool size to be 1, is", pool.Size()) + } } From ae2c90cc2813509a3a2e848584a3a45b568ae064 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 2 Jan 2015 12:24:36 +0100 Subject: [PATCH 060/132] Removed value check from tx validation --- core/transaction_pool.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/transaction_pool.go b/core/transaction_pool.go index 4f91f35755..7f12a296d6 100644 --- a/core/transaction_pool.go +++ b/core/transaction_pool.go @@ -2,7 +2,6 @@ package core import ( "fmt" - "math/big" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/event" @@ -73,7 +72,7 @@ func (pool *TxPool) ValidateTransaction(tx *types.Transaction) error { v, _, _ := tx.Curve() if v > 28 || v < 27 { - return fmt.Errorf("tx.v != (28 || 27)") + return fmt.Errorf("tx.v != (28 || 27) => %v", v) } // Get the sender @@ -83,12 +82,17 @@ func (pool *TxPool) ValidateTransaction(tx *types.Transaction) error { } sender := pool.stateQuery.GetAccount(senderAddr) + /* XXX this kind of validation needs to happen elsewhere in the gui when sending txs. + Other clients should do their own validation. Value transfer could be throw error + but doesn't necessarily invalidate the tx. Gas can still be payed for and miner + can still be rewarded for their inclusion and processing. totAmount := new(big.Int).Set(tx.Value()) // Make sure there's enough in the sender's account. Having insufficient // funds won't invalidate this transaction but simple ignores it. if sender.Balance().Cmp(totAmount) < 0 { return fmt.Errorf("Insufficient amount in sender's (%x) account", tx.From()) } + */ return nil } From d336e24dcec2bb2cb89fff76302882aa82124dc8 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 2 Jan 2015 12:26:55 +0100 Subject: [PATCH 061/132] Removed the need of having a backend for the tx pool --- core/chain_manager_test.go | 4 ++-- core/transaction_pool.go | 23 ++++++++++------------- core/transaction_pool_test.go | 2 +- eth/backend.go | 2 +- 4 files changed, 14 insertions(+), 17 deletions(-) diff --git a/core/chain_manager_test.go b/core/chain_manager_test.go index 1e0ec34361..10ff7359bd 100644 --- a/core/chain_manager_test.go +++ b/core/chain_manager_test.go @@ -78,7 +78,7 @@ func TestChainInsertions(t *testing.T) { var eventMux event.TypeMux chainMan := NewChainManager(&eventMux) - txPool := NewTxPool(chainMan, &eventMux) + txPool := NewTxPool(&eventMux) blockMan := NewBlockManager(txPool, chainMan, &eventMux) chainMan.SetProcessor(blockMan) @@ -122,7 +122,7 @@ func TestChainMultipleInsertions(t *testing.T) { } var eventMux event.TypeMux chainMan := NewChainManager(&eventMux) - txPool := NewTxPool(chainMan, &eventMux) + txPool := NewTxPool(&eventMux) blockMan := NewBlockManager(txPool, chainMan, &eventMux) chainMan.SetProcessor(blockMan) done := make(chan bool, max) diff --git a/core/transaction_pool.go b/core/transaction_pool.go index 7f12a296d6..3349c94411 100644 --- a/core/transaction_pool.go +++ b/core/transaction_pool.go @@ -43,22 +43,19 @@ type TxPool struct { subscribers []chan TxMsg - stateQuery StateQuery - eventMux *event.TypeMux + eventMux *event.TypeMux } -func NewTxPool(stateQuery StateQuery, eventMux *event.TypeMux) *TxPool { +func NewTxPool(eventMux *event.TypeMux) *TxPool { return &TxPool{ - pool: set.New(), - queueChan: make(chan *types.Transaction, txPoolQueueSize), - quit: make(chan bool), - stateQuery: stateQuery, - eventMux: eventMux, + pool: set.New(), + queueChan: make(chan *types.Transaction, txPoolQueueSize), + quit: make(chan bool), + eventMux: eventMux, } } func (pool *TxPool) addTransaction(tx *types.Transaction) { - pool.pool.Add(tx) // Broadcast the transaction to the rest of the peers @@ -75,6 +72,10 @@ func (pool *TxPool) ValidateTransaction(tx *types.Transaction) error { return fmt.Errorf("tx.v != (28 || 27) => %v", v) } + /* XXX this kind of validation needs to happen elsewhere in the gui when sending txs. + Other clients should do their own validation. Value transfer could throw error + but doesn't necessarily invalidate the tx. Gas can still be payed for and miner + can still be rewarded for their inclusion and processing. // Get the sender senderAddr := tx.From() if senderAddr == nil { @@ -82,10 +83,6 @@ func (pool *TxPool) ValidateTransaction(tx *types.Transaction) error { } sender := pool.stateQuery.GetAccount(senderAddr) - /* XXX this kind of validation needs to happen elsewhere in the gui when sending txs. - Other clients should do their own validation. Value transfer could be throw error - but doesn't necessarily invalidate the tx. Gas can still be payed for and miner - can still be rewarded for their inclusion and processing. totAmount := new(big.Int).Set(tx.Value()) // Make sure there's enough in the sender's account. Having insufficient // funds won't invalidate this transaction but simple ignores it. diff --git a/core/transaction_pool_test.go b/core/transaction_pool_test.go index 1214ad9030..e77d7a1aed 100644 --- a/core/transaction_pool_test.go +++ b/core/transaction_pool_test.go @@ -25,7 +25,7 @@ func transaction() *types.Transaction { func setup() (*TxPool, *ecdsa.PrivateKey) { var m event.TypeMux key, _ := crypto.GenerateKey() - return NewTxPool(stateQuery{}, &m), key + return NewTxPool(&m), key } func TestTxAdding(t *testing.T) { diff --git a/eth/backend.go b/eth/backend.go index 383cda46f4..78c2159c0b 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -70,7 +70,7 @@ func New(db ethutil.Database, identity p2p.ClientIdentity, keyManager *crypto.Ke } eth.chainManager = core.NewChainManager(eth.EventMux()) - eth.txPool = core.NewTxPool(eth.chainManager, eth.EventMux()) + eth.txPool = core.NewTxPool(eth.EventMux()) eth.blockManager = core.NewBlockManager(eth.txPool, eth.chainManager, eth.EventMux()) eth.chainManager.SetProcessor(eth.blockManager) eth.whisper = whisper.New() From e2d1d832efe0623539c9d37ca8aee17d44e47067 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 2 Jan 2015 13:00:25 +0100 Subject: [PATCH 062/132] added nil check --- core/chain_manager_test.go | 10 +--------- core/types/block_test.go | 22 ---------------------- state/state_test.go | 9 ++++----- whisper/envelope.go | 1 + whisper/messages_test.go | 5 ++--- 5 files changed, 8 insertions(+), 39 deletions(-) diff --git a/core/chain_manager_test.go b/core/chain_manager_test.go index 10ff7359bd..2ed3c6c9e0 100644 --- a/core/chain_manager_test.go +++ b/core/chain_manager_test.go @@ -16,17 +16,9 @@ import ( "github.com/ethereum/go-ethereum/rlp" ) -//var Logger logpkg.LogSystem - -//var Log = logpkg.NewLogger("TEST") - func init() { runtime.GOMAXPROCS(runtime.NumCPU()) - //Logger = logpkg.NewStdLogSystem(os.Stdout, log.LstdFlags, logpkg.DebugLevel) - //logpkg.AddLogSystem(Logger) - ethutil.ReadConfig("/tmp/ethtest", "/tmp/ethtest", "ETH") - } func reset() { @@ -38,7 +30,7 @@ func reset() { } func loadChain(fn string, t *testing.T) (types.Blocks, error) { - fh, err := os.OpenFile(path.Join("..", "_data", fn), os.O_RDONLY, os.ModePerm) + fh, err := os.OpenFile(path.Join(os.Getenv("GOPATH"), "src", "github.com", "ethereum", "go-ethereum", "_data", fn), os.O_RDONLY, os.ModePerm) if err != nil { return nil, err } diff --git a/core/types/block_test.go b/core/types/block_test.go index c85708975f..ab1254f4c2 100644 --- a/core/types/block_test.go +++ b/core/types/block_test.go @@ -1,23 +1 @@ package types - -import ( - "bytes" - "testing" - - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/ethutil" - "github.com/ethereum/go-ethereum/rlp" -) - -func init() { - ethutil.ReadConfig(".ethtest", "/tmp/ethtest", "") - ethutil.Config.Db, _ = ethdb.NewMemDatabase() -} - -func TestNewBlock(t *testing.T) { - block := GenesisBlock() - data := ethutil.Encode(block) - - var genesis Block - err := rlp.Decode(bytes.NewReader(data), &genesis) -} diff --git a/state/state_test.go b/state/state_test.go index 28e4fc5da1..1f76eff0fb 100644 --- a/state/state_test.go +++ b/state/state_test.go @@ -5,7 +5,7 @@ import ( "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/ethutil" - "github.com/ethereum/go-ethereum/trie" + "github.com/ethereum/go-ethereum/ptrie" ) type StateSuite struct { @@ -18,9 +18,8 @@ var _ = checker.Suite(&StateSuite{}) func (s *StateSuite) TestDump(c *checker.C) { key := []byte{0x01} - value := "foo" - node := []interface{}{key, value} - s.state.Trie.Put(node) + value := []byte("foo") + s.state.trie.Update(key, value) dump := s.state.Dump() c.Assert(dump, checker.NotNil) } @@ -29,7 +28,7 @@ func (s *StateSuite) SetUpTest(c *checker.C) { db, _ := ethdb.NewMemDatabase() ethutil.ReadConfig(".ethtest", "/tmp/ethtest", "") ethutil.Config.Db = db - s.state = New(trie.New(db, "")) + s.state = New(ptrie.New(nil, db)) } func (s *StateSuite) TestSnapshot(c *checker.C) { diff --git a/whisper/envelope.go b/whisper/envelope.go index 066e20f6a3..9d28dfa6be 100644 --- a/whisper/envelope.go +++ b/whisper/envelope.go @@ -79,6 +79,7 @@ func (self *Envelope) Open(prv *ecdsa.PrivateKey) (msg *Message, err error) { if prv != nil { message.Payload, err = crypto.Decrypt(prv, payload) switch err { + case nil: // OK case ecies.ErrInvalidPublicKey: // Payload isn't encrypted message.Payload = payload return &message, err diff --git a/whisper/messages_test.go b/whisper/messages_test.go index cba103011d..93caa31b36 100644 --- a/whisper/messages_test.go +++ b/whisper/messages_test.go @@ -40,12 +40,11 @@ func TestMessageEncryptDecrypt(t *testing.T) { msg1, err := envelope.Open(prv2) if err != nil { - fmt.Println(err) + t.Error(err) t.FailNow() } if !bytes.Equal(msg1.Payload, data) { - fmt.Println("encryption error. data did not match") - t.FailNow() + t.Error("encryption error. data did not match") } } From 4dc7ee90879d7146c9e5004c04992c90ad78f632 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 2 Jan 2015 16:14:12 +0100 Subject: [PATCH 063/132] Closure => Context --- cmd/evm/main.go | 6 +- cmd/utils/vm_env.go | 6 +- core/chain_manager.go | 20 ------ core/execution.go | 6 +- core/state_transition.go | 2 +- core/vm_env.go | 6 +- tests/helper/vm.go | 6 +- vm/{closure.go => context.go} | 34 +++++----- vm/environment.go | 6 +- vm/virtual_machine.go | 2 +- vm/vm.go | 2 +- vm/vm_debug.go | 124 ++++++++++++++++++---------------- xeth/vm_env.go | 6 +- 13 files changed, 107 insertions(+), 119 deletions(-) rename vm/{closure.go => context.go} (65%) diff --git a/cmd/evm/main.go b/cmd/evm/main.go index 66bba72893..31b7da3c82 100644 --- a/cmd/evm/main.go +++ b/cmd/evm/main.go @@ -144,19 +144,19 @@ func (self *VMEnv) vm(addr, data []byte, gas, price, value *big.Int) *core.Execu return core.NewExecution(self, addr, data, gas, price, value) } -func (self *VMEnv) Call(caller vm.ClosureRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error) { +func (self *VMEnv) Call(caller vm.ContextRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error) { exe := self.vm(addr, data, gas, price, value) ret, err := exe.Call(addr, caller) self.Gas = exe.Gas return ret, err } -func (self *VMEnv) CallCode(caller vm.ClosureRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error) { +func (self *VMEnv) CallCode(caller vm.ContextRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error) { exe := self.vm(caller.Address(), data, gas, price, value) return exe.Call(addr, caller) } -func (self *VMEnv) Create(caller vm.ClosureRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error, vm.ClosureRef) { +func (self *VMEnv) Create(caller vm.ContextRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error, vm.ContextRef) { exe := self.vm(addr, data, gas, price, value) return exe.Create(caller) } diff --git a/cmd/utils/vm_env.go b/cmd/utils/vm_env.go index be6249e82d..19091bdc5d 100644 --- a/cmd/utils/vm_env.go +++ b/cmd/utils/vm_env.go @@ -52,19 +52,19 @@ func (self *VMEnv) vm(addr, data []byte, gas, price, value *big.Int) *core.Execu return core.NewExecution(self, addr, data, gas, price, value) } -func (self *VMEnv) Call(caller vm.ClosureRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error) { +func (self *VMEnv) Call(caller vm.ContextRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error) { exe := self.vm(addr, data, gas, price, value) ret, err := exe.Call(addr, caller) self.Gas = exe.Gas return ret, err } -func (self *VMEnv) CallCode(caller vm.ClosureRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error) { +func (self *VMEnv) CallCode(caller vm.ContextRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error) { exe := self.vm(caller.Address(), data, gas, price, value) return exe.Call(addr, caller) } -func (self *VMEnv) Create(caller vm.ClosureRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error, vm.ClosureRef) { +func (self *VMEnv) Create(caller vm.ContextRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error, vm.ContextRef) { exe := self.vm(addr, data, gas, price, value) return exe.Create(caller) } diff --git a/core/chain_manager.go b/core/chain_manager.go index d623c170bc..ece98d7830 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -20,26 +20,6 @@ type StateQuery interface { GetAccount(addr []byte) *state.StateObject } -/* -func AddTestNetFunds(block *types.Block) { - for _, addr := range []string{ - "51ba59315b3a95761d0863b05ccc7a7f54703d99", - "e4157b34ea9615cfbde6b4fda419828124b70c78", - "b9c015918bdaba24b4ff057a92a3873d6eb201be", - "6c386a4b26f73c802f34673f7248bb118f97424a", - "cd2a3d9f938e13cd947ec05abc7fe734df8dd826", - "2ef47100e0787b915105fd5e3f4ff6752079d5cb", - "e6716f9544a56c530d868e4bfbacb172315bdead", - "1a26338f0d905e295fccb71fa9ea849ffa12aaf4", - } { - codedAddr := ethutil.Hex2Bytes(addr) - account := block.State().GetAccount(codedAddr) - account.SetBalance(ethutil.Big("1606938044258990275541962092341162602522202993782792835301376")) //ethutil.BigPow(2, 200) - block.State().UpdateStateObject(account) - } -} -*/ - func CalcDifficulty(block, parent *types.Block) *big.Int { diff := new(big.Int) diff --git a/core/execution.go b/core/execution.go index b7eead0dd3..a7bb596516 100644 --- a/core/execution.go +++ b/core/execution.go @@ -24,14 +24,14 @@ func (self *Execution) Addr() []byte { return self.address } -func (self *Execution) Call(codeAddr []byte, caller vm.ClosureRef) ([]byte, error) { +func (self *Execution) Call(codeAddr []byte, caller vm.ContextRef) ([]byte, error) { // Retrieve the executing code code := self.env.State().GetCode(codeAddr) return self.exec(code, codeAddr, caller) } -func (self *Execution) exec(code, contextAddr []byte, caller vm.ClosureRef) (ret []byte, err error) { +func (self *Execution) exec(code, contextAddr []byte, caller vm.ContextRef) (ret []byte, err error) { env := self.env evm := vm.New(env, vm.DebugVmTy) @@ -63,7 +63,7 @@ func (self *Execution) exec(code, contextAddr []byte, caller vm.ClosureRef) (ret return } -func (self *Execution) Create(caller vm.ClosureRef) (ret []byte, err error, account *state.StateObject) { +func (self *Execution) Create(caller vm.ContextRef) (ret []byte, err error, account *state.StateObject) { ret, err = self.exec(self.input, nil, caller) account = self.env.State().GetStateObject(self.address) diff --git a/core/state_transition.go b/core/state_transition.go index 7b7026c298..91cfd5fe3b 100644 --- a/core/state_transition.go +++ b/core/state_transition.go @@ -184,7 +184,7 @@ func (self *StateTransition) TransitionState() (ret []byte, err error) { } vmenv := self.VmEnv() - var ref vm.ClosureRef + var ref vm.ContextRef if MessageCreatesContract(msg) { contract := MakeContract(msg, self.state) ret, err, ref = vmenv.Create(sender, contract.Address(), self.msg.Data(), self.gas, self.gasPrice, self.value) diff --git a/core/vm_env.go b/core/vm_env.go index 209115eabf..4e0315ff3b 100644 --- a/core/vm_env.go +++ b/core/vm_env.go @@ -46,16 +46,16 @@ func (self *VMEnv) vm(addr, data []byte, gas, price, value *big.Int) *Execution return NewExecution(self, addr, data, gas, price, value) } -func (self *VMEnv) Call(me vm.ClosureRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error) { +func (self *VMEnv) Call(me vm.ContextRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error) { exe := self.vm(addr, data, gas, price, value) return exe.Call(addr, me) } -func (self *VMEnv) CallCode(me vm.ClosureRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error) { +func (self *VMEnv) CallCode(me vm.ContextRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error) { exe := self.vm(me.Address(), data, gas, price, value) return exe.Call(addr, me) } -func (self *VMEnv) Create(me vm.ClosureRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error, vm.ClosureRef) { +func (self *VMEnv) Create(me vm.ContextRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error, vm.ContextRef) { exe := self.vm(addr, data, gas, price, value) return exe.Create(me) } diff --git a/tests/helper/vm.go b/tests/helper/vm.go index e174e0892e..aa17313b77 100644 --- a/tests/helper/vm.go +++ b/tests/helper/vm.go @@ -74,19 +74,19 @@ func (self *Env) vm(addr, data []byte, gas, price, value *big.Int) *core.Executi return exec } -func (self *Env) Call(caller vm.ClosureRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error) { +func (self *Env) Call(caller vm.ContextRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error) { exe := self.vm(addr, data, gas, price, value) ret, err := exe.Call(addr, caller) self.Gas = exe.Gas return ret, err } -func (self *Env) CallCode(caller vm.ClosureRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error) { +func (self *Env) CallCode(caller vm.ContextRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error) { exe := self.vm(caller.Address(), data, gas, price, value) return exe.Call(addr, caller) } -func (self *Env) Create(caller vm.ClosureRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error, vm.ClosureRef) { +func (self *Env) Create(caller vm.ContextRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error, vm.ContextRef) { exe := self.vm(addr, data, gas, price, value) return exe.Create(caller) } diff --git a/vm/closure.go b/vm/context.go similarity index 65% rename from vm/closure.go rename to vm/context.go index df216f2aed..ccbadabdaa 100644 --- a/vm/closure.go +++ b/vm/context.go @@ -8,15 +8,15 @@ import ( "github.com/ethereum/go-ethereum/state" ) -type ClosureRef interface { +type ContextRef interface { ReturnGas(*big.Int, *big.Int) Address() []byte SetCode([]byte) } -type Closure struct { - caller ClosureRef - object ClosureRef +type Context struct { + caller ContextRef + object ContextRef Code []byte message *state.Message @@ -25,9 +25,9 @@ type Closure struct { Args []byte } -// Create a new closure for the given data items -func NewClosure(msg *state.Message, caller ClosureRef, object ClosureRef, code []byte, gas, price *big.Int) *Closure { - c := &Closure{message: msg, caller: caller, object: object, Code: code, Args: nil} +// Create a new context for the given data items +func NewContext(msg *state.Message, caller ContextRef, object ContextRef, code []byte, gas, price *big.Int) *Context { + c := &Context{message: msg, caller: caller, object: object, Code: code, Args: nil} // Gas should be a pointer so it can safely be reduced through the run // This pointer will be off the state transition @@ -40,11 +40,11 @@ func NewClosure(msg *state.Message, caller ClosureRef, object ClosureRef, code [ return c } -func (c *Closure) GetOp(x uint64) OpCode { +func (c *Context) GetOp(x uint64) OpCode { return OpCode(c.GetByte(x)) } -func (c *Closure) GetByte(x uint64) byte { +func (c *Context) GetByte(x uint64) byte { if x < uint64(len(c.Code)) { return c.Code[x] } @@ -52,18 +52,18 @@ func (c *Closure) GetByte(x uint64) byte { return 0 } -func (c *Closure) GetBytes(x, y int) []byte { +func (c *Context) GetBytes(x, y int) []byte { return c.GetRangeValue(uint64(x), uint64(y)) } -func (c *Closure) GetRangeValue(x, size uint64) []byte { +func (c *Context) GetRangeValue(x, size uint64) []byte { x = uint64(math.Min(float64(x), float64(len(c.Code)))) y := uint64(math.Min(float64(x+size), float64(len(c.Code)))) return ethutil.LeftPadBytes(c.Code[x:y], int(size)) } -func (c *Closure) Return(ret []byte) []byte { +func (c *Context) Return(ret []byte) []byte { // Return the remaining gas to the caller c.caller.ReturnGas(c.Gas, c.Price) @@ -73,7 +73,7 @@ func (c *Closure) Return(ret []byte) []byte { /* * Gas functions */ -func (c *Closure) UseGas(gas *big.Int) bool { +func (c *Context) UseGas(gas *big.Int) bool { if c.Gas.Cmp(gas) < 0 { return false } @@ -86,8 +86,8 @@ func (c *Closure) UseGas(gas *big.Int) bool { } // Implement the caller interface -func (c *Closure) ReturnGas(gas, price *big.Int) { - // Return the gas to the closure +func (c *Context) ReturnGas(gas, price *big.Int) { + // Return the gas to the context c.Gas.Add(c.Gas, gas) c.UsedGas.Sub(c.UsedGas, gas) } @@ -95,10 +95,10 @@ func (c *Closure) ReturnGas(gas, price *big.Int) { /* * Set / Get */ -func (c *Closure) Address() []byte { +func (c *Context) Address() []byte { return c.object.Address() } -func (self *Closure) SetCode(code []byte) { +func (self *Context) SetCode(code []byte) { self.Code = code } diff --git a/vm/environment.go b/vm/environment.go index 969bc5e431..01bbd56cea 100644 --- a/vm/environment.go +++ b/vm/environment.go @@ -26,9 +26,9 @@ type Environment interface { Depth() int SetDepth(i int) - Call(me ClosureRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error) - CallCode(me ClosureRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error) - Create(me ClosureRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error, ClosureRef) + Call(me ContextRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error) + CallCode(me ContextRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error) + Create(me ContextRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error, ContextRef) } type Object interface { diff --git a/vm/virtual_machine.go b/vm/virtual_machine.go index 3b6f98ab2e..23ac4878f6 100644 --- a/vm/virtual_machine.go +++ b/vm/virtual_machine.go @@ -4,7 +4,7 @@ import "math/big" type VirtualMachine interface { Env() Environment - Run(me, caller ClosureRef, code []byte, value, gas, price *big.Int, data []byte) ([]byte, error) + Run(me, caller ContextRef, code []byte, value, gas, price *big.Int, data []byte) ([]byte, error) Printf(string, ...interface{}) VirtualMachine Endl() VirtualMachine } diff --git a/vm/vm.go b/vm/vm.go index 22172cb3ae..a5ea297b32 100644 --- a/vm/vm.go +++ b/vm/vm.go @@ -20,7 +20,7 @@ func New(env Environment, typ Type) VirtualMachine { } } -func (self *Vm) Run(me, caller ClosureRef, code []byte, value, gas, price *big.Int, data []byte) (ret []byte, err error) { +func (self *Vm) Run(me, caller ContextRef, code []byte, value, gas, price *big.Int, data []byte) (ret []byte, err error) { panic("not implemented") } diff --git a/vm/vm_debug.go b/vm/vm_debug.go index 8829a9de0b..1b9c480f8a 100644 --- a/vm/vm_debug.go +++ b/vm/vm_debug.go @@ -37,7 +37,7 @@ func NewDebugVm(env Environment) *DebugVm { return &DebugVm{env: env, logTy: lt, Recoverable: true} } -func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price *big.Int, callData []byte) (ret []byte, err error) { +func (self *DebugVm) Run(me, caller ContextRef, code []byte, value, gas, price *big.Int, callData []byte) (ret []byte, err error) { self.env.SetDepth(self.env.Depth() + 1) msg := self.env.State().Manifest().AddMessage(&state.Message{ @@ -47,7 +47,7 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * Block: self.env.BlockHash(), Timestamp: self.env.Time(), Coinbase: self.env.Coinbase(), Number: self.env.BlockNumber(), Value: value, }) - closure := NewClosure(msg, caller, me, code, gas, price) + context := NewContext(msg, caller, me, code, gas, price) if self.Recoverable { // Recover from any require exception @@ -55,9 +55,9 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * if r := recover(); r != nil { self.Printf(" %v", r).Endl() - closure.UseGas(closure.Gas) + context.UseGas(context.Gas) - ret = closure.Return(nil) + ret = context.Return(nil) err = fmt.Errorf("%v", r) @@ -66,13 +66,13 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * } if p := Precompiled[string(me.Address())]; p != nil { - return self.RunPrecompiled(p, callData, closure) + return self.RunPrecompiled(p, callData, context) } var ( op OpCode - destinations = analyseJumpDests(closure.Code) + destinations = analyseJumpDests(context.Code) mem = NewMemory() stack = NewStack() pc uint64 = 0 @@ -84,11 +84,19 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * p := to.Uint64() self.Printf(" ~> %v", to) + /* NOTE: new model. Will change soon + nop := OpCode(context.GetOp(p)) + if nop != JUMPDEST { + panic(fmt.Sprintf("invalid jump destination (%v) %v", nop, p)) + } + + pc = to.Uint64() + */ // Return to start if p == 0 { pc = 0 } else { - nop := OpCode(closure.GetOp(p)) + nop := OpCode(context.GetOp(p)) if !(nop == JUMPDEST || destinations[from] != nil) { panic(fmt.Sprintf("invalid jump destination (%v) %v", nop, p)) } else if nop == JUMP || nop == JUMPI { @@ -103,11 +111,11 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * } ) - vmlogger.Debugf("(%d) (%x) %x (code=%d) gas: %v (d) %x\n", self.env.Depth(), caller.Address()[:4], closure.Address(), len(code), closure.Gas, callData) + vmlogger.Debugf("(%d) (%x) %x (code=%d) gas: %v (d) %x\n", self.env.Depth(), caller.Address()[:4], context.Address(), len(code), context.Gas, callData) // Don't bother with the execution if there's no code. if len(code) == 0 { - return closure.Return(nil), nil + return context.Return(nil), nil } for { @@ -117,22 +125,22 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * step++ // Get the memory location of pc - op = closure.GetOp(pc) + op = context.GetOp(pc) self.Printf("(pc) %-3d -o- %-14s (m) %-4d (s) %-4d ", pc, op.String(), mem.Len(), stack.Len()) - newMemSize, gas := self.calculateGasAndSize(closure, caller, op, statedb, mem, stack) + newMemSize, gas := self.calculateGasAndSize(context, caller, op, statedb, mem, stack) - self.Printf("(g) %-3v (%v)", gas, closure.Gas) + self.Printf("(g) %-3v (%v)", gas, context.Gas) - if !closure.UseGas(gas) { + if !context.UseGas(gas) { self.Endl() - tmp := new(big.Int).Set(closure.Gas) + tmp := new(big.Int).Set(context.Gas) - closure.UseGas(closure.Gas) + context.UseGas(context.Gas) - return closure.Return(nil), OOG(gas, tmp) + return context.Return(nil), OOG(gas, tmp) } mem.Resize(newMemSize.Uint64()) @@ -410,9 +418,9 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * self.Printf(" => %x", data) // 0x30 range case ADDRESS: - stack.Push(ethutil.BigD(closure.Address())) + stack.Push(ethutil.BigD(context.Address())) - self.Printf(" => %x", closure.Address()) + self.Printf(" => %x", context.Address()) case BALANCE: addr := stack.Pop().Bytes() @@ -428,7 +436,7 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * self.Printf(" => %x", origin) case CALLER: - caller := closure.caller.Address() + caller := context.caller.Address() stack.Push(ethutil.BigD(caller)) self.Printf(" => %x", caller) @@ -485,7 +493,7 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * code = statedb.GetCode(addr) } else { - code = closure.Code + code = context.Code } l := big.NewInt(int64(len(code))) @@ -497,7 +505,7 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * if op == EXTCODECOPY { code = statedb.GetCode(stack.Pop().Bytes()) } else { - code = closure.Code + code = context.Code } var ( @@ -519,9 +527,9 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * self.Printf(" => [%v, %v, %v] %x", mOff, cOff, l, codeCopy) case GASPRICE: - stack.Push(closure.Price) + stack.Push(context.Price) - self.Printf(" => %v", closure.Price) + self.Printf(" => %v", context.Price) // 0x40 range case PREVHASH: @@ -560,7 +568,7 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * // 0x50 range case PUSH1, PUSH2, PUSH3, PUSH4, PUSH5, PUSH6, PUSH7, PUSH8, PUSH9, PUSH10, PUSH11, PUSH12, PUSH13, PUSH14, PUSH15, PUSH16, PUSH17, PUSH18, PUSH19, PUSH20, PUSH21, PUSH22, PUSH23, PUSH24, PUSH25, PUSH26, PUSH27, PUSH28, PUSH29, PUSH30, PUSH31, PUSH32: a := uint64(op - PUSH1 + 1) - byts := closure.GetRangeValue(pc+1, a) + byts := context.GetRangeValue(pc+1, a) // Push value to stack stack.Push(ethutil.BigD(byts)) pc += a @@ -589,7 +597,7 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * } data := mem.Geti(mStart.Int64(), mSize.Int64()) - log := &Log{closure.Address(), topics, data} + log := &Log{context.Address(), topics, data} self.env.AddLog(log) self.Printf(" => %v", log) @@ -614,15 +622,15 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * self.Printf(" => [%v] 0x%x", off, val) case SLOAD: loc := stack.Pop() - val := ethutil.BigD(statedb.GetState(closure.Address(), loc.Bytes())) + val := ethutil.BigD(statedb.GetState(context.Address(), loc.Bytes())) stack.Push(val) self.Printf(" {0x%x : 0x%x}", loc.Bytes(), val.Bytes()) case SSTORE: val, loc := stack.Popn() - statedb.SetState(closure.Address(), loc.Bytes(), val) + statedb.SetState(context.Address(), loc.Bytes(), val) - closure.message.AddStorageChange(loc.Bytes()) + context.message.AddStorageChange(loc.Bytes()) self.Printf(" {0x%x : 0x%x}", loc.Bytes(), val.Bytes()) case JUMP: @@ -644,7 +652,7 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * case MSIZE: stack.Push(big.NewInt(int64(mem.Len()))) case GAS: - stack.Push(closure.Gas) + stack.Push(context.Gas) // 0x60 range case CREATE: @@ -653,7 +661,7 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * value = stack.Pop() size, offset = stack.Popn() input = mem.Get(offset.Int64(), size.Int64()) - gas = new(big.Int).Set(closure.Gas) + gas = new(big.Int).Set(context.Gas) // Snapshot the current stack so we are able to // revert back to it later. @@ -661,15 +669,15 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * ) // Generate a new address - n := statedb.GetNonce(closure.Address()) - addr := crypto.CreateAddress(closure.Address(), n) - statedb.SetNonce(closure.Address(), n+1) + n := statedb.GetNonce(context.Address()) + addr := crypto.CreateAddress(context.Address(), n) + statedb.SetNonce(context.Address(), n+1) self.Printf(" (*) %x", addr).Endl() - closure.UseGas(closure.Gas) + context.UseGas(context.Gas) - ret, err, ref := self.env.Create(closure, addr, input, gas, price, value) + ret, err, ref := self.env.Create(context, addr, input, gas, price, value) if err != nil { stack.Push(ethutil.BigFalse) @@ -678,7 +686,7 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * // gas < len(ret) * CreateDataGas == NO_CODE dataGas := big.NewInt(int64(len(ret))) dataGas.Mul(dataGas, GasCreateByte) - if closure.UseGas(dataGas) { + if context.UseGas(dataGas) { ref.SetCode(ret) msg.Output = ret } @@ -690,7 +698,7 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * // Debug hook if self.Dbg != nil { - self.Dbg.SetCode(closure.Code) + self.Dbg.SetCode(context.Code) } case CALL, CALLCODE: self.Endl() @@ -711,9 +719,9 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * err error ) if op == CALLCODE { - ret, err = self.env.CallCode(closure, addr.Bytes(), args, gas, price, value) + ret, err = self.env.CallCode(context, addr.Bytes(), args, gas, price, value) } else { - ret, err = self.env.Call(closure, addr.Bytes(), args, gas, price, value) + ret, err = self.env.Call(context, addr.Bytes(), args, gas, price, value) } if err != nil { @@ -726,11 +734,11 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * mem.Set(retOffset.Uint64(), retSize.Uint64(), ret) } - self.Printf("resume %x (%v)", closure.Address(), closure.Gas) + self.Printf("resume %x (%v)", context.Address(), context.Gas) // Debug hook if self.Dbg != nil { - self.Dbg.SetCode(closure.Code) + self.Dbg.SetCode(context.Code) } case RETURN: @@ -739,27 +747,27 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * self.Printf(" => [%v, %v] (%d) 0x%x", offset, size, len(ret), ret).Endl() - return closure.Return(ret), nil + return context.Return(ret), nil case SUICIDE: receiver := statedb.GetOrNewStateObject(stack.Pop().Bytes()) - balance := statedb.GetBalance(closure.Address()) + balance := statedb.GetBalance(context.Address()) self.Printf(" => (%x) %v", receiver.Address()[:4], balance) receiver.AddAmount(balance) - statedb.Delete(closure.Address()) + statedb.Delete(context.Address()) fallthrough - case STOP: // Stop the closure + case STOP: // Stop the context self.Endl() - return closure.Return(nil), nil + return context.Return(nil), nil default: vmlogger.Debugf("(pc) %-3v Invalid opcode %x\n", pc, op) - closure.ReturnGas(big.NewInt(1), nil) + context.ReturnGas(big.NewInt(1), nil) - return closure.Return(nil), fmt.Errorf("Invalid opcode %x", op) + return context.Return(nil), fmt.Errorf("Invalid opcode %x", op) } pc++ @@ -771,11 +779,11 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * if pc == uint64(instrNo) { self.Stepping = true - if !self.Dbg.BreakHook(prevStep, op, mem, stack, statedb.GetStateObject(closure.Address())) { + if !self.Dbg.BreakHook(prevStep, op, mem, stack, statedb.GetStateObject(context.Address())) { return nil, nil } } else if self.Stepping { - if !self.Dbg.StepHook(prevStep, op, mem, stack, statedb.GetStateObject(closure.Address())) { + if !self.Dbg.StepHook(prevStep, op, mem, stack, statedb.GetStateObject(context.Address())) { return nil, nil } } @@ -785,7 +793,7 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * } } -func (self *DebugVm) calculateGasAndSize(closure *Closure, caller ClosureRef, op OpCode, statedb *state.StateDB, mem *Memory, stack *Stack) (*big.Int, *big.Int) { +func (self *DebugVm) calculateGasAndSize(context *Context, caller ContextRef, op OpCode, statedb *state.StateDB, mem *Memory, stack *Stack) (*big.Int, *big.Int) { gas := new(big.Int) addStepGasUsage := func(amount *big.Int) { if amount.Cmp(ethutil.Big0) >= 0 { @@ -844,7 +852,7 @@ func (self *DebugVm) calculateGasAndSize(closure *Closure, caller ClosureRef, op var mult *big.Int y, x := stack.Peekn() - val := statedb.GetState(closure.Address(), x.Bytes()) + val := statedb.GetState(context.Address(), x.Bytes()) if len(val) == 0 && len(y.Bytes()) > 0 { // 0 => non 0 mult = ethutil.Big3 @@ -940,22 +948,22 @@ func (self *DebugVm) calculateGasAndSize(closure *Closure, caller ClosureRef, op return newMemSize, gas } -func (self *DebugVm) RunPrecompiled(p *PrecompiledAccount, callData []byte, closure *Closure) (ret []byte, err error) { +func (self *DebugVm) RunPrecompiled(p *PrecompiledAccount, callData []byte, context *Context) (ret []byte, err error) { gas := p.Gas(len(callData)) - if closure.UseGas(gas) { + if context.UseGas(gas) { ret = p.Call(callData) self.Printf("NATIVE_FUNC => %x", ret) self.Endl() - return closure.Return(ret), nil + return context.Return(ret), nil } else { self.Endl() - tmp := new(big.Int).Set(closure.Gas) + tmp := new(big.Int).Set(context.Gas) - closure.UseGas(closure.Gas) + context.UseGas(context.Gas) - return closure.Return(nil), OOG(gas, tmp) + return context.Return(nil), OOG(gas, tmp) } } diff --git a/xeth/vm_env.go b/xeth/vm_env.go index 7633e0640c..d2a21afd5d 100644 --- a/xeth/vm_env.go +++ b/xeth/vm_env.go @@ -50,16 +50,16 @@ func (self *VMEnv) vm(addr, data []byte, gas, price, value *big.Int) *core.Execu return core.NewExecution(self, addr, data, gas, price, value) } -func (self *VMEnv) Call(me vm.ClosureRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error) { +func (self *VMEnv) Call(me vm.ContextRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error) { exe := self.vm(addr, data, gas, price, value) return exe.Call(addr, me) } -func (self *VMEnv) CallCode(me vm.ClosureRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error) { +func (self *VMEnv) CallCode(me vm.ContextRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error) { exe := self.vm(me.Address(), data, gas, price, value) return exe.Call(addr, me) } -func (self *VMEnv) Create(me vm.ClosureRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error, vm.ClosureRef) { +func (self *VMEnv) Create(me vm.ContextRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error, vm.ContextRef) { exe := self.vm(addr, data, gas, price, value) return exe.Create(me) } From 24f89f8bd9c05ce88249eee65f250d75aa6fcef5 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 2 Jan 2015 17:33:14 +0100 Subject: [PATCH 064/132] Squashed commit of the following: commit 2e75a216c7765d38d31f16703c89df752f0ef808 Author: CJentzsch Date: Fri Jan 2 17:05:20 2015 +0100 new jumpdest interpretation commit 7aab71f656a12e5183e0b63c41eaa6d2ff2eb83b Author: CJentzsch Date: Fri Jan 2 16:55:59 2015 +0100 added complete exp tests commit 3340f4dbfc83106aa6708c1ba7db0b8946beee6c Author: CJentzsch Date: Fri Jan 2 14:26:55 2015 +0100 retuning gas prices of recursive bombs to test limits commit 456b5791bb656acf82feb1e0ff67781a3ddf7817 Author: CJentzsch Date: Fri Jan 2 14:08:55 2015 +0100 more init code, systemoperations and transaction tests commit 1f5552feb4aa3a104b71d77b1e9d2369f42dde83 Author: wanderer Date: Mon Dec 29 20:11:41 2014 -0500 added balance tests commit 4d37c1cea2ca2999e8dd442ee137c942755697f6 Author: wanderer Date: Sat Dec 27 20:30:42 2014 -0500 added trie tests for branches on detel commit 2fdc7bfbd18f6357799a800eb73cc9d1576824e1 Author: CJentzsch Date: Sat Dec 27 22:46:21 2014 +0100 more random tests commit 98fe404e6a94d6f6cdd22fb47c07d01067bf987d Merge: aafb5f7 8c34e93 Author: CJentzsch Date: Tue Dec 23 16:36:13 2014 +0100 Merge remote-tracking branch 'origin/develop' into develop commit aafb5f768b7e161ea4e2853aaaf41cfadf5d04c0 Author: CJentzsch Date: Tue Dec 23 16:35:35 2014 +0100 first failing random tests commit 8c34e93b512676f23b877f7eb7e78b806dcb9401 Author: wanderer Date: Tue Dec 23 10:01:20 2014 -0500 added stackOverFlow test to initCode commit 8a285d258ac4a939c43297ac58bebde7460da896 Merge: a4ccc6e 6567f9d Author: CJentzsch Date: Sat Dec 20 13:08:18 2014 +0100 Merge remote-tracking branch 'origin/develop' into develop commit a4ccc6e72eb759a2d769107054af1646b79d3fc5 Author: CJentzsch Date: Sat Dec 20 13:07:54 2014 +0100 CALLCODE <-> RETURN commit 6567f9d0b2a537b0012653350d83b75c435331f0 Author: wanderer Date: Thu Dec 18 23:39:30 2014 -0500 add refund tests commit 07cfec33f85e41c91671569a80e67ffaf394bea8 Author: wanderer Date: Thu Dec 18 18:30:46 2014 -0500 added trieTest anyorder commit 86c3b8cfadba57af2801f1e2e1fa5963d65bf45e Merge: b227b10 71b5d6e Author: CJentzsch Date: Thu Dec 18 21:43:06 2014 +0100 Merge branch 'develop' of https://github.com/ethereum/tests into develop commit b227b10f5d18c0911df7955e14b1f00df4c41aa6 Author: CJentzsch Date: Thu Dec 18 21:42:41 2014 +0100 more refund tests commit 71b5d6e0a36cecd63f7051a5ad9955acfbe438e9 Author: wanderer Date: Thu Dec 18 12:13:55 2014 -0500 updated index.js commit aefcb9716efb4418e4b218b2c2923295dd03f1a3 Author: CJentzsch Date: Thu Dec 18 09:31:43 2014 +0100 transaction tests and refund tests commit ccbf120c360e46f94d95735a469ee3d919fd7594 Author: CJentzsch Date: Sat Dec 13 23:03:21 2014 +0100 added stInitCodeTest.json commit cbf5afdef80a8cf711e8764153afd5a2eab8e76a Author: CJentzsch Date: Fri Dec 12 22:03:54 2014 +0100 update recursive create commit a70c4b51a4a2983d4331d11002e5eb05572e47ae Author: Gav Wood Date: Fri Dec 12 17:22:41 2014 +0100 Fix return tests. commit f1464676074592ee410804653f6c191b931b24f1 Author: Gav Wood Date: Fri Dec 12 16:33:51 2014 +0100 Add test file. commit c2bd8d1d7aae5c3a13340719e79ea652f31248bf Author: Gav Wood Date: Fri Dec 12 14:27:38 2014 +0100 Alter "" to null. commit ce6344b77036ea4030bc0d93056bccc96106a438 Author: Gav Wood Date: Fri Dec 12 14:22:19 2014 +0100 Trie testing. commit 779f25d36c770fcc0bdf135c8baf13be9b0a77b9 Author: CJentzsch Date: Thu Dec 11 22:59:56 2014 +0100 first random test commit 68175386c0606a824686606e992c2544775ef6c9 Author: CJentzsch Date: Thu Dec 11 21:34:50 2014 +0100 update gas prices commit ad322fbb58e87ee5175cfaf4b8f9650675660e08 Author: CJentzsch Date: Mon Dec 8 06:01:17 2014 +0100 Log as array commit f989f42618ffdaeb004c2c99007189b4739c8fad Author: CJentzsch Date: Fri Dec 5 15:12:12 2014 +0100 state log tests commit 4bc65d1129efa36eae3c83fa8f11bb7df9bcaea5 Author: CJentzsch Date: Thu Dec 4 18:18:49 2014 +0100 add calldataload, codecopy, extcodecopy tests commit 12cfae18e3e5250cca9af0932bd4178cf190b794 Author: CJentzsch Date: Thu Dec 4 15:57:56 2014 +0100 add calldataload test commit 086caf37011478ec847c7a9071f057832ad3be3e Author: CJentzsch Date: Wed Dec 3 08:31:03 2014 +0100 protocol update (CALLCODE <-> RETURN), topics in log are arrays not sets commit e6c92673b9cee6146a89e0eb28894620fe5ac035 Author: CJentzsch Date: Mon Dec 1 21:14:08 2014 +0100 update state tests with logs commit 4089b809fb9b5daea24ab88ad3e3e3947b3ff6d7 Author: CJentzsch Date: Mon Dec 1 18:19:40 2014 +0100 update gas costs commit cfdca6227716b66bd64b64c6aab864fde69336d3 Merge: 2e5175e f59f89d Author: Christoph Jentzsch Date: Mon Dec 1 18:04:51 2014 +0100 Merge pull request #42 from negedzuregal/fix vmTest fix commit f59f89d876c0e44d88b3daa4f0d26e6764ccbe0b Author: alon muroch Date: Mon Dec 1 16:18:12 2014 +0100 vmEnvironmentalInfoTest CALLDATACOPY, CODECOPY, EXTCODECOPY fix commit 68da13fe3e2efe85898e8a4ffeb99e2a8f8c103d Author: alon muroch Date: Mon Dec 1 11:10:57 2014 +0100 vmArithmeticTest exp fix commit 2e5175e818d817cda4607f9e731632393e2eb93e Author: ethers Date: Sun Nov 30 19:55:51 2014 +0100 add vmLogTest commit b5b9408e641031ded31a87792c4ec613c8afabbf Author: Heiko Heiko Date: Sun Nov 30 16:27:27 2014 +0100 updated genesis to new header w/o min_gas_price commit 8e69fbfa98d95116734f2349f6d90fbd479b694a Author: ethers Date: Fri Nov 21 17:42:05 2014 -0800 add special tests commit 90f4f942e68f38e833a727214d5810be3f8f6cf5 Author: ethers Date: Thu Nov 20 19:01:09 2014 -0800 typo commit c5e5228e0d47ec237ef6a28e696dda47a4a3a85e Author: Christoph Jentzsch Date: Thu Nov 20 17:04:06 2014 +0100 Removed log,post,out,gas,callcreates if exception occured commit 9c0232a2b995bd608f5f541e6f607d373797641d Author: Christoph Jentzsch Date: Wed Nov 19 18:19:05 2014 +0100 MakeMoney test commit 3ba0007e868e9cfc802443d6f5d42ba35a4209cb Author: Christoph Jentzsch Date: Wed Nov 19 16:23:04 2014 +0100 Added log sections in all vmtests + log tests commit d84be4fe07bb240c1ae56f63580e0e4655611e62 Merge: c8497ab 76d2542 Author: Christoph Jentzsch Date: Wed Nov 19 10:00:24 2014 +0100 Merge remote-tracking branch 'origin/develop' into develop commit c8497ab25724bb6aed40fcd0462f3789380848a1 Author: Christoph Jentzsch Date: Wed Nov 19 10:00:02 2014 +0100 new push32 test and renaming commit 76d25420e153e18c667aa4991dcacf12e8f4fb5c Author: ethers Date: Mon Nov 17 18:59:30 2014 -0800 adding test commit 0be275e757744de496a80525ad8aa153def89fd3 Merge: 1d42d1d d90868c Author: Christoph Jentzsch Date: Mon Nov 17 22:47:34 2014 +0100 Merge remote-tracking branch 'origin/develop' into develop commit 1d42d1d7c620fb3e6d0e284697d5041226567af9 Author: Christoph Jentzsch Date: Mon Nov 17 22:46:51 2014 +0100 fix ecrecover2 commit d90868c3070624bc38668a0f3ceef3e3806d9f00 Merge: 1f38c8c 6dbcf6b Author: Christoph Jentzsch Date: Mon Nov 17 20:26:59 2014 +0100 Merge pull request #39 from wanderer/develop added test for max call depth on creation commit 6dbcf6b0d6bb68ceaa743e18a52ac815f495d408 Author: wanderer Date: Mon Nov 17 14:06:43 2014 -0500 spelling fix commit 6fc07a7f81408308e56db105afcad191f81c43bc Author: wanderer Date: Sat Nov 15 21:39:16 2014 -0500 added test for max call depth on creation commit 1f38c8c0a2e306fa95e8332c03a02e72fe26f9be Merge: 279b284 cd85ca1 Author: martin becze Date: Fri Nov 14 20:10:21 2014 -0500 Merge pull request #38 from wanderer/develop updated test 'jeff' in trietest.json commit cd85ca17edd314b3744c46573f1d5093e9be2db3 Author: martin becze Date: Fri Nov 14 19:59:34 2014 -0500 Update trietest.json commit 279b284c0d03737360ae36ce2c0da06d70e91c2c Merge: 89675a7 6cae937 Author: martin becze Date: Fri Nov 14 17:43:49 2014 -0500 Merge pull request #37 from wanderer/develop Update trietest.json commit 6cae937e5eee1c904b636440653b6157359c0963 Author: martin becze Date: Fri Nov 14 17:20:03 2014 -0500 Update trietest.json 'emptyValues' should have the same root as 'puppy' commit 89675a71537e6a386f97a9190db40276b388d692 Merge: f1de1cc 32f0c47 Author: Christoph Jentzsch Date: Thu Nov 13 23:17:49 2014 +0100 Merge remote-tracking branch 'origin/develop' into develop commit f1de1cc97a556adad8a4a864267150c39bef4d85 Author: Christoph Jentzsch Date: Thu Nov 13 23:17:13 2014 +0100 Fix CallRecursiveBomb2 commit 32f0c47c6801974c210c3b93792105a9183f9e7b Merge: ab50e76 3da90d0 Author: martin becze Date: Thu Nov 13 15:26:49 2014 -0500 Merge pull request #36 from wanderer/develop converted back to arrary format commit ab50e766521ca31febe21677909a665043937488 Merge: d06b792 78f1e4a Author: Christoph Jentzsch Date: Thu Nov 13 07:52:35 2014 +0100 Merge pull request #35 from ethers/delOld rename tests since they are valid opcodes that exist commit 3da90d01f6f9e79190ebcd3a6513f481eacbbae2 Author: wanderer Date: Wed Nov 12 22:22:47 2014 -0500 converted back to arrary format commit 78f1e4a9452566f5645a7f5ade6aad79901d5f98 Author: ethers Date: Wed Nov 12 19:11:06 2014 -0800 rename tests since they are valid opcodes that exist commit d06b792cd0c80d48aa206dd9126b515e4fb1d606 Author: Christoph Jentzsch Date: Wed Nov 12 07:00:17 2014 +0100 minor change in CallSha256_1_nonzeroValue test commit d434ecdcc37af4bb53058a43884df8085c5efe73 Author: Christoph Jentzsch Date: Wed Nov 12 06:56:31 2014 +0100 Added CallSha256_1_nonzeroValue test commit 2c06f34cc00e6c41dc0c68d3e99825731e0603ab Author: Christoph Jentzsch Date: Tue Nov 11 18:10:26 2014 +0100 Store return value of call to precompiled contracts commit 4b0c3b29ae5b8807d7d244340a625c6144320df0 Author: Christoph Jentzsch Date: Tue Nov 11 17:51:14 2014 +0100 Fix gas cost for OOG calls commit 63bcca7604dce4f912776f4e2e9954ceca02dfcf Author: Heiko Heiko Date: Tue Nov 11 08:59:19 2014 +0100 fix: genesis test commit 6e0310c1ea7b0f8af7a337df93b3b83591a6e647 Merge: 30c266c 2927763 Author: Christoph Jentzsch Date: Tue Nov 11 08:34:36 2014 +0100 Merge remote-tracking branch 'origin/develop' into develop commit 30c266caff8c253438e542a81501a313c3c06eaf Author: Christoph Jentzsch Date: Tue Nov 11 08:33:59 2014 +0100 jump to position outside code stops execution commit 2927763d68df91c16a4a463a3fbb91a2e67e22e9 Author: ethers Date: Mon Nov 10 14:10:22 2014 -0800 RandomTests were removed commit a0fa91b2b82c2a4b97e08d7e9b32abc1188d0ce0 Merge: 6092484 fcba866 Author: Christoph Jentzsch Date: Mon Nov 10 22:22:05 2014 +0100 Merge branch 'develop' of https://github.com/ethereum/tests into develop commit 60924843f07f394c8e95782ab52d56ef27d5e642 Author: Christoph Jentzsch Date: Mon Nov 10 22:21:37 2014 +0100 Unintended Exceptions work like OOG commit fcba86672193d6bd19ab2104432348eff3f353f2 Author: ethers Date: Thu Nov 6 14:19:59 2014 -0800 add StateTests commit a441074ba4b057e2918735f7427841b92aa3c16e Author: Christoph Jentzsch Date: Thu Nov 6 17:54:36 2014 +0100 Updated precompiled contracts test commit 0afa72c82be2f4996d1662dfbf9e019c5267c6b1 Author: Christoph Jentzsch Date: Thu Nov 6 15:27:45 2014 +0100 Added precompiledContracts tests commit 6be83dd5a185048cfdb8ec29659f14abaeab0c42 Author: Christoph Jentzsch Date: Thu Nov 6 13:31:34 2014 +0100 Update gas cost for PoC7 commit c18b8ab2d3462e813b731e525afc9ea414d8d136 Merge: 66c2e1f 9a93258 Author: Christoph Jentzsch Date: Thu Nov 6 09:19:53 2014 +0100 Merge remote-tracking branch 'origin/develop' into develop commit 66c2e1f642a7b37d9f3631e4573100b0cdc36cef Author: Christoph Jentzsch Date: Thu Nov 6 09:19:22 2014 +0100 Updated SIGNEXTEND tests commit 9a9325822e756dafce8d7418bd4fda63acf84d2d Author: ethers Date: Wed Nov 5 16:20:26 2014 -0800 part of 9b4e768 - Delete vmNamecoin.json commit e229374f467452bf82fd0cc86b18f224dabfadfa Merge: 189527e 9b4e768 Author: Christoph Jentzsch Date: Wed Nov 5 20:59:49 2014 +0100 Merge remote-tracking branch 'origin/develop' into develop commit 189527e563a6e7a39654a9544a2b0d873be7176f Author: Christoph Jentzsch Date: Wed Nov 5 20:59:20 2014 +0100 added dynamic jump out of code commit 9b4e7689951e50c7de3bd945784b92242ed8fd63 Author: Christoph Jentzsch Date: Wed Nov 5 20:41:54 2014 +0100 Delete vmNamecoin.json commit 4669b5694b9dc7bdf9e6f527323dff612b65634d Merge: a567fed aaba185 Author: Christoph Jentzsch Date: Wed Nov 5 15:00:12 2014 +0100 Merge remote-tracking branch 'origin/develop' into develop commit a567fedaa7f8ff8904bd90447fc4b68685bf2af9 Author: Christoph Jentzsch Date: Wed Nov 5 14:59:08 2014 +0100 added state systemOperationsTest commit aaba185ceb0e4c37151134f3e1ded9714d6b7685 Merge: 79d7cbf fa782ae Author: ethers Date: Tue Nov 4 12:15:40 2014 -0800 Merge pull request #32 from ethers/indexjs updates needed per restructure commit fa782aed93934eb51347d08facea838bb4262b1b Author: ethers Date: Tue Nov 4 11:28:56 2014 -0800 updates needed per restructure commit 79d7cbfc4a9cf3d70ae01dea8ee76c770af33211 Merge: 9120274 1c1ba8d Author: Christoph Jentzsch Date: Tue Nov 4 13:32:11 2014 +0100 Merge remote-tracking branch 'origin/develop' into develop commit 9120274a46d696cda6d595b2ec5acc2947eb2b46 Author: Christoph Jentzsch Date: Tue Nov 4 13:31:27 2014 +0100 Update tests to latest protocol changes (PoC7) commit 1c1ba8d161817b391ea296391ad3ede3e71c0aa1 Merge: 014d370 3aebe53 Author: Christoph Jentzsch Date: Tue Nov 4 13:30:52 2014 +0100 Merge pull request #31 from CJentzsch/develop Restructered tests in folders in accordance to test suites commit 3aebe532e536eb6f6766ccac456c07023ab822e1 Author: Christoph Jentzsch Date: Mon Nov 3 13:58:21 2014 +0100 Updated vmNamecoin.json to new sstore prices commit 8a0be21839cf8bb7d3d80a2b61c8433b5d3a8bfd Author: Christoph Jentzsch Date: Mon Nov 3 13:53:00 2014 +0100 Added example state test commit 83643addbc3d50c6a79611a5d8700aad5fb1df16 Author: Christoph Jentzsch Date: Mon Nov 3 13:36:25 2014 +0100 removed systemoperationstests commit 3930ca3a9a377107d5792b3e7202f79c688f1a67 Author: Christoph Jentzsch Date: Mon Nov 3 13:22:15 2014 +0100 Restructered tests in folders in accordance to test suites commit 014d370b5d5d0a807cc31a2fc3a8c5313ccd7ea4 Author: Christoph Jentzsch Date: Wed Oct 29 21:23:56 2014 +0100 New SIGNEXTEND tets commit 155d449be206f5276f689770006ecbbb203dd6ad Author: Christoph Jentzsch Date: Wed Oct 29 20:59:05 2014 +0100 New tests for BNOT and SIGNEXTEND commit c9eae764b8921a5d6c929b8544cb9acdb920453c Author: Christoph Jentzsch Date: Tue Oct 28 12:58:27 2014 +0100 Update SSTORE gas cost and BNOT instead of NEG commit ad2a75ac58ddcb06316f68d0fdaa8e80828a990c Author: Christoph Jentzsch Date: Thu Oct 23 16:05:49 2014 +0200 Added new recursive bombs commit 834c52af6406b9af429104408ca7bcbc525efe5c Author: Christoph Jentzsch Date: Thu Oct 23 12:01:05 2014 +0200 Changing gas cost to zero at stackunderflow commit c73a8a89d23cbdaf80875667437d57c3ee32f08a Author: Jeffrey Wilcke Date: Wed Oct 22 13:04:45 2014 +0200 Reverted back to original value. commit b9a8c924227996ef281d44ccfcc72c7618027f91 Author: martin becze Date: Tue Oct 21 17:02:52 2014 -0400 fix spelling error commit b48ae74af441c00cdce487416be448b0df3d4323 Author: Christoph Jentzsch Date: Tue Oct 21 17:26:26 2014 +0200 Added failing random tests commit bee0a4100c69cabfa361e36831ec0f64187188f3 Merge: 5050d20 b315da6 Author: Christoph Jentzsch Date: Tue Oct 21 17:15:05 2014 +0200 Merge remote-tracking branch 'origin/master' into develop commit 5050d20b4d0321e3e4ea2f118781c7bb96a3d7b5 Merge: 7516685 ba35362 Author: Christoph Jentzsch Date: Mon Oct 20 20:18:20 2014 +0200 Merge pull request #26 from wanderer/develop Add a package.json for node.js commit ba35362876caa03b11c7ce777d959b99accbcfb0 Author: wanderer Date: Sun Oct 19 23:59:47 2014 -0400 turned tests into a node module commit 751668571e390e6bceb515d082222aa31b5e5b14 Author: ethers Date: Thu Oct 16 17:08:20 2014 -0700 json was invalid and missing quotes commit 0e687cee479acfd82861e13d2022ad430fc78d78 Author: Jeffrey Wilcke Date: Thu Oct 16 17:13:24 2014 +0200 Update vmEnvironmentalInfoTest.json commit 78a78e2e6cffb9357f2281070d83bf869ab8b2f4 Author: Christoph Jentzsch Date: Wed Oct 15 14:19:11 2014 +0200 updated genesis_hash commit b315da618b55b581ba8e87f83b2ab5175841392e Merge: 7a7e198 0a76a3a Author: Christoph Jentzsch Date: Tue Oct 14 10:33:26 2014 +0200 Merge pull request #23 from ethers/fix22 numbers should be strings #22 commit 0a76a3a312951e852509e2b378b2b5b3f87135b0 Author: ethers Date: Mon Oct 13 14:45:30 2014 -0700 numbers should be strings #22 commit 1f67385f130422588f92341fe82c2435b160fe84 Author: Christoph Jentzsch Date: Sat Oct 11 13:18:00 2014 +0200 Added some MUL tests commit 7a7e198395f776d0a95d252ddc3b30492b9d3cff Author: Christoph Jentzsch Date: Sat Oct 11 13:11:59 2014 +0200 Added some MUL tests commit 46eb6283ae6c147f7efa910dadc18a504b6725ed Author: Christoph Jentzsch Date: Sat Oct 11 12:18:13 2014 +0200 tested new opcodes (JUMPDEST,CALLCODE) and created test for CALL/CREATE depth commit 8d38d62d1053ed7552211105e26b2e248a3db747 Author: Nick Savers Date: Fri Oct 10 18:09:41 2014 +0200 INVALID stops the operation and doesn't cost gas commit ed6eba7c8ebc0cbb65ccd45b047823f9acc1471b Author: Christoph Jentzsch Date: Wed Oct 8 19:08:48 2014 +0200 Update + ABA recursive bomb which needs maximum recursion limit of 1024 commit 2d72050db1c67d9d6912ce6ade80dbe5685749ff Author: Christoph Jentzsch Date: Wed Oct 8 14:37:18 2014 +0200 Applied recent protocol changes (PoC7) to existin tests commit dfe66cab3fb533003ddaec7250d8fffbf3fbad65 Merge: 4513623 1a67a96 Author: Christoph Jentzsch Date: Wed Oct 8 11:05:51 2014 +0200 Merge remote-tracking branch 'origin/develop' Conflicts: genesishashestest.json commit 1a67a96cff2fba02e57a82d65007cec99dcc313c Merge: a4f5f45 ffd6bc9 Author: vbuterin Date: Tue Oct 7 15:10:23 2014 +0100 Merge pull request #18 from CJentzsch/develop CallToNameRegistratorOutOfGas balance correction commit ffd6bc97adfbc83b6e0c50cdf072fd58f94ace69 Merge: a4f5f45 9779d67 Author: Christoph Jentzsch Date: Tue Oct 7 15:47:34 2014 +0200 Merge remote-tracking branch 'origin/develop' into develop commit 9779d67b8cdf4e99818a5eeadbc3aebd7527b1a9 Author: Christoph Jentzsch Date: Tue Oct 7 15:45:53 2014 +0200 CallToNameRegistratorOutOfGas balance correction Even if execution fails, the value gets transferred. commit a4f5f45228b6f3ebf8ea77c47515149a3df2bc24 Merge: 49a9f47 b6d7cba Author: vbuterin Date: Tue Oct 7 14:13:12 2014 +0100 Merge pull request #17 from CJentzsch/develop Added A calls B calls A contracts commit b6d7cba49914362297c0fcac48d868ffe3bdf06a Merge: 865cb40 49a9f47 Author: Christoph Jentzsch Date: Tue Oct 7 15:02:51 2014 +0200 Merge remote-tracking branch 'upstream/develop' into develop commit 865cb4083d33de2a9115ee39c73aea56b0c34fe8 Author: Christoph Jentzsch Date: Tue Oct 7 15:02:36 2014 +0200 Added A calls B calls A contracts commit 49a9f47aec2dbd6e321298947929b3d0b5abc280 Merge: 3b0ec43 94a493b Author: Jeffrey Wilcke Date: Tue Oct 7 10:56:17 2014 +0200 Merge pull request #16 from CJentzsch/develop corrected amount of used gas for CallToNameRegistratorOutOfGas commit 94a493b0d94163e3de96e1c4bb389ef745756f30 Merge: 72853c4 3b0ec43 Author: Christoph Jentzsch Date: Tue Oct 7 10:51:32 2014 +0200 Merge remote-tracking branch 'upstream/develop' into develop commit 72853c4382fa1b51e384223da34427d3579fe48a Author: Christoph Jentzsch Date: Tue Oct 7 10:51:07 2014 +0200 corrected amount of used gas for CallToNameRegistratorOutOfGas commit 3b0ec436e4c6808f98f1bc5bb5c66b4d2be4b4be Merge: aec3252 222068b Author: vbuterin Date: Tue Oct 7 05:52:43 2014 +0100 Merge pull request #15 from CJentzsch/develop corrected tests and different style for storage commit 222068b9bac6c386e499cb6b0fc2af562fcd309e Merge: c169653 aec3252 Author: Christoph Jentzsch Date: Mon Oct 6 21:17:28 2014 +0200 Merge remote-tracking branch 'upstream/develop' into develop commit c1696531a646309b2b286abb7552eb05f1278cd1 Author: Christoph Jentzsch Date: Mon Oct 6 21:17:09 2014 +0200 corrected tests and different style for storage commit aec3252b8e9f6d37b5cf3dbe0c1678e08929d291 Merge: 25f9fd5 e17a909 Author: vbuterin Date: Mon Oct 6 09:39:46 2014 +0100 Merge pull request #14 from CJentzsch/develop corrected gas limit in vmSystemOperationsTest commit e17a909f70af18fbfc0216c061a663e8778e7d5c Merge: 33fcab5 25f9fd5 Author: Christoph Jentzsch Date: Mon Oct 6 10:31:51 2014 +0200 Merge remote-tracking branch 'upstream/develop' into develop commit 33fcab57273731f449e9504d15c5d22cbe773e2a Author: Christoph Jentzsch Date: Mon Oct 6 10:30:04 2014 +0200 Bug fix, corrected gasLimit in vmSystemOperationsTest commit 25f9fd542a4ab27a5a66668a72b84d4bf7c292e6 Author: Vitalik Buterin Date: Sat Oct 4 15:47:00 2014 -0400 one more vm test commit 2d561a5373faf392e51f8c579c936549db2966d3 Author: Vitalik Buterin Date: Sat Oct 4 15:15:37 2014 -0400 separated out vmtests commit b0c48fa8d69ae02e01931a5675fc58ff9e84aba3 Merge: cb8261a 6cae166 Author: vbuterin Date: Sat Oct 4 17:18:02 2014 +0100 Merge pull request #13 from CJentzsch/develop Added comprehensive EVM test suite. All commands are tested. commit 6cae166f6f1e3f4eaaef6a9036c597b6064b263a Author: Christoph Jentzsch Date: Wed Oct 1 15:34:23 2014 +0200 Delete tmp.json commit 4ff906fbc271ee3aee3eb5db135e591eb187793a Author: Christoph Jentzsch Date: Wed Oct 1 14:06:32 2014 +0200 corrected CALLSTATELESS tests commit 5b3fee6806a69545e572725add73c297e9473eee Author: Christoph Jentzsch Date: Mon Sep 29 13:08:44 2014 +0200 Completed vm tests. Added ADDMOD, MULMOD, POST, CALLSTATELESS commit 9cdd2180833d98cf967929e07cab6638c2e933d0 Author: Christoph Jentzsch Date: Sat Sep 27 21:48:09 2014 +0200 Added IOandFlowOperation-, PushDupSwap- and SystemOperations- tests. Removed empty storage from adresses. commit 28ed968b46590bd8f3e5bb25606e8f83e0ee9b9e Author: Christoph Jentzsch Date: Tue Sep 23 15:49:22 2014 +0200 Added blockInfoTest commit ffbd5a35b597d2908fa0fa37d9b2aeaf30aee155 Author: Christoph Jentzsch Date: Tue Sep 23 15:37:52 2014 +0200 Added environmentalInfo- and sha3- test commit 54c14f1ff3f7ec66d755181be32a13e0404110d9 Author: Christoph Jentzsch Date: Mon Sep 22 13:06:57 2014 +0200 Added bitwise logic operation test commit d0af113aab3991fecbde29933f4a77884fafdf60 Author: Christoph Jentzsch Date: Sat Sep 20 01:42:51 2014 +0200 Added vm arithmetic test commit cb8261a78b56197e421bce5ac2afb7147f5acb45 Author: Jeffrey Wilcke Date: Fri Sep 19 13:15:44 2014 +0200 Update genesishashestest.json commit 4513623da1110e74a236abf0357ad00ff7a38126 Author: Maran Date: Tue Jul 22 12:24:46 2014 +0200 Update keyaddrtest to be valid JSON commit e8cb5c221d4763c8c26ac73f99609b64a595f4b3 Author: Vitalik Buterin Date: Mon Jul 21 23:30:33 2014 -0400 Added next/prev trie test commit 98823c04b30ef0be478c69a11edc3f9f6dff567e Author: Vitalik Buterin Date: Mon Jul 14 02:51:31 2014 -0400 Replaced with deterministic test commit 357eb21e4d5d9d6713ba7c63a76bd597a57d6a0e Author: Vitalik Buterin Date: Sun Jul 13 16:12:56 2014 -0400 Added my own random and namecoin tests (pyethereum) commit 00cd0cce8f0fc0ca8aa2c8ca424954d4932672f2 Author: Gav Wood Date: Sat Jul 12 21:20:04 2014 +0200 Output hex strings. commit ddfa3af45da9d5d81da38745ae23ee93ce390c2b Author: Gav Wood Date: Thu Jul 10 11:28:35 2014 +0100 Everything a string. commit d659f469a9ddcdd144a332da64b826908b0f7872 Author: Gav Wood Date: Thu Jul 10 10:16:25 2014 +0100 Code fixes. commit 5e83ea82283f042df384d7ff20183ba51760d893 Author: Gav Wood Date: Sun Jul 6 16:17:12 2014 +0200 Prettier VM tests. commit a09aae0efe9a1cb94be3e0386532c532262956ec Author: Gav Wood Date: Sun Jul 6 15:46:01 2014 +0200 Fix VM tests. commit ec9a044a17779f0b3814bffa8c058b4091d6d13d Merge: 4bb6461 5e0123f Author: Jeffrey Wilcke Date: Fri Jul 4 15:56:52 2014 +0200 Merge pull request #10 from romanman/patch-1 Update vmtests.json commit 5e0123fbe1573dcf8157995f3ef2f7ce625235a4 Author: romanman Date: Fri Jul 4 10:23:04 2014 +0100 Update vmtests.json commit 2b6da2f5f21b60ebca44a5866888b00f736f92b2 Author: romanman Date: Thu Jul 3 17:45:04 2014 +0100 Update vmtests.json arith testcase updated commit 4bb646117d0034fb459c07e6955b1c9cca802fa9 Merge: bba3898 a33b309 Author: Gav Wood Date: Wed Jul 2 19:43:22 2014 +0200 Merge branch 'develop' of github.com:/ethereum/tests into develop commit bba38980bdfa6ba6fddf0419479ad2405a3cb079 Author: Gav Wood Date: Wed Jul 2 19:43:06 2014 +0200 New tests. commit a33b309d99b36c4c57083d5e77422c3f2bba4bbe Author: Vitalik Buterin Date: Wed Jul 2 10:14:05 2014 -0400 Testing submodules commit 50318217ca875d23147eddfa7cc0326242db90bf Author: Vitalik Buterin Date: Wed Jul 2 10:10:46 2014 -0400 Testing submodules commit 57fa655522fc9696adcc7a6a25b64afd569b0758 Author: Vitalik Buterin Date: Wed Jul 2 10:09:08 2014 -0400 Testing submodules commit ea0eb0a8c82521322bd0359d1c42fc013c433d2e Author: Gav Wood Date: Tue Jul 1 15:19:34 2014 +0200 Latest genesis block. commit 25bb76b69c90ebd44a271d7c180a4a4b86845018 Author: Jeffrey Wilcke Date: Mon Jun 30 13:25:04 2014 +0200 Reset commit 74c6d8424e7d91ccd592c179794bc74e63c0d8c0 Author: Jeffrey Wilcke Date: Mon Jun 30 12:10:06 2014 +0200 Updated wrong test commit 9ea3a60291f2ca68a54198d53e4c40fffb09f6b3 Author: Jeffrey Wilcke Date: Sat Jun 28 18:48:28 2014 +0200 Fixed roots commit 5fc3ac0e925cdfe95632024f574fb945558491b8 Author: Gav Wood Date: Sat Jun 28 18:40:06 2014 +0200 Simple hex test. commit edd3a00c2a8d78867d8bb1557697455729a03027 Author: Gav Wood Date: Sat Jun 28 18:22:18 2014 +0200 Additional test for jeff. Now use the 0x... notation. commit 5021e0dd83bdb8b23ca3dcc72293c6737e8165a8 Author: Gav Wood Date: Fri Jun 27 21:35:26 2014 +0200 VM test framework updated. commit c818d132022c228c5b04ab82871f5971049b0c6d Author: Gav Wood Date: Fri Jun 27 18:18:24 2014 +0200 Removed arrays from Trie tests JSON as per conformance guide and changed vocabulary to match other tests. VM test updates. commit 714770ffb3bb037e2daeaa37a6f4f4066387abe3 Author: Gav Wood Date: Wed Jun 11 11:32:42 2014 +0100 Added Gav's new address. commit 9345bc13d40e6d288c37b650ace1db0c41a89d84 Merge: a2257f3 78576dd Author: Gav Wood Date: Fri May 30 17:50:38 2014 +0200 Merge branch 'master' of github.com:ethereum/tests into develop commit a2257f3471dd4b472bc156be4575ea0f26a8a046 Author: Gav Wood Date: Fri May 30 17:50:18 2014 +0200 VM tests. commit 78576dd3d3d4bf46af19d703affdd42f221e49c9 Author: Heiko Heiko Date: Fri May 30 17:19:09 2014 +0200 changes based on new account structure nonce, balance, storage, code commit 125839e84833ec25e0fdd4fbd545772ba706fe6b Merge: 42e14ec 356a329 Author: Jeffrey Wilcke Date: Thu May 22 09:58:45 2014 +0200 Merge pull request #5 from bkirwi/master Fix invalid JSON (removed trailing comma) and add test names commit 356a3296bc7eeac8b1b65aa843b5856cd786c4cf Author: Ben Kirwin Date: Thu May 22 00:20:48 2014 -0400 Add some arbitrary test names This should now conform to the format specified in the README. commit 42e14ec54fa57c2373625d21e5b47f597c748bf5 Author: Chen Houwu Date: Wed May 21 23:27:40 2014 +0800 revert to correct data commit 4300197a748de29cc5c93fd77f13cae029dad49e Author: Chen Houwu Date: Wed May 21 22:42:23 2014 +0800 fix: wrong sha3 hash because of the wrong rlp hex commit a0d01b1a0b59555e38ea694ff864f2aa25a0d953 Author: Chen Houwu Date: Wed May 21 22:29:53 2014 +0800 fix: wrong rlp hex commit 6bc2fc74054a418e7cfca9cf9144237a5e4fa65f Merge: 66bc366 c31a93c Author: Jeffrey Wilcke Date: Wed May 21 14:11:37 2014 +0200 Merge pull request #4 from ethers/master fix file name that seems to have been a typo commit c31a93c27a9048df92fcf53a2201c6e3737a40fd Author: ethers Date: Tue May 20 15:42:39 2014 -0700 fix file name that seems to have been a typo commit 66bc3665c17e1eec309e5a40b2a9c74273fb639a Author: Heiko Heiko Date: Tue May 20 17:36:35 2014 +0200 fix: represent integers as strings commit ede5499da624d95db1cad63939be56f7bdaa6389 Author: Heiko Heiko Date: Tue May 20 17:21:09 2014 +0200 add: current initial alloc and genesis hashes commit 5131429abbe6d2636064e17b45c99827a904c345 Author: Ben Kirwin Date: Mon May 19 11:18:31 2014 -0400 Delete a comma This should now be parseable as JSON. commit f44a85933110dd3ef362090f512678e99ae80256 Author: Chen Houwu Date: Sun May 18 15:04:42 2014 +0800 add: case when value is long, ensure it's not get rlp encoded as node commit e1ae4ad4495dd13fba6346274971a8871cb32607 Author: Gav Wood Date: Mon May 12 14:40:47 2014 +0100 PoC-5 VM tests. commit 2b6c136dda0d55a0ebd228bff029d97411c9cec6 Author: Vitalik Buterin Date: Sun May 11 21:42:41 2014 -0400 Moved txt to json commit cbccbf977ca7bde15a661a4b453ea062e62ac856 Merge: edbb8d4 45a0974 Author: Vitalik Buterin Date: Thu May 8 21:54:48 2014 -0400 New commit commit edbb8d407ecfbcbb6504659cbd9bdabdb93369e3 Author: Vitalik Buterin Date: Tue May 6 16:53:43 2014 -0400 Removed unneeded test, added new tests commit 45a0974f6f32511119e40a27042fdd571fe47a16 Merge: 15dd8fd 5fd2a98 Author: Gav Wood Date: Sun Apr 27 12:53:47 2014 +0100 Merge pull request #3 from autolycus/develop Fixed formatting and added test cases commit 5fd2a98fcb4f6a648160204d1b20b0f980d55b9d Author: Carl Allendorph Date: Sat Apr 19 13:26:14 2014 -0700 Added some new test cases for the rlp encoding. commit 4ba150954ef8ac72416a35f06fdad9c6d7ed461d Author: Carl Allendorph Date: Sat Apr 19 12:48:42 2014 -0700 Converted spaces to tabs to be compliant with the coding standards defined in cpp-ethereum commit 15dd8fd794a0dc305ef7696d0c2a68e032bc9759 Author: Gav Wood Date: Fri Feb 28 12:54:47 2014 +0000 RLP tests and Trie updates. commit 33f80fef211c2d51162c1856e50448be3d90c214 Author: Gav Wood Date: Fri Feb 28 11:39:35 2014 +0000 Hex encode tests done. commit e1f5e12abb38f8cedb4a589b1347fb01c3da902a Author: Gav Wood Date: Fri Feb 28 11:22:49 2014 +0000 Fix RLP tests. commit f87ce15ad201a6d97e2654e5dc5a3181873d1719 Author: Gav Wood Date: Thu Feb 27 13:28:11 2014 +0000 Fix empty string. commit c006ed4ffd7d00124dbcb44d4e7ca05d6d9ddc12 Author: Gav Wood Date: Mon Feb 24 10:24:39 2014 +0000 Tests fix. commit 510ff563639e71224306d9af0e50a28a9d624b8f Author: Gav Wood Date: Fri Feb 21 18:54:08 2014 +0000 Updated the tests. commit a0ec84383218ea80b4c0b99e09710fae182a2379 Author: Gav Wood Date: Fri Feb 21 18:49:24 2014 +0000 Moved over to new format, but RLP tests still need updating. commit 660cd26f31b3979149950c1fdea995b85a774c1c Author: Gav Wood Date: Fri Feb 21 18:35:51 2014 +0000 More docs. commit 6ad14c1a157e707fd15c87816e8ad872f69790db Author: Gav Wood Date: Fri Feb 21 18:33:39 2014 +0000 Added VM test suite. Added TODO. Renamed old files. commit f91ad7b3857ec9157e7df7f315d942afb7594da0 Author: Vitalik Buterin Date: Wed Jan 8 11:26:58 2014 -0500 update trie algorithm commit 6da295446203889ac5a4a365b397bb45766c9ad8 Merge: cc42246 131c610 Author: Vitalik Buterin Date: Wed Jan 8 08:15:38 2014 -0500 merge commit cc4224675f1f70242f91ee7d2d1295bed6f0dc01 Author: Vitalik Buterin Date: Tue Jan 7 14:35:26 2014 -0500 Updated trie test commit 131c610da66203f708391485aa42fc7a81f01ef7 Merge: 121632b 7613302 Author: vbuterin Date: Wed Jan 1 06:40:54 2014 -0800 Merge pull request #1 from obscuren/master Update trietest.txt commit 7613302b491b3f6406b1ea3c8292adf6d41860d0 Author: obscuren Date: Wed Jan 1 15:25:21 2014 +0100 Update trietest.txt New proposed explanatory format commit 121632bedd1c84a0af847b923aa4b803556722c0 Author: Vitalik Buterin Date: Wed Jan 1 08:26:18 2014 -0500 Added obscure's tests commit ef6c5506c3fcdecf779184ad81d92db9315c2488 Author: Vitalik Buterin Date: Tue Dec 31 19:04:48 2013 -0500 Fixed tests a bit commit 345e4bcfefb45a66a09b1761570405a03c67b9d2 Merge: 2c81698 e4bbea4 Author: Vitalik Buterin Date: Tue Dec 31 15:52:46 2013 -0500 Merge branch 'master' of github.com:ethereum/tests commit 2c81698f31e7e579335a2ab8706f96397a68f018 Author: Vitalik Buterin Date: Mon Dec 30 21:09:40 2013 -0500 Added first three tests commit e4bbea400f7df275faf47ea643256d68495b35aa Author: vbuterin Date: Mon Dec 30 18:09:03 2013 -0800 Initial commit --- tests/files/StateTests/stInitCodeTest.json | 619 +-- .../StateTests/stSystemOperationsTest.json | 416 +- tests/files/StateTests/stTransactionTest.json | 206 + .../files/VMTests/RandomTests/randomTest.json | 46 + tests/files/VMTests/vmArithmeticTest.json | 3630 ++++++++++++++++- .../VMTests/vmIOandFlowOperationsTest.json | 79 - 6 files changed, 4448 insertions(+), 548 deletions(-) create mode 100644 tests/files/VMTests/RandomTests/randomTest.json diff --git a/tests/files/StateTests/stInitCodeTest.json b/tests/files/StateTests/stInitCodeTest.json index 1c4670cef3..c44d710391 100644 --- a/tests/files/StateTests/stInitCodeTest.json +++ b/tests/files/StateTests/stInitCodeTest.json @@ -1,4 +1,356 @@ { + "CallContractToCreateContractAndCallItOOG" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "100000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "998", + "code" : "0x74600c60005566602060406000f060205260076039f36000526015600b6001f0600055600060006000600060016000546000f1", + "nonce" : "1", + "storage" : { + "0x" : "0xd2571607e241ecf590ed94b12d87c94babe36db6" + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "1301", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "99998699", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + }, + "d2571607e241ecf590ed94b12d87c94babe36db6" : { + "balance" : "2", + "code" : "0x602060406000f0", + "nonce" : "0", + "storage" : { + "0x" : "0x0c" + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000", + "code" : "0x74600c60005566602060406000f060205260076039f36000526015600b6001f0600055600060006000600060016000546000f1", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "100000000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "0x00", + "gasLimit" : "20000000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "0" + } + }, + "CallContractToCreateContractNoCash" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "100000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000", + "code" : "0x74600c60005566602060406000f060205260076039f36000526015600b6103e9f0600055", + "nonce" : "0", + "storage" : { + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "709", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "99999291", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000", + "code" : "0x74600c60005566602060406000f060205260076039f36000526015600b6103e9f0600055", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "100000000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "0x00", + "gasLimit" : "20000000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "0" + } + }, + "CallContractToCreateContractOOG" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "100000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "0000000000000000000000000000000000000000" : { + "balance" : "0", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "0", + "code" : "0x74600c60005566602060406000f060205260076039f36000526015600b6001f0600055600060006000600060006000546000f1", + "nonce" : "0", + "storage" : { + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "756", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "99999244", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "0", + "code" : "0x74600c60005566602060406000f060205260076039f36000526015600b6001f0600055600060006000600060006000546000f1", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "100000000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "0x00", + "gasLimit" : "20000000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "0" + } + }, + "CallContractToCreateContractWhichWouldCreateContractIfCalled" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "100000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "998", + "code" : "0x74600c60005566602060406000f060205260076039f36000526015600b6001f0600055600060006000600060016000546101f4f1", + "nonce" : "1", + "storage" : { + "0x" : "0xd2571607e241ecf590ed94b12d87c94babe36db6" + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "1407", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "62c01474f089b07dae603491675dc5b5748f7049" : { + "balance" : "0", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "99998593", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + }, + "d2571607e241ecf590ed94b12d87c94babe36db6" : { + "balance" : "2", + "code" : "0x602060406000f0", + "nonce" : "1", + "storage" : { + "0x" : "0x0c" + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000", + "code" : "0x74600c60005566602060406000f060205260076039f36000526015600b6001f0600055600060006000600060016000546101f4f1", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "100000000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "0x00", + "gasLimit" : "20000000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "0" + } + }, + "CallContractToCreateContractWhichWouldCreateContractInInitCode" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "100000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1", + "code" : "0x6b600c600055602060406000f0600052600c60146000f0", + "nonce" : "1", + "storage" : { + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "1016", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "62c01474f089b07dae603491675dc5b5748f7049" : { + "balance" : "0", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "99998984", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + }, + "d2571607e241ecf590ed94b12d87c94babe36db6" : { + "balance" : "0", + "code" : "0x", + "nonce" : "1", + "storage" : { + "0x" : "0x0c" + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1", + "code" : "0x6b600c600055602060406000f0600052600c60146000f0", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "100000000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "0x00", + "gasLimit" : "20000000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "0" + } + }, "CallRecursiveContract" : { "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", @@ -244,251 +596,6 @@ "value" : "1" } }, - "CallTheContractToCreateContractWithInitCode" : { - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "45678256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : 1, - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "logs" : [ - ], - "out" : "0x", - "post" : { - "04110d816c380812a427968ece99b1c963dfbce6" : { - "balance" : "0", - "code" : "0x", - "nonce" : "1", - "storage" : { - "0x02" : "0x04110d816c380812a427968ece99b1c963dfbce6" - } - }, - "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "10001", - "code" : "0x3060025560206000600039602060006000f0", - "nonce" : "1", - "storage" : { - "0x02" : "0x095e7baea6a6c7c4c2dfeb977efac326af552d87" - } - }, - "0a517d755cebbf66312b30fff713666a9cb917e0" : { - "balance" : "0", - "code" : "0x", - "nonce" : "1", - "storage" : { - "0x02" : "0x0a517d755cebbf66312b30fff713666a9cb917e0" - } - }, - "24dd378f51adc67a50e339e8031fe9bd4aafab36" : { - "balance" : "0", - "code" : "0x", - "nonce" : "1", - "storage" : { - "0x02" : "0x24dd378f51adc67a50e339e8031fe9bd4aafab36" - } - }, - "293f982d000532a7861ab122bdc4bbfd26bf9030" : { - "balance" : "0", - "code" : "0x", - "nonce" : "1", - "storage" : { - "0x02" : "0x293f982d000532a7861ab122bdc4bbfd26bf9030" - } - }, - "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "10000", - "code" : "0x", - "nonce" : "0", - "storage" : { - } - }, - "2cf5732f017b0cf1b1f13a1478e10239716bf6b5" : { - "balance" : "0", - "code" : "0x", - "nonce" : "1", - "storage" : { - "0x02" : "0x2cf5732f017b0cf1b1f13a1478e10239716bf6b5" - } - }, - "31c640b92c21a1f1465c91070b4b3b4d6854195f" : { - "balance" : "0", - "code" : "0x", - "nonce" : "0", - "storage" : { - } - }, - "37f998764813b136ddf5a754f34063fd03065e36" : { - "balance" : "0", - "code" : "0x", - "nonce" : "1", - "storage" : { - "0x02" : "0x37f998764813b136ddf5a754f34063fd03065e36" - } - }, - "37fa399a749c121f8a15ce77e3d9f9bec8020d7a" : { - "balance" : "0", - "code" : "0x", - "nonce" : "1", - "storage" : { - "0x02" : "0x37fa399a749c121f8a15ce77e3d9f9bec8020d7a" - } - }, - "4f36659fa632310b6ec438dea4085b522a2dd077" : { - "balance" : "0", - "code" : "0x", - "nonce" : "1", - "storage" : { - "0x02" : "0x4f36659fa632310b6ec438dea4085b522a2dd077" - } - }, - "62c01474f089b07dae603491675dc5b5748f7049" : { - "balance" : "0", - "code" : "0x", - "nonce" : "1", - "storage" : { - "0x02" : "0x62c01474f089b07dae603491675dc5b5748f7049" - } - }, - "729af7294be595a0efd7d891c9e51f89c07950c7" : { - "balance" : "0", - "code" : "0x", - "nonce" : "1", - "storage" : { - "0x02" : "0x729af7294be595a0efd7d891c9e51f89c07950c7" - } - }, - "83e3e5a16d3b696a0314b30b2534804dd5e11197" : { - "balance" : "0", - "code" : "0x", - "nonce" : "1", - "storage" : { - "0x02" : "0x83e3e5a16d3b696a0314b30b2534804dd5e11197" - } - }, - "8703df2417e0d7c59d063caa9583cb10a4d20532" : { - "balance" : "0", - "code" : "0x", - "nonce" : "1", - "storage" : { - "0x02" : "0x8703df2417e0d7c59d063caa9583cb10a4d20532" - } - }, - "8dffcd74e5b5923512916c6a64b502689cfa65e1" : { - "balance" : "0", - "code" : "0x", - "nonce" : "1", - "storage" : { - "0x02" : "0x8dffcd74e5b5923512916c6a64b502689cfa65e1" - } - }, - "95a4d7cccb5204733874fa87285a176fe1e9e240" : { - "balance" : "0", - "code" : "0x", - "nonce" : "1", - "storage" : { - "0x02" : "0x95a4d7cccb5204733874fa87285a176fe1e9e240" - } - }, - "99b2fcba8120bedd048fe79f5262a6690ed38c39" : { - "balance" : "0", - "code" : "0x", - "nonce" : "1", - "storage" : { - "0x02" : "0x99b2fcba8120bedd048fe79f5262a6690ed38c39" - } - }, - "a4202b8b8afd5354e3e40a219bdc17f6001bf2cf" : { - "balance" : "0", - "code" : "0x", - "nonce" : "1", - "storage" : { - "0x02" : "0xa4202b8b8afd5354e3e40a219bdc17f6001bf2cf" - } - }, - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "89999", - "code" : "0x", - "nonce" : "1", - "storage" : { - } - }, - "a9647f4a0a14042d91dc33c0328030a7157c93ae" : { - "balance" : "0", - "code" : "0x", - "nonce" : "1", - "storage" : { - "0x02" : "0xa9647f4a0a14042d91dc33c0328030a7157c93ae" - } - }, - "aa6cffe5185732689c18f37a7f86170cb7304c2a" : { - "balance" : "0", - "code" : "0x", - "nonce" : "1", - "storage" : { - "0x02" : "0xaa6cffe5185732689c18f37a7f86170cb7304c2a" - } - }, - "aae4a2e3c51c04606dcb3723456e58f3ed214f45" : { - "balance" : "0", - "code" : "0x", - "nonce" : "1", - "storage" : { - "0x02" : "0xaae4a2e3c51c04606dcb3723456e58f3ed214f45" - } - }, - "c37a43e940dfb5baf581a0b82b351d48305fc885" : { - "balance" : "0", - "code" : "0x", - "nonce" : "1", - "storage" : { - "0x02" : "0xc37a43e940dfb5baf581a0b82b351d48305fc885" - } - }, - "d2571607e241ecf590ed94b12d87c94babe36db6" : { - "balance" : "0", - "code" : "0x", - "nonce" : "1", - "storage" : { - "0x02" : "0xd2571607e241ecf590ed94b12d87c94babe36db6" - } - }, - "f735071cbee190d76b704ce68384fc21e389fbe7" : { - "balance" : "0", - "code" : "0x", - "nonce" : "1", - "storage" : { - "0x02" : "0xf735071cbee190d76b704ce68384fc21e389fbe7" - } - } - }, - "pre" : { - "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "10000", - "code" : "0x3060025560206000600039602060006000f0", - "nonce" : "0", - "storage" : { - } - }, - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "100000", - "code" : "0x", - "nonce" : "0", - "storage" : { - } - } - }, - "transaction" : { - "data" : "0x00", - "gasLimit" : "10000", - "gasPrice" : "1", - "nonce" : "0", - "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", - "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "value" : "1" - } - }, "CallTheContractToCreateEmptyContract" : { "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", @@ -588,7 +695,7 @@ } }, "transaction" : { - "data" : "0x600a80600c6000396000f300600160008035811a8100", + "data" : "0x600a80600c6000396000f200600160008035811a8100", "gasLimit" : "599", "gasPrice" : "1", "nonce" : "0", @@ -642,7 +749,7 @@ } }, "transaction" : { - "data" : "0x600a80600c6000396000f300600160008035811a8100", + "data" : "0x600a80600c6000396000f200600160008035811a8100", "gasLimit" : "590", "gasPrice" : "3", "nonce" : "0", @@ -750,7 +857,7 @@ } }, "transaction" : { - "data" : "0x600a80600c6000396000f300600160008035811a8100", + "data" : "0x600a80600c6000396000f200600160008035811a8100", "gasLimit" : "599", "gasPrice" : "1", "nonce" : "0", @@ -770,10 +877,10 @@ }, "logs" : [ ], - "out" : "0xff600160008035811a81", + "out" : "0x", "post" : { "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "653", + "balance" : "1000", "code" : "0x", "nonce" : "0", "storage" : { @@ -781,13 +888,13 @@ }, "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : { "balance" : "1", - "code" : "0xff600160008035811a81", + "code" : "0x", "nonce" : "0", "storage" : { } }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "9346", + "balance" : "8999", "code" : "0x", "nonce" : "1", "storage" : { @@ -804,7 +911,7 @@ } }, "transaction" : { - "data" : "0x600a80600c6000396000f300ff600160008035811a81", + "data" : "0x600a80600c6000396000f200ff600160008035811a81", "gasLimit" : "1000", "gasPrice" : "1", "nonce" : "0", @@ -858,7 +965,7 @@ } }, "transaction" : { - "data" : "0x600a80600c600039600000f30000600160008035811a81", + "data" : "0x600a80600c600039600000f20000600160008035811a81", "gasLimit" : "1000", "gasPrice" : "1", "nonce" : "0", @@ -912,7 +1019,7 @@ } }, "transaction" : { - "data" : "0x600a80600c6000396000fff3ffff600160008035811a81", + "data" : "0x600a80600c6000396000fff2ffff600160008035811a81", "gasLimit" : "1000", "gasPrice" : "1", "nonce" : "0", @@ -921,4 +1028,4 @@ "value" : "1" } } -} +} \ No newline at end of file diff --git a/tests/files/StateTests/stSystemOperationsTest.json b/tests/files/StateTests/stSystemOperationsTest.json index e92c8d9adb..dd5d35c205 100644 --- a/tests/files/StateTests/stSystemOperationsTest.json +++ b/tests/files/StateTests/stSystemOperationsTest.json @@ -552,14 +552,14 @@ } }, "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "261077", + "balance" : "261097", "code" : "0x", "nonce" : "0", "storage" : { } }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "999999999999638923", + "balance" : "999999999999638903", "code" : "0x", "nonce" : "1", "storage" : { @@ -584,7 +584,7 @@ }, "transaction" : { "data" : "", - "gasLimit" : "365223", + "gasLimit" : "365243", "gasPrice" : "1", "nonce" : "0", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", @@ -610,19 +610,19 @@ "code" : "0x600160005401600055600060006000600060003060e05a03f1600155", "nonce" : "0", "storage" : { - "0x" : "0x03ff", + "0x" : "0x0400", "0x01" : "0x01" } }, "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "261078", + "balance" : "260996", "code" : "0x", "nonce" : "0", "storage" : { } }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "999999999999638922", + "balance" : "999999999999639004", "code" : "0x", "nonce" : "1", "storage" : { @@ -647,7 +647,7 @@ }, "transaction" : { "data" : "", - "gasLimit" : "365224", + "gasLimit" : "365244", "gasPrice" : "1", "nonce" : "0", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", @@ -4166,11 +4166,10 @@ "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6000527faaffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaa6020526000604060406000601773945304eb96065b2a98b57a48a06ae28d285a71b56103e8f1600055", "nonce" : "0", "storage" : { - "0x" : "0x01" } }, "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "1165", + "balance" : "1636", "code" : "0x", "nonce" : "0", "storage" : { @@ -4181,11 +4180,10 @@ "code" : "0x60003554156009570060203560003555", "nonce" : "0", "storage" : { - "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" : "0xaaffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaa" } }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "999999999999898835", + "balance" : "999999999999898364", "code" : "0x", "nonce" : "1", "storage" : { @@ -4243,11 +4241,10 @@ "code" : "0x7feeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff006000527faaffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaa6020526000620f120660406000601773945304eb96065b2a98b57a48a06ae28d285a71b56101f4f1600055", "nonce" : "0", "storage" : { - "0x" : "0x01" } }, "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "1165", + "balance" : "1136", "code" : "0x", "nonce" : "0", "storage" : { @@ -4258,11 +4255,10 @@ "code" : "0x60003554156009570060203560003555", "nonce" : "0", "storage" : { - "0xeeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00" : "0xaaffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaa" } }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "999999999999898835", + "balance" : "999999999999898864", "code" : "0x", "nonce" : "1", "storage" : { @@ -4320,11 +4316,10 @@ "code" : "0x7feeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff006000527faaffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaa602052600060406000620f1206601773945304eb96065b2a98b57a48a06ae28d285a71b56101f4f1600055", "nonce" : "0", "storage" : { - "0x" : "0x01" } }, "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "965", + "balance" : "1136", "code" : "0x", "nonce" : "0", "storage" : { @@ -4338,7 +4333,7 @@ } }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "999999999999899035", + "balance" : "999999999999898864", "code" : "0x", "nonce" : "1", "storage" : { @@ -4848,18 +4843,17 @@ "code" : "0x60003554156009570060203560003555", "nonce" : "0", "storage" : { - "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa" : "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa" } }, "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "1149", + "balance" : "1000000", "code" : "0x", "nonce" : "0", "storage" : { } }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "999999999999898851", + "balance" : "999999999998900000", "code" : "0x", "nonce" : "1", "storage" : { @@ -4892,6 +4886,68 @@ "value" : "100000" } }, + "callValue" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "10000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000100000", + "code" : "0x34600055", + "nonce" : "0", + "storage" : { + "0x" : "0x0186a0" + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "802", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "999999999999899198", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "code" : "0x34600055", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000000000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "10000000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "100000" + } + }, "callcodeToNameRegistrator0" : { "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", @@ -4910,12 +4966,10 @@ "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6000527faaffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaa6020526000604060406000601773945304eb96065b2a98b57a48a06ae28d285a71b56103e8f2600055", "nonce" : "0", "storage" : { - "0x" : "0x01", - "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" : "0xaaffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaa" } }, "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "1165", + "balance" : "1636", "code" : "0x", "nonce" : "0", "storage" : { @@ -4929,7 +4983,7 @@ } }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "999999999999898835", + "balance" : "999999999999898364", "code" : "0x", "nonce" : "1", "storage" : { @@ -5046,6 +5100,68 @@ "value" : "100000" } }, + "callerAccountBalance" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "10000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000100000", + "code" : "0x3331600055", + "nonce" : "0", + "storage" : { + "0x" : "0x0de0b6b3a6c9e2e0" + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "822", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "999999999999899178", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "code" : "0x3331600055", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000000000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "10000000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "100000" + } + }, "callstatelessToReturn1" : { "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", @@ -5367,6 +5483,68 @@ "value" : "100000" } }, + "currentAccountBalance" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "10000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000100000", + "code" : "0x3031600055", + "nonce" : "0", + "storage" : { + "0x" : "0x0de0b6b3a76586a0" + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "822", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "999999999999899178", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "code" : "0x3031600055", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000000000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "10000000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "100000" + } + }, "return0" : { "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", @@ -5826,191 +6004,5 @@ "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "value" : "100000" } - }, - "callValue" : { - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "10000000", - "currentNumber" : "0", - "currentTimestamp" : 1, - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "logs" : [ - ], - "out" : "0x", - "post" : { - "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "1000000000000100000", - "code" : "0x34600055", - "nonce" : "0", - "storage" : { - "0x" : "0x0186a0" - } - }, - "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "802", - "code" : "0x", - "nonce" : "0", - "storage" : { - } - }, - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "999999999999899198", - "code" : "0x", - "nonce" : "1", - "storage" : { - } - } - }, - "pre" : { - "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "1000000000000000000", - "code" : "0x34600055", - "nonce" : "0", - "storage" : { - } - }, - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "1000000000000000000", - "code" : "0x", - "nonce" : "0", - "storage" : { - } - } - }, - "transaction" : { - "data" : "", - "gasLimit" : "10000000", - "gasPrice" : "1", - "nonce" : "0", - "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", - "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "value" : "100000" - } - }, - "callerAccountBalance" : { - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "10000000", - "currentNumber" : "0", - "currentTimestamp" : 1, - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "logs" : [ - ], - "out" : "0x", - "post" : { - "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "1000000000000100000", - "code" : "0x3331600055", - "nonce" : "0", - "storage" : { - "0x" : "0x0de0b6b3a6c9e2e0" - } - }, - "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "822", - "code" : "0x", - "nonce" : "0", - "storage" : { - } - }, - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "999999999999899178", - "code" : "0x", - "nonce" : "1", - "storage" : { - } - } - }, - "pre" : { - "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "1000000000000000000", - "code" : "0x3331600055", - "nonce" : "0", - "storage" : { - } - }, - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "1000000000000000000", - "code" : "0x", - "nonce" : "0", - "storage" : { - } - } - }, - "transaction" : { - "data" : "", - "gasLimit" : "10000000", - "gasPrice" : "1", - "nonce" : "0", - "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", - "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "value" : "100000" - } - }, - "currentAccountBalance" : { - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "10000000", - "currentNumber" : "0", - "currentTimestamp" : 1, - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "logs" : [ - ], - "out" : "0x", - "post" : { - "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "1000000000000100000", - "code" : "0x3031600055", - "nonce" : "0", - "storage" : { - "0x" : "0x0de0b6b3a76586a0" - } - }, - "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "822", - "code" : "0x", - "nonce" : "0", - "storage" : { - } - }, - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "999999999999899178", - "code" : "0x", - "nonce" : "1", - "storage" : { - } - } - }, - "pre" : { - "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "1000000000000000000", - "code" : "0x3031600055", - "nonce" : "0", - "storage" : { - } - }, - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "1000000000000000000", - "code" : "0x", - "nonce" : "0", - "storage" : { - } - } - }, - "transaction" : { - "data" : "", - "gasLimit" : "10000000", - "gasPrice" : "1", - "nonce" : "0", - "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", - "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "value" : "100000" - } } -} +} \ No newline at end of file diff --git a/tests/files/StateTests/stTransactionTest.json b/tests/files/StateTests/stTransactionTest.json index 0de8507979..56f43a7333 100644 --- a/tests/files/StateTests/stTransactionTest.json +++ b/tests/files/StateTests/stTransactionTest.json @@ -1,4 +1,156 @@ { + "ContractStoreClearsOOG" : { + "env" : { + "currentCoinbase" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "currentDifficulty" : "45678256", + "currentGasLimit" : "10000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "6390", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + }, + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "600", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "d2571607e241ecf590ed94b12d87c94babe36db6" : { + "balance" : "10", + "code" : "0x600060005560006001556000600255600060035560006004556000600555600060065560006007556000600855600c600955", + "nonce" : "0", + "storage" : { + "0x" : "0x0c", + "0x01" : "0x0c", + "0x02" : "0x0c", + "0x03" : "0x0c", + "0x04" : "0x0c", + "0x05" : "0x0c", + "0x06" : "0x0c", + "0x07" : "0x0c", + "0x08" : "0x0c", + "0x09" : "0x0c" + } + } + }, + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "7000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "d2571607e241ecf590ed94b12d87c94babe36db6" : { + "balance" : "0", + "code" : "0x600060005560006001556000600255600060035560006004556000600555600060065560006007556000600855600c600955", + "nonce" : "0", + "storage" : { + "0x" : "0x0c", + "0x01" : "0x0c", + "0x02" : "0x0c", + "0x03" : "0x0c", + "0x04" : "0x0c", + "0x05" : "0x0c", + "0x06" : "0x0c", + "0x07" : "0x0c", + "0x08" : "0x0c", + "0x09" : "0x0c" + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "600", + "gasPrice" : "1", + "nonce" : "", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "d2571607e241ecf590ed94b12d87c94babe36db6", + "value" : "10" + } + }, + "ContractStoreClearsSuccess" : { + "env" : { + "currentCoinbase" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "currentDifficulty" : "45678256", + "currentGasLimit" : "10000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "6730", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + }, + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "260", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "d2571607e241ecf590ed94b12d87c94babe36db6" : { + "balance" : "10", + "code" : "0x6000600055600060015560006002556000600355600060045560006005556000600655600060075560006008556000600955", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "7000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "d2571607e241ecf590ed94b12d87c94babe36db6" : { + "balance" : "0", + "code" : "0x6000600055600060015560006002556000600355600060045560006005556000600655600060075560006008556000600955", + "nonce" : "0", + "storage" : { + "0x" : "0x0c", + "0x01" : "0x0c", + "0x02" : "0x0c", + "0x03" : "0x0c", + "0x04" : "0x0c", + "0x05" : "0x0c", + "0x06" : "0x0c", + "0x07" : "0x0c", + "0x08" : "0x0c", + "0x09" : "0x0c" + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "600", + "gasPrice" : "1", + "nonce" : "", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "d2571607e241ecf590ed94b12d87c94babe36db6", + "value" : "10" + } + }, "EmptyTransaction" : { "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", @@ -273,5 +425,59 @@ "to" : "a94f5374fce5edbc8e2a8697c15331677e6ebf0b", "value" : "502" } + }, + "TransactionTooManyRlpElements" : { + "env" : { + "currentCoinbase" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "currentDifficulty" : "45678256", + "currentGasLimit" : "10000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "93990", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + }, + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "6000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "d2571607e241ecf590ed94b12d87c94babe36db6" : { + "balance" : "10", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "100000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "1600", + "gasPrice" : "12", + "nonce" : "", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "d2571607e241ecf590ed94b12d87c94babe36db6", + "value" : "10" + } } } \ No newline at end of file diff --git a/tests/files/VMTests/RandomTests/randomTest.json b/tests/files/VMTests/RandomTests/randomTest.json new file mode 100644 index 0000000000..dad2ee4a22 --- /dev/null +++ b/tests/files/VMTests/RandomTests/randomTest.json @@ -0,0 +1,46 @@ +{ + "randomVMtest" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x675545", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9999", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x675545", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x675545", + "nonce" : "0", + "storage" : { + } + } + } + } +} \ No newline at end of file diff --git a/tests/files/VMTests/vmArithmeticTest.json b/tests/files/VMTests/vmArithmeticTest.json index 88d209dfaf..9d7cac99fc 100644 --- a/tests/files/VMTests/vmArithmeticTest.json +++ b/tests/files/VMTests/vmArithmeticTest.json @@ -1114,6 +1114,3634 @@ } } }, + "expPowerOf256Of256_0" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60006101000a6101000a600055600060ff0a6101000a60015560006101010a6101000a60025560006101000a60ff0a600355600060ff0a60ff0a60045560006101010a60ff0a60055560006101000a6101010a600655600060ff0a6101010a60075560006101010a6101010a600855", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "7237", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60006101000a6101000a600055600060ff0a6101000a60015560006101010a6101000a60025560006101000a60ff0a600355600060ff0a60ff0a60045560006101010a60ff0a60055560006101000a6101010a600655600060ff0a6101010a60075560006101010a6101010a600855", + "nonce" : "0", + "storage" : { + "0x" : "0x0100", + "0x01" : "0x0100", + "0x02" : "0x0100", + "0x03" : "0xff", + "0x04" : "0xff", + "0x05" : "0xff", + "0x06" : "0x0101", + "0x07" : "0x0101", + "0x08" : "0x0101" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60006101000a6101000a600055600060ff0a6101000a60015560006101010a6101000a60025560006101000a60ff0a600355600060ff0a60ff0a60045560006101010a60ff0a60055560006101000a6101010a600655600060ff0a6101010a60075560006101010a6101010a600855", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256Of256_1" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60016101000a6101000a600055600160ff0a6101000a60015560016101010a6101000a60025560016101000a60ff0a600355600160ff0a60ff0a60045560016101010a60ff0a60055560016101000a6101010a600655600160ff0a6101010a60075560016101010a6101010a600855", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "7822", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60016101000a6101000a600055600160ff0a6101000a60015560016101010a6101000a60025560016101000a60ff0a600355600160ff0a60ff0a60045560016101010a60ff0a60055560016101000a6101010a600655600160ff0a6101010a60075560016101010a6101010a600855", + "nonce" : "0", + "storage" : { + "0x03" : "0x06c3acd330b959ad6efabce6d2d2125e73a88a65a9880d203dddf5957f7f0001", + "0x04" : "0x8f965a06da0ac41dcb3a34f1d8ab7d8fee620a94faa42c395997756b007ffeff", + "0x05" : "0xbce9265d88a053c18bc229ebff404c1534e1db43de85131da0179fe9ff8100ff", + "0x06" : "0x02b5e9d7a094c19f5ebdd4f2e618f859ed15e4f1f0351f286bf849eb7f810001", + "0x07" : "0xc73b7a6f68385c653a24993bb72eea0e4ba17470816ec658cf9c5bedfd81ff01", + "0x08" : "0xb89fc178355660fe1c92c7d8ff11524702fad6e2255447946442356b00810101" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60016101000a6101000a600055600160ff0a6101000a60015560016101010a6101000a60025560016101000a60ff0a600355600160ff0a60ff0a60045560016101010a60ff0a60055560016101000a6101010a600655600160ff0a6101010a60075560016101010a6101010a600855", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256Of256_10" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x600a6101000a6101000a600055600a60ff0a6101000a600155600a6101010a6101000a600255600a6101000a60ff0a600355600a60ff0a60ff0a600455600a6101010a60ff0a600555600a6101000a6101010a600655600a60ff0a6101010a600755600a6101010a6101010a600855", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "7741", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600a6101000a6101000a600055600a60ff0a6101000a600155600a6101010a6101000a600255600a6101000a60ff0a600355600a60ff0a60ff0a600455600a6101010a60ff0a600555600a6101000a6101010a600655600a60ff0a6101010a600755600a6101010a6101010a600855", + "nonce" : "0", + "storage" : { + "0x03" : "0xfe0f60957dc223578a0298879ec55c33085514ff7f0000000000000000000001", + "0x04" : "0xc1ea45f348b5d351c4d8fe5c77da979cadc33d866acc42e981278896b1f600ff", + "0x05" : "0x56ddb29bca94fb986ac0a40188b3b53f3216b3559bd8324a77ea8bd8a80a00ff", + "0x06" : "0x2d49ff6b0bbe177ae9317000b68fb921f7aa6aff810000000000000000000001", + "0x07" : "0x185fa9eab94cfe3016b69657e83b23fd24cc6960218254231c3db627a7f60101", + "0x08" : "0xa7a0223829f26d6c635368034320563df4aa5eb62efc87a42bb35f69b20a0101" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600a6101000a6101000a600055600a60ff0a6101000a600155600a6101010a6101000a600255600a6101000a60ff0a600355600a60ff0a60ff0a600455600a6101010a60ff0a600555600a6101000a6101010a600655600a60ff0a6101010a600755600a6101010a6101010a600855", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256Of256_11" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x600b6101000a6101000a600055600b60ff0a6101000a600155600b6101010a6101000a600255600b6101000a60ff0a600355600b60ff0a60ff0a600455600b6101010a60ff0a600555600b6101000a6101010a600655600b60ff0a6101010a600755600b6101010a6101010a600855", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "7732", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600b6101000a6101000a600055600b60ff0a6101000a600155600b6101010a6101000a600255600b6101000a60ff0a600355600b60ff0a60ff0a600455600b6101010a60ff0a600555600b6101000a6101010a600655600b60ff0a6101010a600755600b6101010a6101010a600855", + "nonce" : "0", + "storage" : { + "0x03" : "0xe1440264b8ee0cea0218879ec55c33085514ff7f000000000000000000000001", + "0x04" : "0x29575fdce377b23043e489e358581474bc863187fa85f9945473a2be5889feff", + "0x05" : "0x3df8c030ec521fb109c4d887dbbc14c7c9c9921b27058e3503971b60b18b00ff", + "0x06" : "0x67799740340daf4a30f000b68fb921f7aa6aff81000000000000000000000001", + "0x07" : "0x540a4e4635b40585e09ff10b63ffe310dd717fca5c0a51570091e25e378bff01", + "0x08" : "0xdbbaef5c49ffee61b08cde6ebc8dba6e9a62d56c2355d1980cb9e790bc8b0101" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600b6101000a6101000a600055600b60ff0a6101000a600155600b6101010a6101000a600255600b6101000a60ff0a600355600b60ff0a60ff0a600455600b6101010a60ff0a600555600b6101000a6101010a600655600b60ff0a6101010a600755600b6101010a6101010a600855", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256Of256_12" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x600c6101000a6101000a600055600c60ff0a6101000a600155600c6101010a6101000a600255600c6101000a60ff0a600355600c60ff0a60ff0a600455600c6101010a60ff0a600555600c6101000a6101010a600655600c60ff0a6101010a600755600c6101010a6101010a600855", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "7723", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600c6101000a6101000a600055600c60ff0a6101000a600155600c6101010a6101000a600255600c6101000a60ff0a600355600c60ff0a60ff0a600455600c6101010a60ff0a600555600c6101000a6101010a600655600c60ff0a6101010a600755600c6101010a6101010a600855", + "nonce" : "0", + "storage" : { + "0x03" : "0xb0e95b83a36ce98218879ec55c33085514ff7f00000000000000000000000001", + "0x04" : "0xc482ab56ec19186dc48c88f30861a850b2253b1ea6dc021589e569bd47f400ff", + "0x05" : "0xcf45c7f9af4bbe4a83055b55b97777ad5e0a3f08b129c9ae208c5d713c0c00ff", + "0x06" : "0xa5cbb62a421049b0f000b68fb921f7aa6aff8100000000000000000000000001", + "0x07" : "0x3bde6ca66dffe1bf5d727c3edea74c7a4af43b3912e6256d37705c8f3bf40101", + "0x08" : "0x3f49a1e40c5213aa4ffed57eb4c1ad2d181b2aaa289e9d59c2256c43480c0101" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600c6101000a6101000a600055600c60ff0a6101000a600155600c6101010a6101000a600255600c6101000a60ff0a600355600c60ff0a60ff0a600455600c6101010a60ff0a600555600c6101000a6101010a600655600c60ff0a6101010a600755600c6101010a6101010a600855", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256Of256_13" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x600d6101000a6101000a600055600d60ff0a6101000a600155600d6101010a6101000a600255600d6101000a60ff0a600355600d60ff0a60ff0a600455600d6101010a60ff0a600555600d6101000a6101010a600655600d60ff0a6101010a600755600d6101010a6101010a600855", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "7714", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600d6101000a6101000a600055600d60ff0a6101000a600155600d6101010a6101000a600255600d6101000a60ff0a600355600d60ff0a60ff0a600455600d6101010a60ff0a600555600d6101000a6101010a600655600d60ff0a6101010a600755600d6101010a6101010a600855", + "nonce" : "0", + "storage" : { + "0x03" : "0xe02639036c698218879ec55c33085514ff7f0000000000000000000000000001", + "0x04" : "0x8be664bde946d939ce551b948b503787942d2a7734509288c1b62fd5c48bfeff", + "0x05" : "0xa923a28e7a75aef26c51580ffc686879e4a0b404b089bdbcd751d88b478d00ff", + "0x06" : "0x41ac5ea30fc9b0f000b68fb921f7aa6aff810000000000000000000000000001", + "0x07" : "0x0daa3a177ec975cb69bb4acf4a6e1be7bcc1ad33d1ffad97510f9fea9d8dff01", + "0x08" : "0x19e6822beb889be28310060f4fb9741bfd50a31fa81ec65de21f7b02548d0101" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600d6101000a6101000a600055600d60ff0a6101000a600155600d6101010a6101000a600255600d6101000a60ff0a600355600d60ff0a60ff0a600455600d6101010a60ff0a600555600d6101000a6101010a600655600d60ff0a6101010a600755600d6101010a6101010a600855", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256Of256_14" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x600e6101000a6101000a600055600e60ff0a6101000a600155600e6101010a6101000a600255600e6101000a60ff0a600355600e60ff0a60ff0a600455600e6101010a60ff0a600555600e6101000a6101010a600655600e60ff0a6101010a600755600e6101010a6101010a600855", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "7705", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600e6101000a6101000a600055600e60ff0a6101000a600155600e6101010a6101000a600255600e6101000a60ff0a600355600e60ff0a60ff0a600455600e6101010a60ff0a600555600e6101000a6101010a600655600e60ff0a6101010a600755600e6101010a6101010a600855", + "nonce" : "0", + "storage" : { + "0x03" : "0xdb9902ec698218879ec55c33085514ff7f000000000000000000000000000001", + "0x04" : "0x83fab06c6c8fef761ebbb9534c06ac2a9d61820623008069062ff3b1e1f200ff", + "0x05" : "0x3f791dd183ed5b963bd86e0dba1a9dd5b8ceeb078f15c73062f1942fd40e00ff", + "0x06" : "0xe0bfa28fc9b0f000b68fb921f7aa6aff81000000000000000000000000000001", + "0x07" : "0x8133b760dfae27560eb490f235ddfa301f058dee4f01f3fe4b3567d0d3f20101", + "0x08" : "0xcd4cd0124e983af71620fb5f98275965c6a8bebc4b8adc288b63224ee20e0101" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600e6101000a6101000a600055600e60ff0a6101000a600155600e6101010a6101000a600255600e6101000a60ff0a600355600e60ff0a60ff0a600455600e6101010a60ff0a600555600e6101000a6101010a600655600e60ff0a6101010a600755600e6101010a6101010a600855", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256Of256_15" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x600f6101000a6101000a600055600f60ff0a6101000a600155600f6101010a6101000a600255600f6101000a60ff0a600355600f60ff0a60ff0a600455600f6101010a60ff0a600555600f6101000a6101010a600655600f60ff0a6101010a600755600f6101010a6101010a600855", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "7696", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600f6101000a6101000a600055600f60ff0a6101000a600155600f6101010a6101000a600255600f6101000a60ff0a600355600f60ff0a60ff0a600455600f6101010a60ff0a600555600f6101000a6101010a600655600f60ff0a6101010a600755600f6101010a6101010a600855", + "nonce" : "0", + "storage" : { + "0x03" : "0x9882ec698218879ec55c33085514ff7f00000000000000000000000000000001", + "0x04" : "0x75c4915e18b96704209738f5ca765568bb4dc4113d56683977825a132c8dfeff", + "0x05" : "0x5c76839bf5a80b1da705dbdf43e4dd6770cd7501af11ff2dab7918dfe18f00ff", + "0x06" : "0xbf228fc9b0f000b68fb921f7aa6aff8100000000000000000000000000000001", + "0x07" : "0xc6a29131e7594004bc2aa79f0d2c402a1409c57c77d284c14b1a3ab0ff8fff01", + "0x08" : "0xe6b3e5cf6ec90e532fef7d08455ebf92a03e9e3f6e224ea0febdf1a9f08f0101" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600f6101000a6101000a600055600f60ff0a6101000a600155600f6101010a6101000a600255600f6101000a60ff0a600355600f60ff0a60ff0a600455600f6101010a60ff0a600555600f6101000a6101010a600655600f60ff0a6101010a600755600f6101010a6101010a600855", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256Of256_16" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60106101000a6101000a600055601060ff0a6101000a60015560106101010a6101000a60025560106101000a60ff0a600355601060ff0a60ff0a60045560106101010a60ff0a60055560106101000a6101010a600655601060ff0a6101010a60075560106101010a6101010a600855", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "7687", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60106101000a6101000a600055601060ff0a6101000a60015560106101010a6101000a60025560106101000a60ff0a600355601060ff0a60ff0a60045560106101010a60ff0a60055560106101000a6101010a600655601060ff0a6101010a60075560106101010a6101010a600855", + "nonce" : "0", + "storage" : { + "0x03" : "0x82ec698218879ec55c33085514ff7f0000000000000000000000000000000001", + "0x04" : "0x3122f4bcdf6dd8b265cd18eb6af28c879aed44a35e0bf59273e39e6c7ff000ff", + "0x05" : "0x6a2b3bc87a02c29b9d27757df43047ecd0f15485270fca27417a701c701000ff", + "0x06" : "0x228fc9b0f000b68fb921f7aa6aff810000000000000000000000000000000001", + "0x07" : "0x88e1259502eef93d46060aacc9e2ff506c734dade0b6714ab12d17e46ff00101", + "0x08" : "0x4a103813c12c12169b218296bb0a9eae80cf8d2b158aa70eb990f99480100101" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60106101000a6101000a600055601060ff0a6101000a60015560106101010a6101000a60025560106101000a60ff0a600355601060ff0a60ff0a60045560106101010a60ff0a60055560106101000a6101010a600655601060ff0a6101010a60075560106101010a6101010a600855", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256Of256_17" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60116101000a6101000a600055601160ff0a6101000a60015560116101010a6101000a60025560116101000a60ff0a600355601160ff0a60ff0a60045560116101010a60ff0a60055560116101000a6101010a600655601160ff0a6101010a60075560116101010a6101010a600855", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "7678", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60116101000a6101000a600055601160ff0a6101000a60015560116101010a6101000a60025560116101000a60ff0a600355601160ff0a60ff0a60045560116101010a60ff0a60055560116101000a6101010a600655601160ff0a6101010a60075560116101010a6101010a600855", + "nonce" : "0", + "storage" : { + "0x03" : "0xec698218879ec55c33085514ff7f000000000000000000000000000000000001", + "0x04" : "0x722ad218eb1995a2d257c4c06d8de993c203cfc8e3512df7d633e17e908ffeff", + "0x05" : "0x8ac9b5ec08d74612cb29f941481d274b51721af2296207c0da8d24667f9100ff", + "0x06" : "0x8fc9b0f000b68fb921f7aa6aff81000000000000000000000000000000000001", + "0x07" : "0x81d5ff63680841482299f3eab616446dcd336f537c0c565aa4112ab95d91ff01", + "0x08" : "0x9c6ca90dac4e97dea02ac969e8649ee9e6232e0c3f4797411151cb8f90910101" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60116101000a6101000a600055601160ff0a6101000a60015560116101010a6101000a60025560116101000a60ff0a600355601160ff0a60ff0a60045560116101010a60ff0a60055560116101000a6101010a600655601160ff0a6101010a60075560116101010a6101010a600855", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256Of256_18" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60126101000a6101000a600055601260ff0a6101000a60015560126101010a6101000a60025560126101000a60ff0a600355601260ff0a60ff0a60045560126101010a60ff0a60055560126101000a6101010a600655601260ff0a6101010a60075560126101010a6101010a600855", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "7669", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60126101000a6101000a600055601260ff0a6101000a60015560126101010a6101000a60025560126101000a60ff0a600355601260ff0a60ff0a60045560126101010a60ff0a60055560126101000a6101010a600655601260ff0a6101010a60075560126101010a6101010a600855", + "nonce" : "0", + "storage" : { + "0x03" : "0x698218879ec55c33085514ff7f00000000000000000000000000000000000001", + "0x04" : "0x8a2cbd9f40794e2205b13306f2aa0a43c60823c64b95d8601fa4f1e521ee00ff", + "0x05" : "0xc1b5a1e3a81da51b10d84e880f0113ff67b863ddad3faf1f4ecf413f101200ff", + "0x06" : "0xc9b0f000b68fb921f7aa6aff8100000000000000000000000000000000000001", + "0x07" : "0x410be68e49452a1fbcd863bf6e8d637f8eae4979c34c88d552afbcc20fee0101", + "0x08" : "0xf540cb714754b5b1eb0373833833bd7fb0ee925ce8b92962500b7a1c22120101" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60126101000a6101000a600055601260ff0a6101000a60015560126101010a6101000a60025560126101000a60ff0a600355601260ff0a60ff0a60045560126101010a60ff0a60055560126101000a6101010a600655601260ff0a6101010a60075560126101010a6101010a600855", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256Of256_19" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60136101000a6101000a600055601360ff0a6101000a60015560136101010a6101000a60025560136101000a60ff0a600355601360ff0a60ff0a60045560136101010a60ff0a60055560136101000a6101010a600655601360ff0a6101010a60075560136101010a6101010a600855", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "7660", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60136101000a6101000a600055601360ff0a6101000a60015560136101010a6101000a60025560136101000a60ff0a600355601360ff0a60ff0a60045560136101010a60ff0a60055560136101000a6101010a600655601360ff0a6101010a60075560136101010a6101010a600855", + "nonce" : "0", + "storage" : { + "0x03" : "0x8218879ec55c33085514ff7f0000000000000000000000000000000000000001", + "0x04" : "0xb795ad7ac24cfbb7435cf53bd3584f3d4b2709935635c3ceb66e761ff091feff", + "0x05" : "0x1f0bb7be91a0ccd0cca93d75cf03de3e6b56fe8f1c54242617665327219300ff", + "0x06" : "0xb0f000b68fb921f7aa6aff810000000000000000000000000000000000000001", + "0x07" : "0xad571756ecbff1bfdef064861e5e92c5d897a9cc380e54bdbaabd80bb793ff01", + "0x08" : "0xd8b5b531989e689f700dcdb43ab90e79a49dfbbb5a13dbf751df98bb34930101" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60136101000a6101000a600055601360ff0a6101000a60015560136101010a6101000a60025560136101000a60ff0a600355601360ff0a60ff0a60045560136101010a60ff0a60055560136101000a6101010a600655601360ff0a6101010a60075560136101010a6101010a600855", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256Of256_2" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60026101000a6101000a600055600260ff0a6101000a60015560026101010a6101000a60025560026101000a60ff0a600355600260ff0a60ff0a60045560026101010a60ff0a60055560026101000a6101010a600655600260ff0a6101010a60075560026101010a6101010a600855", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "7813", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60026101000a6101000a600055600260ff0a6101000a60015560026101010a6101000a60025560026101000a60ff0a600355600260ff0a60ff0a60045560026101010a60ff0a60055560026101000a6101010a600655600260ff0a6101010a60075560026101010a6101010a600855", + "nonce" : "0", + "storage" : { + "0x03" : "0x4ee4ceeaac565c81f55a87c43f82f7c889ef4fc7c679671e28d594ff7f000001", + "0x04" : "0x82f46a1b4e34d66712910615d2571d75606ceac51fa8ca8c58cf6ca881fe00ff", + "0x05" : "0x81c9fcefa5de158ae2007f25d35c0d11cd735342a48905955a5a6852800200ff", + "0x06" : "0x666ac362902470ed850709e2a29969d10cba09debc03c38d172aeaff81000001", + "0x07" : "0xeb30a3c678a01bde914548f98f3366dc0ffe9f85384ebf1111d03dad7ffe0101", + "0x08" : "0x72d0a7939b6303ce1d46e6e3f1b8be303bfdb2b00f41ad8076b0975782020101" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60026101000a6101000a600055600260ff0a6101000a60015560026101010a6101000a60025560026101000a60ff0a600355600260ff0a60ff0a60045560026101010a60ff0a60055560026101000a6101010a600655600260ff0a6101010a60075560026101010a6101010a600855", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256Of256_20" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60146101000a6101000a600055601460ff0a6101000a60015560146101010a6101000a60025560146101000a60ff0a600355601460ff0a60ff0a60045560146101010a60ff0a60055560146101000a6101010a600655601460ff0a6101010a60075560146101010a6101010a600855", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "7651", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60146101000a6101000a600055601460ff0a6101000a60015560146101010a6101000a60025560146101000a60ff0a600355601460ff0a60ff0a60045560146101010a60ff0a60055560146101000a6101010a600655601460ff0a6101010a60075560146101010a6101010a600855", + "nonce" : "0", + "storage" : { + "0x03" : "0x18879ec55c33085514ff7f000000000000000000000000000000000000000001", + "0x04" : "0x67e4797dc21f02ce4a7c52218c7dbea5d212e6c244e24f0ba4c08613c7ec00ff", + "0x05" : "0xa1ce1a085f258785846939cc1d2e8725ac94ad4dff8913234e00679fb41400ff", + "0x06" : "0xf000b68fb921f7aa6aff81000000000000000000000000000000000000000001", + "0x07" : "0xcce501857a1cb45473915a28082af950e0f78f7e2de68ce748adb661b3ec0101", + "0x08" : "0x3b2e28d274a16c08b58a23bad63bba6d7b09685769d1f68ca3873bedc8140101" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60146101000a6101000a600055601460ff0a6101000a60015560146101010a6101000a60025560146101000a60ff0a600355601460ff0a60ff0a60045560146101010a60ff0a60055560146101000a6101010a600655601460ff0a6101010a60075560146101010a6101010a600855", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256Of256_21" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60156101000a6101000a600055601560ff0a6101000a60015560156101010a6101000a60025560156101000a60ff0a600355601560ff0a60ff0a60045560156101010a60ff0a60055560156101000a6101010a600655601560ff0a6101010a60075560156101010a6101010a600855", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "7642", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60156101000a6101000a600055601560ff0a6101000a60015560156101010a6101000a60025560156101000a60ff0a600355601560ff0a60ff0a60045560156101010a60ff0a60055560156101000a6101010a600655601560ff0a6101010a60075560156101010a6101010a600855", + "nonce" : "0", + "storage" : { + "0x03" : "0x879ec55c33085514ff7f00000000000000000000000000000000000000000001", + "0x04" : "0x7fd07055ff50cdfe4b4bd9a15133d72d3607d92eb7ac81bac93db7ff4c93feff", + "0x05" : "0x665ac5c769e87f61d5993abc26522fbfca2734d76a63216b2d550d29c79500ff", + "0x06" : "0xb68fb921f7aa6aff8100000000000000000000000000000000000000000001", + "0x07" : "0x1c93db67c9884bc694686d69a25a5d7ed089841d5ce147fdd7199ab00d95ff01", + "0x08" : "0x485053d8ff66be52036597520344fac87b6a305426a9e49221d3f934dc950101" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60156101000a6101000a600055601560ff0a6101000a60015560156101010a6101000a60025560156101000a60ff0a600355601560ff0a60ff0a60045560156101010a60ff0a60055560156101000a6101010a600655601560ff0a6101010a60075560156101010a6101010a600855", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256Of256_22" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60166101000a6101000a600055601660ff0a6101000a60015560166101010a6101000a60025560166101000a60ff0a600355601660ff0a60ff0a60045560166101010a60ff0a60055560166101000a6101010a600655601660ff0a6101010a60075560166101010a6101010a600855", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "7633", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60166101000a6101000a600055601660ff0a6101000a60015560166101010a6101000a60025560166101000a60ff0a600355601660ff0a60ff0a60045560166101010a60ff0a60055560166101000a6101010a600655601660ff0a6101010a60075560166101010a6101010a600855", + "nonce" : "0", + "storage" : { + "0x03" : "0x9ec55c33085514ff7f0000000000000000000000000000000000000000000001", + "0x04" : "0xec447e662ac08957d7e290a421dbf54c0aaf43aadc9cc465ad0b02f071ea00ff", + "0x05" : "0xdc9178d3bab470096f01477c859b5f4173986640b659426412a653465c1600ff", + "0x06" : "0xb68fb921f7aa6aff810000000000000000000000000000000000000000000001", + "0x07" : "0xdcf0a770777610503596ae0311af46c171151ed45107d7e7bb8f74bb5bea0101", + "0x08" : "0x4d65773387993928c95c861274232d3fb6f6b7fe1b22e4e61a30e71172160101" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60166101000a6101000a600055601660ff0a6101000a60015560166101010a6101000a60025560166101000a60ff0a600355601660ff0a60ff0a60045560166101010a60ff0a60055560166101000a6101010a600655601660ff0a6101010a60075560166101010a6101010a600855", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256Of256_23" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60176101000a6101000a600055601760ff0a6101000a60015560176101010a6101000a60025560176101000a60ff0a600355601760ff0a60ff0a60045560176101010a60ff0a60055560176101000a6101010a600655601760ff0a6101010a60075560176101010a6101010a600855", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "7624", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60176101000a6101000a600055601760ff0a6101000a60015560176101010a6101000a60025560176101000a60ff0a600355601760ff0a60ff0a60045560176101010a60ff0a60055560176101000a6101010a600655601760ff0a6101010a60075560176101010a6101010a600855", + "nonce" : "0", + "storage" : { + "0x03" : "0xc55c33085514ff7f000000000000000000000000000000000000000000000001", + "0x04" : "0x537ca0f03f974303005f1e6693b55b72315a166841732e42b8353724a495feff", + "0x05" : "0x86418797ec60058de6cca47dfdbee79923ac49d7801e01840041ca76719700ff", + "0x06" : "0x8fb921f7aa6aff81000000000000000000000000000000000000000000000001", + "0x07" : "0x56a55341ab8d4318f1cfb55d5f21e2ba35d7e070a72bac6b2b21baae5f97ff01", + "0x08" : "0x55ddd0ec77909de6d8311116cf520398e816f928b06fdd90ec239d0488970101" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60176101000a6101000a600055601760ff0a6101000a60015560176101010a6101000a60025560176101000a60ff0a600355601760ff0a60ff0a60045560176101010a60ff0a60055560176101000a6101010a600655601760ff0a6101010a60075560176101010a6101010a600855", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256Of256_24" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60186101000a6101000a600055601860ff0a6101000a60015560186101010a6101000a60025560186101000a60ff0a600355601860ff0a60ff0a60045560186101010a60ff0a60055560186101000a6101010a600655601860ff0a6101010a60075560186101010a6101010a600855", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "7615", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60186101000a6101000a600055601860ff0a6101000a60015560186101010a6101000a60025560186101000a60ff0a600355601860ff0a60ff0a60045560186101010a60ff0a60055560186101000a6101010a600655601860ff0a6101010a60075560186101010a6101010a600855", + "nonce" : "0", + "storage" : { + "0x03" : "0x5c33085514ff7f00000000000000000000000000000000000000000000000001", + "0x04" : "0xd542e526003539ead104274aff2d78332366e29d328c2161f0c120731fe800ff", + "0x05" : "0xc706cb25e8384ce9bb5c9cb48415238ba03e16c448e292c0a101843b081800ff", + "0x06" : "0xb921f7aa6aff8100000000000000000000000000000000000000000000000001", + "0x07" : "0x4ca55f89202c524cb0f1cb3195d13c8d94a9f7a05c59e1d4031577c707e80101", + "0x08" : "0x8c4b0574e9156b80035f3ecdcf1fe79d273ed7559747a4322bcd338f20180101" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60186101000a6101000a600055601860ff0a6101000a60015560186101010a6101000a60025560186101000a60ff0a600355601860ff0a60ff0a60045560186101010a60ff0a60055560186101000a6101010a600655601860ff0a6101010a60075560186101010a6101010a600855", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256Of256_25" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60196101000a6101000a600055601960ff0a6101000a60015560196101010a6101000a60025560196101000a60ff0a600355601960ff0a60ff0a60045560196101010a60ff0a60055560196101000a6101010a600655601960ff0a6101010a60075560196101010a6101010a600855", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "7606", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60196101000a6101000a600055601960ff0a6101000a60015560196101010a6101000a60025560196101000a60ff0a600355601960ff0a60ff0a60045560196101010a60ff0a60055560196101000a6101010a600655601960ff0a6101010a60075560196101010a6101010a600855", + "nonce" : "0", + "storage" : { + "0x03" : "0x33085514ff7f0000000000000000000000000000000000000000000000000001", + "0x04" : "0x7f510dd7198cac0a92ff7ea80451838c0dfa12114c41a0ef05907397f897feff", + "0x05" : "0x1275e752b6aee228ecba5e9b57ef1111deff3c651e2cfbf2cccd13151f9900ff", + "0x06" : "0x21f7aa6aff810000000000000000000000000000000000000000000000000001", + "0x07" : "0x6646340ad51a03bb710caf05756b685b33c7dad62ae68d369243700ead99ff01", + "0x08" : "0x29d80e8060ef2221929bb18215586c742686d6860e028ca0456b443238990101" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60196101000a6101000a600055601960ff0a6101000a60015560196101010a6101000a60025560196101000a60ff0a600355601960ff0a60ff0a60045560196101010a60ff0a60055560196101000a6101010a600655601960ff0a6101010a60075560196101010a6101010a600855", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256Of256_26" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x601a6101000a6101000a600055601a60ff0a6101000a600155601a6101010a6101000a600255601a6101000a60ff0a600355601a60ff0a60ff0a600455601a6101010a60ff0a600555601a6101000a6101010a600655601a60ff0a6101010a600755601a6101010a6101010a600855", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "7597", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x601a6101000a6101000a600055601a60ff0a6101000a600155601a6101010a6101000a600255601a6101000a60ff0a600355601a60ff0a60ff0a600455601a6101010a60ff0a600555601a6101000a6101010a600655601a60ff0a6101010a600755601a6101010a6101010a600855", + "nonce" : "0", + "storage" : { + "0x03" : "0x085514ff7f000000000000000000000000000000000000000000000000000001", + "0x04" : "0x1d164db738eb6893868b361ad2803f97be35764456e82a837667a693d1e600ff", + "0x05" : "0x8b92c24abebf376a5aab5ff4dfd3538a03d38a10bced2aae8e1a8a85b81a00ff", + "0x06" : "0xf7aa6aff81000000000000000000000000000000000000000000000000000001", + "0x07" : "0x6931bda98c70e860a1f6a5224940f1ec7e6734cd9456c95806384f7cb7e60101", + "0x08" : "0x3402a9db66492dfc2a220715e76243469462f24edc56903ba1d8e96ed21a0101" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x601a6101000a6101000a600055601a60ff0a6101000a600155601a6101010a6101000a600255601a6101000a60ff0a600355601a60ff0a60ff0a600455601a6101010a60ff0a600555601a6101000a6101010a600655601a60ff0a6101010a600755601a6101010a6101010a600855", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256Of256_27" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x601b6101000a6101000a600055601b60ff0a6101000a600155601b6101010a6101000a600255601b6101000a60ff0a600355601b60ff0a60ff0a600455601b6101010a60ff0a600555601b6101000a6101010a600655601b60ff0a6101010a600755601b6101010a6101010a600855", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "7588", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x601b6101000a6101000a600055601b60ff0a6101000a600155601b6101010a6101000a600255601b6101000a60ff0a600355601b60ff0a60ff0a600455601b6101010a60ff0a600555601b6101000a6101010a600655601b60ff0a6101010a600755601b6101010a6101010a600855", + "nonce" : "0", + "storage" : { + "0x03" : "0x5514ff7f00000000000000000000000000000000000000000000000000000001", + "0x04" : "0x178918ffbcb401d4efd2f7dfb4d01a897172267f0f491121ac52dd614899feff", + "0x05" : "0x38ecff71480ca0b422f2ed6f780d5fead2ae234a49104b10a86f7f0dd19b00ff", + "0x06" : "0xaa6aff8100000000000000000000000000000000000000000000000000000001", + "0x07" : "0xd02811cb5dc1d80567e810532b235b7672f5c78cd6e89bb511d5e2d8f79bff01", + "0x08" : "0x1b4e6404f474c18055d30bb8987672f59e97980d6f9de1764c0fbec5ec9b0101" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x601b6101000a6101000a600055601b60ff0a6101000a600155601b6101010a6101000a600255601b6101000a60ff0a600355601b60ff0a60ff0a600455601b6101010a60ff0a600555601b6101000a6101010a600655601b60ff0a6101010a600755601b6101010a6101010a600855", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256Of256_28" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x601c6101000a6101000a600055601c60ff0a6101000a600155601c6101010a6101000a600255601c6101000a60ff0a600355601c60ff0a60ff0a600455601c6101010a60ff0a600555601c6101000a6101010a600655601c60ff0a6101010a600755601c6101010a6101010a600855", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "7579", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x601c6101000a6101000a600055601c60ff0a6101000a600155601c6101010a6101000a600255601c6101000a60ff0a600355601c60ff0a60ff0a600455601c6101010a60ff0a600555601c6101000a6101010a600655601c60ff0a6101010a600755601c6101010a6101010a600855", + "nonce" : "0", + "storage" : { + "0x03" : "0x14ff7f0000000000000000000000000000000000000000000000000000000001", + "0x04" : "0xffd368e44b3f85cb81ae394c9809ca9fa2db46a83d7880a912ab6d4a87e400ff", + "0x05" : "0x0981ad53c19b15a94bcf0bf20235dd0da9df25f46ae635029fe2062e6c1c00ff", + "0x06" : "0x6aff810000000000000000000000000000000000000000000000000000000001", + "0x07" : "0x19df06ffa28250867006726405fbc05d43dc2f9d2f025006db089bd46be40101", + "0x08" : "0x243fffe3a4f2982f45055c08f379648ab886da8027a7401117a8e0b8881c0101" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x601c6101000a6101000a600055601c60ff0a6101000a600155601c6101010a6101000a600255601c6101000a60ff0a600355601c60ff0a60ff0a600455601c6101010a60ff0a600555601c6101000a6101010a600655601c60ff0a6101010a600755601c6101010a6101010a600855", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256Of256_29" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x601d6101000a6101000a600055601d60ff0a6101000a600155601d6101010a6101000a600255601d6101000a60ff0a600355601d60ff0a60ff0a600455601d6101010a60ff0a600555601d6101000a6101010a600655601d60ff0a6101010a600755601d6101010a6101010a600855", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "7570", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x601d6101000a6101000a600055601d60ff0a6101000a600155601d6101010a6101000a600255601d6101000a60ff0a600355601d60ff0a60ff0a600455601d6101010a60ff0a600555601d6101000a6101010a600655601d60ff0a6101010a600755601d6101010a6101010a600855", + "nonce" : "0", + "storage" : { + "0x03" : "0xff7f000000000000000000000000000000000000000000000000000000000001", + "0x04" : "0x41e065d46e0349cfe624c4e8a2034aea1f7edfff80e511cd8067d488949bfeff", + "0x05" : "0xa84162ca6675a22c4c79dfc4ea15f760db5a04dbf04246764199b668879d00ff", + "0x06" : "0xff81000000000000000000000000000000000000000000000000000000000001", + "0x07" : "0x1226984faa6b05ebdbd45d8477fa4fd5b55bfd5061de03c319282b153d9dff01", + "0x08" : "0x5cc9e6b0b749fd94541ad00364bdec2fca7816981ca3e38f485decc7a49d0101" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x601d6101000a6101000a600055601d60ff0a6101000a600155601d6101010a6101000a600255601d6101000a60ff0a600355601d60ff0a60ff0a600455601d6101010a60ff0a600555601d6101000a6101010a600655601d60ff0a6101010a600755601d6101010a6101010a600855", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256Of256_3" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60036101000a6101000a600055600360ff0a6101000a60015560036101010a6101000a60025560036101000a60ff0a600355600360ff0a60ff0a60045560036101010a60ff0a60055560036101000a6101010a600655600360ff0a6101010a60075560036101010a6101010a600855", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "7804", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60036101000a6101000a600055600360ff0a6101000a60015560036101010a6101000a60025560036101000a60ff0a600355600360ff0a60ff0a60045560036101010a60ff0a60055560036101000a6101010a600655600360ff0a6101010a60075560036101010a6101010a600855", + "nonce" : "0", + "storage" : { + "0x03" : "0x109a00e1370d2d2922bf892e85becb54297354b2e5c75388d514ff7f00000001", + "0x04" : "0x54a792f15e9aba7e4ad9e716bc169eea3a6e2e9c49bf9b335874613c8081feff", + "0x05" : "0x5d24a14d8e5e039372cd0f6a0f31e9ed6b75adba9f16b1c5b3edd5ba818300ff", + "0x06" : "0x298e2f316b4ccded5ebf515998d9ec20df69404b04a441782a6aff8100000001", + "0x07" : "0x4335694e98f372183c62a2339fa4ad161e9b4c42240bdc9452abffd07783ff01", + "0x08" : "0xf0f0820797315acd063056bba76f6a9c3e281cdb5197a233967ca94684830101" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60036101000a6101000a600055600360ff0a6101000a60015560036101010a6101000a60025560036101000a60ff0a600355600360ff0a60ff0a60045560036101010a60ff0a60055560036101000a6101010a600655600360ff0a6101010a60075560036101010a6101010a600855", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256Of256_30" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x601e6101000a6101000a600055601e60ff0a6101000a600155601e6101010a6101000a600255601e6101000a60ff0a600355601e60ff0a60ff0a600455601e6101010a60ff0a600555601e6101000a6101010a600655601e60ff0a6101010a600755601e6101010a6101010a600855", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "7561", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x601e6101000a6101000a600055601e60ff0a6101000a600155601e6101010a6101000a600255601e6101000a60ff0a600355601e60ff0a60ff0a600455601e6101010a60ff0a600555601e6101000a6101010a600655601e60ff0a6101010a600755601e6101010a6101010a600855", + "nonce" : "0", + "storage" : { + "0x03" : "0x7f00000000000000000000000000000000000000000000000000000000000001", + "0x04" : "0xe9772778f50fa0a69cd10fa019ac56d72ac7a7d7af26c4ba28415c8f41e200ff", + "0x05" : "0x33f0385ef73feebdb952e5adb643dd0fa178fd9271578219ad50a73d241e00ff", + "0x06" : "0x8100000000000000000000000000000000000000000000000000000000000001", + "0x07" : "0xfd405cce8f73dffc04a6f0ff6ffc6bf7961876d09c5b4933a68f0cc623e20101", + "0x08" : "0xc5a8f4566fd2e96e4ce3a8b3ec0863e7b20bc3b2f3dc5261ba8a0174421e0101" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x601e6101000a6101000a600055601e60ff0a6101000a600155601e6101010a6101000a600255601e6101000a60ff0a600355601e60ff0a60ff0a600455601e6101010a60ff0a600555601e6101000a6101010a600655601e60ff0a6101010a600755601e6101010a6101010a600855", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256Of256_31" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x601f6101000a6101000a600055601f60ff0a6101000a600155601f6101010a6101000a600255601f6101000a60ff0a600355601f60ff0a60ff0a600455601f6101010a60ff0a600555601f6101000a6101010a600655601f60ff0a6101010a600755601f6101010a6101010a600855", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "7552", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x601f6101000a6101000a600055601f60ff0a6101000a600155601f6101010a6101000a600255601f6101000a60ff0a600355601f60ff0a60ff0a600455601f6101010a60ff0a600555601f6101000a6101010a600655601f60ff0a6101010a600755601f6101010a6101010a600855", + "nonce" : "0", + "storage" : { + "0x03" : "0x01", + "0x04" : "0xf9cb87f5b1ab58602f52a1e9d392e5675b86a59a53943a8d4ec2a915dc9dfeff", + "0x05" : "0x893d729a64e318860ec5047e70e598da163eb41e71e74b04dfd4712d419f00ff", + "0x06" : "0x01", + "0x07" : "0xee5f2839c1b4f6ca05e6fdb04e2fb49c0f860b3765c27dc781a150cb7f9fff01", + "0x08" : "0xb4c358e3c6bcddfb509ea487d733df0e1854f29c3b6bfd4a8caabe3f609f0101" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x601f6101000a6101000a600055601f60ff0a6101000a600155601f6101010a6101000a600255601f6101000a60ff0a600355601f60ff0a60ff0a600455601f6101010a60ff0a600555601f6101000a6101010a600655601f60ff0a6101010a600755601f6101010a6101010a600855", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256Of256_32" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60206101000a6101000a600055602060ff0a6101000a60015560206101010a6101000a60025560206101000a60ff0a600355602060ff0a60ff0a60045560206101010a60ff0a60055560206101000a6101010a600655602060ff0a6101010a60075560206101010a6101010a600855", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "7445", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60206101000a6101000a600055602060ff0a6101000a60015560206101010a6101000a60025560206101000a60ff0a600355602060ff0a60ff0a60045560206101010a60ff0a60055560206101000a6101010a600655602060ff0a6101010a60075560206101010a6101010a600855", + "nonce" : "0", + "storage" : { + "0x" : "0x01", + "0x03" : "0x01", + "0x04" : "0xb8247842bb5ce75c08d0c251669ed5870fa24a22952e5db3a7c66c59ffe000ff", + "0x05" : "0xee526e5a06f2a990b2bf6c951e5feabf0e07ee16877296e1be872db9e02000ff", + "0x06" : "0x01", + "0x07" : "0xeda7d024b6de40a9d3b966e71f10a4667edc5b71cab07aeabcac6249dfe00101", + "0x08" : "0x512ecfaeeb11205f0833e1054dcb1300488e0954be5af77a49e143aa00200101" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60206101000a6101000a600055602060ff0a6101000a60015560206101010a6101000a60025560206101000a60ff0a600355602060ff0a60ff0a60045560206101010a60ff0a60055560206101000a6101010a600655602060ff0a6101010a60075560206101010a6101010a600855", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256Of256_33" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60216101000a6101000a600055602160ff0a6101000a60015560216101010a6101000a60025560216101000a60ff0a600355602160ff0a60ff0a60045560216101010a60ff0a60055560216101000a6101010a600655602160ff0a6101010a60075560216101010a6101010a600855", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "7445", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60216101000a6101000a600055602160ff0a6101000a60015560216101010a6101000a60025560216101000a60ff0a600355602160ff0a60ff0a60045560216101010a60ff0a60055560216101000a6101010a600655602160ff0a6101010a60075560216101010a6101010a600855", + "nonce" : "0", + "storage" : { + "0x" : "0x01", + "0x03" : "0x01", + "0x04" : "0x8dcb65b5494eba78cd6756a6f9851f6e26d0f2bb9ecd7e9abd7e9b11209ffeff", + "0x05" : "0x6694bb31b20cd625f3756897dae6d738f2e64467b5b6f10fa3e07763ffa100ff", + "0x06" : "0x01", + "0x07" : "0xe678999aeffd1f1f45081f64de7f80ab083dd7df04721ed64ee04c03bda1ff01", + "0x08" : "0x39b68fb9898dd7568abd178397251ce8226a25c1d305a4e79573333520a10101" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60216101000a6101000a600055602160ff0a6101000a60015560216101010a6101000a60025560216101000a60ff0a600355602160ff0a60ff0a60045560216101010a60ff0a60055560216101000a6101010a600655602160ff0a6101010a60075560216101010a6101010a600855", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256Of256_4" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60046101000a6101000a600055600460ff0a6101000a60015560046101010a6101000a60025560046101000a60ff0a600355600460ff0a60ff0a60045560046101010a60ff0a60055560046101000a6101010a600655600460ff0a6101010a60075560046101010a6101010a600855", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "7795", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60046101000a6101000a600055600460ff0a6101000a60015560046101010a6101000a60025560046101000a60ff0a600355600460ff0a60ff0a60045560046101010a60ff0a60055560046101000a6101010a600655600460ff0a6101010a60075560046101010a6101010a600855", + "nonce" : "0", + "storage" : { + "0x03" : "0xe6540ce46eaf70da9d644015a661e0e245b13f307cb3885514ff7f0000000001", + "0x04" : "0x6526b38b05a6325b80e1c84ab41dc934fd70f33f1bd0eab3d1f61a4707fc00ff", + "0x05" : "0xe959516cd27e5d8fd487b72db2989b3ec2ba9fb7ead41554526fe5a3040400ff", + "0x06" : "0xe7498a48c6ce2530bbe814ee3440c8c44fffab7ad8a277aa6aff810000000001", + "0x07" : "0x2dffa3e901e5a392d15b79f4193d2168147d2aa7c55870b46c3a905d03fc0101", + "0x08" : "0xe16ea721c96539edb4f7fb82de0dad8cccb1e7a6966a6777635f6fb908040101" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60046101000a6101000a600055600460ff0a6101000a60015560046101010a6101000a60025560046101000a60ff0a600355600460ff0a60ff0a60045560046101010a60ff0a60055560046101000a6101010a600655600460ff0a6101010a60075560046101010a6101010a600855", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256Of256_5" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60056101000a6101000a600055600560ff0a6101000a60015560056101010a6101000a60025560056101000a60ff0a600355600560ff0a60ff0a60045560056101010a60ff0a60055560056101000a6101010a600655600560ff0a6101010a60075560056101010a6101010a600855", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "7786", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60056101000a6101000a600055600560ff0a6101000a60015560056101010a6101000a60025560056101000a60ff0a600355600560ff0a60ff0a60045560056101010a60ff0a60055560056101000a6101010a600655600560ff0a6101010a60075560056101010a6101010a600855", + "nonce" : "0", + "storage" : { + "0x03" : "0xb581ac185aad71db2d177c286929c4c22809e5dcb3085514ff7f000000000001", + "0x04" : "0x75789eb2a64bc971389fbd11a1e6d7abbf95ad25e23fb9aa25e73a0bfc83feff", + "0x05" : "0xfc403fa42ceb6a0d0d3321bd9b2d8af25b1b667f87a04f496c78168d078500ff", + "0x06" : "0xcec5ec213b9cb5811f6ae00428fd7b6ef5a1af39a1f7aa6aff81000000000001", + "0x07" : "0x70ab32233202b98d382d17713fa0be391eaf74f85ba1740c9c3238c4ed85ff01", + "0x08" : "0xb622672a213faa79b32185ff93a7b27a8499e48f7b032cdb4d1a70300c850101" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60056101000a6101000a600055600560ff0a6101000a60015560056101010a6101000a60025560056101000a60ff0a600355600560ff0a60ff0a60045560056101010a60ff0a60055560056101000a6101010a600655600560ff0a6101010a60075560056101010a6101010a600855", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256Of256_6" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60066101000a6101000a600055600660ff0a6101000a60015560066101010a6101000a60025560066101000a60ff0a600355600660ff0a60ff0a60045560066101010a60ff0a60055560066101000a6101010a600655600660ff0a6101010a60075560066101010a6101010a600855", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "7777", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60066101000a6101000a600055600660ff0a6101000a60015560066101010a6101000a60025560066101000a60ff0a600355600660ff0a60ff0a60045560066101010a60ff0a60055560066101000a6101010a600655600660ff0a6101010a60075560066101010a6101010a600855", + "nonce" : "0", + "storage" : { + "0x03" : "0x1948059de1def03c4ec35fc22c2bb8f2bf45dc33085514ff7f00000000000001", + "0x04" : "0x41f818a8e24eb6d7bb7b193b4f2b5fdcf4bd0d453f2ac3499d8830d391fa00ff", + "0x05" : "0xede6fe4a943dfb5d967a2b85d6728759d40d2ef0ae4bc28bbb1867f98c0600ff", + "0x06" : "0x083c936cbaad5de592badc2e142fe4ebd6103921f7aa6aff8100000000000001", + "0x07" : "0x57385019fe4e0939ca3f35c37cadfaf52fba5b1cdfb02def3866e8068bfa0101", + "0x08" : "0x810ac878bd98428f6be8c6426ba9f9da09e3e33bf4fe10bfa3f8b12c92060101" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60066101000a6101000a600055600660ff0a6101000a60015560066101010a6101000a60025560066101000a60ff0a600355600660ff0a60ff0a60045560066101010a60ff0a60055560066101000a6101010a600655600660ff0a6101010a60075560066101010a6101010a600855", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256Of256_7" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60076101000a6101000a600055600760ff0a6101000a60015560076101010a6101000a60025560076101000a60ff0a600355600760ff0a60ff0a60045560076101010a60ff0a60055560076101000a6101010a600655600760ff0a6101010a60075560076101010a6101010a600855", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "7768", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60076101000a6101000a600055600760ff0a6101000a60015560076101010a6101000a60025560076101000a60ff0a600355600760ff0a60ff0a60045560076101010a60ff0a60055560076101000a6101010a600655600760ff0a6101010a60075560076101010a6101010a600855", + "nonce" : "0", + "storage" : { + "0x03" : "0x8bb02654111ad8c60ad8af132283a81f455c33085514ff7f0000000000000001", + "0x04" : "0xa8f75c129dbb8466d6703a2a0b8212131b3248d70e2478862ac40fe17485feff", + "0x05" : "0x5fd4d2de580383ee59f5e800ddb3f1717ceae03aede19d3dec5e5a69918700ff", + "0x06" : "0xc8624230b524b85d6340da48a5db20370fb921f7aa6aff810000000000000001", + "0x07" : "0x287b58a5a13cd7f454468ca616c181712f5ed25433a7d5a894b6ced35f87ff01", + "0x08" : "0x09930d11ac2804fa977bf951593c8dff8498779cc0cdc5812a4fba2f98870101" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60076101000a6101000a600055600760ff0a6101000a60015560076101010a6101000a60025560076101000a60ff0a600355600760ff0a60ff0a60045560076101010a60ff0a60055560076101000a6101010a600655600760ff0a6101010a60075560076101010a6101010a600855", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256Of256_8" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60086101000a6101000a600055600860ff0a6101000a60015560086101010a6101000a60025560086101000a60ff0a600355600860ff0a60ff0a60045560086101010a60ff0a60055560086101000a6101010a600655600860ff0a6101010a60075560086101010a6101010a600855", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "7759", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60086101000a6101000a600055600860ff0a6101000a60015560086101010a6101000a60025560086101000a60ff0a600355600860ff0a60ff0a60045560086101010a60ff0a60055560086101000a6101010a600655600860ff0a6101010a60075560086101010a6101010a600855", + "nonce" : "0", + "storage" : { + "0x03" : "0x230041a0e7602d6e459609ed39081ec55c33085514ff7f000000000000000001", + "0x04" : "0xc407d8a413ef9079ead457ed686a05ac81039c0cae0a7f6afd01e8461ff800ff", + "0x05" : "0x67a397e0692385e4cd83853aabce220a94d449e885fa867e96d3ef5e180800ff", + "0x06" : "0x70add926e753655d6d0ebe9c0f81368fb921f7aa6aff81000000000000000001", + "0x07" : "0x0bdce80b8378e43f13d454b9d0a4c83cf311b8eaa45d5122cfd544a217f80101", + "0x08" : "0x629c25790e1488998877a9ecdf0fb69637e77d8a4bdc1b46270093ba20080101" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60086101000a6101000a600055600860ff0a6101000a60015560086101010a6101000a60025560086101000a60ff0a600355600860ff0a60ff0a60045560086101010a60ff0a60055560086101000a6101010a600655600860ff0a6101010a60075560086101010a6101010a600855", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256Of256_9" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60096101000a6101000a600055600960ff0a6101000a60015560096101010a6101000a60025560096101000a60ff0a600355600960ff0a60ff0a60045560096101010a60ff0a60055560096101000a6101010a600655600960ff0a6101010a60075560096101010a6101010a600855", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "7750", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60096101000a6101000a600055600960ff0a6101000a60015560096101010a6101000a60025560096101000a60ff0a600355600960ff0a60ff0a60045560096101010a60ff0a60055560096101000a6101010a600655600960ff0a6101010a60075560096101010a6101010a600855", + "nonce" : "0", + "storage" : { + "0x03" : "0x53017d8eb210db2c8cd4a299079ec55c33085514ff7f00000000000000000001", + "0x04" : "0x48be09b6c6ae2aa660f1972125cecbb1038b5d236ecf766ba786e2c4e887feff", + "0x05" : "0x2e350d847ba73dc2099f83f532951c47269d9fd7e411b50bae00a9581f8900ff", + "0x06" : "0x013ab9e1f0df89a184b4d07080b68fb921f7aa6aff8100000000000000000001", + "0x07" : "0xf387ed41c1050f9da667f429a3e8fb30b61a55ede97d7b8acd797a03cd89ff01", + "0x08" : "0x525696c22bb3ce00fd2e3f6bbb9b4ea1046a5e31fcff2fedf8f8c74d28890101" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60096101000a6101000a600055600960ff0a6101000a60015560096101010a6101000a60025560096101000a60ff0a600355600960ff0a60ff0a60045560096101010a60ff0a60055560096101000a6101010a600655600960ff0a6101010a60075560096101010a6101010a600855", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256_1" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60016101000a600055600160ff0a60015560016101010a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9085", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60016101000a600055600160ff0a60015560016101010a600255", + "nonce" : "0", + "storage" : { + "0x" : "0x0100", + "0x01" : "0xff", + "0x02" : "0x0101" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60016101000a600055600160ff0a60015560016101010a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256_10" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x600a6101000a600055600a60ff0a600155600a6101010a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9085", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600a6101000a600055600a60ff0a600155600a6101010a600255", + "nonce" : "0", + "storage" : { + "0x" : "0x0100000000000000000000", + "0x01" : "0xf62c88d104d1882cf601", + "0x02" : "0x010a2d78d2fcd2782d0a01" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600a6101000a600055600a60ff0a600155600a6101010a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256_11" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x600b6101000a600055600b60ff0a600155600b6101010a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9085", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600b6101000a600055600b60ff0a600155600b6101010a600255", + "nonce" : "0", + "storage" : { + "0x" : "0x010000000000000000000000", + "0x01" : "0xf5365c4833ccb6a4c90aff", + "0x02" : "0x010b37a64bcfcf4aa5370b01" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600b6101000a600055600b60ff0a600155600b6101010a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256_12" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x600c6101000a600055600c60ff0a600155600c6101010a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9085", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600c6101000a600055600c60ff0a600155600c6101010a600255", + "nonce" : "0", + "storage" : { + "0x" : "0x01000000000000000000000000", + "0x01" : "0xf44125ebeb98e9ee2441f401", + "0x02" : "0x010c42ddf21b9f19efdc420c01" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600c6101000a600055600c60ff0a600155600c6101010a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256_13" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x600d6101000a600055600d60ff0a600155600d6101010a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9085", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600d6101000a600055600d60ff0a600155600d6101010a600255", + "nonce" : "0", + "storage" : { + "0x" : "0x0100000000000000000000000000", + "0x01" : "0xf34ce4c5ffad5104361db20cff", + "0x02" : "0x010d4f20d00dbab909cc1e4e0d01" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600d6101000a600055600d60ff0a600155600d6101010a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256_14" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x600e6101000a600055600e60ff0a600155600e6101010a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9085", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600e6101000a600055600e60ff0a600155600e6101010a600255", + "nonce" : "0", + "storage" : { + "0x" : "0x010000000000000000000000000000", + "0x01" : "0xf25997e139ada3b331e7945af201", + "0x02" : "0x010e5c6ff0ddc873c2d5ea6c5b0e01" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600e6101000a600055600e60ff0a600155600e6101010a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256_15" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x600f6101000a600055600f60ff0a600155600f6101010a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9085", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600f6101000a600055600f60ff0a600155600f6101010a600255", + "nonce" : "0", + "storage" : { + "0x" : "0x01000000000000000000000000000000", + "0x01" : "0xf1673e495873f60f7eb5acc6970eff", + "0x02" : "0x010f6acc60cea63c3698c056c7690f01" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600f6101000a600055600f60ff0a600155600f6101010a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256_16" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60106101000a600055601060ff0a60015560106101010a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9085", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60106101000a600055601060ff0a60015560106101010a600255", + "nonce" : "0", + "storage" : { + "0x" : "0x0100000000000000000000000000000000", + "0x01" : "0xf075d70b0f1b82196f36f719d077f001", + "0x02" : "0x01107a372d2f74e272cf59171e30781001" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60106101000a600055601060ff0a60015560106101010a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256_17" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60116101000a600055601160ff0a60015560116101010a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9085", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60116101000a600055601160ff0a60015560116101010a600255", + "nonce" : "0", + "storage" : { + "0x" : "0x010000000000000000000000000000000000", + "0x01" : "0xef856134040c669755c7c022b6a77810ff", + "0x02" : "0x01118ab1645ca45755422870354ea8881101" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60116101000a600055601160ff0a60015560116101010a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256_18" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60126101000a600055601260ff0a60015560126101010a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9085", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60126101000a600055601260ff0a60015560126101010a600255", + "nonce" : "0", + "storage" : { + "0x" : "0x01000000000000000000000000000000000000", + "0x01" : "0xee95dbd2d0085a30be71f86293f0d098ee01", + "0x02" : "0x01129c3c15c100fbac976a98a583f730991201" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60126101000a600055601260ff0a60015560126101010a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256_19" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60136101000a600055601360ff0a60015560136101010a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9085", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60136101000a600055601360ff0a60015560136101010a600255", + "nonce" : "0", + "storage" : { + "0x" : "0x0100000000000000000000000000000000000000", + "0x01" : "0xeda745f6fd3851d68db3866a315cdfc85512ff", + "0x02" : "0x0113aed851d6c1fca84402033e297b27c9ab1301" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60136101000a600055601360ff0a60015560136101010a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256_2" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60026101000a600055600260ff0a60015560026101010a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9085", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60026101000a600055600260ff0a60015560026101010a600255", + "nonce" : "0", + "storage" : { + "0x" : "0x010000", + "0x01" : "0xfe01", + "0x02" : "0x010201" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60026101000a600055600260ff0a60015560026101010a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256_20" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60146101000a600055601460ff0a60015560146101010a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9085", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60146101000a600055601460ff0a60015560146101010a600255", + "nonce" : "0", + "storage" : { + "0x" : "0x010000000000000000000000000000000000000000", + "0x01" : "0xecb99eb1063b1984b725d2e3c72b82e88cbdec01", + "0x02" : "0x0114c2872a2898bea4ec46054167a4a2f174be1401" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60146101000a600055601460ff0a60015560146101010a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256_21" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60156101000a600055601560ff0a60015560156101010a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9085", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60156101000a600055601560ff0a60015560156101010a600255", + "nonce" : "0", + "storage" : { + "0x" : "0x01000000000000000000000000000000000000000000", + "0x01" : "0xebcce5125534de6b326ead10e3645765a4312e14ff", + "0x02" : "0x0115d749b152c1576391324b46a90c47946632d21501" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60156101000a600055601560ff0a60015560156101010a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256_22" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60166101000a600055601660ff0a60015560166101010a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9085", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60166101000a600055601660ff0a60015560166101010a600255", + "nonce" : "0", + "storage" : { + "0x" : "0x0100000000000000000000000000000000000000000000", + "0x01" : "0xeae1182d42dfa98cc73c3e63d280f30e3e8cfce6ea01", + "0x02" : "0x0116ed20fb041418baf4c37d91efb553dbfa9904e71601" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60166101000a600055601660ff0a60015560166101010a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256_23" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60176101000a600055601760ff0a60015560176101010a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9085", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60176101000a600055601760ff0a60015560176101010a600255", + "nonce" : "0", + "storage" : { + "0x" : "0x010000000000000000000000000000000000000000000000", + "0x01" : "0xe9f63715159cc9e33a7502256eae721b304e6fea0316ff", + "0x02" : "0x0118040e1bff182cd3afb8410f81a5092fd6939debfd1701" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60176101000a600055601760ff0a60015560176101010a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256_24" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60186101000a600055601860ff0a60015560186101010a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9085", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60186101000a600055601860ff0a60015560186101010a600255", + "nonce" : "0", + "storage" : { + "0x" : "0x01000000000000000000000000000000000000000000000000", + "0x01" : "0xe90c40de00872d19573a8d23493fc3a9151e217a1913e801", + "0x02" : "0x01191c122a1b1745008367f9509126ae39066a3189e9141801" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60186101000a600055601860ff0a60015560186101010a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256_25" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60196101000a600055601960ff0a60015560196101010a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9085", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60196101000a600055601960ff0a60015560196101010a600255", + "nonce" : "0", + "storage" : { + "0x" : "0x0100000000000000000000000000000000000000000000000000", + "0x01" : "0xe823349d2286a5ec3de3529625f683e56c0903589efad418ff", + "0x02" : "0x011a352e3c45325c4583eb6149e1b7d4e73f709bbb72fd2c1901" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60196101000a600055601960ff0a60015560196101010a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256_26" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x601a6101000a600055601a60ff0a600155601a6101010a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9085", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x601a6101000a600055601a60ff0a600155601a6101010a600255", + "nonce" : "0", + "storage" : { + "0x" : "0x010000000000000000000000000000000000000000000000000000", + "0x01" : "0xe73b116885641f4651a56f438fd08d61869cfa55465bd944e601", + "0x02" : "0x011b4f636a81778ea1c96f4cab2b998cbc26b00c572e7029451a01" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x601a6101000a600055601a60ff0a600155601a6101010a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256_27" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x601b6101000a600055601b60ff0a600155601b6101010a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9085", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x601b6101000a600055601b60ff0a600155601b6101010a600255", + "nonce" : "0", + "storage" : { + "0x" : "0x01000000000000000000000000000000000000000000000000000000", + "0x01" : "0xe653d6571cdebb270b53c9d44c40bcd425165d5af1157d6ba11aff", + "0x02" : "0x011c6ab2cdebf906306b38bbf7d6c52648e2d6bc63859e996e5f1b01" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x601b6101000a600055601b60ff0a600155601b6101010a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256_28" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x601c6101000a600055601c60ff0a600155601c6101010a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9085", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x601c6101000a600055601c60ff0a600155601c6101010a600255", + "nonce" : "0", + "storage" : { + "0x" : "0x0100000000000000000000000000000000000000000000000000000000", + "0x01" : "0xe56d8280c5c1dc6be448760a77f47c1750f146fd962467ee3579e401", + "0x02" : "0x011d871d80b9e4ff369ba3f4b3ce9beb6f2bb9931fe9243807cd7a1c01" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x601c6101000a600055601c60ff0a600155601c6101010a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256_29" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x601d6101000a600055601d60ff0a600155601d6101010a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9085", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x601d6101000a600055601d60ff0a600155601d6101010a600255", + "nonce" : "0", + "storage" : { + "0x" : "0x010000000000000000000000000000000000000000000000000000000000", + "0x01" : "0xe48814fe44fc1a8f78642d946d7c879b39a055b6988e438647446a1cff", + "0x02" : "0x011ea4a49e3a9ee435d23f98a8826a875a9ae54cb3090d5c3fd547961d01" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x601d6101000a600055601d60ff0a600155601d6101010a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256_3" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60036101000a600055600360ff0a60015560036101010a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9085", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60036101000a600055600360ff0a60015560036101010a600255", + "nonce" : "0", + "storage" : { + "0x" : "0x01000000", + "0x01" : "0xfd02ff", + "0x02" : "0x01030301" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60036101000a600055600360ff0a60015560036101010a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256_30" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x601e6101000a600055601e60ff0a600155601e6101010a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9085", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x601e6101000a600055601e60ff0a600155601e6101010a600255", + "nonce" : "0", + "storage" : { + "0x" : "0x01000000000000000000000000000000000000000000000000000000000000", + "0x01" : "0xe3a38ce946b71e74e8ebc966d90f0b139e66b560e1f5b542c0fd25b2e201", + "0x02" : "0x011fc34942d8d9831a0811d8412aecf1e1f58031ffbc16699c151cddb31e01" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x601e6101000a600055601e60ff0a600155601e6101010a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256_31" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x601f6101000a600055601f60ff0a600155601f6101010a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9085", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x601f6101000a600055601f60ff0a600155601f6101010a600255", + "nonce" : "0", + "storage" : { + "0x" : "0x0100000000000000000000000000000000000000000000000000000000000000", + "0x01" : "0xe2bfe95c5d7067567402dd9d7235fc088ac84eab8113bf8d7e3c288d2f1eff", + "0x02" : "0x0120e30c8c1bb25c9d2219ea196c17ded3d775b231bbd28005b131fa90d11f01" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x601f6101000a600055601f60ff0a600155601f6101010a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256_32" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60206101000a600055602060ff0a60015560206101010a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9285", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60206101000a600055602060ff0a60015560206101010a600255", + "nonce" : "0", + "storage" : { + "0x01" : "0xe1dd29730112f6ef1d8edabfd4c3c60c823d865cd592abcdf0bdec64a1efe001", + "0x02" : "0x2203ef98a7ce0ef9bf3c04038583f6b2ab4d27e3ed8e5285b6e32c8b61f02001" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60206101000a600055602060ff0a60015560206101010a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256_33" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60216101000a600055602160ff0a60015560216101010a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9285", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60216101000a600055602160ff0a60015560216101010a600255", + "nonce" : "0", + "storage" : { + "0x01" : "0xfb4c498e11e3f82e714be514ef024675bb48d678bd192222cd2e783d4df020ff", + "0x02" : "0x25f3884075dd08b8fb400789097aa95df8750bd17be0d83c9a0fb7ed52102101" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60216101000a600055602160ff0a60015560216101010a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256_4" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60046101000a600055600460ff0a60015560046101010a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9085", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60046101000a600055600460ff0a60015560046101010a600255", + "nonce" : "0", + "storage" : { + "0x" : "0x0100000000", + "0x01" : "0xfc05fc01", + "0x02" : "0x0104060401" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60046101000a600055600460ff0a60015560046101010a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256_5" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60056101000a600055600560ff0a60015560056101010a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9085", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60056101000a600055600560ff0a60015560056101010a600255", + "nonce" : "0", + "storage" : { + "0x" : "0x010000000000", + "0x01" : "0xfb09f604ff", + "0x02" : "0x01050a0a0501" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60056101000a600055600560ff0a60015560056101010a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256_6" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60066101000a600055600660ff0a60015560066101010a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9085", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60066101000a600055600660ff0a60015560066101010a600255", + "nonce" : "0", + "storage" : { + "0x" : "0x01000000000000", + "0x01" : "0xfa0eec0efa01", + "0x02" : "0x01060f140f0601" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60066101000a600055600660ff0a60015560066101010a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256_7" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60076101000a600055600760ff0a60015560076101010a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9085", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60076101000a600055600760ff0a60015560076101010a600255", + "nonce" : "0", + "storage" : { + "0x" : "0x0100000000000000", + "0x01" : "0xf914dd22eb06ff", + "0x02" : "0x0107152323150701" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60076101000a600055600760ff0a60015560076101010a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256_8" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60086101000a600055600860ff0a60015560086101010a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9085", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60086101000a600055600860ff0a60015560086101010a600255", + "nonce" : "0", + "storage" : { + "0x" : "0x010000000000000000", + "0x01" : "0xf81bc845c81bf801", + "0x02" : "0x01081c3846381c0801" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60086101000a600055600860ff0a60015560086101010a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf256_9" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x60096101000a600055600960ff0a60015560096101010a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9085", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60096101000a600055600960ff0a60015560096101010a600255", + "nonce" : "0", + "storage" : { + "0x" : "0x01000000000000000000", + "0x01" : "0xf723ac7d8253dc08ff", + "0x02" : "0x010924547e7e54240901" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60096101000a600055600960ff0a60015560096101010a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf2_128" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x608060020a600055607f60020a600155608160020a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9085", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x608060020a600055607f60020a600155608160020a600255", + "nonce" : "0", + "storage" : { + "0x" : "0x0100000000000000000000000000000000", + "0x01" : "0x80000000000000000000000000000000", + "0x02" : "0x0200000000000000000000000000000000" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x608060020a600055607f60020a600155608160020a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf2_16" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x601060020a600055600f60020a600155601160020a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9085", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x601060020a600055600f60020a600155601160020a600255", + "nonce" : "0", + "storage" : { + "0x" : "0x010000", + "0x01" : "0x8000", + "0x02" : "0x020000" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x601060020a600055600f60020a600155601160020a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf2_2" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x600260020a600055600160020a600155600360020a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9085", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600260020a600055600160020a600155600360020a600255", + "nonce" : "0", + "storage" : { + "0x" : "0x04", + "0x01" : "0x02", + "0x02" : "0x08" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600260020a600055600160020a600155600360020a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf2_256" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x61010060020a60005560ff60020a60015561010160020a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9483", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x61010060020a60005560ff60020a60015561010160020a600255", + "nonce" : "0", + "storage" : { + "0x01" : "0x8000000000000000000000000000000000000000000000000000000000000000" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x61010060020a60005560ff60020a60015561010160020a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf2_32" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x602060020a600055601f60020a600155602160020a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9085", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x602060020a600055601f60020a600155602160020a600255", + "nonce" : "0", + "storage" : { + "0x" : "0x0100000000", + "0x01" : "0x80000000", + "0x02" : "0x0200000000" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x602060020a600055601f60020a600155602160020a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf2_4" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x600460020a600055600360020a600155600560020a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9085", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600460020a600055600360020a600155600560020a600255", + "nonce" : "0", + "storage" : { + "0x" : "0x10", + "0x01" : "0x08", + "0x02" : "0x20" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600460020a600055600360020a600155600560020a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf2_64" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x604060020a600055603f60020a600155604160020a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9085", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x604060020a600055603f60020a600155604160020a600255", + "nonce" : "0", + "storage" : { + "0x" : "0x010000000000000000", + "0x01" : "0x8000000000000000", + "0x02" : "0x020000000000000000" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x604060020a600055603f60020a600155604160020a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, + "expPowerOf2_8" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "code" : "0x600860020a600055600760020a600155600960020a600255", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9085", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600860020a600055600760020a600155600960020a600255", + "nonce" : "0", + "storage" : { + "0x" : "0x0100", + "0x01" : "0x80", + "0x02" : "0x0200" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600860020a600055600760020a600155600960020a600255", + "nonce" : "0", + "storage" : { + } + } + } + }, "mod0" : { "callcreates" : [ ], @@ -3258,4 +6886,4 @@ } } } -} +} \ No newline at end of file diff --git a/tests/files/VMTests/vmIOandFlowOperationsTest.json b/tests/files/VMTests/vmIOandFlowOperationsTest.json index 1209770864..24adc9d5dc 100644 --- a/tests/files/VMTests/vmIOandFlowOperationsTest.json +++ b/tests/files/VMTests/vmIOandFlowOperationsTest.json @@ -135,8 +135,6 @@ } }, "jump0" : { - "callcreates" : [ - ], "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", "currentDifficulty" : "256", @@ -155,20 +153,6 @@ "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, - "gas" : "9696", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x60236007566001600255", - "nonce" : "0", - "storage" : { - "0x02" : "0x23" - } - } - }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -254,8 +238,6 @@ } }, "jump0_jumpdest1" : { - "callcreates" : [ - ], "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", "currentDifficulty" : "256", @@ -274,20 +256,6 @@ "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, - "gas" : "9696", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x602360085660015b600255", - "nonce" : "0", - "storage" : { - "0x02" : "0x23" - } - } - }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -402,8 +370,6 @@ } }, "jumpi0" : { - "callcreates" : [ - ], "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", "currentDifficulty" : "256", @@ -422,20 +388,6 @@ "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, - "gas" : "9695", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x602360016009576001600255", - "nonce" : "0", - "storage" : { - "0x02" : "0x23" - } - } - }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -492,8 +444,6 @@ } }, "jumpi1_jumpdest" : { - "callcreates" : [ - ], "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", "currentDifficulty" : "256", @@ -512,20 +462,6 @@ "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, - "gas" : "9695", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x60236001600a5760015b600255", - "nonce" : "0", - "storage" : { - "0x02" : "0x23" - } - } - }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -537,8 +473,6 @@ } }, "jumpi2" : { - "callcreates" : [ - ], "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", "currentDifficulty" : "256", @@ -557,19 +491,6 @@ "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff576002600355", - "nonce" : "0", - "storage" : { - } - } - }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", From 530953050ad0cf99d2a354c165b431d111baa1e3 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 2 Jan 2015 17:35:00 +0100 Subject: [PATCH 065/132] Updated protocol version --- eth/protocol.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eth/protocol.go b/eth/protocol.go index 963d417940..7c5d09489b 100644 --- a/eth/protocol.go +++ b/eth/protocol.go @@ -13,7 +13,7 @@ import ( ) const ( - ProtocolVersion = 49 + ProtocolVersion = 51 NetworkId = 0 ProtocolLength = uint64(8) ProtocolMaxMsgSize = 10 * 1024 * 1024 From 55e55826ee3b763be8805dcdef0468a179619ba1 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 2 Jan 2015 17:35:55 +0100 Subject: [PATCH 066/132] Changed JUMP(I) behaviour. * All jumps must land on a JUMPDEST instruction byte. * The byte may not be part of a PUSH* --- tests/vm/gh_test.go | 8 +++++++- vm/analysis.go | 26 ++++++-------------------- vm/vm_debug.go | 20 ++------------------ 3 files changed, 15 insertions(+), 39 deletions(-) diff --git a/tests/vm/gh_test.go b/tests/vm/gh_test.go index f1e4d1acc8..698b0aefc2 100644 --- a/tests/vm/gh_test.go +++ b/tests/vm/gh_test.go @@ -78,6 +78,12 @@ func RunVmTest(p string, t *testing.T) { helper.CreateFileTests(t, p, &tests) for name, test := range tests { + /* + helper.Logger.SetLogLevel(5) + if name != "jump0_jumpdest2" { + continue + } + */ statedb := state.New(helper.NewTrie()) for addr, account := range test.Pre { obj := StateObjectFromAccount(addr, account) @@ -127,7 +133,7 @@ func RunVmTest(p string, t *testing.T) { if isVmTest { if len(test.Gas) == 0 && err == nil { - t.Errorf("%s's gas unspecified, indicating an error. VM returned (incorrectly) successfull") + t.Errorf("%s's gas unspecified, indicating an error. VM returned (incorrectly) successfull", name) } else { gexp := ethutil.Big(test.Gas) if gexp.Cmp(gas) != 0 { diff --git a/vm/analysis.go b/vm/analysis.go index fef448b7ba..501fbfc4a3 100644 --- a/vm/analysis.go +++ b/vm/analysis.go @@ -1,34 +1,20 @@ package vm -import ( - "math/big" +import "gopkg.in/fatih/set.v0" - "github.com/ethereum/go-ethereum/ethutil" -) +func analyseJumpDests(code []byte) (dests *set.Set) { + dests = set.New() -func analyseJumpDests(code []byte) (dests map[uint64]*big.Int) { - dests = make(map[uint64]*big.Int) - - lp := false - var lpv *big.Int for pc := uint64(0); pc < uint64(len(code)); pc++ { var op OpCode = OpCode(code[pc]) switch op { case PUSH1, PUSH2, PUSH3, PUSH4, PUSH5, PUSH6, PUSH7, PUSH8, PUSH9, PUSH10, PUSH11, PUSH12, PUSH13, PUSH14, PUSH15, PUSH16, PUSH17, PUSH18, PUSH19, PUSH20, PUSH21, PUSH22, PUSH23, PUSH24, PUSH25, PUSH26, PUSH27, PUSH28, PUSH29, PUSH30, PUSH31, PUSH32: a := uint64(op) - uint64(PUSH1) + 1 - if uint64(len(code)) > pc+1+a { - lpv = ethutil.BigD(code[pc+1 : pc+1+a]) - } pc += a - lp = true - case JUMP, JUMPI: - if lp { - dests[pc] = lpv - } - - default: - lp = false + //lp = true + case JUMPDEST: + dests.Add(pc) } } return diff --git a/vm/vm_debug.go b/vm/vm_debug.go index 1b9c480f8a..6ad385fd0c 100644 --- a/vm/vm_debug.go +++ b/vm/vm_debug.go @@ -83,29 +83,13 @@ func (self *DebugVm) Run(me, caller ContextRef, code []byte, value, gas, price * jump = func(from uint64, to *big.Int) { p := to.Uint64() - self.Printf(" ~> %v", to) - /* NOTE: new model. Will change soon nop := OpCode(context.GetOp(p)) - if nop != JUMPDEST { + if !destinations.Has(p) { panic(fmt.Sprintf("invalid jump destination (%v) %v", nop, p)) } + self.Printf(" ~> %v", to) pc = to.Uint64() - */ - // Return to start - if p == 0 { - pc = 0 - } else { - nop := OpCode(context.GetOp(p)) - if !(nop == JUMPDEST || destinations[from] != nil) { - panic(fmt.Sprintf("invalid jump destination (%v) %v", nop, p)) - } else if nop == JUMP || nop == JUMPI { - panic(fmt.Sprintf("not allowed to JUMP(I) in to JUMP")) - } - - pc = to.Uint64() - - } self.Endl() } From 5c82fdc2434c302a2b65a4c7f25fe91b22cd43df Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 2 Jan 2015 22:18:23 +0100 Subject: [PATCH 067/132] Make sure that the object exists --- xeth/pipe.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xeth/pipe.go b/xeth/pipe.go index 775d5cfc58..cae6ee1dec 100644 --- a/xeth/pipe.go +++ b/xeth/pipe.go @@ -139,7 +139,7 @@ func (self *XEth) Transact(key *crypto.KeyPair, to []byte, value, gas, price *et // Do some pre processing for our "pre" events and hooks block := self.chainManager.NewBlock(key.Address()) - coinbase := state.GetStateObject(key.Address()) + coinbase := state.GetOrNewStateObject(key.Address()) coinbase.SetGasPool(block.GasLimit()) self.blockManager.ApplyTransactions(coinbase, state, block, types.Transactions{tx}, true) From 16f417f5af16de8f1c2c140f8b249bd989200bd3 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 2 Jan 2015 22:19:58 +0100 Subject: [PATCH 068/132] Fixed bug where logging could crash client during tx adding --- cmd/ethereum/repl/repl.go | 1 + core/transaction_pool.go | 10 +++++++++- eth/backend.go | 6 ++++-- javascript/types.go | 30 ++++++++++-------------------- vm/analysis.go | 1 - 5 files changed, 24 insertions(+), 24 deletions(-) diff --git a/cmd/ethereum/repl/repl.go b/cmd/ethereum/repl/repl.go index 822aaa19d5..78bb19cecf 100644 --- a/cmd/ethereum/repl/repl.go +++ b/cmd/ethereum/repl/repl.go @@ -86,6 +86,7 @@ func (self *JSRepl) Stop() { } func (self *JSRepl) parseInput(code string) { + value, err := self.re.Run(code) if err != nil { fmt.Println(err) diff --git a/core/transaction_pool.go b/core/transaction_pool.go index 3349c94411..fa284e52d0 100644 --- a/core/transaction_pool.go +++ b/core/transaction_pool.go @@ -4,6 +4,7 @@ import ( "fmt" "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/logger" "gopkg.in/fatih/set.v0" @@ -107,7 +108,14 @@ func (self *TxPool) Add(tx *types.Transaction) error { self.addTransaction(tx) - txplogger.Debugf("(t) %x => %x (%v) %x\n", tx.From()[:4], tx.To()[:4], tx.Value, tx.Hash()) + var to string + if len(tx.To()) > 0 { + to = ethutil.Bytes2Hex(tx.To()[:4]) + } else { + to = "[NEW_CONTRACT]" + } + + txplogger.Debugf("(t) %x => %s (%v) %x\n", tx.From()[:4], to, tx.Value, tx.Hash()) // Notify the subscribers go self.eventMux.Post(TxPreEvent{tx}) diff --git a/eth/backend.go b/eth/backend.go index 78c2159c0b..36c1ac30f3 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -234,8 +234,10 @@ func (self *Ethereum) txBroadcastLoop() { func (self *Ethereum) blockBroadcastLoop() { // automatically stops if unsubscribe for obj := range self.txSub.Chan() { - event := obj.(core.NewMinedBlockEvent) - self.server.Broadcast("eth", NewBlockMsg, event.Block.RlpData()) + switch ev := obj.(type) { + case core.NewMinedBlockEvent: + self.server.Broadcast("eth", NewBlockMsg, ev.Block.RlpData()) + } } } diff --git a/javascript/types.go b/javascript/types.go index ce1d9995a4..61a57033b2 100644 --- a/javascript/types.go +++ b/javascript/types.go @@ -72,15 +72,21 @@ type JSEthereum struct { ethereum *eth.Ethereum } -func (self *JSEthereum) GetBlock(hash string) otto.Value { - return self.toVal(&JSBlock{self.JSXEth.BlockByHash(hash), self}) +func (self *JSEthereum) Block(v interface{}) otto.Value { + if number, ok := v.(int64); ok { + return self.toVal(&JSBlock{self.JSXEth.BlockByNumber(int32(number)), self}) + } else if hash, ok := v.(string); ok { + return self.toVal(&JSBlock{self.JSXEth.BlockByHash(hash), self}) + } + + return otto.UndefinedValue() } -func (self *JSEthereum) GetPeers() otto.Value { +func (self *JSEthereum) Peers() otto.Value { return self.toVal(self.JSXEth.Peers()) } -func (self *JSEthereum) GetKey() otto.Value { +func (self *JSEthereum) Key() otto.Value { return self.toVal(self.JSXEth.Key()) } @@ -88,10 +94,6 @@ func (self *JSEthereum) GetStateObject(addr string) otto.Value { return self.toVal(&JSStateObject{xeth.NewJSObject(self.JSXEth.World().SafeGet(ethutil.Hex2Bytes(addr))), self}) } -func (self *JSEthereum) Peers() otto.Value { - return self.toVal(self.JSXEth.Peers()) -} - func (self *JSEthereum) Transact(key, recipient, valueStr, gasStr, gasPriceStr, dataStr string) otto.Value { r, err := self.JSXEth.Transact(key, recipient, valueStr, gasStr, gasPriceStr, dataStr) if err != nil { @@ -103,18 +105,6 @@ func (self *JSEthereum) Transact(key, recipient, valueStr, gasStr, gasPriceStr, return self.toVal(r) } -func (self *JSEthereum) Create(key, valueStr, gasStr, gasPriceStr, scriptStr string) otto.Value { - r, err := self.JSXEth.Transact(key, "", valueStr, gasStr, gasPriceStr, scriptStr) - - if err != nil { - fmt.Println(err) - - return otto.UndefinedValue() - } - - return self.toVal(r) -} - func (self *JSEthereum) toVal(v interface{}) otto.Value { result, err := self.vm.ToValue(v) diff --git a/vm/analysis.go b/vm/analysis.go index 501fbfc4a3..411df56861 100644 --- a/vm/analysis.go +++ b/vm/analysis.go @@ -12,7 +12,6 @@ func analyseJumpDests(code []byte) (dests *set.Set) { a := uint64(op) - uint64(PUSH1) + 1 pc += a - //lp = true case JUMPDEST: dests.Add(pc) } From ca1b2a1a91401255ab4e26cec7eb575b99ecb8da Mon Sep 17 00:00:00 2001 From: obscuren Date: Sat, 3 Jan 2015 17:18:43 +0100 Subject: [PATCH 069/132] Changed prev_hash to block_hash, state transition now uses vm env * PREVHASH => BLOCKHASH( N ) * State transition object uses VMEnv as it's query interface * Updated vm.Enviroment has GetHash( n ) for BLOCKHASH instruction * Added GetHash to xeth, core, utils & test environments --- cmd/mist/debugger.go | 2 +- cmd/utils/vm_env.go | 12 ++++++++++-- core/block_manager.go | 12 +++++++----- core/chain_manager.go | 16 ++++++++-------- core/state_transition.go | 41 ++++++++++++++++++++-------------------- core/vm_env.go | 13 ++++++++++--- state/manifest.go | 6 ++++++ tests/helper/vm.go | 7 ++++--- vm/environment.go | 3 +-- vm/types.go | 4 ++-- vm/vm_debug.go | 19 +++++++++++-------- xeth/pipe.go | 2 +- xeth/vm_env.go | 11 +++++++++-- 13 files changed, 91 insertions(+), 57 deletions(-) diff --git a/cmd/mist/debugger.go b/cmd/mist/debugger.go index 0e97a6652c..618e31f4ed 100644 --- a/cmd/mist/debugger.go +++ b/cmd/mist/debugger.go @@ -151,7 +151,7 @@ func (self *DebuggerWindow) Debug(valueStr, gasStr, gasPriceStr, scriptStr, data block := self.lib.eth.ChainManager().CurrentBlock() - env := utils.NewEnv(statedb, block, account.Address(), value) + env := utils.NewEnv(self.lib.eth.ChainManager(), statedb, block, account.Address(), value) self.Logf("callsize %d", len(script)) go func() { diff --git a/cmd/utils/vm_env.go b/cmd/utils/vm_env.go index 19091bdc5d..acc2ffad95 100644 --- a/cmd/utils/vm_env.go +++ b/cmd/utils/vm_env.go @@ -10,6 +10,7 @@ import ( ) type VMEnv struct { + chain *core.ChainManager state *state.StateDB block *types.Block @@ -20,8 +21,9 @@ type VMEnv struct { Gas *big.Int } -func NewEnv(state *state.StateDB, block *types.Block, transactor []byte, value *big.Int) *VMEnv { +func NewEnv(chain *core.ChainManager, state *state.StateDB, block *types.Block, transactor []byte, value *big.Int) *VMEnv { return &VMEnv{ + chain: chain, state: state, block: block, transactor: transactor, @@ -35,12 +37,18 @@ func (self *VMEnv) PrevHash() []byte { return self.block.ParentHash() } func (self *VMEnv) Coinbase() []byte { return self.block.Coinbase() } func (self *VMEnv) Time() int64 { return self.block.Time() } func (self *VMEnv) Difficulty() *big.Int { return self.block.Difficulty() } -func (self *VMEnv) BlockHash() []byte { return self.block.Hash() } func (self *VMEnv) GasLimit() *big.Int { return self.block.GasLimit() } func (self *VMEnv) Value() *big.Int { return self.value } func (self *VMEnv) State() *state.StateDB { return self.state } func (self *VMEnv) Depth() int { return self.depth } func (self *VMEnv) SetDepth(i int) { self.depth = i } +func (self *VMEnv) GetHash(n uint64) []byte { + if block := self.chain.GetBlockByNumber(n); block != nil { + return block.Hash() + } + + return nil +} func (self *VMEnv) AddLog(log state.Log) { self.state.AddLog(log) } diff --git a/core/block_manager.go b/core/block_manager.go index 8a5455306c..09f569d96e 100644 --- a/core/block_manager.go +++ b/core/block_manager.go @@ -113,7 +113,7 @@ done: txGas := new(big.Int).Set(tx.Gas()) cb := state.GetStateObject(coinbase.Address()) - st := NewStateTransition(cb, tx, state, block) + st := NewStateTransition(NewEnv(state, self.bc, tx, block), tx, cb) _, err = st.TransitionState() if err != nil { switch { @@ -232,6 +232,8 @@ func (sm *BlockManager) ProcessWithParent(block, parent *types.Block) (td *big.I // Sync the current block's state to the database and cancelling out the deferred Undo state.Sync() + state.Manifest().SetHash(block.Hash()) + messages := state.Manifest().Messages state.Manifest().Reset() @@ -339,10 +341,10 @@ func (sm *BlockManager) AccumelateRewards(statedb *state.StateDB, block, parent account.AddAmount(reward) statedb.Manifest().AddMessage(&state.Message{ - To: block.Header().Coinbase, - Input: nil, - Origin: nil, - Block: block.Hash(), Timestamp: int64(block.Header().Time), Coinbase: block.Header().Coinbase, Number: block.Header().Number, + To: block.Header().Coinbase, + Input: nil, + Origin: nil, + Timestamp: int64(block.Header().Time), Coinbase: block.Header().Coinbase, Number: block.Header().Number, Value: new(big.Int).Add(reward, block.Reward), }) diff --git a/core/chain_manager.go b/core/chain_manager.go index ece98d7830..82b17cd931 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -271,15 +271,15 @@ func (self *ChainManager) GetBlockByNumber(num uint64) *types.Block { self.mu.RLock() defer self.mu.RUnlock() - block := self.currentBlock - for ; block != nil; block = self.GetBlock(block.Header().ParentHash) { - if block.Header().Number.Uint64() == num { - break - } - } + var block *types.Block - if block != nil && block.Header().Number.Uint64() == 0 && num != 0 { - return nil + if num <= self.currentBlock.Number().Uint64() { + block = self.currentBlock + for ; block != nil; block = self.GetBlock(block.Header().ParentHash) { + if block.Header().Number.Uint64() == num { + break + } + } } return block diff --git a/core/state_transition.go b/core/state_transition.go index 91cfd5fe3b..b22c5bf217 100644 --- a/core/state_transition.go +++ b/core/state_transition.go @@ -4,7 +4,6 @@ import ( "fmt" "math/big" - "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/state" @@ -28,18 +27,17 @@ import ( * 6) Derive new state root */ type StateTransition struct { - coinbase, receiver []byte - msg Message - gas, gasPrice *big.Int - initialGas *big.Int - value *big.Int - data []byte - state *state.StateDB - block *types.Block + coinbase []byte + msg Message + gas, gasPrice *big.Int + initialGas *big.Int + value *big.Int + data []byte + state *state.StateDB cb, rec, sen *state.StateObject - Env vm.Environment + env vm.Environment } type Message interface { @@ -69,16 +67,19 @@ func MessageGasValue(msg Message) *big.Int { return new(big.Int).Mul(msg.Gas(), msg.GasPrice()) } -func NewStateTransition(coinbase *state.StateObject, msg Message, state *state.StateDB, block *types.Block) *StateTransition { - return &StateTransition{coinbase.Address(), msg.To(), msg, new(big.Int), new(big.Int).Set(msg.GasPrice()), new(big.Int), msg.Value(), msg.Data(), state, block, coinbase, nil, nil, nil} -} - -func (self *StateTransition) VmEnv() vm.Environment { - if self.Env == nil { - self.Env = NewEnv(self.state, self.msg, self.block) +func NewStateTransition(env vm.Environment, msg Message, coinbase *state.StateObject) *StateTransition { + return &StateTransition{ + coinbase: coinbase.Address(), + env: env, + msg: msg, + gas: new(big.Int), + gasPrice: new(big.Int).Set(msg.GasPrice()), + initialGas: new(big.Int), + value: msg.Value(), + data: msg.Data(), + state: env.State(), + cb: coinbase, } - - return self.Env } func (self *StateTransition) Coinbase() *state.StateObject { @@ -183,7 +184,7 @@ func (self *StateTransition) TransitionState() (ret []byte, err error) { return } - vmenv := self.VmEnv() + vmenv := self.env var ref vm.ContextRef if MessageCreatesContract(msg) { contract := MakeContract(msg, self.state) diff --git a/core/vm_env.go b/core/vm_env.go index 4e0315ff3b..624a633334 100644 --- a/core/vm_env.go +++ b/core/vm_env.go @@ -13,10 +13,12 @@ type VMEnv struct { block *types.Block msg Message depth int + chain *ChainManager } -func NewEnv(state *state.StateDB, msg Message, block *types.Block) *VMEnv { +func NewEnv(state *state.StateDB, chain *ChainManager, msg Message, block *types.Block) *VMEnv { return &VMEnv{ + chain: chain, state: state, block: block, msg: msg, @@ -25,16 +27,21 @@ func NewEnv(state *state.StateDB, msg Message, block *types.Block) *VMEnv { func (self *VMEnv) Origin() []byte { return self.msg.From() } func (self *VMEnv) BlockNumber() *big.Int { return self.block.Number() } -func (self *VMEnv) PrevHash() []byte { return self.block.ParentHash() } func (self *VMEnv) Coinbase() []byte { return self.block.Coinbase() } func (self *VMEnv) Time() int64 { return self.block.Time() } func (self *VMEnv) Difficulty() *big.Int { return self.block.Difficulty() } -func (self *VMEnv) BlockHash() []byte { return self.block.Hash() } func (self *VMEnv) GasLimit() *big.Int { return self.block.GasLimit() } func (self *VMEnv) Value() *big.Int { return self.msg.Value() } func (self *VMEnv) State() *state.StateDB { return self.state } func (self *VMEnv) Depth() int { return self.depth } func (self *VMEnv) SetDepth(i int) { self.depth = i } +func (self *VMEnv) GetHash(n uint64) []byte { + if block := self.chain.GetBlockByNumber(n); block != nil { + return block.Hash() + } + + return nil +} func (self *VMEnv) AddLog(log state.Log) { self.state.AddLog(log) } diff --git a/state/manifest.go b/state/manifest.go index 21cd04a1a9..994019a086 100644 --- a/state/manifest.go +++ b/state/manifest.go @@ -30,6 +30,12 @@ func (self *Manifest) AddMessage(msg *Message) *Message { return msg } +func (self *Manifest) SetHash(hash []byte) { + for _, message := range self.Messages { + message.Block = hash + } +} + type Messages []*Message type Message struct { To, From []byte diff --git a/tests/helper/vm.go b/tests/helper/vm.go index aa17313b77..123003faa3 100644 --- a/tests/helper/vm.go +++ b/tests/helper/vm.go @@ -55,9 +55,11 @@ func (self *Env) PrevHash() []byte { return self.parent } func (self *Env) Coinbase() []byte { return self.coinbase } func (self *Env) Time() int64 { return self.time } func (self *Env) Difficulty() *big.Int { return self.difficulty } -func (self *Env) BlockHash() []byte { return nil } func (self *Env) State() *state.StateDB { return self.state } func (self *Env) GasLimit() *big.Int { return self.gasLimit } +func (self *Env) GetHash(n uint64) []byte { + return nil +} func (self *Env) AddLog(log state.Log) { self.logs = append(self.logs, log) } @@ -126,10 +128,9 @@ func RunState(statedb *state.StateDB, env, tx map[string]string) ([]byte, state. message := NewMessage(keyPair.Address(), to, data, value, gas, price) Log.DebugDetailf("message{ to: %x, from %x, value: %v, gas: %v, price: %v }\n", message.to[:4], message.from[:4], message.value, message.gas, message.price) - st := core.NewStateTransition(coinbase, message, statedb, nil) vmenv := NewEnvFromMap(statedb, env, tx) + st := core.NewStateTransition(vmenv, message, coinbase) vmenv.origin = keyPair.Address() - st.Env = vmenv ret, err := st.TransitionState() statedb.Update(vmenv.Gas) diff --git a/vm/environment.go b/vm/environment.go index 01bbd56cea..d8b1cef283 100644 --- a/vm/environment.go +++ b/vm/environment.go @@ -14,11 +14,10 @@ type Environment interface { Origin() []byte BlockNumber() *big.Int - PrevHash() []byte + GetHash(n uint64) []byte Coinbase() []byte Time() int64 Difficulty() *big.Int - BlockHash() []byte GasLimit() *big.Int Transfer(from, to Account, amount *big.Int) error AddLog(state.Log) diff --git a/vm/types.go b/vm/types.go index ec9c7e74e6..1ea80a212d 100644 --- a/vm/types.go +++ b/vm/types.go @@ -59,7 +59,7 @@ const ( const ( // 0x40 range - block operations - PREVHASH OpCode = 0x40 + iota + BLOCKHASH OpCode = 0x40 + iota COINBASE TIMESTAMP NUMBER @@ -216,7 +216,7 @@ var opCodeToString = map[OpCode]string{ GASPRICE: "TXGASPRICE", // 0x40 range - block operations - PREVHASH: "PREVHASH", + BLOCKHASH: "BLOCKHASH", COINBASE: "COINBASE", TIMESTAMP: "TIMESTAMP", NUMBER: "NUMBER", diff --git a/vm/vm_debug.go b/vm/vm_debug.go index 6ad385fd0c..baacf752bf 100644 --- a/vm/vm_debug.go +++ b/vm/vm_debug.go @@ -42,9 +42,9 @@ func (self *DebugVm) Run(me, caller ContextRef, code []byte, value, gas, price * msg := self.env.State().Manifest().AddMessage(&state.Message{ To: me.Address(), From: caller.Address(), - Input: callData, - Origin: self.env.Origin(), - Block: self.env.BlockHash(), Timestamp: self.env.Time(), Coinbase: self.env.Coinbase(), Number: self.env.BlockNumber(), + Input: callData, + Origin: self.env.Origin(), + Timestamp: self.env.Time(), Coinbase: self.env.Coinbase(), Number: self.env.BlockNumber(), Value: value, }) context := NewContext(msg, caller, me, code, gas, price) @@ -516,12 +516,15 @@ func (self *DebugVm) Run(me, caller ContextRef, code []byte, value, gas, price * self.Printf(" => %v", context.Price) // 0x40 range - case PREVHASH: - prevHash := self.env.PrevHash() + case BLOCKHASH: + num := stack.Pop() + if num.Cmp(new(big.Int).Sub(self.env.BlockNumber(), ethutil.Big256)) < 0 { + stack.Push(ethutil.Big0) + } else { + stack.Push(ethutil.BigD(self.env.GetHash(num.Uint64()))) + } - stack.Push(ethutil.BigD(prevHash)) - - self.Printf(" => 0x%x", prevHash) + self.Printf(" => 0x%x", stack.Peek().Bytes()) case COINBASE: coinbase := self.env.Coinbase() diff --git a/xeth/pipe.go b/xeth/pipe.go index cae6ee1dec..05cefd8ad2 100644 --- a/xeth/pipe.go +++ b/xeth/pipe.go @@ -87,7 +87,7 @@ func (self *XEth) ExecuteObject(object *Object, data []byte, value, gas, price * self.Vm.State = self.World().State().Copy() - vmenv := NewEnv(self.Vm.State, block, value.BigInt(), initiator.Address()) + vmenv := NewEnv(self.chainManager, self.Vm.State, block, value.BigInt(), initiator.Address()) return vmenv.Call(initiator, object.Address(), data, gas.BigInt(), price.BigInt(), value.BigInt()) } diff --git a/xeth/vm_env.go b/xeth/vm_env.go index d2a21afd5d..1470b9eaa5 100644 --- a/xeth/vm_env.go +++ b/xeth/vm_env.go @@ -10,6 +10,7 @@ import ( ) type VMEnv struct { + chain *core.ChainManager state *state.StateDB block *types.Block value *big.Int @@ -18,7 +19,7 @@ type VMEnv struct { depth int } -func NewEnv(state *state.StateDB, block *types.Block, value *big.Int, sender []byte) *VMEnv { +func NewEnv(chain *core.ChainManager, state *state.StateDB, block *types.Block, value *big.Int, sender []byte) *VMEnv { return &VMEnv{ state: state, block: block, @@ -33,12 +34,18 @@ func (self *VMEnv) PrevHash() []byte { return self.block.ParentHash() } func (self *VMEnv) Coinbase() []byte { return self.block.Coinbase() } func (self *VMEnv) Time() int64 { return self.block.Time() } func (self *VMEnv) Difficulty() *big.Int { return self.block.Difficulty() } -func (self *VMEnv) BlockHash() []byte { return self.block.Hash() } func (self *VMEnv) GasLimit() *big.Int { return self.block.GasLimit() } func (self *VMEnv) Value() *big.Int { return self.value } func (self *VMEnv) State() *state.StateDB { return self.state } func (self *VMEnv) Depth() int { return self.depth } func (self *VMEnv) SetDepth(i int) { self.depth = i } +func (self *VMEnv) GetHash(n uint64) []byte { + if block := self.chain.GetBlockByNumber(n); block != nil { + return block.Hash() + } + + return nil +} func (self *VMEnv) AddLog(log state.Log) { self.state.AddLog(log) } From bd0c267cbe9db805b5a272d29ef8860c62ddafe5 Mon Sep 17 00:00:00 2001 From: obscuren Date: Sat, 3 Jan 2015 17:29:08 +0100 Subject: [PATCH 070/132] Cleanup old code --- vm/context.go | 12 +++++------- vm/environment.go | 5 ----- vm/vm_debug.go | 4 ++-- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/vm/context.go b/vm/context.go index ccbadabdaa..d995c92c76 100644 --- a/vm/context.go +++ b/vm/context.go @@ -5,7 +5,6 @@ import ( "math/big" "github.com/ethereum/go-ethereum/ethutil" - "github.com/ethereum/go-ethereum/state" ) type ContextRef interface { @@ -15,10 +14,9 @@ type ContextRef interface { } type Context struct { - caller ContextRef - object ContextRef - Code []byte - message *state.Message + caller ContextRef + object ContextRef + Code []byte Gas, UsedGas, Price *big.Int @@ -26,8 +24,8 @@ type Context struct { } // Create a new context for the given data items -func NewContext(msg *state.Message, caller ContextRef, object ContextRef, code []byte, gas, price *big.Int) *Context { - c := &Context{message: msg, caller: caller, object: object, Code: code, Args: nil} +func NewContext(caller ContextRef, object ContextRef, code []byte, gas, price *big.Int) *Context { + c := &Context{caller: caller, object: object, Code: code, Args: nil} // Gas should be a pointer so it can safely be reduced through the run // This pointer will be off the state transition diff --git a/vm/environment.go b/vm/environment.go index d8b1cef283..8ec13ee412 100644 --- a/vm/environment.go +++ b/vm/environment.go @@ -30,11 +30,6 @@ type Environment interface { Create(me ContextRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error, ContextRef) } -type Object interface { - GetStorage(key *big.Int) *ethutil.Value - SetStorage(key *big.Int, value *ethutil.Value) -} - type Account interface { SubBalance(amount *big.Int) AddBalance(amount *big.Int) diff --git a/vm/vm_debug.go b/vm/vm_debug.go index baacf752bf..acad9c5e71 100644 --- a/vm/vm_debug.go +++ b/vm/vm_debug.go @@ -47,7 +47,7 @@ func (self *DebugVm) Run(me, caller ContextRef, code []byte, value, gas, price * Timestamp: self.env.Time(), Coinbase: self.env.Coinbase(), Number: self.env.BlockNumber(), Value: value, }) - context := NewContext(msg, caller, me, code, gas, price) + context := NewContext(caller, me, code, gas, price) if self.Recoverable { // Recover from any require exception @@ -617,7 +617,7 @@ func (self *DebugVm) Run(me, caller ContextRef, code []byte, value, gas, price * val, loc := stack.Popn() statedb.SetState(context.Address(), loc.Bytes(), val) - context.message.AddStorageChange(loc.Bytes()) + msg.AddStorageChange(loc.Bytes()) self.Printf(" {0x%x : 0x%x}", loc.Bytes(), val.Bytes()) case JUMP: From 09841b1c9b2553a4572590128580df37c8fa83ad Mon Sep 17 00:00:00 2001 From: obscuren Date: Sun, 4 Jan 2015 14:20:16 +0100 Subject: [PATCH 071/132] Cleaned up some of that util --- cmd/ethereum/main.go | 48 +-- cmd/ethtest/LICENSE | 14 - cmd/ethtest/README.md | 79 ----- cmd/ethtest/bower.json | 51 --- cmd/ethtest/dist/ethereum.js | 20 -- cmd/ethtest/dist/ethereum.js.map | 29 -- cmd/ethtest/dist/ethereum.min.js | 1 - cmd/ethtest/example/contract.html | 75 ---- cmd/ethtest/example/index.html | 41 --- cmd/ethtest/example/node-app.js | 16 - cmd/ethtest/gulpfile.js | 123 ------- cmd/ethtest/index.js | 8 - cmd/ethtest/index_qt.js | 5 - cmd/ethtest/lib/abi.js | 218 ------------ cmd/ethtest/lib/autoprovider.js | 103 ------ cmd/ethtest/lib/contract.js | 65 ---- cmd/ethtest/lib/httprpc.js | 95 ------ cmd/ethtest/lib/main.js | 494 --------------------------- cmd/ethtest/lib/qt.js | 45 --- cmd/ethtest/lib/websocket.js | 78 ----- cmd/ethtest/package.json | 67 ---- cmd/mist/assets/qml/main.qml | 2 + cmd/mist/assets/qml/views/wallet.qml | 2 +- cmd/mist/bindings.go | 2 +- cmd/mist/gui.go | 5 +- cmd/mist/main.go | 40 ++- cmd/peerserver/main.go | 8 +- cmd/utils/cmd.go | 103 +----- core/block_manager.go | 13 - eth/backend.go | 90 ++++- ethutil/path.go | 8 + logger/log.go | 33 ++ p2p/client_identity.go | 4 +- p2p/nat.go | 23 ++ {core => pow/dagger}/dagger.go | 2 +- {core => pow/dagger}/dagger_test.go | 2 +- vm/context.go | 10 +- vm/vm_debug.go | 2 +- 38 files changed, 199 insertions(+), 1825 deletions(-) delete mode 100644 cmd/ethtest/LICENSE delete mode 100644 cmd/ethtest/README.md delete mode 100644 cmd/ethtest/bower.json delete mode 100644 cmd/ethtest/dist/ethereum.js delete mode 100644 cmd/ethtest/dist/ethereum.js.map delete mode 100644 cmd/ethtest/dist/ethereum.min.js delete mode 100644 cmd/ethtest/example/contract.html delete mode 100644 cmd/ethtest/example/index.html delete mode 100644 cmd/ethtest/example/node-app.js delete mode 100644 cmd/ethtest/gulpfile.js delete mode 100644 cmd/ethtest/index.js delete mode 100644 cmd/ethtest/index_qt.js delete mode 100644 cmd/ethtest/lib/abi.js delete mode 100644 cmd/ethtest/lib/autoprovider.js delete mode 100644 cmd/ethtest/lib/contract.js delete mode 100644 cmd/ethtest/lib/httprpc.js delete mode 100644 cmd/ethtest/lib/main.js delete mode 100644 cmd/ethtest/lib/qt.js delete mode 100644 cmd/ethtest/lib/websocket.js delete mode 100644 cmd/ethtest/package.json create mode 100644 logger/log.go create mode 100644 p2p/nat.go rename {core => pow/dagger}/dagger.go (99%) rename {core => pow/dagger}/dagger_test.go (96%) diff --git a/cmd/ethereum/main.go b/cmd/ethereum/main.go index 7efee31e78..95060025f9 100644 --- a/cmd/ethereum/main.go +++ b/cmd/ethereum/main.go @@ -25,6 +25,7 @@ import ( "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/eth" "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/logger" ) @@ -48,35 +49,26 @@ func main() { // precedence: code-internal flag default < config file < environment variables < command line Init() // parsing command line - // If the difftool option is selected ignore all other log output - if DiffTool || Dump { - LogLevel = 0 - } - utils.InitConfig(VmType, ConfigFile, Datadir, "ETH") - ethutil.Config.Diff = DiffTool - ethutil.Config.DiffType = DiffType - utils.InitDataDir(Datadir) - - utils.InitLogging(Datadir, LogFile, LogLevel, DebugFile) - - db := utils.NewDatabase() - err := utils.DBSanityCheck(db) + ethereum, err := eth.New(ð.Config{ + Name: ClientIdentifier, + Version: Version, + KeyStore: KeyStore, + DataDir: Datadir, + LogFile: LogFile, + LogLevel: LogLevel, + Identifier: Identifier, + MaxPeers: MaxPeer, + Port: OutboundPort, + NATType: PMPGateway, + PMPGateway: PMPGateway, + KeyRing: KeyRing, + }) if err != nil { - fmt.Println(err) - - os.Exit(1) + clilogger.Fatalln(err) } - - keyManager := utils.NewKeyManager(KeyStore, Datadir, db) - - // create, import, export keys - utils.KeyTasks(keyManager, KeyRing, GenAddr, SecretFile, ExportDir, NonInteractive) - - clientIdentity := utils.NewClientIdentity(ClientIdentifier, Version, Identifier, string(keyManager.PublicKey())) - - ethereum := utils.NewEthereum(db, clientIdentity, keyManager, utils.NatType(NatType, PMPGateway), OutboundPort, MaxPeer) + utils.KeyTasks(ethereum.KeyManager(), KeyRing, GenAddr, SecretFile, ExportDir, NonInteractive) if Dump { var block *types.Block @@ -103,11 +95,7 @@ func main() { fmt.Println(block) - os.Exit(0) - } - - if ShowGenesis { - utils.ShowGenesis(ethereum) + return } if StartMining { diff --git a/cmd/ethtest/LICENSE b/cmd/ethtest/LICENSE deleted file mode 100644 index 0f187b8736..0000000000 --- a/cmd/ethtest/LICENSE +++ /dev/null @@ -1,14 +0,0 @@ -This file is part of ethereum.js. - -ethereum.js is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -ethereum.js is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with ethereum.js. If not, see . \ No newline at end of file diff --git a/cmd/ethtest/README.md b/cmd/ethtest/README.md deleted file mode 100644 index 865b62c6b1..0000000000 --- a/cmd/ethtest/README.md +++ /dev/null @@ -1,79 +0,0 @@ -# Ethereum JavaScript API - -This is the Ethereum compatible JavaScript API using `Promise`s -which implements the [Generic JSON RPC](https://github.com/ethereum/wiki/wiki/Generic-JSON-RPC) spec. It's available on npm as a node module and also for bower and component as an embeddable js - -[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![dependency status][dep-image]][dep-url] [![dev dependency status][dep-dev-image]][dep-dev-url] - - - -## Installation - -### Node.js - - npm install ethereum.js - -### For browser -Bower - - bower install ethereum.js - -Component - - component install ethereum/ethereum.js - -* Include `ethereum.min.js` in your html file. -* Include [es6-promise](https://github.com/jakearchibald/es6-promise) or another ES6-Shim if your browser doesn't support ECMAScript 6. - -## Usage -Require the library: - - var web3 = require('web3'); - -Set a provider (QtProvider, WebSocketProvider, HttpRpcProvider) - - var web3.setProvider(new web3.providers.WebSocketProvider('ws://localhost:40404/eth')); - -There you go, now you can use it: - -``` -web3.eth.coinbase.then(function(result){ - console.log(result); - return web3.eth.balanceAt(result); -}).then(function(balance){ - console.log(web3.toDecimal(balance)); -}).catch(function(err){ - console.log(err); -}); -``` - - -For another example see `example/index.html`. - -## Building - -* `gulp build` - - -### Testing - -**Please note this repo is in it's early stage.** - -If you'd like to run a WebSocket ethereum node check out -[go-ethereum](https://github.com/ethereum/go-ethereum). - -To install ethereum and spawn a node: - -``` -go get github.com/ethereum/go-ethereum/ethereum -ethereum -ws -loglevel=4 -``` - -[npm-image]: https://badge.fury.io/js/ethereum.js.png -[npm-url]: https://npmjs.org/package/ethereum.js -[travis-image]: https://travis-ci.org/ethereum/ethereum.js.svg -[travis-url]: https://travis-ci.org/ethereum/ethereum.js -[dep-image]: https://david-dm.org/ethereum/ethereum.js.svg -[dep-url]: https://david-dm.org/ethereum/ethereum.js -[dep-dev-image]: https://david-dm.org/ethereum/ethereum.js/dev-status.svg -[dep-dev-url]: https://david-dm.org/ethereum/ethereum.js#info=devDependencies \ No newline at end of file diff --git a/cmd/ethtest/bower.json b/cmd/ethtest/bower.json deleted file mode 100644 index cedae9023d..0000000000 --- a/cmd/ethtest/bower.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "ethereum.js", - "namespace": "ethereum", - "version": "0.0.3", - "description": "Ethereum Compatible JavaScript API", - "main": ["./dist/ethereum.js", "./dist/ethereum.min.js"], - "dependencies": { - "es6-promise": "#master" - }, - "repository": { - "type": "git", - "url": "https://github.com/ethereum/ethereum.js.git" - }, - "homepage": "https://github.com/ethereum/ethereum.js", - "bugs": { - "url": "https://github.com/ethereum/ethereum.js/issues" - }, - "keywords": [ - "ethereum", - "javascript", - "API" - ], - "authors": [ - { - "name": "Marek Kotewicz", - "email": "marek@ethdev.com", - "homepage": "https://github.com/debris" - }, - { - "name": "Marian Oancea", - "email": "marian@ethdev.com", - "homepage": "https://github.com/cubedro" - } - ], - "license": "LGPL-3.0", - "ignore": [ - "example", - "lib", - "node_modules", - "package.json", - ".bowerrc", - ".editorconfig", - ".gitignore", - ".jshintrc", - ".npmignore", - ".travis.yml", - "gulpfile.js", - "index.js", - "**/*.txt" - ] -} \ No newline at end of file diff --git a/cmd/ethtest/dist/ethereum.js b/cmd/ethtest/dist/ethereum.js deleted file mode 100644 index b64c15b9e2..0000000000 --- a/cmd/ethtest/dist/ethereum.js +++ /dev/null @@ -1,20 +0,0 @@ -require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;oi&&(code=hex.charCodeAt(i),0!==code);i+=2)str+=String.fromCharCode(parseInt(hex.substr(i,2),16));return str},toDecimal:function(val){return parseInt(val,16)},fromAscii:function(str,pad){pad=void 0===pad?32:pad;for(var hex=this.toHex(str);hex.length<2*pad;)hex+="00";return"0x"+hex},eth:{prototype:Object(),watch:function(params){return new Filter(params,ethWatch)}},db:{prototype:Object()},shh:{prototype:Object(),watch:function(params){return new Filter(params,shhWatch)}},on:function(event,id,cb){return void 0===web3._events[event]&&(web3._events[event]={}),web3._events[event][id]=cb,this},off:function(event,id){return void 0!==web3._events[event]&&delete web3._events[event][id],this},trigger:function(event,id,data){var cb,callbacks=web3._events[event];callbacks&&callbacks[id]&&(cb=callbacks[id])(data)}};setupMethods(web3.eth,ethMethods()),setupProperties(web3.eth,ethProperties()),setupMethods(web3.db,dbMethods()),setupMethods(web3.shh,shhMethods()),ethWatch={changed:"eth_changed"},setupMethods(ethWatch,ethWatchMethods()),shhWatch={changed:"shh_changed"},setupMethods(shhWatch,shhWatchMethods()),ProviderManager=function(){var self,poll;this.queued=[],this.polls=[],this.ready=!1,this.provider=void 0,this.id=1,self=this,(poll=function(){self.provider&&self.provider.poll&&self.polls.forEach(function(data){data.data._id=self.id,self.id++,self.provider.poll(data.data,data.id)}),setTimeout(poll,12e3)})()},ProviderManager.prototype.send=function(data,cb){data._id=this.id,cb&&(web3._callbacks[data._id]=cb),data.args=data.args||[],this.id++,void 0!==this.provider?this.provider.send(data):(console.warn("provider is not set"),this.queued.push(data))},ProviderManager.prototype.set=function(provider){void 0!==this.provider&&void 0!==this.provider.unload&&this.provider.unload(),this.provider=provider,this.ready=!0},ProviderManager.prototype.sendQueued=function(){for(var i=0;this.queued.length;i++)this.send(this.queued[i])},ProviderManager.prototype.installed=function(){return void 0!==this.provider},ProviderManager.prototype.startPolling=function(data,pollId){this.provider&&this.provider.poll&&this.polls.push({data:data,id:pollId})},ProviderManager.prototype.stopPolling=function(pollId){var i,poll;for(i=this.polls.length;i--;)poll=this.polls[i],poll.id===pollId&&this.polls.splice(i,1)},web3.provider=new ProviderManager,web3.setProvider=function(provider){provider.onmessage=messageHandler,web3.provider.set(provider),web3.provider.sendQueued()},web3.haveProvider=function(){return!!web3.provider.provider},Filter=function(options,impl){this.impl=impl,this.callbacks=[];var self=this;this.promise=impl.newFilter(options),this.promise.then(function(id){self.id=id,web3.on(impl.changed,id,self.trigger.bind(self)),web3.provider.startPolling({call:impl.changed,args:[id]},id)})},Filter.prototype.arrived=function(callback){this.changed(callback)},Filter.prototype.changed=function(callback){var self=this;this.promise.then(function(id){self.callbacks.push(callback)})},Filter.prototype.trigger=function(messages){for(var i=0;ii&&(code=hex.charCodeAt(i),0!==code);i+=2)str+=String.fromCharCode(parseInt(hex.substr(i,2),16));return str},toDecimal:function(val){return parseInt(val,16)},fromAscii:function(str,pad){pad=void 0===pad?32:pad;for(var hex=this.toHex(str);hex.length<2*pad;)hex+=\"00\";return\"0x\"+hex},eth:{prototype:Object(),watch:function(params){return new Filter(params,ethWatch)}},db:{prototype:Object()},shh:{prototype:Object(),watch:function(params){return new Filter(params,shhWatch)}},on:function(event,id,cb){return void 0===web3._events[event]&&(web3._events[event]={}),web3._events[event][id]=cb,this},off:function(event,id){return void 0!==web3._events[event]&&delete web3._events[event][id],this},trigger:function(event,id,data){var cb,callbacks=web3._events[event];callbacks&&callbacks[id]&&(cb=callbacks[id])(data)}};setupMethods(web3.eth,ethMethods()),setupProperties(web3.eth,ethProperties()),setupMethods(web3.db,dbMethods()),setupMethods(web3.shh,shhMethods()),ethWatch={changed:\"eth_changed\"},setupMethods(ethWatch,ethWatchMethods()),shhWatch={changed:\"shh_changed\"},setupMethods(shhWatch,shhWatchMethods()),ProviderManager=function(){var self,poll;this.queued=[],this.polls=[],this.ready=!1,this.provider=void 0,this.id=1,self=this,(poll=function(){self.provider&&self.provider.poll&&self.polls.forEach(function(data){data.data._id=self.id,self.id++,self.provider.poll(data.data,data.id)}),setTimeout(poll,12e3)})()},ProviderManager.prototype.send=function(data,cb){data._id=this.id,cb&&(web3._callbacks[data._id]=cb),data.args=data.args||[],this.id++,void 0!==this.provider?this.provider.send(data):(console.warn(\"provider is not set\"),this.queued.push(data))},ProviderManager.prototype.set=function(provider){void 0!==this.provider&&void 0!==this.provider.unload&&this.provider.unload(),this.provider=provider,this.ready=!0},ProviderManager.prototype.sendQueued=function(){for(var i=0;this.queued.length;i++)this.send(this.queued[i])},ProviderManager.prototype.installed=function(){return void 0!==this.provider},ProviderManager.prototype.startPolling=function(data,pollId){this.provider&&this.provider.poll&&this.polls.push({data:data,id:pollId})},ProviderManager.prototype.stopPolling=function(pollId){var i,poll;for(i=this.polls.length;i--;)poll=this.polls[i],poll.id===pollId&&this.polls.splice(i,1)},web3.provider=new ProviderManager,web3.setProvider=function(provider){provider.onmessage=messageHandler,web3.provider.set(provider),web3.provider.sendQueued()},web3.haveProvider=function(){return!!web3.provider.provider},Filter=function(options,impl){this.impl=impl,this.callbacks=[];var self=this;this.promise=impl.newFilter(options),this.promise.then(function(id){self.id=id,web3.on(impl.changed,id,self.trigger.bind(self)),web3.provider.startPolling({call:impl.changed,args:[id]},id)})},Filter.prototype.arrived=function(callback){this.changed(callback)},Filter.prototype.changed=function(callback){var self=this;this.promise.then(function(id){self.callbacks.push(callback)})},Filter.prototype.trigger=function(messages){for(var i=0;ir&&(e=t.charCodeAt(r),0!==e);r+=2)n+=String.fromCharCode(parseInt(t.substr(r,2),16));return n},toDecimal:function(t){return parseInt(t,16)},fromAscii:function(t,e){e=void 0===e?32:e;for(var n=this.toHex(t);n.length<2*e;)n+="00";return"0x"+n},eth:{prototype:Object(),watch:function(t){return new a(t,o)}},db:{prototype:Object()},shh:{prototype:Object(),watch:function(t){return new a(t,i)}},on:function(t,e,n){return void 0===g._events[t]&&(g._events[t]={}),g._events[t][e]=n,this},off:function(t,e){return void 0!==g._events[t]&&delete g._events[t][e],this},trigger:function(t,e,n){var r,o=g._events[t];o&&o[e]&&(r=o[e])(n)}};f(g.eth,u()),v(g.eth,c()),f(g.db,l()),f(g.shh,h()),o={changed:"eth_changed"},f(o,p()),i={changed:"shh_changed"},f(i,d()),s=function(){var t,e;this.queued=[],this.polls=[],this.ready=!1,this.provider=void 0,this.id=1,t=this,(e=function(){t.provider&&t.provider.poll&&t.polls.forEach(function(e){e.data._id=t.id,t.id++,t.provider.poll(e.data,e.id)}),setTimeout(e,12e3)})()},s.prototype.send=function(t,e){t._id=this.id,e&&(g._callbacks[t._id]=e),t.args=t.args||[],this.id++,void 0!==this.provider?this.provider.send(t):(console.warn("provider is not set"),this.queued.push(t))},s.prototype.set=function(t){void 0!==this.provider&&void 0!==this.provider.unload&&this.provider.unload(),this.provider=t,this.ready=!0},s.prototype.sendQueued=function(){for(var t=0;this.queued.length;t++)this.send(this.queued[t])},s.prototype.installed=function(){return void 0!==this.provider},s.prototype.startPolling=function(t,e){this.provider&&this.provider.poll&&this.polls.push({data:t,id:e})},s.prototype.stopPolling=function(t){var e,n;for(e=this.polls.length;e--;)n=this.polls[e],n.id===t&&this.polls.splice(e,1)},g.provider=new s,g.setProvider=function(t){t.onmessage=r,g.provider.set(t),g.provider.sendQueued()},g.haveProvider=function(){return!!g.provider.provider},a=function(t,e){this.impl=e,this.callbacks=[];var n=this;this.promise=e.newFilter(t),this.promise.then(function(t){n.id=t,g.on(e.changed,t,n.trigger.bind(n)),g.provider.startPolling({call:e.changed,args:[t]},t)})},a.prototype.arrived=function(t){this.changed(t)},a.prototype.changed=function(t){var e=this;this.promise.then(function(){e.callbacks.push(t)})},a.prototype.trigger=function(t){for(var e=0;e - - - - - - - - -

contract

-
-
- -
- -
- - - diff --git a/cmd/ethtest/example/index.html b/cmd/ethtest/example/index.html deleted file mode 100644 index d0bf094ef2..0000000000 --- a/cmd/ethtest/example/index.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - -

coinbase balance

- -
-
-
-
- - - diff --git a/cmd/ethtest/example/node-app.js b/cmd/ethtest/example/node-app.js deleted file mode 100644 index f63fa9115f..0000000000 --- a/cmd/ethtest/example/node-app.js +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env node - -require('es6-promise').polyfill(); - -var web3 = require("../index.js"); - -web3.setProvider(new web3.providers.HttpRpcProvider('http://localhost:8080')); - -web3.eth.coinbase.then(function(result){ - console.log(result); - return web3.eth.balanceAt(result); -}).then(function(balance){ - console.log(web3.toDecimal(balance)); -}).catch(function(err){ - console.log(err); -}); \ No newline at end of file diff --git a/cmd/ethtest/gulpfile.js b/cmd/ethtest/gulpfile.js deleted file mode 100644 index 9e0717d8b1..0000000000 --- a/cmd/ethtest/gulpfile.js +++ /dev/null @@ -1,123 +0,0 @@ -#!/usr/bin/env node - -'use strict'; - -var path = require('path'); - -var del = require('del'); -var gulp = require('gulp'); -var browserify = require('browserify'); -var jshint = require('gulp-jshint'); -var uglify = require('gulp-uglify'); -var rename = require('gulp-rename'); -var envify = require('envify/custom'); -var unreach = require('unreachable-branch-transform'); -var source = require('vinyl-source-stream'); -var exorcist = require('exorcist'); -var bower = require('bower'); - -var DEST = './dist/'; - -var build = function(src, dst) { - return browserify({ - debug: true, - insert_global_vars: false, - detectGlobals: false, - bundleExternal: false - }) - .require('./' + src + '.js', {expose: 'web3'}) - .add('./' + src + '.js') - .transform('envify', { - NODE_ENV: 'build' - }) - .transform('unreachable-branch-transform') - .transform('uglifyify', { - mangle: false, - compress: { - dead_code: false, - conditionals: true, - unused: false, - hoist_funs: true, - hoist_vars: true, - negate_iife: false - }, - beautify: true, - warnings: true - }) - .bundle() - .pipe(exorcist(path.join( DEST, dst + '.js.map'))) - .pipe(source(dst + '.js')) - .pipe(gulp.dest( DEST )); -}; - -var buildDev = function(src, dst) { - return browserify({ - debug: true, - insert_global_vars: false, - detectGlobals: false, - bundleExternal: false - }) - .require('./' + src + '.js', {expose: 'web3'}) - .add('./' + src + '.js') - .transform('envify', { - NODE_ENV: 'build' - }) - .transform('unreachable-branch-transform') - .bundle() - .pipe(exorcist(path.join( DEST, dst + '.js.map'))) - .pipe(source(dst + '.js')) - .pipe(gulp.dest( DEST )); -}; - -var uglifyFile = function(file) { - return gulp.src( DEST + file + '.js') - .pipe(uglify()) - .pipe(rename(file + '.min.js')) - .pipe(gulp.dest( DEST )); -}; - -gulp.task('bower', function(cb){ - bower.commands.install().on('end', function (installed){ - console.log(installed); - cb(); - }); -}); - -gulp.task('lint', function(){ - return gulp.src(['./*.js', './lib/*.js']) - .pipe(jshint()) - .pipe(jshint.reporter('default')); -}); - -gulp.task('clean', ['lint'], function(cb) { - del([ DEST ], cb); -}); - -gulp.task('build', ['clean'], function () { - return build('index', 'ethereum'); -}); - -gulp.task('buildQt', ['clean'], function () { - return build('index_qt', 'ethereum'); -}); - -gulp.task('buildDev', ['clean'], function () { - return buildDev('index', 'ethereum'); -}); - -gulp.task('uglify', ['build'], function(){ - return uglifyFile('ethereum'); -}); - -gulp.task('uglifyQt', ['buildQt'], function () { - return uglifyFile('ethereum'); -}); - -gulp.task('watch', function() { - gulp.watch(['./lib/*.js'], ['lint', 'prepare', 'build']); -}); - -gulp.task('default', ['bower', 'lint', 'build', 'uglify']); -gulp.task('qt', ['bower', 'lint', 'buildQt', 'uglifyQt']); -gulp.task('dev', ['bower', 'lint', 'buildDev']); - diff --git a/cmd/ethtest/index.js b/cmd/ethtest/index.js deleted file mode 100644 index c2de7e735e..0000000000 --- a/cmd/ethtest/index.js +++ /dev/null @@ -1,8 +0,0 @@ -var web3 = require('./lib/main'); -web3.providers.WebSocketProvider = require('./lib/websocket'); -web3.providers.HttpRpcProvider = require('./lib/httprpc'); -web3.providers.QtProvider = require('./lib/qt'); -web3.providers.AutoProvider = require('./lib/autoprovider'); -web3.contract = require('./lib/contract'); - -module.exports = web3; diff --git a/cmd/ethtest/index_qt.js b/cmd/ethtest/index_qt.js deleted file mode 100644 index d5e47597e4..0000000000 --- a/cmd/ethtest/index_qt.js +++ /dev/null @@ -1,5 +0,0 @@ -var web3 = require('./lib/main'); -web3.providers.QtProvider = require('./lib/qt'); -web3.contract = require('./lib/contract'); - -module.exports = web3; diff --git a/cmd/ethtest/lib/abi.js b/cmd/ethtest/lib/abi.js deleted file mode 100644 index 2cff503d38..0000000000 --- a/cmd/ethtest/lib/abi.js +++ /dev/null @@ -1,218 +0,0 @@ -/* - This file is part of ethereum.js. - - ethereum.js is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - ethereum.js is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . -*/ -/** @file abi.js - * @authors: - * Marek Kotewicz - * Gav Wood - * @date 2014 - */ - -// TODO: make these be actually accurate instead of falling back onto JS's doubles. -var hexToDec = function (hex) { - return parseInt(hex, 16).toString(); -}; - -var decToHex = function (dec) { - return parseInt(dec).toString(16); -}; - -var findIndex = function (array, callback) { - var end = false; - var i = 0; - for (; i < array.length && !end; i++) { - end = callback(array[i]); - } - return end ? i - 1 : -1; -}; - -var findMethodIndex = function (json, methodName) { - return findIndex(json, function (method) { - return method.name === methodName; - }); -}; - -var padLeft = function (string, chars) { - return Array(chars - string.length + 1).join("0") + string; -}; - -var setupInputTypes = function () { - var prefixedType = function (prefix) { - return function (type, value) { - var expected = prefix; - if (type.indexOf(expected) !== 0) { - return false; - } - - var padding = parseInt(type.slice(expected.length)) / 8; - if (typeof value === "number") - value = value.toString(16); - else if (value.indexOf('0x') === 0) - value = value.substr(2); - else - value = (+value).toString(16); - return padLeft(value, padding * 2); - }; - }; - - var namedType = function (name, padding, formatter) { - return function (type, value) { - if (type !== name) { - return false; - } - - return padLeft(formatter ? formatter(value) : value, padding * 2); - }; - }; - - var formatBool = function (value) { - return value ? '0x1' : '0x0'; - }; - - return [ - prefixedType('uint'), - prefixedType('int'), - prefixedType('hash'), - namedType('address', 20), - namedType('bool', 1, formatBool), - ]; -}; - -var inputTypes = setupInputTypes(); - -var toAbiInput = function (json, methodName, params) { - var bytes = ""; - var index = findMethodIndex(json, methodName); - - if (index === -1) { - return; - } - - bytes = "0x" + padLeft(index.toString(16), 2); - var method = json[index]; - - for (var i = 0; i < method.inputs.length; i++) { - var found = false; - for (var j = 0; j < inputTypes.length && !found; j++) { - found = inputTypes[j](method.inputs[i].type, params[i]); - } - if (!found) { - console.error('unsupported json type: ' + method.inputs[i].type); - } - bytes += found; - } - return bytes; -}; - -var setupOutputTypes = function () { - var prefixedType = function (prefix) { - return function (type) { - var expected = prefix; - if (type.indexOf(expected) !== 0) { - return -1; - } - - var padding = parseInt(type.slice(expected.length)) / 8; - return padding * 2; - }; - }; - - var namedType = function (name, padding) { - return function (type) { - return name === type ? padding * 2 : -1; - }; - }; - - var formatInt = function (value) { - return value.length <= 8 ? +parseInt(value, 16) : hexToDec(value); - }; - - var formatHash = function (value) { - return "0x" + value; - }; - - var formatBool = function (value) { - return value === '1' ? true : false; - }; - - return [ - { padding: prefixedType('uint'), format: formatInt }, - { padding: prefixedType('int'), format: formatInt }, - { padding: prefixedType('hash'), format: formatHash }, - { padding: namedType('address', 20) }, - { padding: namedType('bool', 1), format: formatBool } - ]; -}; - -var outputTypes = setupOutputTypes(); - -var fromAbiOutput = function (json, methodName, output) { - var index = findMethodIndex(json, methodName); - - if (index === -1) { - return; - } - - output = output.slice(2); - - var result = []; - var method = json[index]; - for (var i = 0; i < method.outputs.length; i++) { - var padding = -1; - for (var j = 0; j < outputTypes.length && padding === -1; j++) { - padding = outputTypes[j].padding(method.outputs[i].type); - } - - if (padding === -1) { - // not found output parsing - continue; - } - var res = output.slice(0, padding); - var formatter = outputTypes[j - 1].format; - result.push(formatter ? formatter(res) : ("0x" + res)); - output = output.slice(padding); - } - - return result; -}; - -var inputParser = function (json) { - var parser = {}; - json.forEach(function (method) { - parser[method.name] = function () { - var params = Array.prototype.slice.call(arguments); - return toAbiInput(json, method.name, params); - }; - }); - - return parser; -}; - -var outputParser = function (json) { - var parser = {}; - json.forEach(function (method) { - parser[method.name] = function (output) { - return fromAbiOutput(json, method.name, output); - }; - }); - - return parser; -}; - -module.exports = { - inputParser: inputParser, - outputParser: outputParser -}; diff --git a/cmd/ethtest/lib/autoprovider.js b/cmd/ethtest/lib/autoprovider.js deleted file mode 100644 index bfbc3ab6e1..0000000000 --- a/cmd/ethtest/lib/autoprovider.js +++ /dev/null @@ -1,103 +0,0 @@ -/* - This file is part of ethereum.js. - - ethereum.js is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - ethereum.js is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . -*/ -/** @file autoprovider.js - * @authors: - * Marek Kotewicz - * Marian Oancea - * @date 2014 - */ - -/* - * @brief if qt object is available, uses QtProvider, - * if not tries to connect over websockets - * if it fails, it uses HttpRpcProvider - */ - -// TODO: work out which of the following two lines it is supposed to be... -//if (process.env.NODE_ENV !== 'build') { -if ("build" !== 'build') {/* - var WebSocket = require('ws'); // jshint ignore:line - var web3 = require('./main.js'); // jshint ignore:line -*/} - -var AutoProvider = function (userOptions) { - if (web3.haveProvider()) { - return; - } - - // before we determine what provider we are, we have to cache request - this.sendQueue = []; - this.onmessageQueue = []; - - if (navigator.qt) { - this.provider = new web3.providers.QtProvider(); - return; - } - - userOptions = userOptions || {}; - var options = { - httprpc: userOptions.httprpc || 'http://localhost:8080', - websockets: userOptions.websockets || 'ws://localhost:40404/eth' - }; - - var self = this; - var closeWithSuccess = function (success) { - ws.close(); - if (success) { - self.provider = new web3.providers.WebSocketProvider(options.websockets); - } else { - self.provider = new web3.providers.HttpRpcProvider(options.httprpc); - self.poll = self.provider.poll.bind(self.provider); - } - self.sendQueue.forEach(function (payload) { - self.provider(payload); - }); - self.onmessageQueue.forEach(function (handler) { - self.provider.onmessage = handler; - }); - }; - - var ws = new WebSocket(options.websockets); - - ws.onopen = function() { - closeWithSuccess(true); - }; - - ws.onerror = function() { - closeWithSuccess(false); - }; -}; - -AutoProvider.prototype.send = function (payload) { - if (this.provider) { - this.provider.send(payload); - return; - } - this.sendQueue.push(payload); -}; - -Object.defineProperty(AutoProvider.prototype, 'onmessage', { - set: function (handler) { - if (this.provider) { - this.provider.onmessage = handler; - return; - } - this.onmessageQueue.push(handler); - } -}); - -module.exports = AutoProvider; diff --git a/cmd/ethtest/lib/contract.js b/cmd/ethtest/lib/contract.js deleted file mode 100644 index 17b077484b..0000000000 --- a/cmd/ethtest/lib/contract.js +++ /dev/null @@ -1,65 +0,0 @@ -/* - This file is part of ethereum.js. - - ethereum.js is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - ethereum.js is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . -*/ -/** @file contract.js - * @authors: - * Marek Kotewicz - * @date 2014 - */ - -// TODO: work out which of the following two lines it is supposed to be... -//if (process.env.NODE_ENV !== 'build') { -if ("build" !== 'build') {/* - var web3 = require('./web3'); // jshint ignore:line -*/} -var abi = require('./abi'); - -var contract = function (address, desc) { - var inputParser = abi.inputParser(desc); - var outputParser = abi.outputParser(desc); - - var contract = {}; - - desc.forEach(function (method) { - contract[method.name] = function () { - var params = Array.prototype.slice.call(arguments); - var parsed = inputParser[method.name].apply(null, params); - - var onSuccess = function (result) { - return outputParser[method.name](result); - }; - - return { - call: function (extra) { - extra = extra || {}; - extra.to = address; - extra.data = parsed; - return web3.eth.call(extra).then(onSuccess); - }, - transact: function (extra) { - extra = extra || {}; - extra.to = address; - extra.data = parsed; - return web3.eth.transact(extra).then(onSuccess); - } - }; - }; - }); - - return contract; -}; - -module.exports = contract; diff --git a/cmd/ethtest/lib/httprpc.js b/cmd/ethtest/lib/httprpc.js deleted file mode 100644 index ee6b5c3070..0000000000 --- a/cmd/ethtest/lib/httprpc.js +++ /dev/null @@ -1,95 +0,0 @@ -/* - This file is part of ethereum.js. - - ethereum.js is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - ethereum.js is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . -*/ -/** @file httprpc.js - * @authors: - * Marek Kotewicz - * Marian Oancea - * @date 2014 - */ - -// TODO: work out which of the following two lines it is supposed to be... -//if (process.env.NODE_ENV !== 'build') { -if ("build" !== "build") {/* - var XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest; // jshint ignore:line -*/} - -var HttpRpcProvider = function (host) { - this.handlers = []; - this.host = host; -}; - -function formatJsonRpcObject(object) { - return { - jsonrpc: '2.0', - method: object.call, - params: object.args, - id: object._id - }; -} - -function formatJsonRpcMessage(message) { - var object = JSON.parse(message); - - return { - _id: object.id, - data: object.result, - error: object.error - }; -} - -HttpRpcProvider.prototype.sendRequest = function (payload, cb) { - var data = formatJsonRpcObject(payload); - - var request = new XMLHttpRequest(); - request.open("POST", this.host, true); - request.send(JSON.stringify(data)); - request.onreadystatechange = function () { - if (request.readyState === 4 && cb) { - cb(request); - } - }; -}; - -HttpRpcProvider.prototype.send = function (payload) { - var self = this; - this.sendRequest(payload, function (request) { - self.handlers.forEach(function (handler) { - handler.call(self, formatJsonRpcMessage(request.responseText)); - }); - }); -}; - -HttpRpcProvider.prototype.poll = function (payload, id) { - var self = this; - this.sendRequest(payload, function (request) { - var parsed = JSON.parse(request.responseText); - if (parsed.error || (parsed.result instanceof Array ? parsed.result.length === 0 : !parsed.result)) { - return; - } - self.handlers.forEach(function (handler) { - handler.call(self, {_event: payload.call, _id: id, data: parsed.result}); - }); - }); -}; - -Object.defineProperty(HttpRpcProvider.prototype, "onmessage", { - set: function (handler) { - this.handlers.push(handler); - } -}); - -module.exports = HttpRpcProvider; diff --git a/cmd/ethtest/lib/main.js b/cmd/ethtest/lib/main.js deleted file mode 100644 index 59c60cfa81..0000000000 --- a/cmd/ethtest/lib/main.js +++ /dev/null @@ -1,494 +0,0 @@ -/* - This file is part of ethereum.js. - - ethereum.js is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - ethereum.js is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . -*/ -/** @file main.js - * @authors: - * Jeffrey Wilcke - * Marek Kotewicz - * Marian Oancea - * Gav Wood - * @date 2014 - */ - -function flattenPromise (obj) { - if (obj instanceof Promise) { - return Promise.resolve(obj); - } - - if (obj instanceof Array) { - return new Promise(function (resolve) { - var promises = obj.map(function (o) { - return flattenPromise(o); - }); - - return Promise.all(promises).then(function (res) { - for (var i = 0; i < obj.length; i++) { - obj[i] = res[i]; - } - resolve(obj); - }); - }); - } - - if (obj instanceof Object) { - return new Promise(function (resolve) { - var keys = Object.keys(obj); - var promises = keys.map(function (key) { - return flattenPromise(obj[key]); - }); - - return Promise.all(promises).then(function (res) { - for (var i = 0; i < keys.length; i++) { - obj[keys[i]] = res[i]; - } - resolve(obj); - }); - }); - } - - return Promise.resolve(obj); -} - -var web3Methods = function () { - return [ - { name: 'sha3', call: 'web3_sha3' } - ]; -}; - -var ethMethods = function () { - var blockCall = function (args) { - return typeof args[0] === "string" ? "eth_blockByHash" : "eth_blockByNumber"; - }; - - var transactionCall = function (args) { - return typeof args[0] === "string" ? 'eth_transactionByHash' : 'eth_transactionByNumber'; - }; - - var uncleCall = function (args) { - return typeof args[0] === "string" ? 'eth_uncleByHash' : 'eth_uncleByNumber'; - }; - - var methods = [ - { name: 'balanceAt', call: 'eth_balanceAt' }, - { name: 'stateAt', call: 'eth_stateAt' }, - { name: 'storageAt', call: 'eth_storageAt' }, - { name: 'countAt', call: 'eth_countAt'}, - { name: 'codeAt', call: 'eth_codeAt' }, - { name: 'transact', call: 'eth_transact' }, - { name: 'call', call: 'eth_call' }, - { name: 'block', call: blockCall }, - { name: 'transaction', call: transactionCall }, - { name: 'uncle', call: uncleCall }, - { name: 'compilers', call: 'eth_compilers' }, - { name: 'lll', call: 'eth_lll' }, - { name: 'solidity', call: 'eth_solidity' }, - { name: 'serpent', call: 'eth_serpent' }, - { name: 'logs', call: 'eth_logs' } - ]; - return methods; -}; - -var ethProperties = function () { - return [ - { name: 'coinbase', getter: 'eth_coinbase', setter: 'eth_setCoinbase' }, - { name: 'listening', getter: 'eth_listening', setter: 'eth_setListening' }, - { name: 'mining', getter: 'eth_mining', setter: 'eth_setMining' }, - { name: 'gasPrice', getter: 'eth_gasPrice' }, - { name: 'account', getter: 'eth_account' }, - { name: 'accounts', getter: 'eth_accounts' }, - { name: 'peerCount', getter: 'eth_peerCount' }, - { name: 'defaultBlock', getter: 'eth_defaultBlock', setter: 'eth_setDefaultBlock' }, - { name: 'number', getter: 'eth_number'} - ]; -}; - -var dbMethods = function () { - return [ - { name: 'put', call: 'db_put' }, - { name: 'get', call: 'db_get' }, - { name: 'putString', call: 'db_putString' }, - { name: 'getString', call: 'db_getString' } - ]; -}; - -var shhMethods = function () { - return [ - { name: 'post', call: 'shh_post' }, - { name: 'newIdentity', call: 'shh_newIdentity' }, - { name: 'haveIdentity', call: 'shh_haveIdentity' }, - { name: 'newGroup', call: 'shh_newGroup' }, - { name: 'addToGroup', call: 'shh_addToGroup' } - ]; -}; - -var ethWatchMethods = function () { - var newFilter = function (args) { - return typeof args[0] === 'string' ? 'eth_newFilterString' : 'eth_newFilter'; - }; - - return [ - { name: 'newFilter', call: newFilter }, - { name: 'uninstallFilter', call: 'eth_uninstallFilter' }, - { name: 'getMessages', call: 'eth_filterLogs' } - ]; -}; - -var shhWatchMethods = function () { - return [ - { name: 'newFilter', call: 'shh_newFilter' }, - { name: 'uninstallFilter', call: 'shh_uninstallFilter' }, - { name: 'getMessage', call: 'shh_getMessages' } - ]; -}; - -var setupMethods = function (obj, methods) { - methods.forEach(function (method) { - obj[method.name] = function () { - return flattenPromise(Array.prototype.slice.call(arguments)).then(function (args) { - var call = typeof method.call === "function" ? method.call(args) : method.call; - return {call: call, args: args}; - }).then(function (request) { - return new Promise(function (resolve, reject) { - web3.provider.send(request, function (err, result) { - if (!err) { - resolve(result); - return; - } - reject(err); - }); - }); - }).catch(function(err) { - console.error(err); - }); - }; - }); -}; - -var setupProperties = function (obj, properties) { - properties.forEach(function (property) { - var proto = {}; - proto.get = function () { - return new Promise(function(resolve, reject) { - web3.provider.send({call: property.getter}, function(err, result) { - if (!err) { - resolve(result); - return; - } - reject(err); - }); - }); - }; - if (property.setter) { - proto.set = function (val) { - return flattenPromise([val]).then(function (args) { - return new Promise(function (resolve) { - web3.provider.send({call: property.setter, args: args}, function (err, result) { - if (!err) { - resolve(result); - return; - } - reject(err); - }); - }); - }).catch(function (err) { - console.error(err); - }); - }; - } - Object.defineProperty(obj, property.name, proto); - }); -}; - -// TODO: import from a dependency, don't duplicate. -var hexToDec = function (hex) { - return parseInt(hex, 16).toString(); -}; - -var decToHex = function (dec) { - return parseInt(dec).toString(16); -}; - - -var web3 = { - _callbacks: {}, - _events: {}, - providers: {}, - - toAscii: function(hex) { - // Find termination - var str = ""; - var i = 0, l = hex.length; - if (hex.substring(0, 2) === '0x') - i = 2; - for(; i < l; i+=2) { - var code = hex.charCodeAt(i); - if(code === 0) { - break; - } - - str += String.fromCharCode(parseInt(hex.substr(i, 2), 16)); - } - - return str; - }, - - fromAscii: function(str, pad) { - pad = pad === undefined ? 32 : pad; - var hex = this.toHex(str); - while(hex.length < pad*2) - hex += "00"; - return "0x" + hex; - }, - - toDecimal: function (val) { - return hexToDec(val.substring(2)); - }, - - fromDecimal: function (val) { - return "0x" + decToHex(val); - }, - - toEth: function(str) { - var val = typeof str === "string" ? str.indexOf('0x') == 0 ? parseInt(str.substr(2), 16) : parseInt(str) : str; - var unit = 0; - var units = [ 'wei', 'Kwei', 'Mwei', 'Gwei', 'szabo', 'finney', 'ether', 'grand', 'Mether', 'Gether', 'Tether', 'Pether', 'Eether', 'Zether', 'Yether', 'Nether', 'Dether', 'Vether', 'Uether' ]; - while (val > 3000 && unit < units.length - 1) - { - val /= 1000; - unit++; - } - var s = val.toString().length < val.toFixed(2).length ? val.toString() : val.toFixed(2); - while (true) { - var o = s; - s = s.replace(/(\d)(\d\d\d[\.\,])/, function($0, $1, $2) { return $1 + ',' + $2; }); - if (o == s) - break; - } - return s + ' ' + units[unit]; - }, - - eth: { - prototype: Object(), // jshint ignore:line - watch: function (params) { - return new Filter(params, ethWatch); - } - }, - - db: { - prototype: Object() // jshint ignore:line - }, - - shh: { - prototype: Object(), // jshint ignore:line - watch: function (params) { - return new Filter(params, shhWatch); - } - }, - - on: function(event, id, cb) { - if(web3._events[event] === undefined) { - web3._events[event] = {}; - } - - web3._events[event][id] = cb; - return this; - }, - - off: function(event, id) { - if(web3._events[event] !== undefined) { - delete web3._events[event][id]; - } - - return this; - }, - - trigger: function(event, id, data) { - var callbacks = web3._events[event]; - if (!callbacks || !callbacks[id]) { - return; - } - var cb = callbacks[id]; - cb(data); - } -}; - -setupMethods(web3, web3Methods()); -setupMethods(web3.eth, ethMethods()); -setupProperties(web3.eth, ethProperties()); -setupMethods(web3.db, dbMethods()); -setupMethods(web3.shh, shhMethods()); - -var ethWatch = { - changed: 'eth_changed' -}; -setupMethods(ethWatch, ethWatchMethods()); -var shhWatch = { - changed: 'shh_changed' -}; -setupMethods(shhWatch, shhWatchMethods()); - -var ProviderManager = function() { - this.queued = []; - this.polls = []; - this.ready = false; - this.provider = undefined; - this.id = 1; - - var self = this; - var poll = function () { - if (self.provider && self.provider.poll) { - self.polls.forEach(function (data) { - data.data._id = self.id; - self.id++; - self.provider.poll(data.data, data.id); - }); - } - setTimeout(poll, 12000); - }; - poll(); -}; - -ProviderManager.prototype.send = function(data, cb) { - data._id = this.id; - if (cb) { - web3._callbacks[data._id] = cb; - } - - data.args = data.args || []; - this.id++; - - if(this.provider !== undefined) { - this.provider.send(data); - } else { - console.warn("provider is not set"); - this.queued.push(data); - } -}; - -ProviderManager.prototype.set = function(provider) { - if(this.provider !== undefined && this.provider.unload !== undefined) { - this.provider.unload(); - } - - this.provider = provider; - this.ready = true; -}; - -ProviderManager.prototype.sendQueued = function() { - for(var i = 0; this.queued.length; i++) { - // Resend - this.send(this.queued[i]); - } -}; - -ProviderManager.prototype.installed = function() { - return this.provider !== undefined; -}; - -ProviderManager.prototype.startPolling = function (data, pollId) { - if (!this.provider || !this.provider.poll) { - return; - } - this.polls.push({data: data, id: pollId}); -}; - -ProviderManager.prototype.stopPolling = function (pollId) { - for (var i = this.polls.length; i--;) { - var poll = this.polls[i]; - if (poll.id === pollId) { - this.polls.splice(i, 1); - } - } -}; - -web3.provider = new ProviderManager(); - -web3.setProvider = function(provider) { - provider.onmessage = messageHandler; - web3.provider.set(provider); - web3.provider.sendQueued(); -}; - -web3.haveProvider = function() { - return !!web3.provider.provider; -}; - -var Filter = function(options, impl) { - this.impl = impl; - this.callbacks = []; - - var self = this; - this.promise = impl.newFilter(options); - this.promise.then(function (id) { - self.id = id; - web3.on(impl.changed, id, self.trigger.bind(self)); - web3.provider.startPolling({call: impl.changed, args: [id]}, id); - }); -}; - -Filter.prototype.arrived = function(callback) { - this.changed(callback); -}; - -Filter.prototype.changed = function(callback) { - var self = this; - this.promise.then(function(id) { - self.callbacks.push(callback); - }); -}; - -Filter.prototype.trigger = function(messages) { - for(var i = 0; i < this.callbacks.length; i++) { - this.callbacks[i].call(this, messages); - } -}; - -Filter.prototype.uninstall = function() { - var self = this; - this.promise.then(function (id) { - self.impl.uninstallFilter(id); - web3.provider.stopPolling(id); - web3.off(impl.changed, id); - }); -}; - -Filter.prototype.messages = function() { - var self = this; - return this.promise.then(function (id) { - return self.impl.getMessages(id); - }); -}; - -Filter.prototype.logs = function () { - return this.messages(); -}; - -function messageHandler(data) { - if(data._event !== undefined) { - web3.trigger(data._event, data._id, data.data); - return; - } - - if(data._id) { - var cb = web3._callbacks[data._id]; - if (cb) { - cb.call(this, data.error, data.data); - delete web3._callbacks[data._id]; - } - } -} - -module.exports = web3; diff --git a/cmd/ethtest/lib/qt.js b/cmd/ethtest/lib/qt.js deleted file mode 100644 index f022395476..0000000000 --- a/cmd/ethtest/lib/qt.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - This file is part of ethereum.js. - - ethereum.js is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - ethereum.js is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . -*/ -/** @file qt.js - * @authors: - * Jeffrey Wilcke - * Marek Kotewicz - * @date 2014 - */ - -var QtProvider = function() { - this.handlers = []; - - var self = this; - navigator.qt.onmessage = function (message) { - self.handlers.forEach(function (handler) { - handler.call(self, JSON.parse(message.data)); - }); - }; -}; - -QtProvider.prototype.send = function(payload) { - navigator.qt.postMessage(JSON.stringify(payload)); -}; - -Object.defineProperty(QtProvider.prototype, "onmessage", { - set: function(handler) { - this.handlers.push(handler); - } -}); - -module.exports = QtProvider; diff --git a/cmd/ethtest/lib/websocket.js b/cmd/ethtest/lib/websocket.js deleted file mode 100644 index 24a0725313..0000000000 --- a/cmd/ethtest/lib/websocket.js +++ /dev/null @@ -1,78 +0,0 @@ -/* - This file is part of ethereum.js. - - ethereum.js is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - ethereum.js is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . -*/ -/** @file websocket.js - * @authors: - * Jeffrey Wilcke - * Marek Kotewicz - * Marian Oancea - * @date 2014 - */ - -// TODO: work out which of the following two lines it is supposed to be... -//if (process.env.NODE_ENV !== 'build') { -if ("build" !== "build") {/* - var WebSocket = require('ws'); // jshint ignore:line -*/} - -var WebSocketProvider = function(host) { - // onmessage handlers - this.handlers = []; - // queue will be filled with messages if send is invoked before the ws is ready - this.queued = []; - this.ready = false; - - this.ws = new WebSocket(host); - - var self = this; - this.ws.onmessage = function(event) { - for(var i = 0; i < self.handlers.length; i++) { - self.handlers[i].call(self, JSON.parse(event.data), event); - } - }; - - this.ws.onopen = function() { - self.ready = true; - - for(var i = 0; i < self.queued.length; i++) { - // Resend - self.send(self.queued[i]); - } - }; -}; - -WebSocketProvider.prototype.send = function(payload) { - if(this.ready) { - var data = JSON.stringify(payload); - - this.ws.send(data); - } else { - this.queued.push(payload); - } -}; - -WebSocketProvider.prototype.onMessage = function(handler) { - this.handlers.push(handler); -}; - -WebSocketProvider.prototype.unload = function() { - this.ws.close(); -}; -Object.defineProperty(WebSocketProvider.prototype, "onmessage", { - set: function(provider) { this.onMessage(provider); } -}); - -module.exports = WebSocketProvider; diff --git a/cmd/ethtest/package.json b/cmd/ethtest/package.json deleted file mode 100644 index 24141ea2e4..0000000000 --- a/cmd/ethtest/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "name": "ethereum.js", - "namespace": "ethereum", - "version": "0.0.5", - "description": "Ethereum Compatible JavaScript API", - "main": "./index.js", - "directories": { - "lib": "./lib" - }, - "dependencies": { - "es6-promise": "*", - "ws": "*", - "xmlhttprequest": "*" - }, - "devDependencies": { - "bower": ">=1.3.0", - "browserify": ">=6.0", - "del": ">=0.1.1", - "envify": "^3.0.0", - "exorcist": "^0.1.6", - "gulp": ">=3.4.0", - "gulp-jshint": ">=1.5.0", - "gulp-rename": ">=1.2.0", - "gulp-uglify": ">=1.0.0", - "jshint": ">=2.5.0", - "uglifyify": "^2.6.0", - "unreachable-branch-transform": "^0.1.0", - "vinyl-source-stream": "^1.0.0" - }, - "scripts": { - "build": "gulp", - "watch": "gulp watch", - "lint": "gulp lint" - }, - "repository": { - "type": "git", - "url": "https://github.com/ethereum/ethereum.js.git" - }, - "homepage": "https://github.com/ethereum/ethereum.js", - "bugs": { - "url": "https://github.com/ethereum/ethereum.js/issues" - }, - "keywords": [ - "ethereum", - "javascript", - "API" - ], - "author": "ethdev.com", - "authors": [ - { - "name": "Jeffery Wilcke", - "email": "jeff@ethdev.com", - "url": "https://github.com/obscuren" - }, - { - "name": "Marek Kotewicz", - "email": "marek@ethdev.com", - "url": "https://github.com/debris" - }, - { - "name": "Marian Oancea", - "email": "marian@ethdev.com", - "url": "https://github.com/cubedro" - } - ], - "license": "LGPL-3.0" -} diff --git a/cmd/mist/assets/qml/main.qml b/cmd/mist/assets/qml/main.qml index 06a7bc2a8e..5df4c8aad2 100644 --- a/cmd/mist/assets/qml/main.qml +++ b/cmd/mist/assets/qml/main.qml @@ -866,12 +866,14 @@ ApplicationWindow { model: ListModel { id: pastPeers } Component.onCompleted: { + /* var ips = eth.pastPeers() for(var i = 0; i < ips.length; i++) { pastPeers.append({text: ips.get(i)}) } pastPeers.insert(0, {text: "poc-7.ethdev.com:30303"}) + */ } } diff --git a/cmd/mist/assets/qml/views/wallet.qml b/cmd/mist/assets/qml/views/wallet.qml index 9727ef35c8..b81273a173 100644 --- a/cmd/mist/assets/qml/views/wallet.qml +++ b/cmd/mist/assets/qml/views/wallet.qml @@ -20,7 +20,7 @@ Rectangle { } function setBalance() { - balance.text = "Balance: " + eth.numberToHuman(eth.balanceAt(eth.key().address)) + //balance.text = "Balance: " + eth.numberToHuman(eth.balanceAt(eth.key().address)) if(menuItem) menuItem.secondaryTitle = eth.numberToHuman(eth.balanceAt(eth.key().address)) } diff --git a/cmd/mist/bindings.go b/cmd/mist/bindings.go index 6d2342c876..66d8d14916 100644 --- a/cmd/mist/bindings.go +++ b/cmd/mist/bindings.go @@ -72,7 +72,7 @@ func (gui *Gui) GetCustomIdentifier() string { // functions that allow Gui to implement interface guilogger.LogSystem func (gui *Gui) SetLogLevel(level logger.LogLevel) { gui.logLevel = level - gui.stdLog.SetLogLevel(level) + gui.eth.Logger().SetLogLevel(level) gui.config.Save("loglevel", level) } diff --git a/cmd/mist/gui.go b/cmd/mist/gui.go index 98ca70b162..8e533d9772 100644 --- a/cmd/mist/gui.go +++ b/cmd/mist/gui.go @@ -72,8 +72,7 @@ type Gui struct { plugins map[string]plugin - miner *miner.Miner - stdLog logger.LogSystem + miner *miner.Miner } // Create GUI, but doesn't start it @@ -113,7 +112,7 @@ func (gui *Gui) Start(assetPath string) { // Expose the eth library and the ui library to QML context.SetVar("gui", gui) context.SetVar("eth", gui.uiLib) - context.SetVar("shh", gui.whisper) + //context.SetVar("shh", gui.whisper) // Load the main QML interface data, _ := ethutil.Config.Db.Get([]byte("KeyRing")) diff --git a/cmd/mist/main.go b/cmd/mist/main.go index 6f578ff48f..cae666d458 100644 --- a/cmd/mist/main.go +++ b/cmd/mist/main.go @@ -26,6 +26,7 @@ import ( "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/eth" "github.com/ethereum/go-ethereum/logger" + "github.com/ethereum/go-ethereum/p2p" "gopkg.in/qml.v1" ) @@ -35,6 +36,7 @@ const ( ) var ethereum *eth.Ethereum +var mainlogger = logger.NewLogger("MAIN") func run() error { // precedence: code-internal flag default < config file < environment variables < command line @@ -43,27 +45,24 @@ func run() error { tstart := time.Now() config := utils.InitConfig(VmType, ConfigFile, Datadir, "ETH") - utils.InitDataDir(Datadir) - - stdLog := utils.InitLogging(Datadir, LogFile, LogLevel, DebugFile) - - db := utils.NewDatabase() - err := utils.DBSanityCheck(db) + ethereum, err := eth.New(ð.Config{ + Name: ClientIdentifier, + Version: Version, + KeyStore: KeyStore, + DataDir: Datadir, + LogFile: LogFile, + LogLevel: LogLevel, + Identifier: Identifier, + MaxPeers: MaxPeer, + Port: OutboundPort, + NATType: PMPGateway, + PMPGateway: PMPGateway, + KeyRing: KeyRing, + }) if err != nil { - ErrorWindow(err) - - os.Exit(1) - } - keyManager := utils.NewKeyManager(KeyStore, Datadir, db) - - // create, import, export keys - utils.KeyTasks(keyManager, KeyRing, GenAddr, SecretFile, ExportDir, NonInteractive) - clientIdentity := utils.NewClientIdentity(ClientIdentifier, Version, Identifier, string(keyManager.PublicKey())) - ethereum := utils.NewEthereum(db, clientIdentity, keyManager, utils.NatType(NatType, PMPGateway), OutboundPort, MaxPeer) - - if ShowGenesis { - utils.ShowGenesis(ethereum) + mainlogger.Fatalln(err) } + utils.KeyTasks(ethereum.KeyManager(), KeyRing, GenAddr, SecretFile, ExportDir, NonInteractive) if StartRpc { utils.StartRpc(ethereum, RpcPort) @@ -73,8 +72,7 @@ func run() error { utils.StartWebSockets(ethereum) } - gui := NewWindow(ethereum, config, clientIdentity, KeyRing, LogLevel) - gui.stdLog = stdLog + gui := NewWindow(ethereum, config, ethereum.ClientIdentity().(*p2p.SimpleClientIdentity), KeyRing, LogLevel) utils.RegisterInterrupt(func(os.Signal) { gui.Stop() diff --git a/cmd/peerserver/main.go b/cmd/peerserver/main.go index 0fa7a9b440..18d183f0bd 100644 --- a/cmd/peerserver/main.go +++ b/cmd/peerserver/main.go @@ -18,7 +18,7 @@ func main() { marshaled := elliptic.Marshal(crypto.S256(), key.PublicKey.X, key.PublicKey.Y) srv := p2p.Server{ - MaxPeers: 10, + MaxPeers: 100, Identity: p2p.NewSimpleClientIdentity("Ethereum(G)", "0.1", "Peer Server Two", string(marshaled)), ListenAddr: ":30301", NAT: p2p.UPNP(), @@ -29,12 +29,12 @@ func main() { } // add seed peers - seed, err := net.ResolveTCPAddr("tcp", "poc-7.ethdev.com:30300") + seed, err := net.ResolveTCPAddr("tcp", "poc-8.ethdev.com:30303") if err != nil { fmt.Println("couldn't resolve:", err) - os.Exit(1) + } else { + srv.SuggestPeer(seed.IP, seed.Port, nil) } - srv.SuggestPeer(seed.IP, seed.Port, nil) select {} } diff --git a/cmd/utils/cmd.go b/cmd/utils/cmd.go index 466c513835..6b1cf37265 100644 --- a/cmd/utils/cmd.go +++ b/cmd/utils/cmd.go @@ -2,9 +2,6 @@ package utils import ( "fmt" - "io" - "log" - "net" "os" "os/signal" "path" @@ -16,11 +13,9 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/eth" - "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/miner" - "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/rpc" "github.com/ethereum/go-ethereum/xeth" @@ -52,15 +47,8 @@ func RunInterruptCallbacks(sig os.Signal) { } } -func AbsolutePath(Datadir string, filename string) string { - if path.IsAbs(filename) { - return filename - } - return path.Join(Datadir, filename) -} - func openLogFile(Datadir string, filename string) *os.File { - path := AbsolutePath(Datadir, filename) + path := ethutil.AbsolutePath(Datadir, filename) file, err := os.OpenFile(path, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666) if err != nil { panic(fmt.Sprintf("error opening log file '%s': %v", filename, err)) @@ -76,23 +64,13 @@ func confirm(message string) bool { if r == "n" || r == "y" { break } else { - fmt.Printf("Yes or no?", r) + fmt.Printf("Yes or no? (%s)", r) } } return r == "y" } -func DBSanityCheck(db ethutil.Database) error { - d, _ := db.Get([]byte("ProtocolVersion")) - protov := ethutil.NewValue(d).Uint() - if protov != eth.ProtocolVersion && protov != 0 { - return fmt.Errorf("Database version mismatch. Protocol(%d / %d). `rm -rf %s`", protov, eth.ProtocolVersion, ethutil.Config.ExecPath+"/database") - } - - return nil -} - -func InitDataDir(Datadir string) { +func initDataDir(Datadir string) { _, err := os.Stat(Datadir) if err != nil { if os.IsNotExist(err) { @@ -102,26 +80,8 @@ func InitDataDir(Datadir string) { } } -func InitLogging(Datadir string, LogFile string, LogLevel int, DebugFile string) logger.LogSystem { - var writer io.Writer - if LogFile == "" { - writer = os.Stdout - } else { - writer = openLogFile(Datadir, LogFile) - } - - sys := logger.NewStdLogSystem(writer, log.LstdFlags, logger.LogLevel(LogLevel)) - logger.AddLogSystem(sys) - if DebugFile != "" { - writer = openLogFile(Datadir, DebugFile) - logger.AddLogSystem(logger.NewStdLogSystem(writer, log.LstdFlags, logger.DebugLevel)) - } - - return sys -} - func InitConfig(vmType int, ConfigFile string, Datadir string, EnvPrefix string) *ethutil.ConfigManager { - InitDataDir(Datadir) + initDataDir(Datadir) cfg := ethutil.ReadConfig(ConfigFile, Datadir, EnvPrefix) cfg.VmType = vmType @@ -138,43 +98,6 @@ func exit(err error) { os.Exit(status) } -func NewDatabase() ethutil.Database { - db, err := ethdb.NewLDBDatabase("database") - if err != nil { - exit(err) - } - return db -} - -func NewClientIdentity(clientIdentifier, version, customIdentifier string, pubkey string) *p2p.SimpleClientIdentity { - return p2p.NewSimpleClientIdentity(clientIdentifier, version, customIdentifier, pubkey) -} - -func NatType(natType string, gateway string) (nat p2p.NAT) { - switch natType { - case "UPNP": - nat = p2p.UPNP() - case "PMP": - ip := net.ParseIP(gateway) - if ip == nil { - clilogger.Fatalf("cannot resolve PMP gateway IP %s", gateway) - } - nat = p2p.PMP(ip) - case "": - default: - clilogger.Fatalf("unrecognised NAT type '%s'", natType) - } - return -} - -func NewEthereum(db ethutil.Database, clientIdentity p2p.ClientIdentity, keyManager *crypto.KeyManager, nat p2p.NAT, OutboundPort string, MaxPeer int) *eth.Ethereum { - ethereum, err := eth.New(db, clientIdentity, keyManager, nat, OutboundPort, MaxPeer) - if err != nil { - clilogger.Fatalln("eth start err:", err) - } - return ethereum -} - func StartEthereum(ethereum *eth.Ethereum, UseSeed bool) { clilogger.Infof("Starting %s", ethereum.ClientIdentity()) ethereum.Start(UseSeed) @@ -184,24 +107,6 @@ func StartEthereum(ethereum *eth.Ethereum, UseSeed bool) { }) } -func ShowGenesis(ethereum *eth.Ethereum) { - clilogger.Infoln(ethereum.ChainManager().Genesis()) - exit(nil) -} - -func NewKeyManager(KeyStore string, Datadir string, db ethutil.Database) *crypto.KeyManager { - var keyManager *crypto.KeyManager - switch { - case KeyStore == "db": - keyManager = crypto.NewDBKeyManager(db) - case KeyStore == "file": - keyManager = crypto.NewFileKeyManager(Datadir) - default: - exit(fmt.Errorf("unknown keystore type: %s", KeyStore)) - } - return keyManager -} - func DefaultAssetPath() string { var assetPath string // If the current working directory is the go-ethereum dir diff --git a/core/block_manager.go b/core/block_manager.go index 09f569d96e..76385ea1fd 100644 --- a/core/block_manager.go +++ b/core/block_manager.go @@ -6,7 +6,6 @@ import ( "fmt" "math/big" "sync" - "time" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" @@ -22,18 +21,6 @@ import ( var statelogger = logger.NewLogger("BLOCK") -type Peer interface { - Inbound() bool - LastSend() time.Time - LastPong() int64 - Host() []byte - Port() uint16 - Version() string - PingTime() string - Connected() *int32 - Caps() *ethutil.Value -} - type EthManager interface { BlockManager() *BlockManager ChainManager() *ChainManager diff --git a/eth/backend.go b/eth/backend.go index 36c1ac30f3..bf6c912826 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -1,11 +1,13 @@ package eth import ( + "fmt" "net" "sync" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/event" ethlogger "github.com/ethereum/go-ethereum/logger" @@ -19,6 +21,24 @@ const ( seedNodeAddress = "poc-7.ethdev.com:30300" ) +type Config struct { + Name string + Version string + Identifier string + KeyStore string + DataDir string + LogFile string + LogLevel int + KeyRing string + + MaxPeers int + Port string + NATType string + PMPGateway string + + KeyManager *crypto.KeyManager +} + var logger = ethlogger.NewLogger("SERV") type Ethereum struct { @@ -38,7 +58,7 @@ type Ethereum struct { blockPool *BlockPool whisper *whisper.Whisper - server *p2p.Server + net *p2p.Server eventMux *event.TypeMux txSub event.Subscription blockSub event.Subscription @@ -47,6 +67,7 @@ type Ethereum struct { keyManager *crypto.KeyManager clientIdentity p2p.ClientIdentity + logger ethlogger.LogSystem synclock sync.Mutex syncGroup sync.WaitGroup @@ -54,7 +75,36 @@ type Ethereum struct { Mining bool } -func New(db ethutil.Database, identity p2p.ClientIdentity, keyManager *crypto.KeyManager, nat p2p.NAT, port string, maxPeers int) (*Ethereum, error) { +func New(config *Config) (*Ethereum, error) { + // Boostrap database + logger := ethlogger.New(config.DataDir, config.LogFile, config.LogLevel) + db, err := ethdb.NewLDBDatabase("database") + if err != nil { + return nil, err + } + + // Perform database sanity checks + d, _ := db.Get([]byte("ProtocolVersion")) + protov := ethutil.NewValue(d).Uint() + if protov != ProtocolVersion && protov != 0 { + return nil, fmt.Errorf("Database version mismatch. Protocol(%d / %d). `rm -rf %s`", protov, ProtocolVersion, ethutil.Config.ExecPath+"/database") + } + + // Create new keymanager + var keyManager *crypto.KeyManager + switch config.KeyStore { + case "db": + keyManager = crypto.NewDBKeyManager(db) + case "file": + keyManager = crypto.NewFileKeyManager(config.DataDir) + default: + return nil, fmt.Errorf("unknown keystore type: %s", config.KeyStore) + } + // Initialise the keyring + keyManager.Init(config.KeyRing, 0, false) + + // Create a new client id for this instance. This will help identifying the node on the network + clientId := p2p.NewSimpleClientIdentity(config.Name, config.Version, config.Identifier, keyManager.PublicKey()) saveProtocolVersion(db) ethutil.Config.Db = db @@ -64,9 +114,10 @@ func New(db ethutil.Database, identity p2p.ClientIdentity, keyManager *crypto.Ke quit: make(chan bool), db: db, keyManager: keyManager, - clientIdentity: identity, + clientIdentity: clientId, blacklist: p2p.NewBlacklist(), eventMux: &event.TypeMux{}, + logger: logger, } eth.chainManager = core.NewChainManager(eth.EventMux()) @@ -85,17 +136,20 @@ func New(db ethutil.Database, identity p2p.ClientIdentity, keyManager *crypto.Ke ethProto := EthProtocol(eth.txPool, eth.chainManager, eth.blockPool) protocols := []p2p.Protocol{ethProto, eth.whisper.Protocol()} - server := &p2p.Server{ - Identity: identity, - MaxPeers: maxPeers, + nat, err := p2p.ParseNAT(config.NATType, config.PMPGateway) + if err != nil { + return nil, err + } + + eth.net = &p2p.Server{ + Identity: clientId, + MaxPeers: config.MaxPeers, Protocols: protocols, - ListenAddr: ":" + port, + ListenAddr: ":" + config.Port, Blacklist: eth.blacklist, NAT: nat, } - eth.server = server - return eth, nil } @@ -103,6 +157,10 @@ func (s *Ethereum) KeyManager() *crypto.KeyManager { return s.keyManager } +func (s *Ethereum) Logger() ethlogger.LogSystem { + return s.logger +} + func (s *Ethereum) ClientIdentity() p2p.ClientIdentity { return s.clientIdentity } @@ -144,20 +202,20 @@ func (s *Ethereum) IsListening() bool { } func (s *Ethereum) PeerCount() int { - return s.server.PeerCount() + return s.net.PeerCount() } func (s *Ethereum) Peers() []*p2p.Peer { - return s.server.Peers() + return s.net.Peers() } func (s *Ethereum) MaxPeers() int { - return s.server.MaxPeers + return s.net.MaxPeers } // Start the ethereum func (s *Ethereum) Start(seed bool) error { - err := s.server.Start() + err := s.net.Start() if err != nil { return err } @@ -191,7 +249,7 @@ func (self *Ethereum) SuggestPeer(addr string) error { return err } - self.server.SuggestPeer(netaddr.IP, netaddr.Port, nil) + self.net.SuggestPeer(netaddr.IP, netaddr.Port, nil) return nil } @@ -227,7 +285,7 @@ func (self *Ethereum) txBroadcastLoop() { // automatically stops if unsubscribe for obj := range self.txSub.Chan() { event := obj.(core.TxPreEvent) - self.server.Broadcast("eth", TxMsg, []interface{}{event.Tx.RlpData()}) + self.net.Broadcast("eth", TxMsg, []interface{}{event.Tx.RlpData()}) } } @@ -236,7 +294,7 @@ func (self *Ethereum) blockBroadcastLoop() { for obj := range self.txSub.Chan() { switch ev := obj.(type) { case core.NewMinedBlockEvent: - self.server.Broadcast("eth", NewBlockMsg, ev.Block.RlpData()) + self.net.Broadcast("eth", NewBlockMsg, ev.Block.RlpData()) } } } diff --git a/ethutil/path.go b/ethutil/path.go index cfbc389508..f64e3849e0 100644 --- a/ethutil/path.go +++ b/ethutil/path.go @@ -4,6 +4,7 @@ import ( "io/ioutil" "os" "os/user" + "path" "strings" ) @@ -58,3 +59,10 @@ func WriteFile(filePath string, content []byte) error { return nil } + +func AbsolutePath(Datadir string, filename string) string { + if path.IsAbs(filename) { + return filename + } + return path.Join(Datadir, filename) +} diff --git a/logger/log.go b/logger/log.go new file mode 100644 index 0000000000..53065f870b --- /dev/null +++ b/logger/log.go @@ -0,0 +1,33 @@ +package logger + +import ( + "fmt" + "io" + "log" + "os" + + "github.com/ethereum/go-ethereum/ethutil" +) + +func openLogFile(datadir string, filename string) *os.File { + path := ethutil.AbsolutePath(datadir, filename) + file, err := os.OpenFile(path, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666) + if err != nil { + panic(fmt.Sprintf("error opening log file '%s': %v", filename, err)) + } + return file +} + +func New(datadir string, logFile string, logLevel int) LogSystem { + var writer io.Writer + if logFile == "" { + writer = os.Stdout + } else { + writer = openLogFile(datadir, logFile) + } + + sys := NewStdLogSystem(writer, log.LstdFlags, LogLevel(logLevel)) + AddLogSystem(sys) + + return sys +} diff --git a/p2p/client_identity.go b/p2p/client_identity.go index bc865b63b0..f15fd01bfc 100644 --- a/p2p/client_identity.go +++ b/p2p/client_identity.go @@ -17,10 +17,10 @@ type SimpleClientIdentity struct { customIdentifier string os string implementation string - pubkey string + pubkey []byte } -func NewSimpleClientIdentity(clientIdentifier string, version string, customIdentifier string, pubkey string) *SimpleClientIdentity { +func NewSimpleClientIdentity(clientIdentifier string, version string, customIdentifier string, pubkey []byte) *SimpleClientIdentity { clientIdentity := &SimpleClientIdentity{ clientIdentifier: clientIdentifier, version: version, diff --git a/p2p/nat.go b/p2p/nat.go new file mode 100644 index 0000000000..9b771c3e8c --- /dev/null +++ b/p2p/nat.go @@ -0,0 +1,23 @@ +package p2p + +import ( + "fmt" + "net" +) + +func ParseNAT(natType string, gateway string) (nat NAT, err error) { + switch natType { + case "UPNP": + nat = UPNP() + case "PMP": + ip := net.ParseIP(gateway) + if ip == nil { + return nil, fmt.Errorf("cannot resolve PMP gateway IP %s", gateway) + } + nat = PMP(ip) + case "": + default: + return nil, fmt.Errorf("unrecognised NAT type '%s'", natType) + } + return +} diff --git a/core/dagger.go b/pow/dagger/dagger.go similarity index 99% rename from core/dagger.go rename to pow/dagger/dagger.go index 3039d89959..9ac0004433 100644 --- a/core/dagger.go +++ b/pow/dagger/dagger.go @@ -1,4 +1,4 @@ -package core +package dagger import ( "hash" diff --git a/core/dagger_test.go b/pow/dagger/dagger_test.go similarity index 96% rename from core/dagger_test.go rename to pow/dagger/dagger_test.go index e80064e6bf..f3a71d1eb4 100644 --- a/core/dagger_test.go +++ b/pow/dagger/dagger_test.go @@ -1,4 +1,4 @@ -package core +package dagger import ( "math/big" diff --git a/vm/context.go b/vm/context.go index d995c92c76..d14df1aa77 100644 --- a/vm/context.go +++ b/vm/context.go @@ -38,13 +38,13 @@ func NewContext(caller ContextRef, object ContextRef, code []byte, gas, price *b return c } -func (c *Context) GetOp(x uint64) OpCode { - return OpCode(c.GetByte(x)) +func (c *Context) GetOp(n uint64) OpCode { + return OpCode(c.GetByte(n)) } -func (c *Context) GetByte(x uint64) byte { - if x < uint64(len(c.Code)) { - return c.Code[x] +func (c *Context) GetByte(n uint64) byte { + if n < uint64(len(c.Code)) { + return c.Code[n] } return 0 diff --git a/vm/vm_debug.go b/vm/vm_debug.go index acad9c5e71..92e4154e4f 100644 --- a/vm/vm_debug.go +++ b/vm/vm_debug.go @@ -83,7 +83,7 @@ func (self *DebugVm) Run(me, caller ContextRef, code []byte, value, gas, price * jump = func(from uint64, to *big.Int) { p := to.Uint64() - nop := OpCode(context.GetOp(p)) + nop := context.GetOp(p) if !destinations.Has(p) { panic(fmt.Sprintf("invalid jump destination (%v) %v", nop, p)) } From 08b03afa4bb3a40d2faf6543bc884a8ece5be2a1 Mon Sep 17 00:00:00 2001 From: obscuren Date: Sun, 4 Jan 2015 14:28:08 +0100 Subject: [PATCH 072/132] Version bump --- README.md | 2 +- cmd/ethereum/main.go | 2 +- cmd/mist/main.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c54a555cb5..4830d93032 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Status](http://build.ethdev.com/buildstatusimage?builder=Linux%20Go%20develop%20 Ethereum Go Client © 2014 Jeffrey Wilcke. -Current state: Proof of Concept 0.7 +Current state: Proof of Concept 0.8 Ethereum is currently in its testing phase. diff --git a/cmd/ethereum/main.go b/cmd/ethereum/main.go index 95060025f9..b238522820 100644 --- a/cmd/ethereum/main.go +++ b/cmd/ethereum/main.go @@ -32,7 +32,7 @@ import ( const ( ClientIdentifier = "Ethereum(G)" - Version = "0.7.11" + Version = "0.8.0" ) var clilogger = logger.NewLogger("CLI") diff --git a/cmd/mist/main.go b/cmd/mist/main.go index cae666d458..ce5e8449a0 100644 --- a/cmd/mist/main.go +++ b/cmd/mist/main.go @@ -32,7 +32,7 @@ import ( const ( ClientIdentifier = "Mist" - Version = "0.7.11" + Version = "0.8.0" ) var ethereum *eth.Ethereum From c1dee151445d1d9700e0c623916299370868490c Mon Sep 17 00:00:00 2001 From: obscuren Date: Mon, 5 Jan 2015 00:18:44 +0100 Subject: [PATCH 073/132] BlockManager => BlockProcessor --- cmd/utils/cmd.go | 2 +- core/{block_manager.go => block_processor.go} | 24 +++--- core/filter.go | 2 +- eth/backend.go | 18 ++--- eth/wallet.go | 80 +++++++++++++++++++ miner/miner.go | 10 +-- xeth/{pipe.go => xeth.go} | 16 ++-- 7 files changed, 116 insertions(+), 36 deletions(-) rename core/{block_manager.go => block_processor.go} (88%) create mode 100644 eth/wallet.go rename xeth/{pipe.go => xeth.go} (92%) diff --git a/cmd/utils/cmd.go b/cmd/utils/cmd.go index 6b1cf37265..7e6dd5f912 100644 --- a/cmd/utils/cmd.go +++ b/cmd/utils/cmd.go @@ -234,7 +234,7 @@ func BlockDo(ethereum *eth.Ethereum, hash []byte) error { parent := ethereum.ChainManager().GetBlock(block.ParentHash()) - _, err := ethereum.BlockManager().TransitionState(parent.State(), parent, block) + _, err := ethereum.BlockProcessor().TransitionState(parent.State(), parent, block) if err != nil { return err } diff --git a/core/block_manager.go b/core/block_processor.go similarity index 88% rename from core/block_manager.go rename to core/block_processor.go index 76385ea1fd..40ff7cb407 100644 --- a/core/block_manager.go +++ b/core/block_processor.go @@ -22,7 +22,7 @@ import ( var statelogger = logger.NewLogger("BLOCK") type EthManager interface { - BlockManager() *BlockManager + BlockProcessor() *BlockProcessor ChainManager() *ChainManager TxPool() *TxPool PeerCount() int @@ -35,7 +35,7 @@ type EthManager interface { EventMux() *event.TypeMux } -type BlockManager struct { +type BlockProcessor struct { // Mutex for locking the block processor. Blocks can only be handled one at a time mutex sync.Mutex // Canonical block chain @@ -57,8 +57,8 @@ type BlockManager struct { eventMux *event.TypeMux } -func NewBlockManager(txpool *TxPool, chainManager *ChainManager, eventMux *event.TypeMux) *BlockManager { - sm := &BlockManager{ +func NewBlockProcessor(txpool *TxPool, chainManager *ChainManager, eventMux *event.TypeMux) *BlockProcessor { + sm := &BlockProcessor{ mem: make(map[string]*big.Int), Pow: ezp.New(), bc: chainManager, @@ -69,7 +69,7 @@ func NewBlockManager(txpool *TxPool, chainManager *ChainManager, eventMux *event return sm } -func (sm *BlockManager) TransitionState(statedb *state.StateDB, parent, block *types.Block) (receipts types.Receipts, err error) { +func (sm *BlockProcessor) TransitionState(statedb *state.StateDB, parent, block *types.Block) (receipts types.Receipts, err error) { coinbase := statedb.GetOrNewStateObject(block.Header().Coinbase) coinbase.SetGasPool(CalcGasLimit(parent, block)) @@ -82,7 +82,7 @@ func (sm *BlockManager) TransitionState(statedb *state.StateDB, parent, block *t return receipts, nil } -func (self *BlockManager) ApplyTransactions(coinbase *state.StateObject, state *state.StateDB, block *types.Block, txs types.Transactions, transientProcess bool) (types.Receipts, types.Transactions, types.Transactions, types.Transactions, error) { +func (self *BlockProcessor) ApplyTransactions(coinbase *state.StateObject, state *state.StateDB, block *types.Block, txs types.Transactions, transientProcess bool) (types.Receipts, types.Transactions, types.Transactions, types.Transactions, error) { var ( receipts types.Receipts handled, unhandled types.Transactions @@ -149,7 +149,7 @@ done: return receipts, handled, unhandled, erroneous, err } -func (sm *BlockManager) Process(block *types.Block) (td *big.Int, msgs state.Messages, err error) { +func (sm *BlockProcessor) Process(block *types.Block) (td *big.Int, msgs state.Messages, err error) { // Processing a blocks may never happen simultaneously sm.mutex.Lock() defer sm.mutex.Unlock() @@ -167,7 +167,7 @@ func (sm *BlockManager) Process(block *types.Block) (td *big.Int, msgs state.Mes return sm.ProcessWithParent(block, parent) } -func (sm *BlockManager) ProcessWithParent(block, parent *types.Block) (td *big.Int, messages state.Messages, err error) { +func (sm *BlockProcessor) ProcessWithParent(block, parent *types.Block) (td *big.Int, messages state.Messages, err error) { sm.lastAttemptedBlock = block state := state.New(parent.Trie().Copy()) @@ -234,7 +234,7 @@ func (sm *BlockManager) ProcessWithParent(block, parent *types.Block) (td *big.I } } -func (sm *BlockManager) CalculateTD(block *types.Block) (*big.Int, bool) { +func (sm *BlockProcessor) CalculateTD(block *types.Block) (*big.Int, bool) { uncleDiff := new(big.Int) for _, uncle := range block.Uncles() { uncleDiff = uncleDiff.Add(uncleDiff, uncle.Difficulty) @@ -257,7 +257,7 @@ func (sm *BlockManager) CalculateTD(block *types.Block) (*big.Int, bool) { // Validates the current block. Returns an error if the block was invalid, // an uncle or anything that isn't on the current block chain. // Validation validates easy over difficult (dagger takes longer time = difficult) -func (sm *BlockManager) ValidateBlock(block, parent *types.Block) error { +func (sm *BlockProcessor) ValidateBlock(block, parent *types.Block) error { expd := CalcDifficulty(block, parent) if expd.Cmp(block.Header().Difficulty) < 0 { return fmt.Errorf("Difficulty check failed for block %v, %v", block.Header().Difficulty, expd) @@ -283,7 +283,7 @@ func (sm *BlockManager) ValidateBlock(block, parent *types.Block) error { return nil } -func (sm *BlockManager) AccumelateRewards(statedb *state.StateDB, block, parent *types.Block) error { +func (sm *BlockProcessor) AccumelateRewards(statedb *state.StateDB, block, parent *types.Block) error { reward := new(big.Int).Set(BlockReward) knownUncles := set.New() @@ -338,7 +338,7 @@ func (sm *BlockManager) AccumelateRewards(statedb *state.StateDB, block, parent return nil } -func (sm *BlockManager) GetMessages(block *types.Block) (messages []*state.Message, err error) { +func (sm *BlockProcessor) GetMessages(block *types.Block) (messages []*state.Message, err error) { if !sm.bc.HasBlock(block.Header().ParentHash) { return nil, ParentError(block.Header().ParentHash) } diff --git a/core/filter.go b/core/filter.go index 7c34748df4..29be8841c9 100644 --- a/core/filter.go +++ b/core/filter.go @@ -104,7 +104,7 @@ func (self *Filter) Find() []*state.Message { // current parameters if self.bloomFilter(block) { // Get the messages of the block - msgs, err := self.eth.BlockManager().GetMessages(block) + msgs, err := self.eth.BlockProcessor().GetMessages(block) if err != nil { chainlogger.Warnln("err: filter get messages ", err) diff --git a/eth/backend.go b/eth/backend.go index bf6c912826..db8e8e029e 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -52,11 +52,11 @@ type Ethereum struct { //*** SERVICES *** // State manager for processing new blocks and managing the over all states - blockManager *core.BlockManager - txPool *core.TxPool - chainManager *core.ChainManager - blockPool *BlockPool - whisper *whisper.Whisper + blockProcessor *core.BlockProcessor + txPool *core.TxPool + chainManager *core.ChainManager + blockPool *BlockPool + whisper *whisper.Whisper net *p2p.Server eventMux *event.TypeMux @@ -122,8 +122,8 @@ func New(config *Config) (*Ethereum, error) { eth.chainManager = core.NewChainManager(eth.EventMux()) eth.txPool = core.NewTxPool(eth.EventMux()) - eth.blockManager = core.NewBlockManager(eth.txPool, eth.chainManager, eth.EventMux()) - eth.chainManager.SetProcessor(eth.blockManager) + eth.blockProcessor = core.NewBlockProcessor(eth.txPool, eth.chainManager, eth.EventMux()) + eth.chainManager.SetProcessor(eth.blockProcessor) eth.whisper = whisper.New() hasBlock := eth.chainManager.HasBlock @@ -169,8 +169,8 @@ func (s *Ethereum) ChainManager() *core.ChainManager { return s.chainManager } -func (s *Ethereum) BlockManager() *core.BlockManager { - return s.blockManager +func (s *Ethereum) BlockProcessor() *core.BlockProcessor { + return s.blockProcessor } func (s *Ethereum) TxPool() *core.TxPool { diff --git a/eth/wallet.go b/eth/wallet.go new file mode 100644 index 0000000000..9ec8343094 --- /dev/null +++ b/eth/wallet.go @@ -0,0 +1,80 @@ +package eth + +/* +import ( + "crypto/ecdsa" + "errors" + "math/big" + + "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/core/types" +) + +type Account struct { + w *Wallet +} + +func (self *Account) Transact(to *Account, value, gas, price *big.Int, data []byte) error { + return self.w.transact(self, to, value, gas, price, data) +} + +func (self *Account) Address() []byte { + return nil +} + +func (self *Account) PrivateKey() *ecdsa.PrivateKey { + return nil +} + +type Wallet struct{} + +func NewWallet() *Wallet { + return &Wallet{} +} + +func (self *Wallet) GetAccount(i int) *Account { +} + +func (self *Wallet) transact(from, to *Account, value, gas, price *big.Int, data []byte) error { + if from.PrivateKey() == nil { + return errors.New("accounts is not owned (no private key available)") + } + + var createsContract bool + if to == nil { + createsContract = true + } + + var msg *types.Transaction + if contractCreation { + msg = types.NewContractCreationTx(value, gas, price, data) + } else { + msg = types.NewTransactionMessage(to.Address(), value, gas, price, data) + } + + state := self.chainManager.TransState() + nonce := state.GetNonce(key.Address()) + + msg.SetNonce(nonce) + msg.SignECDSA(from.PriateKey()) + + // Do some pre processing for our "pre" events and hooks + block := self.chainManager.NewBlock(from.Address()) + coinbase := state.GetOrNewStateObject(from.Address()) + coinbase.SetGasPool(block.GasLimit()) + self.blockManager.ApplyTransactions(coinbase, state, block, types.Transactions{tx}, true) + + err := self.obj.TxPool().Add(tx) + if err != nil { + return nil, err + } + state.SetNonce(key.Address(), nonce+1) + + if contractCreation { + addr := core.AddressFromMessage(tx) + pipelogger.Infof("Contract addr %x\n", addr) + } + + return tx, nil +} +*/ diff --git a/miner/miner.go b/miner/miner.go index aefcadab80..949227d983 100644 --- a/miner/miner.go +++ b/miner/miner.go @@ -174,9 +174,9 @@ func (self *Miner) reset() { func (self *Miner) mine() { var ( - blockManager = self.eth.BlockManager() - chainMan = self.eth.ChainManager() - block = chainMan.NewBlock(self.Coinbase) + blockProcessor = self.eth.BlockProcessor() + chainMan = self.eth.ChainManager() + block = chainMan.NewBlock(self.Coinbase) ) // Apply uncles @@ -194,7 +194,7 @@ func (self *Miner) mine() { // Accumulate all valid transactions and apply them to the new state // Error may be ignored. It's not important during mining - receipts, txs, _, erroneous, err := blockManager.ApplyTransactions(coinbase, state, block, transactions, true) + receipts, txs, _, erroneous, err := blockProcessor.ApplyTransactions(coinbase, state, block, transactions, true) if err != nil { minerlogger.Debugln(err) } @@ -204,7 +204,7 @@ func (self *Miner) mine() { block.SetReceipts(receipts) // Accumulate the rewards included for this block - blockManager.AccumelateRewards(state, block, parent) + blockProcessor.AccumelateRewards(state, block, parent) state.Update(ethutil.Big0) block.SetRoot(state.Root()) diff --git a/xeth/pipe.go b/xeth/xeth.go similarity index 92% rename from xeth/pipe.go rename to xeth/xeth.go index 05cefd8ad2..a10ccfc8b5 100644 --- a/xeth/pipe.go +++ b/xeth/xeth.go @@ -20,19 +20,19 @@ type VmVars struct { } type XEth struct { - obj core.EthManager - blockManager *core.BlockManager - chainManager *core.ChainManager - world *World + obj core.EthManager + blockProcessor *core.BlockProcessor + chainManager *core.ChainManager + world *World Vm VmVars } func New(obj core.EthManager) *XEth { pipe := &XEth{ - obj: obj, - blockManager: obj.BlockManager(), - chainManager: obj.ChainManager(), + obj: obj, + blockProcessor: obj.BlockProcessor(), + chainManager: obj.ChainManager(), } pipe.world = NewWorld(pipe) @@ -141,7 +141,7 @@ func (self *XEth) Transact(key *crypto.KeyPair, to []byte, value, gas, price *et block := self.chainManager.NewBlock(key.Address()) coinbase := state.GetOrNewStateObject(key.Address()) coinbase.SetGasPool(block.GasLimit()) - self.blockManager.ApplyTransactions(coinbase, state, block, types.Transactions{tx}, true) + self.blockProcessor.ApplyTransactions(coinbase, state, block, types.Transactions{tx}, true) err := self.obj.TxPool().Add(tx) if err != nil { From b0854fbff5c3d588134f577918a39d08002235dc Mon Sep 17 00:00:00 2001 From: obscuren Date: Mon, 5 Jan 2015 11:22:02 +0100 Subject: [PATCH 074/132] BlockManager => BlockProcessor --- core/block_processor.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/block_processor.go b/core/block_processor.go index 40ff7cb407..83399f4728 100644 --- a/core/block_processor.go +++ b/core/block_processor.go @@ -73,7 +73,7 @@ func (sm *BlockProcessor) TransitionState(statedb *state.StateDB, parent, block coinbase := statedb.GetOrNewStateObject(block.Header().Coinbase) coinbase.SetGasPool(CalcGasLimit(parent, block)) - // Process the transactions on to current block + // Process the transactions on to parent state receipts, _, _, _, err = sm.ApplyTransactions(coinbase, statedb, block, block.Transactions(), false) if err != nil { return nil, err @@ -224,7 +224,7 @@ func (sm *BlockProcessor) ProcessWithParent(block, parent *types.Block) (td *big messages := state.Manifest().Messages state.Manifest().Reset() - chainlogger.Infof("Processed block #%d (%x...)\n", header.Number, block.Hash()[0:4]) + chainlogger.Infof("processed block #%d (%x...)\n", header.Number, block.Hash()[0:4]) sm.txpool.RemoveSet(block.Transactions()) From b907a5d76542789e8258c7957981a0ef65fe48d6 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Mon, 5 Jan 2015 13:30:58 +0100 Subject: [PATCH 075/132] cmd/rlpdump: new helper command --- cmd/rlpdump/main.go | 128 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 cmd/rlpdump/main.go diff --git a/cmd/rlpdump/main.go b/cmd/rlpdump/main.go new file mode 100644 index 0000000000..4fb53369af --- /dev/null +++ b/cmd/rlpdump/main.go @@ -0,0 +1,128 @@ +package main + +import ( + "bufio" + "bytes" + "encoding/hex" + "flag" + "fmt" + "io" + "os" + "strings" + + "github.com/ethereum/go-ethereum/rlp" +) + +var ( + hexMode = flag.String("hex", "", "dump given hex data") + noASCII = flag.Bool("noascii", false, "don't print ASCII strings readably") +) + +func init() { + flag.Usage = func() { + fmt.Fprintln(os.Stderr, "Usage:", os.Args[0], "[-noascii] [-hex ] [filename]") + flag.PrintDefaults() + fmt.Fprintln(os.Stderr, ` +Dumps RLP data from the given file in readable form. +If the filename is omitted, data is read from stdin.`) + } +} + +func main() { + flag.Parse() + + var r io.Reader + switch { + case *hexMode != "": + data, err := hex.DecodeString(*hexMode) + if err != nil { + die(err) + } + r = bytes.NewReader(data) + + case flag.NArg() == 0: + r = os.Stdin + + case flag.NArg() == 1: + fd, err := os.Open(flag.Arg(0)) + if err != nil { + die(err) + } + defer fd.Close() + r = bufio.NewReader(fd) + + default: + fmt.Fprintln(os.Stderr, "Error: too many arguments") + flag.Usage() + os.Exit(2) + } + + s := rlp.NewStream(r) + for { + if err := dump(s, 0); err != nil { + if err != io.EOF { + die(err) + } + break + } + fmt.Println() + } +} + +func dump(s *rlp.Stream, depth int) error { + kind, size, err := s.Kind() + if err != nil { + return err + } + switch kind { + case rlp.Byte, rlp.String: + str, err := s.Bytes() + if err != nil { + return err + } + if len(str) == 0 || !*noASCII && isASCII(str) { + fmt.Printf("%s%q", ws(depth), str) + } else { + fmt.Printf("%s%x", ws(depth), str) + } + case rlp.List: + s.List() + defer s.ListEnd() + if size == 0 { + fmt.Printf(ws(depth) + "[]") + return nil + } else { + fmt.Println(ws(depth) + "[") + for i := 0; ; i++ { + if i > 0 { + fmt.Print(",\n") + } + if err := dump(s, depth+1); err == rlp.EOL { + break + } else if err != nil { + return err + } + } + fmt.Print(ws(depth) + "]") + } + } + return nil +} + +func isASCII(b []byte) bool { + for _, c := range b { + if c < 32 || c > 126 { + return false + } + } + return true +} + +func ws(n int) string { + return strings.Repeat(" ", n) +} + +func die(args ...interface{}) { + fmt.Fprintln(os.Stderr, args...) + os.Exit(1) +} From 6abf8ef78f1474fdeb7a6a6ce084bf994cc055f2 Mon Sep 17 00:00:00 2001 From: obscuren Date: Mon, 5 Jan 2015 17:10:42 +0100 Subject: [PATCH 076/132] Merge --- cmd/ethereum/flags.go | 6 +- cmd/ethereum/main.go | 16 +- core/transaction_pool.go | 54 +- core/types/block.go | 79 +- eth/backend.go | 47 +- eth/block_pool.go | 1417 +++++++++++++++++------------------ eth/block_pool_test.go | 930 ++++++++++++++++++++--- eth/error.go | 11 +- eth/protocol.go | 100 +-- eth/protocol_test.go | 336 +++++---- eth/test/README.md | 27 + eth/test/bootstrap.sh | 9 + eth/test/chains/00.chain | Bin 0 -> 9726 bytes eth/test/chains/01.chain | Bin 0 -> 13881 bytes eth/test/chains/02.chain | Bin 0 -> 14989 bytes eth/test/chains/03.chain | Bin 0 -> 18590 bytes eth/test/chains/04.chain | Bin 0 -> 20529 bytes eth/test/mine.sh | 20 + eth/test/run.sh | 53 ++ eth/test/tests/00.chain | 1 + eth/test/tests/00.sh | 13 + eth/test/tests/01.chain | 1 + eth/test/tests/01.sh | 18 + eth/test/tests/02.chain | 1 + eth/test/tests/02.sh | 19 + eth/test/tests/03.chain | 1 + eth/test/tests/03.sh | 14 + eth/test/tests/04.sh | 17 + eth/test/tests/05.sh | 20 + eth/test/tests/common.js | 9 + eth/test/tests/common.sh | 20 + p2p/client_identity_test.go | 2 +- p2p/message.go | 10 +- p2p/peer.go | 28 +- p2p/peer_test.go | 14 +- p2p/protocol.go | 54 +- p2p/protocol_test.go | 82 +- p2p/server.go | 6 +- p2p/server_test.go | 2 +- rlp/decode.go | 57 +- rlp/decode_test.go | 38 +- 41 files changed, 2329 insertions(+), 1203 deletions(-) create mode 100644 eth/test/README.md create mode 100644 eth/test/bootstrap.sh create mode 100755 eth/test/chains/00.chain create mode 100755 eth/test/chains/01.chain create mode 100755 eth/test/chains/02.chain create mode 100755 eth/test/chains/03.chain create mode 100755 eth/test/chains/04.chain create mode 100644 eth/test/mine.sh create mode 100644 eth/test/run.sh create mode 120000 eth/test/tests/00.chain create mode 100644 eth/test/tests/00.sh create mode 120000 eth/test/tests/01.chain create mode 100644 eth/test/tests/01.sh create mode 120000 eth/test/tests/02.chain create mode 100644 eth/test/tests/02.sh create mode 120000 eth/test/tests/03.chain create mode 100644 eth/test/tests/03.sh create mode 100644 eth/test/tests/04.sh create mode 100644 eth/test/tests/05.sh create mode 100644 eth/test/tests/common.js create mode 100644 eth/test/tests/common.sh diff --git a/cmd/ethereum/flags.go b/cmd/ethereum/flags.go index d27b739c36..275fcf248c 100644 --- a/cmd/ethereum/flags.go +++ b/cmd/ethereum/flags.go @@ -59,6 +59,8 @@ var ( DumpNumber int VmType int ImportChain string + SHH bool + Dial bool ) // flags specific to cli client @@ -94,6 +96,8 @@ func Init() { flag.BoolVar(&StartWebSockets, "ws", false, "start websocket server") flag.BoolVar(&NonInteractive, "y", false, "non-interactive mode (say yes to confirmations)") flag.BoolVar(&UseSeed, "seed", true, "seed peers") + flag.BoolVar(&SHH, "shh", true, "whisper protocol (on)") + flag.BoolVar(&Dial, "dial", true, "dial out connections (on)") flag.BoolVar(&GenAddr, "genaddr", false, "create a new priv/pub key") flag.StringVar(&SecretFile, "import", "", "imports the file given (hex or mnemonic formats)") flag.StringVar(&ExportDir, "export", "", "exports the session keyring to files in the directory given") @@ -105,7 +109,7 @@ func Init() { flag.BoolVar(&DiffTool, "difftool", false, "creates output for diff'ing. Sets LogLevel=0") flag.StringVar(&DiffType, "diff", "all", "sets the level of diff output [vm, all]. Has no effect if difftool=false") flag.BoolVar(&ShowGenesis, "genesis", false, "Dump the genesis block") - flag.StringVar(&ImportChain, "chain", "", "Imports fiven chain") + flag.StringVar(&ImportChain, "chain", "", "Imports given chain") flag.BoolVar(&Dump, "dump", false, "output the ethereum state in JSON format. Sub args [number, hash]") flag.StringVar(&DumpHash, "hash", "", "specify arg in hex") diff --git a/cmd/ethereum/main.go b/cmd/ethereum/main.go index b238522820..8b83bbd376 100644 --- a/cmd/ethereum/main.go +++ b/cmd/ethereum/main.go @@ -64,10 +64,14 @@ func main() { NATType: PMPGateway, PMPGateway: PMPGateway, KeyRing: KeyRing, + Shh: SHH, + Dial: Dial, }) + if err != nil { clilogger.Fatalln(err) } + utils.KeyTasks(ethereum.KeyManager(), KeyRing, GenAddr, SecretFile, ExportDir, NonInteractive) if Dump { @@ -112,13 +116,6 @@ func main() { return } - // better reworked as cases - if StartJsConsole { - InitJsConsole(ethereum) - } else if len(InputFile) > 0 { - ExecJsFile(ethereum, InputFile) - } - if StartRpc { utils.StartRpc(ethereum, RpcPort) } @@ -129,6 +126,11 @@ func main() { utils.StartEthereum(ethereum, UseSeed) + if StartJsConsole { + InitJsConsole(ethereum) + } else if len(InputFile) > 0 { + ExecJsFile(ethereum, InputFile) + } // this blocks the thread ethereum.WaitForShutdown() } diff --git a/core/transaction_pool.go b/core/transaction_pool.go index fa284e52d0..ff6c21aa97 100644 --- a/core/transaction_pool.go +++ b/core/transaction_pool.go @@ -7,7 +7,6 @@ import ( "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/logger" - "gopkg.in/fatih/set.v0" ) var txplogger = logger.NewLogger("TXP") @@ -38,7 +37,7 @@ type TxPool struct { quit chan bool // The actual pool //pool *list.List - pool *set.Set + txs map[string]*types.Transaction SecondaryProcessor TxProcessor @@ -49,21 +48,19 @@ type TxPool struct { func NewTxPool(eventMux *event.TypeMux) *TxPool { return &TxPool{ - pool: set.New(), + txs: make(map[string]*types.Transaction), queueChan: make(chan *types.Transaction, txPoolQueueSize), quit: make(chan bool), eventMux: eventMux, } } -func (pool *TxPool) addTransaction(tx *types.Transaction) { - pool.pool.Add(tx) - - // Broadcast the transaction to the rest of the peers - pool.eventMux.Post(TxPreEvent{tx}) -} - func (pool *TxPool) ValidateTransaction(tx *types.Transaction) error { + hash := tx.Hash() + if pool.txs[string(hash)] != nil { + return fmt.Errorf("Known transaction (%x)", hash[0:4]) + } + if len(tx.To()) != 0 && len(tx.To()) != 20 { return fmt.Errorf("Invalid recipient. len = %d", len(tx.To())) } @@ -95,18 +92,17 @@ func (pool *TxPool) ValidateTransaction(tx *types.Transaction) error { return nil } -func (self *TxPool) Add(tx *types.Transaction) error { - hash := tx.Hash() - if self.pool.Has(tx) { - return fmt.Errorf("Known transaction (%x)", hash[0:4]) - } +func (self *TxPool) addTx(tx *types.Transaction) { + self.txs[string(tx.Hash())] = tx +} +func (self *TxPool) Add(tx *types.Transaction) error { err := self.ValidateTransaction(tx) if err != nil { return err } - self.addTransaction(tx) + self.addTx(tx) var to string if len(tx.To()) > 0 { @@ -124,7 +120,7 @@ func (self *TxPool) Add(tx *types.Transaction) error { } func (self *TxPool) Size() int { - return self.pool.Size() + return len(self.txs) } func (self *TxPool) AddTransactions(txs []*types.Transaction) { @@ -137,43 +133,39 @@ func (self *TxPool) AddTransactions(txs []*types.Transaction) { } } -func (pool *TxPool) GetTransactions() []*types.Transaction { - txList := make([]*types.Transaction, pool.Size()) +func (self *TxPool) GetTransactions() (txs types.Transactions) { + txs = make(types.Transactions, self.Size()) i := 0 - pool.pool.Each(func(v interface{}) bool { - txList[i] = v.(*types.Transaction) + for _, tx := range self.txs { + txs[i] = tx i++ + } - return true - }) - - return txList + return } func (pool *TxPool) RemoveInvalid(query StateQuery) { var removedTxs types.Transactions - pool.pool.Each(func(v interface{}) bool { - tx := v.(*types.Transaction) + for _, tx := range pool.txs { sender := query.GetAccount(tx.From()) err := pool.ValidateTransaction(tx) if err != nil || sender.Nonce >= tx.Nonce() { removedTxs = append(removedTxs, tx) } + } - return true - }) pool.RemoveSet(removedTxs) } func (self *TxPool) RemoveSet(txs types.Transactions) { for _, tx := range txs { - self.pool.Remove(tx) + delete(self.txs, string(tx.Hash())) } } func (pool *TxPool) Flush() []*types.Transaction { txList := pool.GetTransactions() - pool.pool.Clear() + pool.txs = make(map[string]*types.Transaction) return txList } diff --git a/core/types/block.go b/core/types/block.go index b59044bfce..7e19d003f5 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -67,10 +67,13 @@ func (self *Header) HashNoNonce() []byte { } type Block struct { - header *Header - uncles []*Header - transactions Transactions - Td *big.Int + // Preset Hash for mock + HeaderHash []byte + ParentHeaderHash []byte + header *Header + uncles []*Header + transactions Transactions + Td *big.Int receipts Receipts Reward *big.Int @@ -99,41 +102,19 @@ func NewBlockWithHeader(header *Header) *Block { } func (self *Block) DecodeRLP(s *rlp.Stream) error { - if _, err := s.List(); err != nil { + var extblock struct { + Header *Header + Txs []*Transaction + Uncles []*Header + TD *big.Int // optional + } + if err := s.Decode(&extblock); err != nil { return err } - - var header Header - if err := s.Decode(&header); err != nil { - return err - } - - var transactions []*Transaction - if err := s.Decode(&transactions); err != nil { - return err - } - - var uncleHeaders []*Header - if err := s.Decode(&uncleHeaders); err != nil { - return err - } - - var tdBytes []byte - if err := s.Decode(&tdBytes); err != nil { - // If this block comes from the network that's fine. If loaded from disk it should be there - // Blocks don't store their Td when propagated over the network - } else { - self.Td = ethutil.BigD(tdBytes) - } - - if err := s.ListEnd(); err != nil { - return err - } - - self.header = &header - self.uncles = uncleHeaders - self.transactions = transactions - + self.header = extblock.Header + self.uncles = extblock.Uncles + self.transactions = extblock.Txs + self.Td = extblock.TD return nil } @@ -189,23 +170,35 @@ func (self *Block) RlpDataForStorage() interface{} { // Header accessors (add as you need them) func (self *Block) Number() *big.Int { return self.header.Number } func (self *Block) NumberU64() uint64 { return self.header.Number.Uint64() } -func (self *Block) ParentHash() []byte { return self.header.ParentHash } func (self *Block) Bloom() []byte { return self.header.Bloom } func (self *Block) Coinbase() []byte { return self.header.Coinbase } func (self *Block) Time() int64 { return int64(self.header.Time) } func (self *Block) GasLimit() *big.Int { return self.header.GasLimit } func (self *Block) GasUsed() *big.Int { return self.header.GasUsed } -func (self *Block) Hash() []byte { return self.header.Hash() } func (self *Block) Trie() *ptrie.Trie { return ptrie.New(self.header.Root, ethutil.Config.Db) } +func (self *Block) SetRoot(root []byte) { self.header.Root = root } func (self *Block) State() *state.StateDB { return state.New(self.Trie()) } func (self *Block) Size() ethutil.StorageSize { return ethutil.StorageSize(len(ethutil.Encode(self))) } -func (self *Block) SetRoot(root []byte) { self.header.Root = root } -// Implement block.Pow +// Implement pow.Block func (self *Block) Difficulty() *big.Int { return self.header.Difficulty } func (self *Block) N() []byte { return self.header.Nonce } -func (self *Block) HashNoNonce() []byte { - return crypto.Sha3(ethutil.Encode(self.header.rlpData(false))) +func (self *Block) HashNoNonce() []byte { return self.header.HashNoNonce() } + +func (self *Block) Hash() []byte { + if self.HeaderHash != nil { + return self.HeaderHash + } else { + return self.header.Hash() + } +} + +func (self *Block) ParentHash() []byte { + if self.ParentHeaderHash != nil { + return self.ParentHeaderHash + } else { + return self.header.ParentHash + } } func (self *Block) String() string { diff --git a/eth/backend.go b/eth/backend.go index db8e8e029e..065a4f7d84 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -36,6 +36,9 @@ type Config struct { NATType string PMPGateway string + Shh bool + Dial bool + KeyManager *crypto.KeyManager } @@ -130,11 +133,13 @@ func New(config *Config) (*Ethereum, error) { insertChain := eth.chainManager.InsertChain eth.blockPool = NewBlockPool(hasBlock, insertChain, ezp.Verify) - // Start services - eth.txPool.Start() - ethProto := EthProtocol(eth.txPool, eth.chainManager, eth.blockPool) - protocols := []p2p.Protocol{ethProto, eth.whisper.Protocol()} + protocols := []p2p.Protocol{ethProto} + + if config.Shh { + eth.whisper = whisper.New() + protocols = append(protocols, eth.whisper.Protocol()) + } nat, err := p2p.ParseNAT(config.NATType, config.PMPGateway) if err != nil { @@ -142,12 +147,16 @@ func New(config *Config) (*Ethereum, error) { } eth.net = &p2p.Server{ - Identity: clientId, - MaxPeers: config.MaxPeers, - Protocols: protocols, - ListenAddr: ":" + config.Port, - Blacklist: eth.blacklist, - NAT: nat, + Identity: clientId, + MaxPeers: config.MaxPeers, + Protocols: protocols, + Blacklist: eth.blacklist, + NAT: nat, + NoDial: !config.Dial, + } + + if len(config.Port) > 0 { + eth.net.ListenAddr = ":" + config.Port } return eth, nil @@ -219,8 +228,14 @@ func (s *Ethereum) Start(seed bool) error { if err != nil { return err } + + // Start services + s.txPool.Start() s.blockPool.Start() - s.whisper.Start() + + if s.whisper != nil { + s.whisper.Start() + } // broadcast transactions s.txSub = s.eventMux.Subscribe(core.TxPreEvent{}) @@ -268,7 +283,9 @@ func (s *Ethereum) Stop() { s.txPool.Stop() s.eventMux.Stop() s.blockPool.Stop() - s.whisper.Stop() + if s.whisper != nil { + s.whisper.Stop() + } logger.Infoln("Server stopped") close(s.shutdownChan) @@ -285,16 +302,16 @@ func (self *Ethereum) txBroadcastLoop() { // automatically stops if unsubscribe for obj := range self.txSub.Chan() { event := obj.(core.TxPreEvent) - self.net.Broadcast("eth", TxMsg, []interface{}{event.Tx.RlpData()}) + self.net.Broadcast("eth", TxMsg, event.Tx.RlpData()) } } func (self *Ethereum) blockBroadcastLoop() { // automatically stops if unsubscribe - for obj := range self.txSub.Chan() { + for obj := range self.blockSub.Chan() { switch ev := obj.(type) { case core.NewMinedBlockEvent: - self.net.Broadcast("eth", NewBlockMsg, ev.Block.RlpData()) + self.net.Broadcast("eth", NewBlockMsg, ev.Block.RlpData(), ev.Block.Td) } } } diff --git a/eth/block_pool.go b/eth/block_pool.go index 7cfbc63f86..519c9fc13c 100644 --- a/eth/block_pool.go +++ b/eth/block_pool.go @@ -1,6 +1,7 @@ package eth import ( + "fmt" "math" "math/big" "math/rand" @@ -19,37 +20,45 @@ var poolLogger = ethlogger.NewLogger("Blockpool") const ( blockHashesBatchSize = 256 blockBatchSize = 64 - blocksRequestInterval = 10 // seconds + blocksRequestInterval = 500 // ms blocksRequestRepetition = 1 - blockHashesRequestInterval = 10 // seconds - blocksRequestMaxIdleRounds = 10 + blockHashesRequestInterval = 500 // ms + blocksRequestMaxIdleRounds = 100 cacheTimeout = 3 // minutes blockTimeout = 5 // minutes ) type poolNode struct { - lock sync.RWMutex - hash []byte - block *types.Block - child *poolNode - parent *poolNode - section *section - knownParent bool - peer string - source string - complete bool + lock sync.RWMutex + hash []byte + td *big.Int + block *types.Block + parent *poolNode + peer string + blockBy string +} + +type poolEntry struct { + node *poolNode + section *section + index int } type BlockPool struct { - lock sync.RWMutex - pool map[string]*poolNode + lock sync.RWMutex + chainLock sync.RWMutex + + pool map[string]*poolEntry peersLock sync.RWMutex peers map[string]*peerInfo peer *peerInfo quit chan bool + purgeC chan bool + flushC chan bool wg sync.WaitGroup + procWg sync.WaitGroup running bool // the minimal interface with blockchain @@ -70,8 +79,23 @@ type peerInfo struct { peerError func(int, string, ...interface{}) sections map[string]*section - roots []*poolNode - quitC chan bool + + quitC chan bool +} + +// structure to store long range links on chain to skip along +type section struct { + lock sync.RWMutex + parent *section + child *section + top *poolNode + bottom *poolNode + nodes []*poolNode + controlC chan *peerInfo + suicideC chan bool + blockChainC chan bool + forkC chan chan bool + offC chan bool } func NewBlockPool(hasBlock func(hash []byte) bool, insertChain func(types.Blocks) error, verifyPoW func(pow.Block) bool, @@ -92,7 +116,9 @@ func (self *BlockPool) Start() { } self.running = true self.quit = make(chan bool) - self.pool = make(map[string]*poolNode) + self.flushC = make(chan bool) + self.pool = make(map[string]*poolEntry) + self.lock.Unlock() self.peersLock.Lock() @@ -110,50 +136,116 @@ func (self *BlockPool) Stop() { return } self.running = false + self.lock.Unlock() - poolLogger.Infoln("Stopping") + poolLogger.Infoln("Stopping...") close(self.quit) - self.lock.Lock() + self.wg.Wait() + self.peersLock.Lock() self.peers = nil - self.pool = nil self.peer = nil - self.wg.Wait() - self.lock.Unlock() self.peersLock.Unlock() + + self.lock.Lock() + self.pool = nil + self.lock.Unlock() + + poolLogger.Infoln("Stopped") +} + +func (self *BlockPool) Purge() { + self.lock.Lock() + if !self.running { + self.lock.Unlock() + return + } + self.lock.Unlock() + + poolLogger.Infoln("Purging...") + + close(self.purgeC) + self.wg.Wait() + + self.purgeC = make(chan bool) + poolLogger.Infoln("Stopped") } +func (self *BlockPool) Wait(t time.Duration) { + self.lock.Lock() + if !self.running { + self.lock.Unlock() + return + } + self.lock.Unlock() + + poolLogger.Infoln("Waiting for processes to complete...") + close(self.flushC) + w := make(chan bool) + go func() { + self.procWg.Wait() + close(w) + }() + + select { + case <-w: + poolLogger.Infoln("Processes complete") + case <-time.After(t): + poolLogger.Warnf("Timeout") + } + self.flushC = make(chan bool) +} + // AddPeer is called by the eth protocol instance running on the peer after // the status message has been received with total difficulty and current block hash // AddPeer can only be used once, RemovePeer needs to be called when the peer disconnects func (self *BlockPool) AddPeer(td *big.Int, currentBlock []byte, peerId string, requestBlockHashes func([]byte) error, requestBlocks func([][]byte) error, peerError func(int, string, ...interface{})) bool { + self.peersLock.Lock() defer self.peersLock.Unlock() - if self.peers[peerId] != nil { - panic("peer already added") + peer, ok := self.peers[peerId] + if ok { + poolLogger.Debugf("Update peer %v with td %v and current block %x", peerId, td, currentBlock[:4]) + peer.td = td + peer.currentBlock = currentBlock + } else { + peer = &peerInfo{ + td: td, + currentBlock: currentBlock, + id: peerId, //peer.Identity().Pubkey() + requestBlockHashes: requestBlockHashes, + requestBlocks: requestBlocks, + peerError: peerError, + sections: make(map[string]*section), + } + self.peers[peerId] = peer + poolLogger.Debugf("add new peer %v with td %v and current block %x", peerId, td, currentBlock[:4]) } - peer := &peerInfo{ - td: td, - currentBlock: currentBlock, - id: peerId, //peer.Identity().Pubkey() - requestBlockHashes: requestBlockHashes, - requestBlocks: requestBlocks, - peerError: peerError, + // check peer current head + if self.hasBlock(currentBlock) { + // peer not ahead + return false } - self.peers[peerId] = peer - poolLogger.Debugf("add new peer %v with td %v", peerId, td) + + if self.peer == peer { + // new block update + // peer is already active best peer, request hashes + poolLogger.Debugf("[%s] already the best peer. request hashes from %s", peerId, name(currentBlock)) + peer.requestBlockHashes(currentBlock) + return true + } + currentTD := ethutil.Big0 if self.peer != nil { currentTD = self.peer.td } if td.Cmp(currentTD) > 0 { - self.peer.stop(peer) - peer.start(self.peer) - poolLogger.Debugf("peer %v promoted to best peer", peerId) + poolLogger.Debugf("peer %v promoted best peer", peerId) + self.switchPeer(self.peer, peer) self.peer = peer return true } @@ -164,15 +256,15 @@ func (self *BlockPool) AddPeer(td *big.Int, currentBlock []byte, peerId string, func (self *BlockPool) RemovePeer(peerId string) { self.peersLock.Lock() defer self.peersLock.Unlock() - peer := self.peers[peerId] - if peer == nil { + peer, ok := self.peers[peerId] + if !ok { return } - self.peers[peerId] = nil - poolLogger.Debugf("remove peer %v", peerId[0:4]) + delete(self.peers, peerId) + poolLogger.Debugf("remove peer %v", peerId) // if current best peer is removed, need find a better one - if self.peer != nil && peerId == self.peer.id { + if self.peer == peer { var newPeer *peerInfo max := ethutil.Big0 // peer with the highest self-acclaimed TD is chosen @@ -182,12 +274,12 @@ func (self *BlockPool) RemovePeer(peerId string) { newPeer = info } } - self.peer.stop(peer) - peer.start(self.peer) + self.peer = newPeer + self.switchPeer(peer, newPeer) if newPeer != nil { - poolLogger.Debugf("peer %v with td %v promoted to best peer", newPeer.id[0:4], newPeer.td) + poolLogger.Debugf("peer %v with td %v promoted to best peer", newPeer.id, newPeer.td) } else { - poolLogger.Warnln("no peers left") + poolLogger.Warnln("no peers") } } } @@ -200,97 +292,132 @@ func (self *BlockPool) RemovePeer(peerId string) { // this function needs to run asynchronously for one peer since the message is discarded??? func (self *BlockPool) AddBlockHashes(next func() ([]byte, bool), peerId string) { - // check if this peer is the best + // register with peer manager loop + peer, best := self.getPeer(peerId) if !best { return } // peer is still the best + poolLogger.Debugf("adding hashes for best peer %s", peerId) - var child *poolNode - var depth int + var size, n int + var hash []byte + var ok bool + var section, child, parent *section + var entry *poolEntry + var nodes []*poolNode +LOOP: // iterate using next (rlp stream lazy decoder) feeding hashesC - self.wg.Add(1) - go func() { - for { - select { - case <-self.quit: - return - case <-peer.quitC: - // if the peer is demoted, no more hashes taken - break - default: - hash, ok := next() - if !ok { - // message consumed chain skeleton built - break + for hash, ok = next(); ok; hash, ok = next() { + n++ + select { + case <-self.quit: + return + case <-peer.quitC: + // if the peer is demoted, no more hashes taken + peer = nil + break LOOP + default: + } + if self.hasBlock(hash) { + // check if known block connecting the downloaded chain to our blockchain + poolLogger.DebugDetailf("[%s] known block", name(hash)) + // mark child as absolute pool root with parent known to blockchain + if section != nil { + self.connectToBlockChain(section) + } else { + if child != nil { + self.connectToBlockChain(child) } - // check if known block connecting the downloaded chain to our blockchain - if self.hasBlock(hash) { - poolLogger.Infof("known block (%x...)\n", hash[0:4]) - if child != nil { - child.Lock() - // mark child as absolute pool root with parent known to blockchain - child.knownParent = true - child.Unlock() - } - break - } - // - var parent *poolNode - // look up node in pool - parent = self.get(hash) - if parent != nil { - // reached a known chain in the pool - // request blocks on the newly added part of the chain - if child != nil { - self.link(parent, child) - - // activate the current chain - self.activateChain(parent, peer, true) - poolLogger.Debugf("potential chain of %v blocks added, reached blockpool, activate chain", depth) - break - } - // if this is the first hash, we expect to find it - parent.RLock() - grandParent := parent.parent - parent.RUnlock() - if grandParent != nil { - // activate the current chain - self.activateChain(parent, peer, true) - poolLogger.Debugf("block hash found, activate chain") - break - } - // the first node is the root of a chain in the pool, rejoice and continue - } - // if node does not exist, create it and index in the pool - section := §ion{} - if child == nil { - section.top = parent - } - parent = &poolNode{ - hash: hash, - child: child, - section: section, - peer: peerId, - } - self.set(hash, parent) - poolLogger.Debugf("create potential block for %x...", hash[0:4]) - - depth++ - child = parent } + break LOOP } - if child != nil { - poolLogger.Debugf("chain of %v hashes added", depth) - // start a processSection on the last node, but switch off asking - // hashes and blocks until next peer confirms this chain - section := self.processSection(child) - peer.addSection(child.hash, section) - section.start() + // look up node in pool + entry = self.get(hash) + if entry != nil { + // reached a known chain in the pool + if entry.node == entry.section.bottom && n == 1 { + // the first block hash received is an orphan in the pool, so rejoice and continue + child = entry.section + continue LOOP + } + poolLogger.DebugDetailf("[%s] reached blockpool chain", name(hash)) + parent = entry.section + break LOOP } - }() + // if node for block hash does not exist, create it and index in the pool + node := &poolNode{ + hash: hash, + peer: peerId, + } + if size == 0 { + section = newSection() + } + nodes = append(nodes, node) + size++ + } //for + + self.chainLock.Lock() + + poolLogger.DebugDetailf("added %v hashes sent by %s", n, peerId) + + if parent != nil && entry != nil && entry.node != parent.top { + poolLogger.DebugDetailf("[%s] split section at fork", sectionName(parent)) + parent.controlC <- nil + waiter := make(chan bool) + parent.forkC <- waiter + chain := parent.nodes + parent.nodes = chain[entry.index:] + parent.top = parent.nodes[0] + orphan := newSection() + self.link(orphan, parent.child) + self.processSection(orphan, chain[0:entry.index]) + orphan.controlC <- nil + close(waiter) + } + + if size > 0 { + self.processSection(section, nodes) + poolLogger.DebugDetailf("[%s]->[%s](%v)->[%s] new chain section", sectionName(parent), sectionName(section), size, sectionName(child)) + self.link(parent, section) + self.link(section, child) + } else { + poolLogger.DebugDetailf("[%s]->[%s] connecting known sections", sectionName(parent), sectionName(child)) + self.link(parent, child) + } + + self.chainLock.Unlock() + + if parent != nil && peer != nil { + self.activateChain(parent, peer) + poolLogger.Debugf("[%s] activate parent section [%s]", name(parent.top.hash), sectionName(parent)) + } + + if section != nil { + peer.addSection(section.top.hash, section) + section.controlC <- peer + poolLogger.Debugf("[%s] activate new section", sectionName(section)) + } +} + +func name(hash []byte) (name string) { + if hash == nil { + name = "" + } else { + name = fmt.Sprintf("%x", hash[:4]) + } + return +} + +func sectionName(section *section) (name string) { + if section == nil { + name = "" + } else { + name = fmt.Sprintf("%x-%x", section.bottom.hash[:4], section.top.hash[:4]) + } + return } // AddBlock is the entry point for the eth protocol when blockmsg is received upon requests @@ -299,67 +426,114 @@ func (self *BlockPool) AddBlockHashes(next func() ([]byte, bool), peerId string) // only the first PoW-valid block for a hash is considered legit func (self *BlockPool) AddBlock(block *types.Block, peerId string) { hash := block.Hash() - node := self.get(hash) - node.RLock() - b := node.block - node.RUnlock() - if b != nil { + if self.hasBlock(hash) { + poolLogger.DebugDetailf("block [%s] already known", name(hash)) return } - if node == nil && !self.hasBlock(hash) { + entry := self.get(hash) + if entry == nil { + poolLogger.Warnf("unrequested block [%x] by peer %s", hash, peerId) self.peerError(peerId, ErrUnrequestedBlock, "%x", hash) return } + + node := entry.node + node.lock.Lock() + defer node.lock.Unlock() + + // check if block already present + if node.block != nil { + poolLogger.DebugDetailf("block [%x] already sent by %s", name(hash), node.blockBy) + return + } + // validate block for PoW if !self.verifyPoW(block) { + poolLogger.Warnf("invalid pow on block [%x] by peer %s", hash, peerId) self.peerError(peerId, ErrInvalidPoW, "%x", hash) + return } - node.Lock() + + poolLogger.Debugf("added block [%s] sent by peer %s", name(hash), peerId) node.block = block - node.source = peerId - node.Unlock() + node.blockBy = peerId + } -// iterates down a known poolchain and activates fetching processes -// on each chain section for the peer -// stops if the peer is demoted -// registers last section root as root for the peer (in case peer is promoted a second time, to remember) -func (self *BlockPool) activateChain(node *poolNode, peer *peerInfo, on bool) { - self.wg.Add(1) - go func() { - for { - node.sectionRLock() - bottom := node.section.bottom - if bottom == nil { // the chain section is being created or killed - break - } - // register this section with the peer - if peer != nil { - peer.addSection(bottom.hash, bottom.section) - if on { - bottom.section.start() - } else { - bottom.section.start() - } - } - if bottom.parent == nil { - node = bottom - break - } - // if peer demoted stop activation - select { - case <-peer.quitC: - break - default: - } +func (self *BlockPool) connectToBlockChain(section *section) { + select { + case <-section.offC: + self.addSectionToBlockChain(section) + case <-section.blockChainC: + default: + close(section.blockChainC) + } +} - node = bottom.parent - bottom.sectionRUnlock() +func (self *BlockPool) addSectionToBlockChain(section *section) (rest int, err error) { + + var blocks types.Blocks + var node *poolNode + var keys []string + rest = len(section.nodes) + for rest > 0 { + rest-- + node = section.nodes[rest] + node.lock.RLock() + block := node.block + node.lock.RUnlock() + if block == nil { + break } - // remember root for this peer - peer.addRoot(node) - self.wg.Done() - }() + keys = append(keys, string(node.hash)) + blocks = append(blocks, block) + } + + self.lock.Lock() + for _, key := range keys { + delete(self.pool, key) + } + self.lock.Unlock() + + poolLogger.Infof("insert %v blocks into blockchain", len(blocks)) + err = self.insertChain(blocks) + if err != nil { + // TODO: not clear which peer we need to address + // peerError should dispatch to peer if still connected and disconnect + self.peerError(node.blockBy, ErrInvalidBlock, "%v", err) + poolLogger.Warnf("invalid block %x", node.hash) + poolLogger.Warnf("penalise peers %v (hash), %v (block)", node.peer, node.blockBy) + // penalise peer in node.blockBy + // self.disconnect() + } + return +} + +func (self *BlockPool) activateChain(section *section, peer *peerInfo) { + poolLogger.DebugDetailf("[%s] activate known chain for peer %s", sectionName(section), peer.id) + i := 0 +LOOP: + for section != nil { + // register this section with the peer and quit if registered + poolLogger.DebugDetailf("[%s] register section with peer %s", sectionName(section), peer.id) + if peer.addSection(section.top.hash, section) == section { + return + } + poolLogger.DebugDetailf("[%s] activate section process", sectionName(section)) + select { + case section.controlC <- peer: + case <-section.offC: + } + i++ + section = self.getParent(section) + select { + case <-peer.quitC: + break LOOP + case <-self.quit: + break LOOP + default: + } + } } // main worker thread on each section in the poolchain @@ -370,261 +544,315 @@ func (self *BlockPool) activateChain(node *poolNode, peer *peerInfo, on bool) { // - when turned off (if peer disconnects and new peer connects with alternative chain), no blockrequests are made but absolute expiry timer is ticking // - when turned back on it recursively calls itself on the root of the next chain section // - when exits, signals to -func (self *BlockPool) processSection(node *poolNode) *section { - // absolute time after which sub-chain is killed if not complete (some blocks are missing) - suicideTimer := time.After(blockTimeout * time.Minute) - var blocksRequestTimer, blockHashesRequestTimer <-chan time.Time - var nodeC, missingC, processC chan *poolNode - controlC := make(chan bool) - resetC := make(chan bool) - var hashes [][]byte - var i, total, missing, lastMissing, depth int - var blockHashesRequests, blocksRequests int - var idle int - var init, alarm, done, same, running, once bool - orignode := node - hash := node.hash +func (self *BlockPool) processSection(section *section, nodes []*poolNode) { - node.sectionLock() - defer node.sectionUnlock() - section := §ion{controlC: controlC, resetC: resetC} - node.section = section + for i, node := range nodes { + entry := &poolEntry{node: node, section: section, index: i} + self.set(node.hash, entry) + } + section.bottom = nodes[len(nodes)-1] + section.top = nodes[0] + section.nodes = nodes + poolLogger.DebugDetailf("[%s] setup section process", sectionName(section)) + + self.wg.Add(1) go func() { - self.wg.Add(1) - for { - node.sectionRLock() - controlC = node.section.controlC - node.sectionRUnlock() - if init { - // missing blocks read from nodeC - // initialized section - if depth == 0 { - break + // absolute time after which sub-chain is killed if not complete (some blocks are missing) + suicideTimer := time.After(blockTimeout * time.Minute) + + var peer, newPeer *peerInfo + + var blocksRequestTimer, blockHashesRequestTimer <-chan time.Time + var blocksRequestTime, blockHashesRequestTime bool + var blocksRequests, blockHashesRequests int + var blocksRequestsComplete, blockHashesRequestsComplete bool + + // node channels for the section + var missingC, processC, offC chan *poolNode + // container for missing block hashes + var hashes [][]byte + + var i, missing, lastMissing, depth int + var idle int + var init, done, same, ready bool + var insertChain bool + var quitC chan bool + + var blockChainC = section.blockChainC + + LOOP: + for { + + if insertChain { + insertChain = false + rest, err := self.addSectionToBlockChain(section) + if err != nil { + close(section.suicideC) + continue LOOP } - // enable select case to read missing block when ready - processC = missingC - missingC = make(chan *poolNode, lastMissing) - nodeC = nil - // only do once - init = false - } else { - if !once { - missingC = nil - processC = nil - i = 0 - total = 0 - lastMissing = 0 + if rest == 0 { + blocksRequestsComplete = true + child := self.getChild(section) + if child != nil { + self.connectToBlockChain(child) + } } } - // went through all blocks in section - if i != 0 && i == lastMissing { - if len(hashes) > 0 { - // send block requests to peers - self.requestBlocks(blocksRequests, hashes) - } - blocksRequests++ - poolLogger.Debugf("[%x] block request attempt %v: missing %v/%v/%v", hash[0:4], blocksRequests, missing, total, depth) - if missing == lastMissing { - // idle round - if same { - // more than once - idle++ - // too many idle rounds - if idle > blocksRequestMaxIdleRounds { - poolLogger.Debugf("[%x] block requests had %v idle rounds (%v total attempts): missing %v/%v/%v\ngiving up...", hash[0:4], idle, blocksRequests, missing, total, depth) - self.killChain(node, nil) - break - } - } else { - idle = 0 - } - same = true + if blockHashesRequestsComplete && blocksRequestsComplete { + // not waiting for hashes any more + poolLogger.Debugf("[%s] section complete %v blocks retrieved (%v attempts), hash requests complete on root (%v attempts)", sectionName(section), depth, blocksRequests, blockHashesRequests) + break LOOP + } // otherwise suicide if no hashes coming + + if done { + // went through all blocks in section + if missing == 0 { + // no missing blocks + poolLogger.DebugDetailf("[%s] got all blocks. process complete (%v total blocksRequests): missing %v/%v/%v", sectionName(section), blocksRequests, missing, lastMissing, depth) + blocksRequestsComplete = true + blocksRequestTimer = nil + blocksRequestTime = false } else { - if missing == 0 { - // no missing nodes - poolLogger.Debugf("block request process complete on section %x... (%v total blocksRequests): missing %v/%v/%v", hash[0:4], blockHashesRequests, blocksRequests, missing, total, depth) - node.Lock() - orignode.complete = true - node.Unlock() - blocksRequestTimer = nil - if blockHashesRequestTimer == nil { - // not waiting for hashes any more - poolLogger.Debugf("hash request on root %x... successful (%v total attempts)\nquitting...", hash[0:4], blockHashesRequests) - break - } // otherwise suicide if no hashes coming + // some missing blocks + blocksRequests++ + if len(hashes) > 0 { + // send block requests to peers + self.requestBlocks(blocksRequests, hashes) + hashes = nil + } + if missing == lastMissing { + // idle round + if same { + // more than once + idle++ + // too many idle rounds + if idle >= blocksRequestMaxIdleRounds { + poolLogger.DebugDetailf("[%s] block requests had %v idle rounds (%v total attempts): missing %v/%v/%v\ngiving up...", sectionName(section), idle, blocksRequests, missing, lastMissing, depth) + close(section.suicideC) + } + } else { + idle = 0 + } + same = true + } else { + same = false } - same = false } lastMissing = missing - i = 0 - missing = 0 - // ready for next round - done = true - } - if done && alarm { - poolLogger.Debugf("start checking if new blocks arrived (attempt %v): missing %v/%v/%v", blocksRequests, missing, total, depth) - blocksRequestTimer = time.After(blocksRequestInterval * time.Second) - alarm = false + ready = true done = false - // processC supposed to be empty and never closed so just swap, no need to allocate - tempC := processC - processC = missingC - missingC = tempC + // save a new processC (blocks still missing) + offC = missingC + missingC = processC + // put processC offline + processC = nil } - select { - case <-self.quit: - break - case <-suicideTimer: - self.killChain(node, nil) - poolLogger.Warnf("[%x] timeout. (%v total attempts): missing %v/%v/%v", hash[0:4], blocksRequests, missing, total, depth) - break - case <-blocksRequestTimer: - alarm = true - case <-blockHashesRequestTimer: - orignode.RLock() - parent := orignode.parent - orignode.RUnlock() - if parent != nil { + // + + if ready && blocksRequestTime && !blocksRequestsComplete { + poolLogger.DebugDetailf("[%s] check if new blocks arrived (attempt %v): missing %v/%v/%v", sectionName(section), blocksRequests, missing, lastMissing, depth) + blocksRequestTimer = time.After(blocksRequestInterval * time.Millisecond) + blocksRequestTime = false + processC = offC + } + + if blockHashesRequestTime { + if self.getParent(section) != nil { // if not root of chain, switch off - poolLogger.Debugf("[%x] parent found, hash requests deactivated (after %v total attempts)\n", hash[0:4], blockHashesRequests) + poolLogger.DebugDetailf("[%s] parent found, hash requests deactivated (after %v total attempts)\n", sectionName(section), blockHashesRequests) blockHashesRequestTimer = nil + blockHashesRequestsComplete = true } else { blockHashesRequests++ - poolLogger.Debugf("[%x] hash request on root (%v total attempts)\n", hash[0:4], blockHashesRequests) - self.requestBlockHashes(parent.hash) - blockHashesRequestTimer = time.After(blockHashesRequestInterval * time.Second) + poolLogger.Debugf("[%s] hash request on root (%v total attempts)\n", sectionName(section), blockHashesRequests) + peer.requestBlockHashes(section.bottom.hash) + blockHashesRequestTimer = time.After(blockHashesRequestInterval * time.Millisecond) } - case r, ok := <-controlC: - if !ok { - break - } - if running && !r { - poolLogger.Debugf("process on section %x... (%v total attempts): missing %v/%v/%v", hash[0:4], blocksRequests, missing, total, depth) + blockHashesRequestTime = false + } - alarm = false + select { + case <-self.quit: + break LOOP + + case <-quitC: + // peer quit or demoted, put section in idle mode + quitC = nil + go func() { + section.controlC <- nil + }() + + case <-self.purgeC: + suicideTimer = time.After(0) + + case <-suicideTimer: + close(section.suicideC) + poolLogger.Debugf("[%s] timeout. (%v total attempts): missing %v/%v/%v", sectionName(section), blocksRequests, missing, lastMissing, depth) + + case <-section.suicideC: + poolLogger.Debugf("[%s] suicide", sectionName(section)) + + // first delink from child and parent under chainlock + self.chainLock.Lock() + self.link(nil, section) + self.link(section, nil) + self.chainLock.Unlock() + // delete node entries from pool index under pool lock + self.lock.Lock() + for _, node := range section.nodes { + delete(self.pool, string(node.hash)) + } + self.lock.Unlock() + + break LOOP + + case <-blocksRequestTimer: + poolLogger.DebugDetailf("[%s] block request time", sectionName(section)) + blocksRequestTime = true + + case <-blockHashesRequestTimer: + poolLogger.DebugDetailf("[%s] hash request time", sectionName(section)) + blockHashesRequestTime = true + + case newPeer = <-section.controlC: + + // active -> idle + if peer != nil && newPeer == nil { + self.procWg.Done() + if init { + poolLogger.Debugf("[%s] idle mode (%v total attempts): missing %v/%v/%v", sectionName(section), blocksRequests, missing, lastMissing, depth) + } + blocksRequestTime = false blocksRequestTimer = nil + blockHashesRequestTime = false blockHashesRequestTimer = nil - processC = nil + if processC != nil { + offC = processC + processC = nil + } } - if !running && r { - poolLogger.Debugf("[%x] on", hash[0:4]) - orignode.RLock() - parent := orignode.parent - complete := orignode.complete - knownParent := orignode.knownParent - orignode.RUnlock() - if !complete { - poolLogger.Debugf("[%x] activate block requests", hash[0:4]) - blocksRequestTimer = time.After(0) + // idle -> active + if peer == nil && newPeer != nil { + self.procWg.Add(1) + + poolLogger.Debugf("[%s] active mode", sectionName(section)) + if !blocksRequestsComplete { + blocksRequestTime = true } - if parent == nil && !knownParent { - // if no parent but not connected to blockchain - poolLogger.Debugf("[%x] activate block hashes requests", hash[0:4]) - blockHashesRequestTimer = time.After(0) - } else { - blockHashesRequestTimer = nil + if !blockHashesRequestsComplete { + blockHashesRequestTime = true } - alarm = true - processC = missingC - if !once { + if !init { + processC = make(chan *poolNode, blockHashesBatchSize) + missingC = make(chan *poolNode, blockHashesBatchSize) + i = 0 + missing = 0 + self.wg.Add(1) + self.procWg.Add(1) + depth = len(section.nodes) + lastMissing = depth // if not run at least once fully, launch iterator - processC = make(chan *poolNode) - missingC = make(chan *poolNode) - self.foldUp(orignode, processC) - once = true + go func() { + var node *poolNode + IT: + for _, node = range section.nodes { + select { + case processC <- node: + case <-self.quit: + break IT + } + } + close(processC) + self.wg.Done() + self.procWg.Done() + }() + } else { + poolLogger.Debugf("[%s] restore earlier state", sectionName(section)) + processC = offC } } - total = lastMissing - case <-resetC: - once = false + // reset quitC to current best peer + if newPeer != nil { + quitC = newPeer.quitC + } + peer = newPeer + + case waiter := <-section.forkC: + // this case just blocks the process until section is split at the fork + <-waiter init = false done = false + ready = false + case node, ok := <-processC: - if !ok { + if !ok && !init { // channel closed, first iteration finished init = true - once = true - continue + done = true + processC = make(chan *poolNode, missing) + poolLogger.DebugDetailf("[%s] section initalised: missing %v/%v/%v", sectionName(section), missing, lastMissing, depth) + continue LOOP + } + if ready { + i = 0 + missing = 0 + ready = false } i++ // if node has no block - node.RLock() + node.lock.RLock() block := node.block - nhash := node.hash - knownParent := node.knownParent - node.RUnlock() - if !init { - depth++ - } + node.lock.RUnlock() if block == nil { missing++ - if !init { - total++ - } - hashes = append(hashes, nhash) + hashes = append(hashes, node.hash) if len(hashes) == blockBatchSize { + poolLogger.Debugf("[%s] request %v missing blocks", sectionName(section), len(hashes)) self.requestBlocks(blocksRequests, hashes) hashes = nil } missingC <- node } else { - // block is found - if knownParent { - // connected to the blockchain, insert the longest chain of blocks - var blocks types.Blocks - child := node - parent := node - node.sectionRLock() - for child != nil && child.block != nil { - parent = child - blocks = append(blocks, parent.block) - child = parent.child - } - node.sectionRUnlock() - poolLogger.Debugf("[%x] insert %v blocks into blockchain", hash[0:4], len(blocks)) - if err := self.insertChain(blocks); err != nil { - // TODO: not clear which peer we need to address - // peerError should dispatch to peer if still connected and disconnect - self.peerError(node.source, ErrInvalidBlock, "%v", err) - poolLogger.Debugf("invalid block %v", node.hash) - poolLogger.Debugf("penalise peers %v (hash), %v (block)", node.peer, node.source) - // penalise peer in node.source - self.killChain(node, nil) - // self.disconnect() - break - } - // if suceeded mark the next one (no block yet) as connected to blockchain - if child != nil { - child.Lock() - child.knownParent = true - child.Unlock() - } - // reset starting node to first node with missing block - orignode = child - // pop the inserted ancestors off the channel - for i := 1; i < len(blocks); i++ { - <-processC - } - // delink inserted chain section - self.killChain(node, parent) + if blockChainC == nil && i == lastMissing { + insertChain = true } } - } - } - poolLogger.Debugf("[%x] quit after\n%v block hashes requests\n%v block requests: missing %v/%v/%v", hash[0:4], blockHashesRequests, blocksRequests, missing, total, depth) + poolLogger.Debugf("[%s] %v/%v/%v/%v", sectionName(section), i, missing, lastMissing, depth) + if i == lastMissing && init { + done = true + } + + case <-blockChainC: + // closed blockChain channel indicates that the blockpool is reached + // connected to the blockchain, insert the longest chain of blocks + poolLogger.Debugf("[%s] reached blockchain", sectionName(section)) + blockChainC = nil + // switch off hash requests in case they were on + blockHashesRequestTime = false + blockHashesRequestTimer = nil + blockHashesRequestsComplete = true + // section root has block + if len(section.nodes) > 0 && section.nodes[len(section.nodes)-1].block != nil { + insertChain = true + } + continue LOOP + + } // select + } // for + poolLogger.Debugf("[%s] section complete: %v block hashes requests - %v block requests - missing %v/%v/%v", sectionName(section), blockHashesRequests, blocksRequests, missing, lastMissing, depth) + + close(section.offC) self.wg.Done() - node.sectionLock() - node.section.controlC = nil - node.sectionUnlock() - // this signals that controller not available + if peer != nil { + self.procWg.Done() + } }() - return section - + return } func (self *BlockPool) peerError(peerId string, code int, format string, params ...interface{}) { @@ -636,39 +864,39 @@ func (self *BlockPool) peerError(peerId string, code int, format string, params } } -func (self *BlockPool) requestBlockHashes(hash []byte) { - self.peersLock.Lock() - defer self.peersLock.Unlock() - if self.peer != nil { - self.peer.requestBlockHashes(hash) - } -} - func (self *BlockPool) requestBlocks(attempts int, hashes [][]byte) { - // distribute block request among known peers - self.peersLock.Lock() - defer self.peersLock.Unlock() - peerCount := len(self.peers) - // on first attempt use the best peer - if attempts == 0 { - self.peer.requestBlocks(hashes) - return - } - repetitions := int(math.Min(float64(peerCount), float64(blocksRequestRepetition))) - poolLogger.Debugf("request %v missing blocks from %v/%v peers", len(hashes), repetitions, peerCount) - i := 0 - indexes := rand.Perm(peerCount)[0:(repetitions - 1)] - sort.Ints(indexes) - for _, peer := range self.peers { - if i == indexes[0] { - peer.requestBlocks(hashes) - indexes = indexes[1:] - if len(indexes) == 0 { - break - } + self.wg.Add(1) + self.procWg.Add(1) + go func() { + // distribute block request among known peers + self.peersLock.Lock() + defer self.peersLock.Unlock() + peerCount := len(self.peers) + // on first attempt use the best peer + if attempts == 0 { + poolLogger.Debugf("request %v missing blocks from best peer %s", len(hashes), self.peer.id) + self.peer.requestBlocks(hashes) + return } - i++ - } + repetitions := int(math.Min(float64(peerCount), float64(blocksRequestRepetition))) + i := 0 + indexes := rand.Perm(peerCount)[0:repetitions] + sort.Ints(indexes) + poolLogger.Debugf("request %v missing blocks from %v/%v peers: chosen %v", len(hashes), repetitions, peerCount, indexes) + for _, peer := range self.peers { + if i == indexes[0] { + poolLogger.Debugf("request %v missing blocks from peer %s", len(hashes), peer.id) + peer.requestBlocks(hashes) + indexes = indexes[1:] + if len(indexes) == 0 { + break + } + } + i++ + } + self.wg.Done() + self.procWg.Done() + }() } func (self *BlockPool) getPeer(peerId string) (*peerInfo, bool) { @@ -679,337 +907,100 @@ func (self *BlockPool) getPeer(peerId string) (*peerInfo, bool) { } info, ok := self.peers[peerId] if !ok { - panic("unknown peer") + return nil, false } return info, false } -func (self *peerInfo) addSection(hash []byte, section *section) { +func (self *peerInfo) addSection(hash []byte, section *section) (found *section) { self.lock.Lock() defer self.lock.Unlock() - self.sections[string(hash)] = section + key := string(hash) + found = self.sections[key] + poolLogger.DebugDetailf("[%s] section process %s registered", sectionName(section), self.id) + self.sections[key] = section + return } -func (self *peerInfo) addRoot(node *poolNode) { - self.lock.Lock() - defer self.lock.Unlock() - self.roots = append(self.roots, node) -} - -// (re)starts processes registered for this peer (self) -func (self *peerInfo) start(peer *peerInfo) { - self.lock.Lock() - defer self.lock.Unlock() - self.quitC = make(chan bool) - for _, root := range self.roots { - root.sectionRLock() - if root.section.bottom != nil { - if root.parent == nil { - self.requestBlockHashes(root.hash) - } - } - root.sectionRUnlock() - } - self.roots = nil - self.controlSections(peer, true) -} - -// (re)starts process without requests, only suicide timer -func (self *peerInfo) stop(peer *peerInfo) { - self.lock.RLock() - defer self.lock.RUnlock() - close(self.quitC) - self.controlSections(peer, false) -} - -func (self *peerInfo) controlSections(peer *peerInfo, on bool) { - if peer != nil { - peer.lock.RLock() - defer peer.lock.RUnlock() - } - for hash, section := range peer.sections { - if section.done() { - delete(self.sections, hash) - } - _, exists := peer.sections[hash] - if on || peer == nil || exists { - if on { - // self is best peer - section.start() - } else { - // (re)starts process without requests, only suicide timer - section.stop() - } - } - } -} - -// called when parent is found in pool -// parent and child are guaranteed to be on different sections -func (self *BlockPool) link(parent, child *poolNode) { - var top bool - parent.sectionLock() - if child != nil { - child.sectionLock() - } - if parent == parent.section.top && parent.section.top != nil { - top = true - } - var bottom bool - - if child == child.section.bottom { - bottom = true - } - if parent.child != child { - orphan := parent.child - if orphan != nil { - // got a fork in the chain - if top { - orphan.lock.Lock() - // make old child orphan - orphan.parent = nil - orphan.lock.Unlock() - } else { // we are under section lock - // make old child orphan - orphan.parent = nil - // reset section objects above the fork - nchild := orphan.child - node := orphan - section := §ion{bottom: orphan} - for node.section == nchild.section { - node = nchild - node.section = section - nchild = node.child - } - section.top = node - // set up a suicide - self.processSection(orphan).stop() - } +func (self *BlockPool) switchPeer(oldPeer, newPeer *peerInfo) { + if newPeer != nil { + entry := self.get(newPeer.currentBlock) + if entry == nil { + poolLogger.Debugf("[%s] head block [%s] not found, requesting hashes", newPeer.id, name(newPeer.currentBlock)) + newPeer.requestBlockHashes(newPeer.currentBlock) } else { - // child is on top of a chain need to close section - child.section.bottom = child + poolLogger.Debugf("[%s] head block [%s] found, activate chain at section [%s]", newPeer.id, name(newPeer.currentBlock), sectionName(entry.section)) + self.activateChain(entry.section, newPeer) } - // adopt new child + poolLogger.DebugDetailf("[%s] activate section processes", newPeer.id) + for hash, section := range newPeer.sections { + // this will block if section process is waiting for peer lock + select { + case <-section.offC: + poolLogger.DebugDetailf("[%s][%x] section process complete - remove", newPeer.id, hash[:4]) + delete(newPeer.sections, hash) + case section.controlC <- newPeer: + poolLogger.DebugDetailf("[%s][%x] registered peer with section", newPeer.id, hash[:4]) + } + } + newPeer.quitC = make(chan bool) + } + if oldPeer != nil { + close(oldPeer.quitC) + } +} + +func (self *BlockPool) getParent(sec *section) *section { + self.chainLock.RLock() + defer self.chainLock.RUnlock() + return sec.parent +} + +func (self *BlockPool) getChild(sec *section) *section { + self.chainLock.RLock() + defer self.chainLock.RUnlock() + return sec.child +} + +func newSection() (sec *section) { + sec = §ion{ + controlC: make(chan *peerInfo), + suicideC: make(chan bool), + blockChainC: make(chan bool), + offC: make(chan bool), + forkC: make(chan chan bool), + } + return +} + +// link should only be called under chainLock +func (self *BlockPool) link(parent *section, child *section) { + if parent != nil { + exChild := parent.child parent.child = child - if !top { - parent.section.top = parent - // restart section process so that shorter section is scanned for blocks - parent.section.reset() + if exChild != nil && exChild != child { + poolLogger.Debugf("[%s] chain fork [%s] -> [%s]", sectionName(parent), sectionName(exChild), sectionName(child)) + exChild.parent = nil } } - if child != nil { - if child.parent != parent { - stepParent := child.parent - if stepParent != nil { - if bottom { - stepParent.Lock() - stepParent.child = nil - stepParent.Unlock() - } else { - // we are on the same section - // if it is a aberrant reverse fork, - stepParent.child = nil - node := stepParent - nparent := stepParent.child - section := §ion{top: stepParent} - for node.section == nparent.section { - node = nparent - node.section = section - node = node.parent - } - } - } else { - // linking to a root node, ie. parent is under the root of a chain - parent.section.top = parent - } + exParent := child.parent + if exParent != nil && exParent != parent { + poolLogger.Debugf("[%s] chain reverse fork [%s] -> [%s]", sectionName(child), sectionName(exParent), sectionName(parent)) + exParent.child = nil } child.parent = parent - child.section.bottom = child - } - // this needed if someone lied about the parent before - child.knownParent = false - - parent.sectionUnlock() - if child != nil { - child.sectionUnlock() } } -// this immediately kills the chain from node to end (inclusive) section by section -func (self *BlockPool) killChain(node *poolNode, end *poolNode) { - poolLogger.Debugf("kill chain section with root node %v", node) - - node.sectionLock() - node.section.abort() - self.set(node.hash, nil) - child := node.child - top := node.section.top - i := 1 - self.wg.Add(1) - go func() { - var quit bool - for node != top && node != end && child != nil { - node = child - select { - case <-self.quit: - quit = true - break - default: - } - self.set(node.hash, nil) - child = node.child - } - poolLogger.Debugf("killed chain section of %v blocks with root node %v", i, node) - if !quit { - if node == top { - if node != end && child != nil && end != nil { - // - self.killChain(child, end) - } - } else { - if child != nil { - // delink rest of this section if ended midsection - child.section.bottom = child - child.parent = nil - } - } - } - node.section.bottom = nil - node.sectionUnlock() - self.wg.Done() - }() -} - -// structure to store long range links on chain to skip along -type section struct { - lock sync.RWMutex - bottom *poolNode - top *poolNode - controlC chan bool - resetC chan bool -} - -func (self *section) start() { +func (self *BlockPool) get(hash []byte) (node *poolEntry) { self.lock.RLock() defer self.lock.RUnlock() - if self.controlC != nil { - self.controlC <- true - } -} - -func (self *section) stop() { - self.lock.RLock() - defer self.lock.RUnlock() - if self.controlC != nil { - self.controlC <- false - } -} - -func (self *section) reset() { - self.lock.RLock() - defer self.lock.RUnlock() - if self.controlC != nil { - self.resetC <- true - self.controlC <- false - } -} - -func (self *section) abort() { - self.lock.Lock() - defer self.lock.Unlock() - if self.controlC != nil { - close(self.controlC) - self.controlC = nil - } -} - -func (self *section) done() bool { - self.lock.Lock() - defer self.lock.Unlock() - if self.controlC != nil { - return true - } - return false -} - -func (self *BlockPool) get(hash []byte) (node *poolNode) { - self.lock.Lock() - defer self.lock.Unlock() return self.pool[string(hash)] } -func (self *BlockPool) set(hash []byte, node *poolNode) { +func (self *BlockPool) set(hash []byte, node *poolEntry) { self.lock.Lock() defer self.lock.Unlock() self.pool[string(hash)] = node } - -// first time for block request, this iteration retrieves nodes of the chain -// from node up to top (all the way if nil) via child links -// copies the controller -// and feeds nodeC channel -// this is performed under section readlock to prevent top from going away -// when -func (self *BlockPool) foldUp(node *poolNode, nodeC chan *poolNode) { - self.wg.Add(1) - go func() { - node.sectionRLock() - defer node.sectionRUnlock() - for node != nil { - select { - case <-self.quit: - break - case nodeC <- node: - if node == node.section.top { - break - } - node = node.child - } - } - close(nodeC) - self.wg.Done() - }() -} - -func (self *poolNode) Lock() { - self.sectionLock() - self.lock.Lock() -} - -func (self *poolNode) Unlock() { - self.lock.Unlock() - self.sectionUnlock() -} - -func (self *poolNode) RLock() { - self.lock.RLock() -} - -func (self *poolNode) RUnlock() { - self.lock.RUnlock() -} - -func (self *poolNode) sectionLock() { - self.lock.RLock() - defer self.lock.RUnlock() - self.section.lock.Lock() -} - -func (self *poolNode) sectionUnlock() { - self.lock.RLock() - defer self.lock.RUnlock() - self.section.lock.Unlock() -} - -func (self *poolNode) sectionRLock() { - self.lock.RLock() - defer self.lock.RUnlock() - self.section.lock.RLock() -} - -func (self *poolNode) sectionRUnlock() { - self.lock.RLock() - defer self.lock.RUnlock() - self.section.lock.RUnlock() -} diff --git a/eth/block_pool_test.go b/eth/block_pool_test.go index 315cc748db..b50a314ead 100644 --- a/eth/block_pool_test.go +++ b/eth/block_pool_test.go @@ -1,115 +1,65 @@ package eth import ( - "bytes" "fmt" "log" + "math/big" "os" "sync" "testing" + "time" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethutil" ethlogger "github.com/ethereum/go-ethereum/logger" + "github.com/ethereum/go-ethereum/pow" ) -var sys = ethlogger.NewStdLogSystem(os.Stdout, log.LstdFlags, ethlogger.LogLevel(ethlogger.DebugDetailLevel)) +const waitTimeout = 60 // seconds -type testChainManager struct { - knownBlock func(hash []byte) bool - addBlock func(*types.Block) error - checkPoW func(*types.Block) bool -} +var logsys = ethlogger.NewStdLogSystem(os.Stdout, log.LstdFlags, ethlogger.LogLevel(ethlogger.DebugLevel)) -func (self *testChainManager) KnownBlock(hash []byte) bool { - if self.knownBlock != nil { - return self.knownBlock(hash) +var ini = false + +func logInit() { + if !ini { + ethlogger.AddLogSystem(logsys) + ini = true } - return false } -func (self *testChainManager) AddBlock(block *types.Block) error { - if self.addBlock != nil { - return self.addBlock(block) - } - return nil -} - -func (self *testChainManager) CheckPoW(block *types.Block) bool { - if self.checkPoW != nil { - return self.checkPoW(block) - } - return false -} - -func knownBlock(hashes ...[]byte) (f func([]byte) bool) { - f = func(block []byte) bool { - for _, hash := range hashes { - if bytes.Compare(block, hash) == 0 { - return true - } - } +// test helpers +func arrayEq(a, b []int) bool { + if len(a) != len(b) { return false } - return -} - -func addBlock(hashes ...[]byte) (f func(*types.Block) error) { - f = func(block *types.Block) error { - for _, hash := range hashes { - if bytes.Compare(block.Hash(), hash) == 0 { - return fmt.Errorf("invalid by test") - } + for i := range a { + if a[i] != b[i] { + return false } - return nil - } - return -} - -func checkPoW(hashes ...[]byte) (f func(*types.Block) bool) { - f = func(block *types.Block) bool { - for _, hash := range hashes { - if bytes.Compare(block.Hash(), hash) == 0 { - return false - } - } - return true - } - return -} - -func newTestChainManager(knownBlocks [][]byte, invalidBlocks [][]byte, invalidPoW [][]byte) *testChainManager { - return &testChainManager{ - knownBlock: knownBlock(knownBlocks...), - addBlock: addBlock(invalidBlocks...), - checkPoW: checkPoW(invalidPoW...), } + return true } type intToHash map[int][]byte type hashToInt map[string]int +// hashPool is a test helper, that allows random hashes to be referred to by integers type testHashPool struct { intToHash hashToInt + lock sync.Mutex } func newHash(i int) []byte { return crypto.Sha3([]byte(string(i))) } -func newTestBlockPool(knownBlockIndexes []int, invalidBlockIndexes []int, invalidPoWIndexes []int) (hashPool *testHashPool, blockPool *BlockPool) { - hashPool = &testHashPool{make(intToHash), make(hashToInt)} - knownBlocks := hashPool.indexesToHashes(knownBlockIndexes) - invalidBlocks := hashPool.indexesToHashes(invalidBlockIndexes) - invalidPoW := hashPool.indexesToHashes(invalidPoWIndexes) - blockPool = NewBlockPool(newTestChainManager(knownBlocks, invalidBlocks, invalidPoW)) - return -} - func (self *testHashPool) indexesToHashes(indexes []int) (hashes [][]byte) { + self.lock.Lock() + defer self.lock.Unlock() for _, i := range indexes { hash, found := self.intToHash[i] if !found { @@ -123,6 +73,8 @@ func (self *testHashPool) indexesToHashes(indexes []int) (hashes [][]byte) { } func (self *testHashPool) hashesToIndexes(hashes [][]byte) (indexes []int) { + self.lock.Lock() + defer self.lock.Unlock() for _, hash := range hashes { i, found := self.hashToInt[string(hash)] if !found { @@ -133,66 +85,812 @@ func (self *testHashPool) hashesToIndexes(hashes [][]byte) (indexes []int) { return } -type protocolChecker struct { +// test blockChain is an integer trie +type blockChain map[int][]int + +// blockPoolTester provides the interface between tests and a blockPool +// +// refBlockChain is used to guide which blocks will be accepted as valid +// blockChain gives the current state of the blockchain and +// accumulates inserts so that we can check the resulting chain +type blockPoolTester struct { + hashPool *testHashPool + lock sync.RWMutex + refBlockChain blockChain + blockChain blockChain + blockPool *BlockPool + t *testing.T +} + +func newTestBlockPool(t *testing.T) (hashPool *testHashPool, blockPool *BlockPool, b *blockPoolTester) { + hashPool = &testHashPool{intToHash: make(intToHash), hashToInt: make(hashToInt)} + b = &blockPoolTester{ + t: t, + hashPool: hashPool, + blockChain: make(blockChain), + refBlockChain: make(blockChain), + } + b.blockPool = NewBlockPool(b.hasBlock, b.insertChain, b.verifyPoW) + blockPool = b.blockPool + return +} + +func (self *blockPoolTester) Errorf(format string, params ...interface{}) { + fmt.Printf(format+"\n", params...) + self.t.Errorf(format, params...) +} + +// blockPoolTester implements the 3 callbacks needed by the blockPool: +// hasBlock, insetChain, verifyPoW +func (self *blockPoolTester) hasBlock(block []byte) (ok bool) { + self.lock.RLock() + defer self.lock.RUnlock() + indexes := self.hashPool.hashesToIndexes([][]byte{block}) + i := indexes[0] + _, ok = self.blockChain[i] + fmt.Printf("has block %v (%x...): %v\n", i, block[0:4], ok) + return +} + +func (self *blockPoolTester) insertChain(blocks types.Blocks) error { + self.lock.RLock() + defer self.lock.RUnlock() + var parent, child int + var children, refChildren []int + var ok bool + for _, block := range blocks { + child = self.hashPool.hashesToIndexes([][]byte{block.Hash()})[0] + _, ok = self.blockChain[child] + if ok { + fmt.Printf("block %v already in blockchain\n", child) + continue // already in chain + } + parent = self.hashPool.hashesToIndexes([][]byte{block.ParentHeaderHash})[0] + children, ok = self.blockChain[parent] + if !ok { + return fmt.Errorf("parent %v not in blockchain ", parent) + } + ok = false + var found bool + refChildren, found = self.refBlockChain[parent] + if found { + for _, c := range refChildren { + if c == child { + ok = true + } + } + if !ok { + return fmt.Errorf("invalid block %v", child) + } + } else { + ok = true + } + if ok { + // accept any blocks if parent not in refBlockChain + fmt.Errorf("blockchain insert %v -> %v\n", parent, child) + self.blockChain[parent] = append(children, child) + self.blockChain[child] = nil + } + } + return nil +} + +func (self *blockPoolTester) verifyPoW(pblock pow.Block) bool { + return true +} + +// test helper that compares the resulting blockChain to the desired blockChain +func (self *blockPoolTester) checkBlockChain(blockChain map[int][]int) { + for k, v := range self.blockChain { + fmt.Printf("got: %v -> %v\n", k, v) + } + for k, v := range blockChain { + fmt.Printf("expected: %v -> %v\n", k, v) + } + if len(blockChain) != len(self.blockChain) { + self.Errorf("blockchain incorrect (zlength differ)") + } + for k, v := range blockChain { + vv, ok := self.blockChain[k] + if !ok || !arrayEq(v, vv) { + self.Errorf("blockchain incorrect on %v -> %v (!= %v)", k, vv, v) + } + } +} + +// + +// peerTester provides the peer callbacks for the blockPool +// it registers actual callbacks so that result can be compared to desired behaviour +// provides helper functions to mock the protocol calls to the blockPool +type peerTester struct { blockHashesRequests []int blocksRequests [][]int - invalidBlocks []error + blocksRequestsMap map[int]bool + peerErrors []int + blockPool *BlockPool hashPool *testHashPool - lock sync.Mutex + lock sync.RWMutex + id string + td int + currentBlock int + t *testing.T } +// peerTester constructor takes hashPool and blockPool from the blockPoolTester +func (self *blockPoolTester) newPeer(id string, td int, cb int) *peerTester { + return &peerTester{ + id: id, + td: td, + currentBlock: cb, + hashPool: self.hashPool, + blockPool: self.blockPool, + t: self.t, + blocksRequestsMap: make(map[int]bool), + } +} + +func (self *peerTester) Errorf(format string, params ...interface{}) { + fmt.Printf(format+"\n", params...) + self.t.Errorf(format, params...) +} + +// helper to compare actual and expected block requests +func (self *peerTester) checkBlocksRequests(blocksRequests ...[]int) { + if len(blocksRequests) > len(self.blocksRequests) { + self.Errorf("blocks requests incorrect (length differ)\ngot %v\nexpected %v", self.blocksRequests, blocksRequests) + } else { + for i, rr := range blocksRequests { + r := self.blocksRequests[i] + if !arrayEq(r, rr) { + self.Errorf("blocks requests incorrect\ngot %v\nexpected %v", self.blocksRequests, blocksRequests) + } + } + } +} + +// helper to compare actual and expected block hash requests +func (self *peerTester) checkBlockHashesRequests(blocksHashesRequests ...int) { + rr := blocksHashesRequests + self.lock.RLock() + r := self.blockHashesRequests + self.lock.RUnlock() + if len(r) != len(rr) { + self.Errorf("block hashes requests incorrect (length differ)\ngot %v\nexpected %v", r, rr) + } else { + if !arrayEq(r, rr) { + self.Errorf("block hashes requests incorrect\ngot %v\nexpected %v", r, rr) + } + } +} + +// waiter function used by peer.AddBlocks +// blocking until requests appear +// since block requests are sent to any random peers +// block request map is shared between peers +// times out after a period +func (self *peerTester) waitBlocksRequests(blocksRequest ...int) { + timeout := time.After(waitTimeout * time.Second) + rr := blocksRequest + for { + self.lock.RLock() + r := self.blocksRequestsMap + fmt.Printf("[%s] blocks request check %v (%v)\n", self.id, rr, r) + i := 0 + for i = 0; i < len(rr); i++ { + _, ok := r[rr[i]] + if !ok { + break + } + } + self.lock.RUnlock() + + if i == len(rr) { + return + } + time.Sleep(100 * time.Millisecond) + select { + case <-timeout: + default: + } + } +} + +// waiter function used by peer.AddBlockHashes +// blocking until requests appear +// times out after a period +func (self *peerTester) waitBlockHashesRequests(blocksHashesRequest int) { + timeout := time.After(waitTimeout * time.Second) + rr := blocksHashesRequest + for i := 0; ; { + self.lock.RLock() + r := self.blockHashesRequests + self.lock.RUnlock() + fmt.Printf("[%s] block hash request check %v (%v)\n", self.id, rr, r) + for ; i < len(r); i++ { + if rr == r[i] { + return + } + } + time.Sleep(100 * time.Millisecond) + select { + case <-timeout: + default: + } + } +} + +// mocks a simple blockchain 0 (genesis) ... n (head) +func (self *blockPoolTester) initRefBlockChain(n int) { + for i := 0; i < n; i++ { + self.refBlockChain[i] = []int{i + 1} + } +} + +// peerTester functions that mimic protocol calls to the blockpool +// registers the peer with the blockPool +func (self *peerTester) AddPeer() bool { + hash := self.hashPool.indexesToHashes([]int{self.currentBlock})[0] + return self.blockPool.AddPeer(big.NewInt(int64(self.td)), hash, self.id, self.requestBlockHashes, self.requestBlocks, self.peerError) +} + +// peer sends blockhashes if and when gets a request +func (self *peerTester) AddBlockHashes(indexes ...int) { + i := 0 + fmt.Printf("ready to add block hashes %v\n", indexes) + + self.waitBlockHashesRequests(indexes[0]) + fmt.Printf("adding block hashes %v\n", indexes) + hashes := self.hashPool.indexesToHashes(indexes) + next := func() (hash []byte, ok bool) { + if i < len(hashes) { + hash = hashes[i] + ok = true + i++ + } + return + } + self.blockPool.AddBlockHashes(next, self.id) +} + +// peer sends blocks if and when there is a request +// (in the shared request store, not necessarily to a person) +func (self *peerTester) AddBlocks(indexes ...int) { + hashes := self.hashPool.indexesToHashes(indexes) + fmt.Printf("ready to add blocks %v\n", indexes[1:]) + self.waitBlocksRequests(indexes[1:]...) + fmt.Printf("adding blocks %v \n", indexes[1:]) + for i := 1; i < len(hashes); i++ { + fmt.Printf("adding block %v %x\n", indexes[i], hashes[i][:4]) + self.blockPool.AddBlock(&types.Block{HeaderHash: ethutil.Bytes(hashes[i]), ParentHeaderHash: ethutil.Bytes(hashes[i-1])}, self.id) + } +} + +// peer callbacks // -1 is special: not found (a hash never seen) -func (self *protocolChecker) requestBlockHashesCallBack() (requestBlockHashesCallBack func([]byte) error) { - requestBlockHashesCallBack = func(hash []byte) error { - indexes := self.hashPool.hashesToIndexes([][]byte{hash}) - self.lock.Lock() - defer self.lock.Unlock() - self.blockHashesRequests = append(self.blockHashesRequests, indexes[0]) - return nil - } - return +// records block hashes requests by the blockPool +func (self *peerTester) requestBlockHashes(hash []byte) error { + indexes := self.hashPool.hashesToIndexes([][]byte{hash}) + fmt.Printf("[%s] blocks hash request %v %x\n", self.id, indexes[0], hash[:4]) + self.lock.Lock() + defer self.lock.Unlock() + self.blockHashesRequests = append(self.blockHashesRequests, indexes[0]) + return nil } -func (self *protocolChecker) requestBlocksCallBack() (requestBlocksCallBack func([][]byte) error) { - requestBlocksCallBack = func(hashes [][]byte) error { - indexes := self.hashPool.hashesToIndexes(hashes) - self.lock.Lock() - defer self.lock.Unlock() - self.blocksRequests = append(self.blocksRequests, indexes) - return nil +// records block requests by the blockPool +func (self *peerTester) requestBlocks(hashes [][]byte) error { + indexes := self.hashPool.hashesToIndexes(hashes) + fmt.Printf("blocks request %v %x...\n", indexes, hashes[0][:4]) + self.lock.Lock() + defer self.lock.Unlock() + self.blocksRequests = append(self.blocksRequests, indexes) + for _, i := range indexes { + self.blocksRequestsMap[i] = true } - return + return nil } -func (self *protocolChecker) invalidBlockCallBack() (invalidBlockCallBack func(error)) { - invalidBlockCallBack = func(err error) { - self.invalidBlocks = append(self.invalidBlocks, err) - } - return +// records the error codes of all the peerErrors found the blockPool +func (self *peerTester) peerError(code int, format string, params ...interface{}) { + self.peerErrors = append(self.peerErrors, code) } +// the actual tests func TestAddPeer(t *testing.T) { - ethlogger.AddLogSystem(sys) - knownBlockIndexes := []int{0, 1} - invalidBlockIndexes := []int{2, 3} - invalidPoWIndexes := []int{4, 5} - hashPool, blockPool := newTestBlockPool(knownBlockIndexes, invalidBlockIndexes, invalidPoWIndexes) - // TODO: - // hashPool, blockPool, blockChainChecker = newTestBlockPool(knownBlockIndexes, invalidBlockIndexes, invalidPoWIndexes) - peer0 := &protocolChecker{ - // blockHashesRequests: make([]int), - // blocksRequests: make([][]int), - // invalidBlocks: make([]error), - hashPool: hashPool, - } - best := blockPool.AddPeer(ethutil.Big1, newHash(100), "0", - peer0.requestBlockHashesCallBack(), - peer0.requestBlocksCallBack(), - peer0.invalidBlockCallBack(), - ) + logInit() + _, blockPool, blockPoolTester := newTestBlockPool(t) + peer0 := blockPoolTester.newPeer("peer0", 1, 0) + peer1 := blockPoolTester.newPeer("peer1", 2, 1) + peer2 := blockPoolTester.newPeer("peer2", 3, 2) + var peer *peerInfo + + blockPool.Start() + + // pool + best := peer0.AddPeer() if !best { - t.Errorf("peer not accepted as best") + t.Errorf("peer0 (TD=1) not accepted as best") } + if blockPool.peer.id != "peer0" { + t.Errorf("peer0 (TD=1) not set as best") + } + peer0.checkBlockHashesRequests(0) + + best = peer2.AddPeer() + if !best { + t.Errorf("peer2 (TD=3) not accepted as best") + } + if blockPool.peer.id != "peer2" { + t.Errorf("peer2 (TD=3) not set as best") + } + peer2.checkBlockHashesRequests(2) + + best = peer1.AddPeer() + if best { + t.Errorf("peer1 (TD=2) accepted as best") + } + if blockPool.peer.id != "peer2" { + t.Errorf("peer2 (TD=3) not set any more as best") + } + if blockPool.peer.td.Cmp(big.NewInt(int64(3))) != 0 { + t.Errorf("peer1 TD not set") + } + + peer2.td = 4 + peer2.currentBlock = 3 + best = peer2.AddPeer() + if !best { + t.Errorf("peer2 (TD=4) not accepted as best") + } + if blockPool.peer.id != "peer2" { + t.Errorf("peer2 (TD=4) not set as best") + } + if blockPool.peer.td.Cmp(big.NewInt(int64(4))) != 0 { + t.Errorf("peer2 TD not updated") + } + peer2.checkBlockHashesRequests(2, 3) + + peer1.td = 3 + peer1.currentBlock = 2 + best = peer1.AddPeer() + if best { + t.Errorf("peer1 (TD=3) should not be set as best") + } + if blockPool.peer.id == "peer1" { + t.Errorf("peer1 (TD=3) should not be set as best") + } + peer, best = blockPool.getPeer("peer1") + if peer.td.Cmp(big.NewInt(int64(3))) != 0 { + t.Errorf("peer1 TD should be updated") + } + + blockPool.RemovePeer("peer2") + peer, best = blockPool.getPeer("peer2") + if peer != nil { + t.Errorf("peer2 not removed") + } + + if blockPool.peer.id != "peer1" { + t.Errorf("existing peer1 (TD=3) should be set as best peer") + } + peer1.checkBlockHashesRequests(2) + + blockPool.RemovePeer("peer1") + peer, best = blockPool.getPeer("peer1") + if peer != nil { + t.Errorf("peer1 not removed") + } + + if blockPool.peer.id != "peer0" { + t.Errorf("existing peer0 (TD=1) should be set as best peer") + } + + blockPool.RemovePeer("peer0") + peer, best = blockPool.getPeer("peer0") + if peer != nil { + t.Errorf("peer1 not removed") + } + + // adding back earlier peer ok + peer0.currentBlock = 3 + best = peer0.AddPeer() + if !best { + t.Errorf("peer0 (TD=1) should be set as best") + } + + if blockPool.peer.id != "peer0" { + t.Errorf("peer0 (TD=1) should be set as best") + } + peer0.checkBlockHashesRequests(0, 0, 3) + blockPool.Stop() } + +func TestPeerWithKnownBlock(t *testing.T) { + logInit() + _, blockPool, blockPoolTester := newTestBlockPool(t) + blockPoolTester.refBlockChain[0] = nil + blockPoolTester.blockChain[0] = nil + // hashPool, blockPool, blockPoolTester := newTestBlockPool() + blockPool.Start() + + peer0 := blockPoolTester.newPeer("0", 1, 0) + peer0.AddPeer() + + blockPool.Stop() + // no request on known block + peer0.checkBlockHashesRequests() +} + +func TestSimpleChain(t *testing.T) { + logInit() + _, blockPool, blockPoolTester := newTestBlockPool(t) + blockPoolTester.blockChain[0] = nil + blockPoolTester.initRefBlockChain(2) + + blockPool.Start() + + peer1 := blockPoolTester.newPeer("peer1", 1, 2) + peer1.AddPeer() + go peer1.AddBlockHashes(2, 1, 0) + peer1.AddBlocks(0, 1, 2) + + blockPool.Wait(waitTimeout * time.Second) + blockPool.Stop() + blockPoolTester.refBlockChain[2] = []int{} + blockPoolTester.checkBlockChain(blockPoolTester.refBlockChain) +} + +func TestInvalidBlock(t *testing.T) { + logInit() + _, blockPool, blockPoolTester := newTestBlockPool(t) + blockPoolTester.blockChain[0] = nil + blockPoolTester.initRefBlockChain(2) + blockPoolTester.refBlockChain[2] = []int{} + + blockPool.Start() + + peer1 := blockPoolTester.newPeer("peer1", 1, 3) + peer1.AddPeer() + go peer1.AddBlockHashes(3, 2, 1, 0) + peer1.AddBlocks(0, 1, 2, 3) + + blockPool.Wait(waitTimeout * time.Second) + blockPool.Stop() + blockPoolTester.refBlockChain[2] = []int{} + blockPoolTester.checkBlockChain(blockPoolTester.refBlockChain) + if len(peer1.peerErrors) == 1 { + if peer1.peerErrors[0] != ErrInvalidBlock { + t.Errorf("wrong error, got %v, expected %v", peer1.peerErrors[0], ErrInvalidBlock) + } + } else { + t.Errorf("expected invalid block error, got nothing") + } +} + +func TestVerifyPoW(t *testing.T) { + logInit() + _, blockPool, blockPoolTester := newTestBlockPool(t) + blockPoolTester.blockChain[0] = nil + blockPoolTester.initRefBlockChain(3) + first := false + blockPoolTester.blockPool.verifyPoW = func(b pow.Block) bool { + bb, _ := b.(*types.Block) + indexes := blockPoolTester.hashPool.hashesToIndexes([][]byte{bb.Hash()}) + if indexes[0] == 1 && !first { + first = true + return false + } else { + return true + } + + } + + blockPool.Start() + + peer1 := blockPoolTester.newPeer("peer1", 1, 2) + peer1.AddPeer() + go peer1.AddBlockHashes(2, 1, 0) + peer1.AddBlocks(0, 1, 2) + peer1.AddBlocks(0, 1) + + blockPool.Wait(waitTimeout * time.Second) + blockPool.Stop() + blockPoolTester.refBlockChain[2] = []int{} + blockPoolTester.checkBlockChain(blockPoolTester.refBlockChain) + if len(peer1.peerErrors) == 1 { + if peer1.peerErrors[0] != ErrInvalidPoW { + t.Errorf("wrong error, got %v, expected %v", peer1.peerErrors[0], ErrInvalidPoW) + } + } else { + t.Errorf("expected invalid pow error, got nothing") + } +} + +func TestMultiSectionChain(t *testing.T) { + logInit() + _, blockPool, blockPoolTester := newTestBlockPool(t) + blockPoolTester.blockChain[0] = nil + blockPoolTester.initRefBlockChain(5) + + blockPool.Start() + + peer1 := blockPoolTester.newPeer("peer1", 1, 5) + + peer1.AddPeer() + go peer1.AddBlockHashes(5, 4, 3) + go peer1.AddBlocks(2, 3, 4, 5) + go peer1.AddBlockHashes(3, 2, 1, 0) + peer1.AddBlocks(0, 1, 2) + + blockPool.Wait(waitTimeout * time.Second) + blockPool.Stop() + blockPoolTester.refBlockChain[5] = []int{} + blockPoolTester.checkBlockChain(blockPoolTester.refBlockChain) +} + +func TestNewBlocksOnPartialChain(t *testing.T) { + logInit() + _, blockPool, blockPoolTester := newTestBlockPool(t) + blockPoolTester.blockChain[0] = nil + blockPoolTester.initRefBlockChain(7) + blockPool.Start() + + peer1 := blockPoolTester.newPeer("peer1", 1, 5) + + peer1.AddPeer() + go peer1.AddBlockHashes(5, 4, 3) + peer1.AddBlocks(2, 3) // partially complete section + // peer1 found new blocks + peer1.td = 2 + peer1.currentBlock = 7 + peer1.AddPeer() + go peer1.AddBlockHashes(7, 6, 5) + go peer1.AddBlocks(3, 4, 5, 6, 7) + go peer1.AddBlockHashes(3, 2, 1, 0) // tests that hash request from known chain root is remembered + peer1.AddBlocks(0, 1, 2) + + blockPool.Wait(waitTimeout * time.Second) + blockPool.Stop() + blockPoolTester.refBlockChain[7] = []int{} + blockPoolTester.checkBlockChain(blockPoolTester.refBlockChain) +} + +func TestPeerSwitch(t *testing.T) { + logInit() + _, blockPool, blockPoolTester := newTestBlockPool(t) + blockPoolTester.blockChain[0] = nil + blockPoolTester.initRefBlockChain(6) + + blockPool.Start() + + peer1 := blockPoolTester.newPeer("peer1", 1, 5) + peer2 := blockPoolTester.newPeer("peer2", 2, 6) + peer2.blocksRequestsMap = peer1.blocksRequestsMap + + peer1.AddPeer() + go peer1.AddBlockHashes(5, 4, 3) + peer1.AddBlocks(2, 3) // section partially complete, block 3 will be preserved after peer demoted + peer2.AddPeer() // peer2 is promoted as best peer, peer1 is demoted + go peer2.AddBlockHashes(6, 5) // + go peer2.AddBlocks(4, 5, 6) // tests that block request for earlier section is remembered + go peer1.AddBlocks(3, 4) // tests that connecting section by demoted peer is remembered and blocks are accepted from demoted peer + go peer2.AddBlockHashes(3, 2, 1, 0) // tests that known chain section is activated, hash requests from 3 is remembered + peer2.AddBlocks(0, 1, 2) // final blocks linking to blockchain sent + + blockPool.Wait(waitTimeout * time.Second) + blockPool.Stop() + blockPoolTester.refBlockChain[6] = []int{} + blockPoolTester.checkBlockChain(blockPoolTester.refBlockChain) +} + +func TestPeerDownSwitch(t *testing.T) { + logInit() + _, blockPool, blockPoolTester := newTestBlockPool(t) + blockPoolTester.blockChain[0] = nil + blockPoolTester.initRefBlockChain(6) + blockPool.Start() + + peer1 := blockPoolTester.newPeer("peer1", 1, 4) + peer2 := blockPoolTester.newPeer("peer2", 2, 6) + peer2.blocksRequestsMap = peer1.blocksRequestsMap + + peer2.AddPeer() + go peer2.AddBlockHashes(6, 5, 4) + peer2.AddBlocks(5, 6) // partially complete, section will be preserved + blockPool.RemovePeer("peer2") // peer2 disconnects + peer1.AddPeer() // inferior peer1 is promoted as best peer + go peer1.AddBlockHashes(4, 3, 2, 1, 0) // + go peer1.AddBlocks(3, 4, 5) // tests that section set by demoted peer is remembered and blocks are accepted + peer1.AddBlocks(0, 1, 2, 3) + + blockPool.Wait(waitTimeout * time.Second) + blockPool.Stop() + blockPoolTester.refBlockChain[6] = []int{} + blockPoolTester.checkBlockChain(blockPoolTester.refBlockChain) +} + +func TestPeerSwitchBack(t *testing.T) { + logInit() + _, blockPool, blockPoolTester := newTestBlockPool(t) + blockPoolTester.blockChain[0] = nil + blockPoolTester.initRefBlockChain(8) + + blockPool.Start() + + peer1 := blockPoolTester.newPeer("peer1", 2, 11) + peer2 := blockPoolTester.newPeer("peer2", 1, 8) + peer2.blocksRequestsMap = peer1.blocksRequestsMap + + peer2.AddPeer() + go peer2.AddBlockHashes(8, 7, 6) + go peer2.AddBlockHashes(6, 5, 4) + peer2.AddBlocks(4, 5) // section partially complete + peer1.AddPeer() // peer1 is promoted as best peer + go peer1.AddBlockHashes(11, 10) // only gives useless results + blockPool.RemovePeer("peer1") // peer1 disconnects + go peer2.AddBlockHashes(4, 3, 2, 1, 0) // tests that asking for hashes from 4 is remembered + go peer2.AddBlocks(3, 4, 5, 6, 7, 8) // tests that section 4, 5, 6 and 7, 8 are remembered for missing blocks + peer2.AddBlocks(0, 1, 2, 3) + + blockPool.Wait(waitTimeout * time.Second) + blockPool.Stop() + blockPoolTester.refBlockChain[8] = []int{} + blockPoolTester.checkBlockChain(blockPoolTester.refBlockChain) +} + +func TestForkSimple(t *testing.T) { + logInit() + _, blockPool, blockPoolTester := newTestBlockPool(t) + blockPoolTester.blockChain[0] = nil + blockPoolTester.initRefBlockChain(9) + blockPoolTester.refBlockChain[3] = []int{4, 7} + delete(blockPoolTester.refBlockChain, 6) + + blockPool.Start() + + peer1 := blockPoolTester.newPeer("peer1", 1, 9) + peer2 := blockPoolTester.newPeer("peer2", 2, 6) + peer2.blocksRequestsMap = peer1.blocksRequestsMap + + peer1.AddPeer() + go peer1.AddBlockHashes(9, 8, 7, 3, 2) + peer1.AddBlocks(1, 2, 3, 7, 8, 9) + peer2.AddPeer() // peer2 is promoted as best peer + go peer2.AddBlockHashes(6, 5, 4, 3, 2) // fork on 3 -> 4 (earlier child: 7) + go peer2.AddBlocks(1, 2, 3, 4, 5, 6) + go peer2.AddBlockHashes(2, 1, 0) + peer2.AddBlocks(0, 1, 2) + + blockPool.Wait(waitTimeout * time.Second) + blockPool.Stop() + blockPoolTester.refBlockChain[6] = []int{} + blockPoolTester.refBlockChain[3] = []int{4} + delete(blockPoolTester.refBlockChain, 7) + delete(blockPoolTester.refBlockChain, 8) + delete(blockPoolTester.refBlockChain, 9) + blockPoolTester.checkBlockChain(blockPoolTester.refBlockChain) + +} + +func TestForkSwitchBackByNewBlocks(t *testing.T) { + logInit() + _, blockPool, blockPoolTester := newTestBlockPool(t) + blockPoolTester.blockChain[0] = nil + blockPoolTester.initRefBlockChain(11) + blockPoolTester.refBlockChain[3] = []int{4, 7} + delete(blockPoolTester.refBlockChain, 6) + + blockPool.Start() + + peer1 := blockPoolTester.newPeer("peer1", 1, 9) + peer2 := blockPoolTester.newPeer("peer2", 2, 6) + peer2.blocksRequestsMap = peer1.blocksRequestsMap + + peer1.AddPeer() + go peer1.AddBlockHashes(9, 8, 7, 3, 2) + peer1.AddBlocks(8, 9) // partial section + peer2.AddPeer() // + go peer2.AddBlockHashes(6, 5, 4, 3, 2) // peer2 forks on block 3 + peer2.AddBlocks(1, 2, 3, 4, 5, 6) // + + // peer1 finds new blocks + peer1.td = 3 + peer1.currentBlock = 11 + peer1.AddPeer() + go peer1.AddBlockHashes(11, 10, 9) + peer1.AddBlocks(7, 8, 9, 10, 11) + go peer1.AddBlockHashes(7, 3) // tests that hash request from fork root is remembered + go peer1.AddBlocks(3, 7) // tests that block requests on earlier fork are remembered + // go peer1.AddBlockHashes(1, 0) // tests that hash request from root of connecting chain section (added by demoted peer) is remembered + go peer1.AddBlockHashes(2, 1, 0) // tests that hash request from root of connecting chain section (added by demoted peer) is remembered + peer1.AddBlocks(0, 1, 2, 3) + + blockPool.Wait(waitTimeout * time.Second) + blockPool.Stop() + blockPoolTester.refBlockChain[11] = []int{} + blockPoolTester.refBlockChain[3] = []int{7} + delete(blockPoolTester.refBlockChain, 6) + delete(blockPoolTester.refBlockChain, 5) + delete(blockPoolTester.refBlockChain, 4) + blockPoolTester.checkBlockChain(blockPoolTester.refBlockChain) + +} + +func TestForkSwitchBackByPeerSwitchBack(t *testing.T) { + logInit() + _, blockPool, blockPoolTester := newTestBlockPool(t) + blockPoolTester.blockChain[0] = nil + blockPoolTester.initRefBlockChain(9) + blockPoolTester.refBlockChain[3] = []int{4, 7} + delete(blockPoolTester.refBlockChain, 6) + + blockPool.Start() + + peer1 := blockPoolTester.newPeer("peer1", 1, 9) + peer2 := blockPoolTester.newPeer("peer2", 2, 6) + peer2.blocksRequestsMap = peer1.blocksRequestsMap + + peer1.AddPeer() + go peer1.AddBlockHashes(9, 8, 7, 3, 2) + peer1.AddBlocks(8, 9) + peer2.AddPeer() // + go peer2.AddBlockHashes(6, 5, 4, 3, 2) // peer2 forks on block 3 + peer2.AddBlocks(2, 3, 4, 5, 6) // + blockPool.RemovePeer("peer2") // peer2 disconnects, peer1 is promoted again as best peer + peer1.AddBlockHashes(7, 3) // tests that hash request from fork root is remembered + go peer1.AddBlocks(3, 7, 8) // tests that block requests on earlier fork are remembered + go peer1.AddBlockHashes(2, 1, 0) // + peer1.AddBlocks(0, 1, 2, 3) + + blockPool.Wait(waitTimeout * time.Second) + blockPool.Stop() + blockPoolTester.refBlockChain[9] = []int{} + blockPoolTester.refBlockChain[3] = []int{7} + delete(blockPoolTester.refBlockChain, 6) + delete(blockPoolTester.refBlockChain, 5) + delete(blockPoolTester.refBlockChain, 4) + blockPoolTester.checkBlockChain(blockPoolTester.refBlockChain) + +} + +func TestForkCompleteSectionSwitchBackByPeerSwitchBack(t *testing.T) { + logInit() + _, blockPool, blockPoolTester := newTestBlockPool(t) + blockPoolTester.blockChain[0] = nil + blockPoolTester.initRefBlockChain(9) + blockPoolTester.refBlockChain[3] = []int{4, 7} + delete(blockPoolTester.refBlockChain, 6) + + blockPool.Start() + + peer1 := blockPoolTester.newPeer("peer1", 1, 9) + peer2 := blockPoolTester.newPeer("peer2", 2, 6) + peer2.blocksRequestsMap = peer1.blocksRequestsMap + + peer1.AddPeer() + go peer1.AddBlockHashes(9, 8, 7) + peer1.AddBlocks(3, 7, 8, 9) // make sure this section is complete + time.Sleep(1 * time.Second) + go peer1.AddBlockHashes(7, 3, 2) // block 3/7 is section boundary + peer1.AddBlocks(2, 3) // partially complete sections + peer2.AddPeer() // + go peer2.AddBlockHashes(6, 5, 4, 3, 2) // peer2 forks on block 3 + peer2.AddBlocks(2, 3, 4, 5, 6) // block 2 still missing. + blockPool.RemovePeer("peer2") // peer2 disconnects, peer1 is promoted again as best peer + peer1.AddBlockHashes(7, 3) // tests that hash request from fork root is remembered even though section process completed + go peer1.AddBlockHashes(2, 1, 0) // + peer1.AddBlocks(0, 1, 2) + + blockPool.Wait(waitTimeout * time.Second) + blockPool.Stop() + blockPoolTester.refBlockChain[9] = []int{} + blockPoolTester.refBlockChain[3] = []int{7} + delete(blockPoolTester.refBlockChain, 6) + delete(blockPoolTester.refBlockChain, 5) + delete(blockPoolTester.refBlockChain, 4) + blockPoolTester.checkBlockChain(blockPoolTester.refBlockChain) + +} diff --git a/eth/error.go b/eth/error.go index d1daad5750..1d9f806380 100644 --- a/eth/error.go +++ b/eth/error.go @@ -52,18 +52,17 @@ func ProtocolError(code int, format string, params ...interface{}) (err *protoco } func (self protocolError) Error() (message string) { - message = self.message - if message == "" { - message, ok := errorToString[self.Code] + if len(message) == 0 { + var ok bool + self.message, ok = errorToString[self.Code] if !ok { panic("invalid error code") } if self.format != "" { - message += ": " + fmt.Sprintf(self.format, self.params...) + self.message += ": " + fmt.Sprintf(self.format, self.params...) } - self.message = message } - return + return self.message } func (self *protocolError) Fatal() bool { diff --git a/eth/protocol.go b/eth/protocol.go index 7c5d09489b..b67e5aaeab 100644 --- a/eth/protocol.go +++ b/eth/protocol.go @@ -3,7 +3,7 @@ package eth import ( "bytes" "fmt" - "math" + "io" "math/big" "github.com/ethereum/go-ethereum/core/types" @@ -95,14 +95,13 @@ func runEthProtocol(txPool txPool, chainManager chainManager, blockPool blockPoo blockPool: blockPool, rw: rw, peer: peer, - id: (string)(peer.Identity().Pubkey()), + id: fmt.Sprintf("%x", peer.Identity().Pubkey()[:8]), } err = self.handleStatus() if err == nil { for { err = self.handle() if err != nil { - fmt.Println(err) self.blockPool.RemovePeer(self.id) break } @@ -117,7 +116,7 @@ func (self *ethProtocol) handle() error { return err } if msg.Size > ProtocolMaxMsgSize { - return ProtocolError(ErrMsgTooLarge, "%v > %v", msg.Size, ProtocolMaxMsgSize) + return self.protoError(ErrMsgTooLarge, "%v > %v", msg.Size, ProtocolMaxMsgSize) } // make sure that the payload has been fully consumed defer msg.Discard() @@ -125,76 +124,87 @@ func (self *ethProtocol) handle() error { switch msg.Code { case StatusMsg: - return ProtocolError(ErrExtraStatusMsg, "") + return self.protoError(ErrExtraStatusMsg, "") case TxMsg: // TODO: rework using lazy RLP stream var txs []*types.Transaction if err := msg.Decode(&txs); err != nil { - return ProtocolError(ErrDecode, "%v", err) + return self.protoError(ErrDecode, "msg %v: %v", msg, err) } self.txPool.AddTransactions(txs) case GetBlockHashesMsg: var request getBlockHashesMsgData if err := msg.Decode(&request); err != nil { - return ProtocolError(ErrDecode, "%v", err) + return self.protoError(ErrDecode, "->msg %v: %v", msg, err) } hashes := self.chainManager.GetBlockHashesFromHash(request.Hash, request.Amount) return self.rw.EncodeMsg(BlockHashesMsg, ethutil.ByteSliceToInterface(hashes)...) case BlockHashesMsg: // TODO: redo using lazy decode , this way very inefficient on known chains - msgStream := rlp.NewListStream(msg.Payload, uint64(msg.Size)) + msgStream := rlp.NewStream(msg.Payload) var err error + var i int + iter := func() (hash []byte, ok bool) { hash, err = msgStream.Bytes() if err == nil { + i++ ok = true + } else { + if err != io.EOF { + self.protoError(ErrDecode, "msg %v: after %v hashes : %v", msg, i, err) + } } return } + self.blockPool.AddBlockHashes(iter, self.id) - if err != nil && err != rlp.EOL { - return ProtocolError(ErrDecode, "%v", err) - } case GetBlocksMsg: - var blockHashes [][]byte - if err := msg.Decode(&blockHashes); err != nil { - return ProtocolError(ErrDecode, "%v", err) - } - max := int(math.Min(float64(len(blockHashes)), blockHashesBatchSize)) + msgStream := rlp.NewStream(msg.Payload) var blocks []interface{} - for i, hash := range blockHashes { - if i >= max { - break + var i int + for { + i++ + var hash []byte + if err := msgStream.Decode(&hash); err != nil { + if err == io.EOF { + break + } else { + return self.protoError(ErrDecode, "msg %v: %v", msg, err) + } } block := self.chainManager.GetBlock(hash) if block != nil { - blocks = append(blocks, block.RlpData()) + blocks = append(blocks, block) + } + if i == blockHashesBatchSize { + break } } return self.rw.EncodeMsg(BlocksMsg, blocks...) case BlocksMsg: - msgStream := rlp.NewListStream(msg.Payload, uint64(msg.Size)) + msgStream := rlp.NewStream(msg.Payload) for { - var block *types.Block + var block types.Block if err := msgStream.Decode(&block); err != nil { - if err == rlp.EOL { + if err == io.EOF { break } else { - return ProtocolError(ErrDecode, "%v", err) + return self.protoError(ErrDecode, "msg %v: %v", msg, err) } } - self.blockPool.AddBlock(block, self.id) + self.blockPool.AddBlock(&block, self.id) } case NewBlockMsg: var request newBlockMsgData if err := msg.Decode(&request); err != nil { - return ProtocolError(ErrDecode, "%v", err) + return self.protoError(ErrDecode, "msg %v: %v", msg, err) } hash := request.Block.Hash() // to simplify backend interface adding a new block @@ -202,12 +212,12 @@ func (self *ethProtocol) handle() error { // (or selected as new best peer) if self.blockPool.AddPeer(request.TD, hash, self.id, self.requestBlockHashes, self.requestBlocks, self.protoErrorDisconnect) { called := true - iter := func() (hash []byte, ok bool) { + iter := func() ([]byte, bool) { if called { called = false return hash, true } else { - return + return nil, false } } self.blockPool.AddBlockHashes(iter, self.id) @@ -215,14 +225,14 @@ func (self *ethProtocol) handle() error { } default: - return ProtocolError(ErrInvalidMsgCode, "%v", msg.Code) + return self.protoError(ErrInvalidMsgCode, "%v", msg.Code) } return nil } type statusMsgData struct { - ProtocolVersion uint - NetworkId uint + ProtocolVersion uint32 + NetworkId uint32 TD *big.Int CurrentBlock []byte GenesisBlock []byte @@ -253,56 +263,56 @@ func (self *ethProtocol) handleStatus() error { } if msg.Code != StatusMsg { - return ProtocolError(ErrNoStatusMsg, "first msg has code %x (!= %x)", msg.Code, StatusMsg) + return self.protoError(ErrNoStatusMsg, "first msg has code %x (!= %x)", msg.Code, StatusMsg) } if msg.Size > ProtocolMaxMsgSize { - return ProtocolError(ErrMsgTooLarge, "%v > %v", msg.Size, ProtocolMaxMsgSize) + return self.protoError(ErrMsgTooLarge, "%v > %v", msg.Size, ProtocolMaxMsgSize) } var status statusMsgData if err := msg.Decode(&status); err != nil { - return ProtocolError(ErrDecode, "%v", err) + return self.protoError(ErrDecode, "msg %v: %v", msg, err) } _, _, genesisBlock := self.chainManager.Status() if bytes.Compare(status.GenesisBlock, genesisBlock) != 0 { - return ProtocolError(ErrGenesisBlockMismatch, "%x (!= %x)", status.GenesisBlock, genesisBlock) + return self.protoError(ErrGenesisBlockMismatch, "%x (!= %x)", status.GenesisBlock, genesisBlock) } if status.NetworkId != NetworkId { - return ProtocolError(ErrNetworkIdMismatch, "%d (!= %d)", status.NetworkId, NetworkId) + return self.protoError(ErrNetworkIdMismatch, "%d (!= %d)", status.NetworkId, NetworkId) } if ProtocolVersion != status.ProtocolVersion { - return ProtocolError(ErrProtocolVersionMismatch, "%d (!= %d)", status.ProtocolVersion, ProtocolVersion) + return self.protoError(ErrProtocolVersionMismatch, "%d (!= %d)", status.ProtocolVersion, ProtocolVersion) } self.peer.Infof("Peer is [eth] capable (%d/%d). TD=%v H=%x\n", status.ProtocolVersion, status.NetworkId, status.TD, status.CurrentBlock[:4]) - //self.blockPool.AddPeer(status.TD, status.CurrentBlock, self.id, self.requestBlockHashes, self.requestBlocks, self.protoErrorDisconnect) - self.peer.Infoln("AddPeer(IGNORED)") + self.blockPool.AddPeer(status.TD, status.CurrentBlock, self.id, self.requestBlockHashes, self.requestBlocks, self.protoErrorDisconnect) return nil } func (self *ethProtocol) requestBlockHashes(from []byte) error { self.peer.Debugf("fetching hashes (%d) %x...\n", blockHashesBatchSize, from[0:4]) - return self.rw.EncodeMsg(GetBlockHashesMsg, from, blockHashesBatchSize) + return self.rw.EncodeMsg(GetBlockHashesMsg, interface{}(from), uint64(blockHashesBatchSize)) } func (self *ethProtocol) requestBlocks(hashes [][]byte) error { self.peer.Debugf("fetching %v blocks", len(hashes)) - return self.rw.EncodeMsg(GetBlocksMsg, ethutil.ByteSliceToInterface(hashes)) + return self.rw.EncodeMsg(GetBlocksMsg, ethutil.ByteSliceToInterface(hashes)...) } func (self *ethProtocol) protoError(code int, format string, params ...interface{}) (err *protocolError) { err = ProtocolError(code, format, params...) if err.Fatal() { - self.peer.Errorln(err) + self.peer.Errorln("err %v", err) + // disconnect } else { - self.peer.Debugln(err) + self.peer.Debugf("fyi %v", err) } return } @@ -310,10 +320,10 @@ func (self *ethProtocol) protoError(code int, format string, params ...interface func (self *ethProtocol) protoErrorDisconnect(code int, format string, params ...interface{}) { err := ProtocolError(code, format, params...) if err.Fatal() { - self.peer.Errorln(err) + self.peer.Errorln("err %v", err) // disconnect } else { - self.peer.Debugln(err) + self.peer.Debugf("fyi %v", err) } } diff --git a/eth/protocol_test.go b/eth/protocol_test.go index 322aec7b70..ab2aa289f0 100644 --- a/eth/protocol_test.go +++ b/eth/protocol_test.go @@ -1,35 +1,48 @@ package eth import ( + "bytes" "io" + "log" "math/big" + "os" "testing" + "time" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/ethutil" + ethlogger "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/p2p" ) +var sys = ethlogger.NewStdLogSystem(os.Stdout, log.LstdFlags, ethlogger.LogLevel(ethlogger.DebugDetailLevel)) + type testMsgReadWriter struct { in chan p2p.Msg - out chan p2p.Msg + out []p2p.Msg } func (self *testMsgReadWriter) In(msg p2p.Msg) { self.in <- msg } -func (self *testMsgReadWriter) Out(msg p2p.Msg) { - self.in <- msg +func (self *testMsgReadWriter) Out() (msg p2p.Msg, ok bool) { + if len(self.out) > 0 { + msg = self.out[0] + self.out = self.out[1:] + ok = true + } + return } func (self *testMsgReadWriter) WriteMsg(msg p2p.Msg) error { - self.out <- msg + self.out = append(self.out, msg) return nil } func (self *testMsgReadWriter) EncodeMsg(code uint64, data ...interface{}) error { - return self.WriteMsg(p2p.NewMsg(code, data)) + return self.WriteMsg(p2p.NewMsg(code, data...)) } func (self *testMsgReadWriter) ReadMsg() (p2p.Msg, error) { @@ -40,145 +53,83 @@ func (self *testMsgReadWriter) ReadMsg() (p2p.Msg, error) { return msg, nil } -func errorCheck(t *testing.T, expCode int, err error) { - perr, ok := err.(*protocolError) - if ok && perr != nil { - if code := perr.Code; code != expCode { - ok = false - } - } - if !ok { - t.Errorf("expected error code %v, got %v", ErrNoStatusMsg, err) - } -} - -type TestBackend struct { +type testTxPool struct { getTransactions func() []*types.Transaction addTransactions func(txs []*types.Transaction) - getBlockHashes func(hash []byte, amount uint32) (hashes [][]byte) - addBlockHashes func(next func() ([]byte, bool), peerId string) - getBlock func(hash []byte) *types.Block - addBlock func(block *types.Block, peerId string) (err error) - addPeer func(td *big.Int, currentBlock []byte, peerId string, requestHashes func([]byte) error, requestBlocks func([][]byte) error, invalidBlock func(error)) (best bool) - removePeer func(peerId string) - status func() (td *big.Int, currentBlock []byte, genesisBlock []byte) } -func (self *TestBackend) GetTransactions() (txs []*types.Transaction) { - if self.getTransactions != nil { - txs = self.getTransactions() - } - return +type testChainManager struct { + getBlockHashes func(hash []byte, amount uint64) (hashes [][]byte) + getBlock func(hash []byte) *types.Block + status func() (td *big.Int, currentBlock []byte, genesisBlock []byte) } -func (self *TestBackend) AddTransactions(txs []*types.Transaction) { +type testBlockPool struct { + addBlockHashes func(next func() ([]byte, bool), peerId string) + addBlock func(block *types.Block, peerId string) (err error) + addPeer func(td *big.Int, currentBlock []byte, peerId string, requestHashes func([]byte) error, requestBlocks func([][]byte) error, peerError func(int, string, ...interface{})) (best bool) + removePeer func(peerId string) +} + +// func (self *testTxPool) GetTransactions() (txs []*types.Transaction) { +// if self.getTransactions != nil { +// txs = self.getTransactions() +// } +// return +// } + +func (self *testTxPool) AddTransactions(txs []*types.Transaction) { if self.addTransactions != nil { self.addTransactions(txs) } } -func (self *TestBackend) GetBlockHashes(hash []byte, amount uint32) (hashes [][]byte) { +func (self *testChainManager) GetBlockHashesFromHash(hash []byte, amount uint64) (hashes [][]byte) { if self.getBlockHashes != nil { hashes = self.getBlockHashes(hash, amount) } return } -<<<<<<< HEAD -<<<<<<< HEAD -func (self *TestBackend) AddBlockHashes(next func() ([]byte, bool), peerId string) { - if self.addBlockHashes != nil { - self.addBlockHashes(next, peerId) - } -} - -======= -func (self *TestBackend) AddHash(hash []byte, peer *p2p.Peer) (more bool) { - if self.addHash != nil { - more = self.addHash(hash, peer) -======= -func (self *TestBackend) AddBlockHashes(next func() ([]byte, bool), peerId string) { - if self.addBlockHashes != nil { - self.addBlockHashes(next, peerId) ->>>>>>> eth protocol changes - } -} -<<<<<<< HEAD ->>>>>>> initial commit for eth-p2p integration -======= - ->>>>>>> eth protocol changes -func (self *TestBackend) GetBlock(hash []byte) (block *types.Block) { - if self.getBlock != nil { - block = self.getBlock(hash) - } - return -} - -<<<<<<< HEAD -<<<<<<< HEAD -func (self *TestBackend) AddBlock(block *types.Block, peerId string) (err error) { - if self.addBlock != nil { - err = self.addBlock(block, peerId) -======= -func (self *TestBackend) AddBlock(td *big.Int, block *types.Block, peer *p2p.Peer) (fetchHashes bool, err error) { - if self.addBlock != nil { - fetchHashes, err = self.addBlock(td, block, peer) ->>>>>>> initial commit for eth-p2p integration -======= -func (self *TestBackend) AddBlock(block *types.Block, peerId string) (err error) { - if self.addBlock != nil { - err = self.addBlock(block, peerId) ->>>>>>> eth protocol changes - } - return -} - -<<<<<<< HEAD -<<<<<<< HEAD -func (self *TestBackend) AddPeer(td *big.Int, currentBlock []byte, peerId string, requestBlockHashes func([]byte) error, requestBlocks func([][]byte) error, invalidBlock func(error)) (best bool) { - if self.addPeer != nil { - best = self.addPeer(td, currentBlock, peerId, requestBlockHashes, requestBlocks, invalidBlock) -======= -func (self *TestBackend) AddPeer(td *big.Int, currentBlock []byte, peer *p2p.Peer) (fetchHashes bool) { - if self.addPeer != nil { - fetchHashes = self.addPeer(td, currentBlock, peer) ->>>>>>> initial commit for eth-p2p integration -======= -func (self *TestBackend) AddPeer(td *big.Int, currentBlock []byte, peerId string, requestBlockHashes func([]byte) error, requestBlocks func([][]byte) error, invalidBlock func(error)) (best bool) { - if self.addPeer != nil { - best = self.addPeer(td, currentBlock, peerId, requestBlockHashes, requestBlocks, invalidBlock) ->>>>>>> eth protocol changes - } - return -} - -<<<<<<< HEAD -<<<<<<< HEAD -======= ->>>>>>> eth protocol changes -func (self *TestBackend) RemovePeer(peerId string) { - if self.removePeer != nil { - self.removePeer(peerId) - } -} - -<<<<<<< HEAD -======= ->>>>>>> initial commit for eth-p2p integration -======= ->>>>>>> eth protocol changes -func (self *TestBackend) Status() (td *big.Int, currentBlock []byte, genesisBlock []byte) { +func (self *testChainManager) Status() (td *big.Int, currentBlock []byte, genesisBlock []byte) { if self.status != nil { td, currentBlock, genesisBlock = self.status() } return } -<<<<<<< HEAD -<<<<<<< HEAD -======= ->>>>>>> eth protocol changes +func (self *testChainManager) GetBlock(hash []byte) (block *types.Block) { + if self.getBlock != nil { + block = self.getBlock(hash) + } + return +} + +func (self *testBlockPool) AddBlockHashes(next func() ([]byte, bool), peerId string) { + if self.addBlockHashes != nil { + self.addBlockHashes(next, peerId) + } +} + +func (self *testBlockPool) AddBlock(block *types.Block, peerId string) { + if self.addBlock != nil { + self.addBlock(block, peerId) + } +} + +func (self *testBlockPool) AddPeer(td *big.Int, currentBlock []byte, peerId string, requestBlockHashes func([]byte) error, requestBlocks func([][]byte) error, peerError func(int, string, ...interface{})) (best bool) { + if self.addPeer != nil { + best = self.addPeer(td, currentBlock, peerId, requestBlockHashes, requestBlocks, peerError) + } + return +} + +func (self *testBlockPool) RemovePeer(peerId string) { + if self.removePeer != nil { + self.removePeer(peerId) + } +} + // TODO: refactor this into p2p/client_identity type peerId struct { pubkey []byte @@ -201,32 +152,119 @@ func testPeer() *p2p.Peer { return p2p.NewPeer(&peerId{}, []p2p.Cap{}) } -func TestErrNoStatusMsg(t *testing.T) { -<<<<<<< HEAD -======= -func TestEth(t *testing.T) { ->>>>>>> initial commit for eth-p2p integration -======= ->>>>>>> eth protocol changes - quit := make(chan bool) - rw := &testMsgReadWriter{make(chan p2p.Msg, 10), make(chan p2p.Msg, 10)} - testBackend := &TestBackend{} - var err error - go func() { -<<<<<<< HEAD -<<<<<<< HEAD - err = runEthProtocol(testBackend, testPeer(), rw) -======= - err = runEthProtocol(testBackend, nil, rw) ->>>>>>> initial commit for eth-p2p integration -======= - err = runEthProtocol(testBackend, testPeer(), rw) ->>>>>>> eth protocol changes - close(quit) - }() - statusMsg := p2p.NewMsg(4) - rw.In(statusMsg) - <-quit - errorCheck(t, ErrNoStatusMsg, err) - // read(t, remote, []byte("hello, world"), nil) +type ethProtocolTester struct { + quit chan error + rw *testMsgReadWriter // p2p.MsgReadWriter + txPool *testTxPool // txPool + chainManager *testChainManager // chainManager + blockPool *testBlockPool // blockPool + t *testing.T +} + +func newEth(t *testing.T) *ethProtocolTester { + return ðProtocolTester{ + quit: make(chan error), + rw: &testMsgReadWriter{in: make(chan p2p.Msg, 10)}, + txPool: &testTxPool{}, + chainManager: &testChainManager{}, + blockPool: &testBlockPool{}, + t: t, + } +} + +func (self *ethProtocolTester) reset() { + self.rw = &testMsgReadWriter{in: make(chan p2p.Msg, 10)} + self.quit = make(chan error) +} + +func (self *ethProtocolTester) checkError(expCode int, delay time.Duration) (err error) { + var timer = time.After(delay) + select { + case err = <-self.quit: + case <-timer: + self.t.Errorf("no error after %v, expected %v", delay, expCode) + return + } + perr, ok := err.(*protocolError) + if ok && perr != nil { + if code := perr.Code; code != expCode { + self.t.Errorf("expected protocol error (code %v), got %v (%v)", expCode, code, err) + } + } else { + self.t.Errorf("expected protocol error (code %v), got %v", expCode, err) + } + return +} + +func (self *ethProtocolTester) In(msg p2p.Msg) { + self.rw.In(msg) +} + +func (self *ethProtocolTester) Out() (p2p.Msg, bool) { + return self.rw.Out() +} + +func (self *ethProtocolTester) checkMsg(i int, code uint64, val interface{}) (msg p2p.Msg) { + if i >= len(self.rw.out) { + self.t.Errorf("expected at least %v msgs, got %v", i, len(self.rw.out)) + return + } + msg = self.rw.out[i] + if msg.Code != code { + self.t.Errorf("expected msg code %v, got %v", code, msg.Code) + } + if val != nil { + if err := msg.Decode(val); err != nil { + self.t.Errorf("rlp encoding error: %v", err) + } + } + return +} + +func (self *ethProtocolTester) run() { + err := runEthProtocol(self.txPool, self.chainManager, self.blockPool, testPeer(), self.rw) + self.quit <- err +} + +func TestStatusMsgErrors(t *testing.T) { + logInit() + eth := newEth(t) + td := ethutil.Big1 + currentBlock := []byte{1} + genesis := []byte{2} + eth.chainManager.status = func() (*big.Int, []byte, []byte) { return td, currentBlock, genesis } + go eth.run() + statusMsg := p2p.NewMsg(4) + eth.In(statusMsg) + delay := 1 * time.Second + eth.checkError(ErrNoStatusMsg, delay) + var status statusMsgData + eth.checkMsg(0, StatusMsg, &status) // first outgoing msg should be StatusMsg + if status.TD.Cmp(td) != 0 || + status.ProtocolVersion != ProtocolVersion || + status.NetworkId != NetworkId || + status.TD.Cmp(td) != 0 || + bytes.Compare(status.CurrentBlock, currentBlock) != 0 || + bytes.Compare(status.GenesisBlock, genesis) != 0 { + t.Errorf("incorrect outgoing status") + } + + eth.reset() + go eth.run() + statusMsg = p2p.NewMsg(0, uint32(48), uint32(0), td, currentBlock, genesis) + eth.In(statusMsg) + eth.checkError(ErrProtocolVersionMismatch, delay) + + eth.reset() + go eth.run() + statusMsg = p2p.NewMsg(0, uint32(49), uint32(1), td, currentBlock, genesis) + eth.In(statusMsg) + eth.checkError(ErrNetworkIdMismatch, delay) + + eth.reset() + go eth.run() + statusMsg = p2p.NewMsg(0, uint32(49), uint32(0), td, currentBlock, []byte{3}) + eth.In(statusMsg) + eth.checkError(ErrGenesisBlockMismatch, delay) + } diff --git a/eth/test/README.md b/eth/test/README.md new file mode 100644 index 0000000000..65728efa5b --- /dev/null +++ b/eth/test/README.md @@ -0,0 +1,27 @@ += Integration tests for eth protocol and blockpool + +This is a simple suite of tests to fire up a local test node with peers to test blockchain synchronisation and download. +The scripts call ethereum (assumed to be compiled in go-ethereum root). + +To run a test: + + . run.sh 00 02 + +Without arguments, all tests are run. + +Peers are launched with preloaded imported chains. In order to prevent them from synchronizing with each other they are set with `-dial=false` and `-maxpeer 1` options. They log into `/tmp/eth.test/nodes/XX` where XX is the last two digits of their port. + +Chains to import can be bootstrapped by letting nodes mine for some time. This is done with + + . bootstrap.sh + +Only the relative timing and forks matter so they should work if the bootstrap script is rerun. +The reference blockchain of tests are soft links to these import chains and check at the end of a test run. + +Connecting to peers and exporting blockchain is scripted with JS files executed by the JSRE, see `tests/XX.sh`. + +Each test is set with a timeout. This may vary on different computers so adjust sensibly. +If you kill a test before it completes, do not forget to kill all the background processes, since they will impact the result. Use: + + killall ethereum + diff --git a/eth/test/bootstrap.sh b/eth/test/bootstrap.sh new file mode 100644 index 0000000000..3da038be8b --- /dev/null +++ b/eth/test/bootstrap.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# bootstrap chains - used to regenerate tests/chains/*.chain + +mkdir -p chains +bash ./mine.sh 00 10 +bash ./mine.sh 01 5 00 +bash ./mine.sh 02 10 00 +bash ./mine.sh 03 5 02 +bash ./mine.sh 04 10 02 \ No newline at end of file diff --git a/eth/test/chains/00.chain b/eth/test/chains/00.chain new file mode 100755 index 0000000000000000000000000000000000000000..ad3c05b24af70b3e02afbde9aa0c4911f56432ee GIT binary patch literal 9726 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
Gm=vJ7a&95t7OOcj%!t-TGvCba{^a2} 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 literal 0 HcmV?d00001 diff --git a/eth/test/chains/02.chain b/eth/test/chains/02.chain new file mode 100755 index 0000000000000000000000000000000000000000..440c92d658508658cb7044fa26bdea741ef99a8b GIT binary patch literal 14989 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
;3+Zc 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 /tmp/eth.test/mine.tmp & +PID=$! +sleep 1 +kill $PID +cat /tmp/eth.test/mine.tmp | grep 'exporting' diff --git a/eth/test/run.sh b/eth/test/run.sh new file mode 100644 index 0000000000..5229af0353 --- /dev/null +++ b/eth/test/run.sh @@ -0,0 +1,53 @@ +#!/bin/bash +# bash run.sh (testid0 testid1 ...) +# runs tests tests/testid0.sh tests/testid1.sh ... +# without arguments, it runs all tests + +. tests/common.sh + +TESTS= + +if [ "$#" -eq 0 ]; then + for NAME in tests/??.sh; do + i=`basename $NAME .sh` + TESTS="$TESTS $i" + done +else + TESTS=$@ +fi + +ETH=../../ethereum +DIR="/tmp/eth.test/nodes" +TIMEOUT=10 + +mkdir -p $DIR/js + +echo "running tests $TESTS" +for NAME in $TESTS; do + PIDS= + CHAIN="tests/$NAME.chain" + JSFILE="$DIR/js/$NAME.js" + CHAIN_TEST="$DIR/$NAME/chain" + + echo "RUN: test $NAME" + cat tests/common.js > $JSFILE + . tests/$NAME.sh + sleep $TIMEOUT + echo "timeout after $TIMEOUT seconds: killing $PIDS" + kill $PIDS + if [ -r "$CHAIN" ]; then + if diff $CHAIN $CHAIN_TEST >/dev/null ; then + echo "chain ok: $CHAIN=$CHAIN_TEST" + else + echo "FAIL: chains differ: expected $CHAIN ; got $CHAIN_TEST" + continue + fi + fi + ERRORS=$DIR/errors + if [ -r "$ERRORS" ]; then + echo "FAIL: " + cat $ERRORS + else + echo PASS + fi +done \ No newline at end of file diff --git a/eth/test/tests/00.chain b/eth/test/tests/00.chain new file mode 120000 index 0000000000..9655cb3df7 --- /dev/null +++ b/eth/test/tests/00.chain @@ -0,0 +1 @@ +../chains/01.chain \ No newline at end of file diff --git a/eth/test/tests/00.sh b/eth/test/tests/00.sh new file mode 100644 index 0000000000..9c5077164b --- /dev/null +++ b/eth/test/tests/00.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +TIMEOUT=4 + +cat >> $JSFILE <> $JSFILE <> $JSFILE <> $JSFILE <> $JSFILE <> $JSFILE < 0 { - return bp.rw.EncodeMsg(peersMsg, peers) + return bp.rw.EncodeMsg(peersMsg, peers...) } case peersMsg: @@ -193,14 +196,9 @@ func (bp *baseProtocol) handle(rw MsgReadWriter) error { return nil } -func (bp *baseProtocol) doHandshake(rw MsgReadWriter) error { - // send our handshake - if err := rw.WriteMsg(bp.handshakeMsg()); err != nil { - return err - } - +func (bp *baseProtocol) readHandshake() error { // read and handle remote handshake - msg, err := rw.ReadMsg() + msg, err := bp.rw.ReadMsg() if err != nil { return err } @@ -210,12 +208,10 @@ func (bp *baseProtocol) doHandshake(rw MsgReadWriter) error { if msg.Size > baseProtocolMaxMsgSize { return newPeerError(errMisc, "message too big") } - var hs handshake if err := msg.Decode(&hs); err != nil { return err } - // validate handshake info if hs.Version != baseProtocolVersion { return newPeerError(errP2PVersionMismatch, "Require protocol %d, received %d\n", @@ -238,9 +234,7 @@ func (bp *baseProtocol) doHandshake(rw MsgReadWriter) error { if err := bp.peer.pubkeyHook(pa); err != nil { return newPeerError(errPubkeyForbidden, "%v", err) } - // TODO: remove Caps with empty name - var addr *peerAddr if hs.ListenPort != 0 { addr = newPeerAddr(bp.peer.conn.RemoteAddr(), hs.NodeID) @@ -270,25 +264,3 @@ func (bp *baseProtocol) handshakeMsg() Msg { bp.peer.ourID.Pubkey()[1:], ) } - -func (bp *baseProtocol) peerList() []ethutil.RlpEncodable { - peers := bp.peer.otherPeers() - ds := make([]ethutil.RlpEncodable, 0, len(peers)) - for _, p := range peers { - p.infolock.Lock() - addr := p.listenAddr - p.infolock.Unlock() - // filter out this peer and peers that are not listening or - // have not completed the handshake. - // TODO: track previously sent peers and exclude them as well. - if p == bp.peer || addr == nil { - continue - } - ds = append(ds, addr) - } - ourAddr := bp.peer.ourListenAddr - if ourAddr != nil && !ourAddr.IP.IsLoopback() && !ourAddr.IP.IsUnspecified() { - ds = append(ds, ourAddr) - } - return ds -} diff --git a/p2p/protocol_test.go b/p2p/protocol_test.go index 65f26fb12d..ce25b3e1b5 100644 --- a/p2p/protocol_test.go +++ b/p2p/protocol_test.go @@ -2,12 +2,89 @@ package p2p import ( "fmt" + "net" + "reflect" "testing" + + "github.com/ethereum/go-ethereum/crypto" ) +type peerId struct { + pubkey []byte +} + +func (self *peerId) String() string { + return fmt.Sprintf("test peer %x", self.Pubkey()[:4]) +} + +func (self *peerId) Pubkey() (pubkey []byte) { + pubkey = self.pubkey + if len(pubkey) == 0 { + pubkey = crypto.GenerateNewKeyPair().PublicKey + self.pubkey = pubkey + } + return +} + +func newTestPeer() (peer *Peer) { + peer = NewPeer(&peerId{}, []Cap{}) + peer.pubkeyHook = func(*peerAddr) error { return nil } + peer.ourID = &peerId{} + peer.listenAddr = &peerAddr{} + peer.otherPeers = func() []*Peer { return nil } + return +} + +func TestBaseProtocolPeers(t *testing.T) { + cannedPeerList := []*peerAddr{ + {IP: net.ParseIP("1.2.3.4"), Port: 2222, Pubkey: []byte{}}, + {IP: net.ParseIP("5.6.7.8"), Port: 3333, Pubkey: []byte{}}, + } + var ownAddr *peerAddr = &peerAddr{IP: net.ParseIP("1.3.5.7"), Port: 1111, Pubkey: []byte{}} + rw1, rw2 := MsgPipe() + // run matcher, close pipe when addresses have arrived + addrChan := make(chan *peerAddr, len(cannedPeerList)) + go func() { + for _, want := range cannedPeerList { + got := <-addrChan + t.Logf("got peer: %+v", got) + if !reflect.DeepEqual(want, got) { + t.Errorf("mismatch: got %#v, want %#v", got, want) + } + } + close(addrChan) + var own []*peerAddr + var got *peerAddr + for got = range addrChan { + own = append(own, got) + } + if len(own) != 1 || !reflect.DeepEqual(ownAddr, own[0]) { + t.Errorf("mismatch: peers own address is incorrectly or not given, got %v, want %#v", ownAddr) + } + rw2.Close() + }() + // run first peer + peer1 := newTestPeer() + peer1.ourListenAddr = ownAddr + peer1.otherPeers = func() []*Peer { + pl := make([]*Peer, len(cannedPeerList)) + for i, addr := range cannedPeerList { + pl[i] = &Peer{listenAddr: addr} + } + return pl + } + go runBaseProtocol(peer1, rw1) + // run second peer + peer2 := newTestPeer() + peer2.newPeerAddr = addrChan // feed peer suggestions into matcher + if err := runBaseProtocol(peer2, rw2); err != ErrPipeClosed { + t.Errorf("peer2 terminated with unexpected error: %v", err) + } +} + func TestBaseProtocolDisconnect(t *testing.T) { - peer := NewPeer(NewSimpleClientIdentity("p1", "", "", "foo"), nil) - peer.ourID = NewSimpleClientIdentity("p2", "", "", "bar") + peer := NewPeer(&peerId{}, nil) + peer.ourID = &peerId{} peer.pubkeyHook = func(*peerAddr) error { return nil } rw1, rw2 := MsgPipe() @@ -32,6 +109,7 @@ func TestBaseProtocolDisconnect(t *testing.T) { if err := rw2.EncodeMsg(discMsg, DiscQuitting); err != nil { t.Error(err) } + close(done) }() diff --git a/p2p/server.go b/p2p/server.go index 3267812343..cfff442f71 100644 --- a/p2p/server.go +++ b/p2p/server.go @@ -113,9 +113,11 @@ func (srv *Server) PeerCount() int { // SuggestPeer injects an address into the outbound address pool. func (srv *Server) SuggestPeer(ip net.IP, port int, nodeID []byte) { + addr := &peerAddr{ip, uint64(port), nodeID} select { - case srv.peerConnect <- &peerAddr{ip, uint64(port), nodeID}: + case srv.peerConnect <- addr: default: // don't block + srvlog.Warnf("peer suggestion %v ignored", addr) } } @@ -258,6 +260,7 @@ func (srv *Server) listenLoop() { for { select { case slot := <-srv.peerSlots: + srvlog.Debugf("grabbed slot %v for listening", slot) conn, err := srv.listener.Accept() if err != nil { srv.peerSlots <- slot @@ -330,6 +333,7 @@ func (srv *Server) dialLoop() { case desc := <-suggest: // candidate peer found, will dial out asyncronously // if connection fails slot will be released + srvlog.Infof("dial %v (%v)", desc, *slot) go srv.dialPeer(desc, *slot) // we can watch if more peers needed in the next loop slots = srv.peerSlots diff --git a/p2p/server_test.go b/p2p/server_test.go index 5c0d08d398..ceb89e3f7f 100644 --- a/p2p/server_test.go +++ b/p2p/server_test.go @@ -11,7 +11,7 @@ import ( func startTestServer(t *testing.T, pf peerFunc) *Server { server := &Server{ - Identity: NewSimpleClientIdentity("clientIdentifier", "version", "customIdentifier", "pubkey"), + Identity: &peerId{}, MaxPeers: 10, ListenAddr: "127.0.0.1:0", newPeerFunc: pf, diff --git a/rlp/decode.go b/rlp/decode.go index 712d9fcf18..a2bd042859 100644 --- a/rlp/decode.go +++ b/rlp/decode.go @@ -76,22 +76,37 @@ func Decode(r io.Reader, val interface{}) error { type decodeError struct { msg string typ reflect.Type + ctx []string } -func (err decodeError) Error() string { - return fmt.Sprintf("rlp: %s for %v", err.msg, err.typ) +func (err *decodeError) Error() string { + ctx := "" + if len(err.ctx) > 0 { + ctx = ", decoding into " + for i := len(err.ctx) - 1; i >= 0; i-- { + ctx += err.ctx[i] + } + } + return fmt.Sprintf("rlp: %s for %v%s", err.msg, err.typ, ctx) } func wrapStreamError(err error, typ reflect.Type) error { switch err { case ErrExpectedList: - return decodeError{"expected input list", typ} + return &decodeError{msg: "expected input list", typ: typ} case ErrExpectedString: - return decodeError{"expected input string or byte", typ} + return &decodeError{msg: "expected input string or byte", typ: typ} case errUintOverflow: - return decodeError{"input string too long", typ} + return &decodeError{msg: "input string too long", typ: typ} case errNotAtEOL: - return decodeError{"input list has too many elements", typ} + return &decodeError{msg: "input list has too many elements", typ: typ} + } + return err +} + +func addErrorContext(err error, ctx string) error { + if decErr, ok := err.(*decodeError); ok { + decErr.ctx = append(decErr.ctx, ctx) } return err } @@ -180,13 +195,13 @@ func makeListDecoder(typ reflect.Type) (decoder, error) { return nil, err } - if typ.Kind() == reflect.Array { - return func(s *Stream, val reflect.Value) error { - return decodeListArray(s, val, etypeinfo.decoder) - }, nil - } + isArray := typ.Kind() == reflect.Array return func(s *Stream, val reflect.Value) error { - return decodeListSlice(s, val, etypeinfo.decoder) + if isArray { + return decodeListArray(s, val, etypeinfo.decoder) + } else { + return decodeListSlice(s, val, etypeinfo.decoder) + } }, nil } @@ -219,7 +234,7 @@ func decodeListSlice(s *Stream, val reflect.Value, elemdec decoder) error { if err := elemdec(s, val.Index(i)); err == EOL { break } else if err != nil { - return err + return addErrorContext(err, fmt.Sprint("[", i, "]")) } } if i < val.Len() { @@ -248,7 +263,7 @@ func decodeListArray(s *Stream, val reflect.Value, elemdec decoder) error { if err := elemdec(s, val.Index(i)); err == EOL { break } else if err != nil { - return err + return addErrorContext(err, fmt.Sprint("[", i, "]")) } } if i < vlen { @@ -280,14 +295,14 @@ func decodeByteArray(s *Stream, val reflect.Value) error { switch kind { case Byte: if val.Len() == 0 { - return decodeError{"input string too long", val.Type()} + return &decodeError{msg: "input string too long", typ: val.Type()} } bv, _ := s.Uint() val.Index(0).SetUint(bv) zero(val, 1) case String: if uint64(val.Len()) < size { - return decodeError{"input string too long", val.Type()} + return &decodeError{msg: "input string too long", typ: val.Type()} } slice := val.Slice(0, int(size)).Interface().([]byte) if err := s.readFull(slice); err != nil { @@ -334,7 +349,7 @@ func makeStructDecoder(typ reflect.Type) (decoder, error) { // too few elements. leave the rest at their zero value. break } else if err != nil { - return err + return addErrorContext(err, "."+typ.Field(f.index).Name) } } return wrapStreamError(s.ListEnd(), typ) @@ -599,7 +614,13 @@ func (s *Stream) Decode(val interface{}) error { if err != nil { return err } - return info.decoder(s, rval.Elem()) + + err = info.decoder(s, rval.Elem()) + if decErr, ok := err.(*decodeError); ok && len(decErr.ctx) > 0 { + // add decode target type to error so context has more meaning + decErr.ctx = append(decErr.ctx, fmt.Sprint("(", rtyp.Elem(), ")")) + } + return err } // Reset discards any information about the current decoding context diff --git a/rlp/decode_test.go b/rlp/decode_test.go index 7a1743937d..18ea63a090 100644 --- a/rlp/decode_test.go +++ b/rlp/decode_test.go @@ -231,7 +231,12 @@ var decodeTests = []decodeTest{ {input: "8D6162636465666768696A6B6C6D", ptr: new([]byte), value: []byte("abcdefghijklm")}, {input: "C0", ptr: new([]byte), value: []byte{}}, {input: "C3010203", ptr: new([]byte), value: []byte{1, 2, 3}}, - {input: "C3820102", ptr: new([]byte), error: "rlp: input string too long for uint8"}, + + { + input: "C3820102", + ptr: new([]byte), + error: "rlp: input string too long for uint8, decoding into ([]uint8)[0]", + }, // byte arrays {input: "01", ptr: new([5]byte), value: [5]byte{1}}, @@ -239,9 +244,22 @@ var decodeTests = []decodeTest{ {input: "850102030405", ptr: new([5]byte), value: [5]byte{1, 2, 3, 4, 5}}, {input: "C0", ptr: new([5]byte), value: [5]byte{}}, {input: "C3010203", ptr: new([5]byte), value: [5]byte{1, 2, 3, 0, 0}}, - {input: "C3820102", ptr: new([5]byte), error: "rlp: input string too long for uint8"}, - {input: "86010203040506", ptr: new([5]byte), error: "rlp: input string too long for [5]uint8"}, - {input: "850101", ptr: new([5]byte), error: io.ErrUnexpectedEOF.Error()}, + + { + input: "C3820102", + ptr: new([5]byte), + error: "rlp: input string too long for uint8, decoding into ([5]uint8)[0]", + }, + { + input: "86010203040506", + ptr: new([5]byte), + error: "rlp: input string too long for [5]uint8", + }, + { + input: "850101", + ptr: new([5]byte), + error: io.ErrUnexpectedEOF.Error(), + }, // byte array reuse (should be zeroed) {input: "850102030405", ptr: &sharedByteArray, value: [5]byte{1, 2, 3, 4, 5}}, @@ -272,13 +290,23 @@ var decodeTests = []decodeTest{ {input: "C0", ptr: new(simplestruct), value: simplestruct{0, ""}}, {input: "C105", ptr: new(simplestruct), value: simplestruct{5, ""}}, {input: "C50583343434", ptr: new(simplestruct), value: simplestruct{5, "444"}}, - {input: "C3010101", ptr: new(simplestruct), error: "rlp: input list has too many elements for rlp.simplestruct"}, { input: "C501C302C103", ptr: new(recstruct), value: recstruct{1, &recstruct{2, &recstruct{3, nil}}}, }, + { + input: "C3010101", + ptr: new(simplestruct), + error: "rlp: input list has too many elements for rlp.simplestruct", + }, + { + input: "C501C3C00000", + ptr: new(recstruct), + error: "rlp: expected input string or byte for uint, decoding into (rlp.recstruct).Child.I", + }, + // pointers {input: "00", ptr: new(*uint), value: (*uint)(nil)}, {input: "80", ptr: new(*uint), value: (*uint)(nil)}, From f16810c48e7cb753844d6eea1a68361fc1539389 Mon Sep 17 00:00:00 2001 From: obscuren Date: Mon, 5 Jan 2015 17:12:52 +0100 Subject: [PATCH 077/132] added shh back in --- cmd/mist/assets/qml/main.qml | 1 + cmd/mist/gui.go | 2 +- cmd/mist/ui_lib.go | 4 +++- cmd/utils/cmd.go | 6 +++++- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/cmd/mist/assets/qml/main.qml b/cmd/mist/assets/qml/main.qml index 5df4c8aad2..0848d13d53 100644 --- a/cmd/mist/assets/qml/main.qml +++ b/cmd/mist/assets/qml/main.qml @@ -866,6 +866,7 @@ ApplicationWindow { model: ListModel { id: pastPeers } Component.onCompleted: { + pastPeers.insert(0, {text: "poc-8.ethdev.com:30303"}) /* var ips = eth.pastPeers() for(var i = 0; i < ips.length; i++) { diff --git a/cmd/mist/gui.go b/cmd/mist/gui.go index 8e533d9772..9efec65276 100644 --- a/cmd/mist/gui.go +++ b/cmd/mist/gui.go @@ -112,7 +112,7 @@ func (gui *Gui) Start(assetPath string) { // Expose the eth library and the ui library to QML context.SetVar("gui", gui) context.SetVar("eth", gui.uiLib) - //context.SetVar("shh", gui.whisper) + context.SetVar("shh", gui.whisper) // Load the main QML interface data, _ := ethutil.Config.Db.Get([]byte("KeyRing")) diff --git a/cmd/mist/ui_lib.go b/cmd/mist/ui_lib.go index 4a92f64796..0aabb87d09 100644 --- a/cmd/mist/ui_lib.go +++ b/cmd/mist/ui_lib.go @@ -195,7 +195,9 @@ func (ui *UiLib) Connect(button qml.Object) { } func (ui *UiLib) ConnectToPeer(addr string) { - ui.eth.SuggestPeer(addr) + if err := ui.eth.SuggestPeer(addr); err != nil { + guilogger.Infoln(err) + } } func (ui *UiLib) AssetPath(p string) string { diff --git a/cmd/utils/cmd.go b/cmd/utils/cmd.go index 7e6dd5f912..d01d9da9f9 100644 --- a/cmd/utils/cmd.go +++ b/cmd/utils/cmd.go @@ -100,7 +100,11 @@ func exit(err error) { func StartEthereum(ethereum *eth.Ethereum, UseSeed bool) { clilogger.Infof("Starting %s", ethereum.ClientIdentity()) - ethereum.Start(UseSeed) + err := ethereum.Start(UseSeed) + if err != nil { + exit(err) + } + RegisterInterrupt(func(sig os.Signal) { ethereum.Stop() logger.Flush() From d001479a47ee27a460a7cc6df136176662fd1799 Mon Sep 17 00:00:00 2001 From: obscuren Date: Mon, 5 Jan 2015 17:15:25 +0100 Subject: [PATCH 078/132] unclean shutdown for now --- eth/block_pool.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eth/block_pool.go b/eth/block_pool.go index 519c9fc13c..2334330e0b 100644 --- a/eth/block_pool.go +++ b/eth/block_pool.go @@ -142,7 +142,7 @@ func (self *BlockPool) Stop() { poolLogger.Infoln("Stopping...") close(self.quit) - self.wg.Wait() + //self.wg.Wait() self.peersLock.Lock() self.peers = nil From 04c0f7e15c03dc1ff9b809c93a7c55c9b5174db6 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Mon, 5 Jan 2015 17:38:39 +0100 Subject: [PATCH 079/132] cmd/rlpdump: add license header and synopsis --- cmd/rlpdump/main.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/cmd/rlpdump/main.go b/cmd/rlpdump/main.go index 4fb53369af..2454d22793 100644 --- a/cmd/rlpdump/main.go +++ b/cmd/rlpdump/main.go @@ -1,3 +1,21 @@ +/* + This file is part of go-ethereum + + go-ethereum is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + go-ethereum is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with go-ethereum. If not, see . +*/ + +// rlpdump is a pretty-printer for RLP data. package main import ( From b99b2c446ca3a81a692eb58294d5a4f6a999f00c Mon Sep 17 00:00:00 2001 From: obscuren Date: Mon, 5 Jan 2015 17:37:30 +0100 Subject: [PATCH 080/132] Precompiled contract & Depth change * Added pre-compiled contract 0x04 (mem cpy) * Changed depth error to return the gas instead of consuming --- core/execution.go | 3 ++- vm/address.go | 16 ++++++++++++++++ vm/common.go | 1 + 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/core/execution.go b/core/execution.go index a7bb596516..43f4b58fb0 100644 --- a/core/execution.go +++ b/core/execution.go @@ -36,7 +36,8 @@ func (self *Execution) exec(code, contextAddr []byte, caller vm.ContextRef) (ret evm := vm.New(env, vm.DebugVmTy) if env.Depth() == vm.MaxCallDepth { - // Consume all gas (by not returning it) and return a depth error + caller.ReturnGas(self.Gas, self.price) + return nil, vm.DepthError{} } diff --git a/vm/address.go b/vm/address.go index 611979c941..be4284421d 100644 --- a/vm/address.go +++ b/vm/address.go @@ -21,19 +21,31 @@ func (self PrecompiledAccount) Call(in []byte) []byte { } var Precompiled = map[string]*PrecompiledAccount{ + // ECRECOVER string(ethutil.LeftPadBytes([]byte{1}, 20)): &PrecompiledAccount{func(l int) *big.Int { return GasEcrecover }, ecrecoverFunc}, + + // SHA256 string(ethutil.LeftPadBytes([]byte{2}, 20)): &PrecompiledAccount{func(l int) *big.Int { n := big.NewInt(int64(l+31)/32 + 1) n.Mul(n, GasSha256) return n }, sha256Func}, + + // RIPEMD160 string(ethutil.LeftPadBytes([]byte{3}, 20)): &PrecompiledAccount{func(l int) *big.Int { n := big.NewInt(int64(l+31)/32 + 1) n.Mul(n, GasRipemd) return n }, ripemd160Func}, + + string(ethutil.LeftPadBytes([]byte{4}, 20)): &PrecompiledAccount{func(l int) *big.Int { + n := big.NewInt(int64(l+31)/32 + 1) + n.Mul(n, GasMemCpy) + + return n + }, memCpy}, } func sha256Func(in []byte) []byte { @@ -54,3 +66,7 @@ func ecrecoverFunc(in []byte) []byte { return ethutil.LeftPadBytes(crypto.Sha3(crypto.Ecrecover(append(hash, sig...))[1:])[12:], 32) } + +func memCpy(in []byte) []byte { + return in +} diff --git a/vm/common.go b/vm/common.go index 529bbdeb18..acf18eede1 100644 --- a/vm/common.go +++ b/vm/common.go @@ -38,6 +38,7 @@ var ( GasSha256 = big.NewInt(50) GasRipemd = big.NewInt(50) GasEcrecover = big.NewInt(500) + GasMemCpy = big.NewInt(1) Pow256 = ethutil.BigPow(2, 256) From 952287db29b5b387f646534cc80479005fd593cb Mon Sep 17 00:00:00 2001 From: obscuren Date: Mon, 5 Jan 2015 17:40:23 +0100 Subject: [PATCH 081/132] Updated tests --- tests/files/StateTests/stRecursiveCreate.json | 4 +- .../StateTests/stSystemOperationsTest.json | 18 +++---- .../VMTests/RandomTests/201412231524.json | 46 ---------------- .../VMTests/RandomTests/201412231526.json | 46 ---------------- .../VMTests/RandomTests/201412231529.json | 46 ---------------- .../VMTests/RandomTests/201412231535.json | 46 ---------------- .../VMTests/RandomTests/201412231543.json | 46 ---------------- .../VMTests/RandomTests/201412231544.json | 46 ---------------- .../VMTests/RandomTests/201412231545.json | 46 ---------------- .../VMTests/RandomTests/201412231546.json | 46 ---------------- .../VMTests/RandomTests/201412231549.json | 46 ---------------- .../VMTests/RandomTests/201412231551.json | 46 ---------------- .../VMTests/RandomTests/201412231552.json | 46 ---------------- .../VMTests/RandomTests/201412231553.json | 46 ---------------- .../VMTests/RandomTests/201412231556.json | 46 ---------------- .../VMTests/RandomTests/201412231557.json | 46 ---------------- .../VMTests/RandomTests/201412231558.json | 46 ---------------- .../VMTests/RandomTests/201412231559.json | 46 ---------------- .../VMTests/RandomTests/201412231601.json | 46 ---------------- .../VMTests/RandomTests/201412231602.json | 53 ------------------- .../VMTests/RandomTests/201412231604.json | 46 ---------------- .../VMTests/RandomTests/201412231606.json | 46 ---------------- .../VMTests/RandomTests/201412231610.json | 46 ---------------- .../VMTests/RandomTests/201412231611.json | 46 ---------------- .../VMTests/RandomTests/201412231612.json | 46 ---------------- .../VMTests/RandomTests/201412231613.json | 46 ---------------- .../VMTests/RandomTests/201412231616.json | 53 ------------------- .../VMTests/RandomTests/201412231617.json | 46 ---------------- .../VMTests/RandomTests/201412231619.json | 46 ---------------- .../VMTests/RandomTests/201412231620.json | 46 ---------------- .../VMTests/RandomTests/201412231622.json | 46 ---------------- .../VMTests/RandomTests/201412231623.json | 46 ---------------- .../VMTests/RandomTests/201412231625.json | 46 ---------------- .../VMTests/RandomTests/201412231626.json | 46 ---------------- .../VMTests/RandomTests/201412231627.json | 46 ---------------- .../VMTests/RandomTests/201412231629.json | 46 ---------------- .../VMTests/RandomTests/201412231630.json | 46 ---------------- .../VMTests/RandomTests/201412231631.json | 53 ------------------- .../VMTests/RandomTests/201412231632.json | 46 ---------------- .../VMTests/RandomTests/201412231633.json | 46 ---------------- .../VMTests/RandomTests/201412231634.json | 46 ---------------- .../VMTests/RandomTests/201412231635.json | 46 ---------------- .../VMTests/RandomTests/201412231637.json | 46 ---------------- .../VMTests/RandomTests/201412231638.json | 46 ---------------- .../VMTests/RandomTests/201412231641.json | 46 ---------------- .../VMTests/RandomTests/201412231642.json | 46 ---------------- .../VMTests/RandomTests/201412231646.json | 46 ---------------- .../VMTests/RandomTests/201412231647.json | 46 ---------------- .../VMTests/RandomTests/201412231648.json | 46 ---------------- .../VMTests/RandomTests/201412231649.json | 46 ---------------- .../VMTests/RandomTests/201412231650.json | 46 ---------------- .../VMTests/RandomTests/201412231652.json | 46 ---------------- .../VMTests/RandomTests/201412231655.json | 46 ---------------- .../VMTests/RandomTests/201412231656.json | 46 ---------------- .../VMTests/RandomTests/201412231657.json | 46 ---------------- .../VMTests/RandomTests/201412231700.json | 46 ---------------- .../VMTests/RandomTests/201412231706.json | 46 ---------------- .../VMTests/RandomTests/201412231707.json | 31 ----------- .../VMTests/RandomTests/201412231708.json | 46 ---------------- .../VMTests/RandomTests/201412231711.json | 46 ---------------- .../VMTests/RandomTests/201412231712.json | 46 ---------------- .../VMTests/RandomTests/201412231714.json | 46 ---------------- .../VMTests/RandomTests/201412231715.json | 46 ---------------- .../VMTests/RandomTests/201412231717.json | 46 ---------------- .../VMTests/RandomTests/201412231723.json | 46 ---------------- .../VMTests/RandomTests/201412231727.json | 46 ---------------- .../VMTests/RandomTests/201412232225.json | 46 ---------------- .../VMTests/RandomTests/201412232226.json | 31 ----------- .../VMTests/RandomTests/201412232228.json | 46 ---------------- .../VMTests/RandomTests/201412232230.json | 46 ---------------- .../VMTests/RandomTests/201412232231.json | 46 ---------------- .../VMTests/RandomTests/201412232232.json | 46 ---------------- .../VMTests/RandomTests/201412232233.json | 46 ---------------- .../VMTests/RandomTests/201412232234.json | 46 ---------------- .../VMTests/RandomTests/201412232235.json | 53 ------------------- .../VMTests/RandomTests/201412232236.json | 46 ---------------- .../VMTests/RandomTests/201412232237.json | 46 ---------------- .../VMTests/RandomTests/201412232238.json | 46 ---------------- .../VMTests/RandomTests/201412232239.json | 46 ---------------- .../VMTests/RandomTests/201412232240.json | 46 ---------------- .../VMTests/RandomTests/201412232241.json | 46 ---------------- .../VMTests/RandomTests/201412232242.json | 46 ---------------- .../VMTests/RandomTests/201412232243.json | 46 ---------------- .../VMTests/RandomTests/201412232244.json | 46 ---------------- .../VMTests/RandomTests/201412232245.json | 46 ---------------- .../VMTests/RandomTests/201412232246.json | 46 ---------------- .../VMTests/RandomTests/201412232247.json | 46 ---------------- .../VMTests/RandomTests/201412232248.json | 46 ---------------- .../VMTests/RandomTests/201412232249.json | 46 ---------------- .../VMTests/RandomTests/201412232250.json | 46 ---------------- .../VMTests/RandomTests/201412232252.json | 46 ---------------- .../VMTests/RandomTests/201412232253.json | 53 ------------------- .../VMTests/RandomTests/201412232254.json | 46 ---------------- .../VMTests/RandomTests/201412232255.json | 46 ---------------- .../VMTests/RandomTests/201412232256.json | 53 ------------------- .../VMTests/RandomTests/201412232257.json | 46 ---------------- .../VMTests/RandomTests/201412232258.json | 46 ---------------- .../VMTests/RandomTests/201412232300.json | 46 ---------------- .../VMTests/RandomTests/201412232301.json | 46 ---------------- .../VMTests/RandomTests/201412232303.json | 46 ---------------- .../VMTests/RandomTests/201412232304.json | 46 ---------------- .../VMTests/RandomTests/201412232305.json | 46 ---------------- .../VMTests/RandomTests/201412232306.json | 46 ---------------- .../VMTests/RandomTests/201412232307.json | 46 ---------------- .../VMTests/RandomTests/201412232308.json | 46 ---------------- .../VMTests/RandomTests/201412232309.json | 46 ---------------- .../VMTests/RandomTests/201412232311.json | 46 ---------------- .../VMTests/RandomTests/201412232312.json | 31 ----------- .../VMTests/RandomTests/201412232313.json | 46 ---------------- .../VMTests/RandomTests/201412232314.json | 46 ---------------- .../VMTests/RandomTests/201412232317.json | 46 ---------------- .../VMTests/RandomTests/201412232318.json | 46 ---------------- .../VMTests/RandomTests/201412232319.json | 46 ---------------- .../VMTests/RandomTests/201412232320.json | 46 ---------------- .../VMTests/RandomTests/201412232321.json | 31 ----------- .../VMTests/RandomTests/201412232323.json | 46 ---------------- .../VMTests/RandomTests/201412232324.json | 46 ---------------- .../VMTests/RandomTests/201412232327.json | 46 ---------------- .../VMTests/RandomTests/201412232328.json | 46 ---------------- .../VMTests/RandomTests/201412232330.json | 46 ---------------- .../VMTests/RandomTests/201412232331.json | 46 ---------------- .../VMTests/RandomTests/201412232336.json | 46 ---------------- .../VMTests/RandomTests/201412232338.json | 46 ---------------- .../VMTests/RandomTests/201412232341.json | 46 ---------------- .../VMTests/RandomTests/201412232342.json | 46 ---------------- .../VMTests/RandomTests/201412232343.json | 46 ---------------- .../VMTests/RandomTests/201412232345.json | 46 ---------------- .../VMTests/RandomTests/201412232348.json | 31 ----------- .../VMTests/RandomTests/201412232349.json | 46 ---------------- .../VMTests/RandomTests/201412232351.json | 46 ---------------- .../VMTests/RandomTests/201412232352.json | 31 ----------- .../VMTests/RandomTests/201412232353.json | 46 ---------------- .../VMTests/RandomTests/201412232354.json | 46 ---------------- .../VMTests/RandomTests/201412232355.json | 46 ---------------- .../VMTests/RandomTests/201412232356.json | 46 ---------------- .../VMTests/RandomTests/201412232357.json | 46 ---------------- .../VMTests/RandomTests/201412232358.json | 46 ---------------- .../VMTests/RandomTests/201412232359.json | 31 ----------- .../VMTests/RandomTests/201412240001.json | 46 ---------------- .../VMTests/RandomTests/201412240002.json | 46 ---------------- .../VMTests/RandomTests/201412240004.json | 31 ----------- .../VMTests/RandomTests/201412240005.json | 46 ---------------- .../VMTests/RandomTests/201412240006.json | 46 ---------------- .../VMTests/RandomTests/201412240007.json | 46 ---------------- .../VMTests/RandomTests/201412240010.json | 46 ---------------- .../VMTests/RandomTests/201412240011.json | 46 ---------------- .../VMTests/RandomTests/201412240012.json | 46 ---------------- .../VMTests/RandomTests/201412240013.json | 46 ---------------- .../VMTests/RandomTests/201412240014.json | 46 ---------------- .../VMTests/RandomTests/201412240015.json | 46 ---------------- .../VMTests/RandomTests/201412240016.json | 46 ---------------- .../VMTests/RandomTests/201412240017.json | 46 ---------------- .../VMTests/RandomTests/201412240019.json | 46 ---------------- .../VMTests/RandomTests/201412240020.json | 46 ---------------- .../VMTests/RandomTests/201412240021.json | 46 ---------------- .../VMTests/RandomTests/201412240022.json | 46 ---------------- .../VMTests/RandomTests/201412240023.json | 46 ---------------- .../VMTests/RandomTests/201412240024.json | 46 ---------------- .../VMTests/RandomTests/201412240025.json | 46 ---------------- .../VMTests/RandomTests/201412240026.json | 46 ---------------- .../VMTests/RandomTests/201412240028.json | 46 ---------------- .../VMTests/RandomTests/201412240030.json | 31 ----------- .../VMTests/RandomTests/201412240031.json | 46 ---------------- .../VMTests/RandomTests/201412240032.json | 31 ----------- .../VMTests/RandomTests/201412240034.json | 46 ---------------- .../VMTests/RandomTests/201412240035.json | 31 ----------- .../VMTests/RandomTests/201412240037.json | 46 ---------------- .../VMTests/RandomTests/201412240039.json | 46 ---------------- .../VMTests/RandomTests/201412240040.json | 46 ---------------- .../VMTests/RandomTests/201412240041.json | 46 ---------------- .../VMTests/RandomTests/201412240042.json | 46 ---------------- .../VMTests/RandomTests/201412240044.json | 46 ---------------- .../VMTests/RandomTests/201412240045.json | 31 ----------- .../VMTests/RandomTests/201412240047.json | 46 ---------------- .../VMTests/RandomTests/201412240051.json | 46 ---------------- .../VMTests/RandomTests/201412240052.json | 46 ---------------- .../VMTests/RandomTests/201412240053.json | 46 ---------------- .../VMTests/RandomTests/201412240054.json | 46 ---------------- .../VMTests/RandomTests/201412240055.json | 46 ---------------- .../VMTests/RandomTests/201412240056.json | 46 ---------------- .../VMTests/RandomTests/201412240058.json | 46 ---------------- .../VMTests/RandomTests/201412240059.json | 31 ----------- .../VMTests/RandomTests/201412240100.json | 46 ---------------- .../VMTests/RandomTests/201412240101.json | 46 ---------------- .../VMTests/RandomTests/201412240103.json | 46 ---------------- .../VMTests/RandomTests/201412240104.json | 46 ---------------- .../VMTests/RandomTests/201412240105.json | 46 ---------------- .../VMTests/RandomTests/201412240106.json | 46 ---------------- .../VMTests/RandomTests/201412240107.json | 46 ---------------- .../VMTests/RandomTests/201412240110.json | 46 ---------------- .../VMTests/RandomTests/201412240111.json | 46 ---------------- .../VMTests/RandomTests/201412240112.json | 46 ---------------- .../VMTests/RandomTests/201412240113.json | 46 ---------------- .../VMTests/RandomTests/201412240115.json | 46 ---------------- .../VMTests/RandomTests/201412240116.json | 46 ---------------- .../VMTests/RandomTests/201412240117.json | 31 ----------- .../VMTests/RandomTests/201412240119.json | 46 ---------------- .../VMTests/RandomTests/201412240120.json | 46 ---------------- .../VMTests/RandomTests/201412240121.json | 46 ---------------- .../VMTests/RandomTests/201412240122.json | 46 ---------------- .../VMTests/RandomTests/201412240123.json | 46 ---------------- .../VMTests/RandomTests/201412240124.json | 31 ----------- .../VMTests/RandomTests/201412240125.json | 46 ---------------- .../VMTests/RandomTests/201412240126.json | 46 ---------------- .../VMTests/RandomTests/201412240127.json | 46 ---------------- .../VMTests/RandomTests/201412240128.json | 46 ---------------- .../VMTests/RandomTests/201412240129.json | 46 ---------------- .../VMTests/RandomTests/201412240130.json | 46 ---------------- .../VMTests/RandomTests/201412240131.json | 31 ----------- .../VMTests/RandomTests/201412240132.json | 46 ---------------- .../VMTests/RandomTests/201412240133.json | 46 ---------------- .../VMTests/RandomTests/201412240134.json | 46 ---------------- .../VMTests/RandomTests/201412240136.json | 31 ----------- .../VMTests/RandomTests/201412240137.json | 46 ---------------- .../VMTests/RandomTests/201412240138.json | 46 ---------------- .../VMTests/RandomTests/201412240139.json | 46 ---------------- .../VMTests/RandomTests/201412240140.json | 46 ---------------- .../VMTests/RandomTests/201412240141.json | 46 ---------------- .../VMTests/RandomTests/201412240142.json | 46 ---------------- .../VMTests/RandomTests/201412240148.json | 46 ---------------- .../VMTests/RandomTests/201412240149.json | 46 ---------------- .../VMTests/RandomTests/201412240150.json | 46 ---------------- .../VMTests/RandomTests/201412240151.json | 46 ---------------- .../VMTests/RandomTests/201412240152.json | 46 ---------------- .../VMTests/RandomTests/201412240153.json | 46 ---------------- .../VMTests/RandomTests/201412240154.json | 46 ---------------- .../VMTests/RandomTests/201412240155.json | 46 ---------------- .../VMTests/RandomTests/201412240156.json | 46 ---------------- .../VMTests/RandomTests/201412240157.json | 46 ---------------- .../VMTests/RandomTests/201412240158.json | 53 ------------------- .../VMTests/RandomTests/201412240159.json | 46 ---------------- .../VMTests/RandomTests/201412240201.json | 46 ---------------- .../VMTests/RandomTests/201412240202.json | 46 ---------------- .../VMTests/RandomTests/201412240204.json | 46 ---------------- 234 files changed, 11 insertions(+), 10477 deletions(-) delete mode 100644 tests/files/VMTests/RandomTests/201412231524.json delete mode 100644 tests/files/VMTests/RandomTests/201412231526.json delete mode 100644 tests/files/VMTests/RandomTests/201412231529.json delete mode 100644 tests/files/VMTests/RandomTests/201412231535.json delete mode 100644 tests/files/VMTests/RandomTests/201412231543.json delete mode 100644 tests/files/VMTests/RandomTests/201412231544.json delete mode 100644 tests/files/VMTests/RandomTests/201412231545.json delete mode 100644 tests/files/VMTests/RandomTests/201412231546.json delete mode 100644 tests/files/VMTests/RandomTests/201412231549.json delete mode 100644 tests/files/VMTests/RandomTests/201412231551.json delete mode 100644 tests/files/VMTests/RandomTests/201412231552.json delete mode 100644 tests/files/VMTests/RandomTests/201412231553.json delete mode 100644 tests/files/VMTests/RandomTests/201412231556.json delete mode 100644 tests/files/VMTests/RandomTests/201412231557.json delete mode 100644 tests/files/VMTests/RandomTests/201412231558.json delete mode 100644 tests/files/VMTests/RandomTests/201412231559.json delete mode 100644 tests/files/VMTests/RandomTests/201412231601.json delete mode 100644 tests/files/VMTests/RandomTests/201412231602.json delete mode 100644 tests/files/VMTests/RandomTests/201412231604.json delete mode 100644 tests/files/VMTests/RandomTests/201412231606.json delete mode 100644 tests/files/VMTests/RandomTests/201412231610.json delete mode 100644 tests/files/VMTests/RandomTests/201412231611.json delete mode 100644 tests/files/VMTests/RandomTests/201412231612.json delete mode 100644 tests/files/VMTests/RandomTests/201412231613.json delete mode 100644 tests/files/VMTests/RandomTests/201412231616.json delete mode 100644 tests/files/VMTests/RandomTests/201412231617.json delete mode 100644 tests/files/VMTests/RandomTests/201412231619.json delete mode 100644 tests/files/VMTests/RandomTests/201412231620.json delete mode 100644 tests/files/VMTests/RandomTests/201412231622.json delete mode 100644 tests/files/VMTests/RandomTests/201412231623.json delete mode 100644 tests/files/VMTests/RandomTests/201412231625.json delete mode 100644 tests/files/VMTests/RandomTests/201412231626.json delete mode 100644 tests/files/VMTests/RandomTests/201412231627.json delete mode 100644 tests/files/VMTests/RandomTests/201412231629.json delete mode 100644 tests/files/VMTests/RandomTests/201412231630.json delete mode 100644 tests/files/VMTests/RandomTests/201412231631.json delete mode 100644 tests/files/VMTests/RandomTests/201412231632.json delete mode 100644 tests/files/VMTests/RandomTests/201412231633.json delete mode 100644 tests/files/VMTests/RandomTests/201412231634.json delete mode 100644 tests/files/VMTests/RandomTests/201412231635.json delete mode 100644 tests/files/VMTests/RandomTests/201412231637.json delete mode 100644 tests/files/VMTests/RandomTests/201412231638.json delete mode 100644 tests/files/VMTests/RandomTests/201412231641.json delete mode 100644 tests/files/VMTests/RandomTests/201412231642.json delete mode 100644 tests/files/VMTests/RandomTests/201412231646.json delete mode 100644 tests/files/VMTests/RandomTests/201412231647.json delete mode 100644 tests/files/VMTests/RandomTests/201412231648.json delete mode 100644 tests/files/VMTests/RandomTests/201412231649.json delete mode 100644 tests/files/VMTests/RandomTests/201412231650.json delete mode 100644 tests/files/VMTests/RandomTests/201412231652.json delete mode 100644 tests/files/VMTests/RandomTests/201412231655.json delete mode 100644 tests/files/VMTests/RandomTests/201412231656.json delete mode 100644 tests/files/VMTests/RandomTests/201412231657.json delete mode 100644 tests/files/VMTests/RandomTests/201412231700.json delete mode 100644 tests/files/VMTests/RandomTests/201412231706.json delete mode 100644 tests/files/VMTests/RandomTests/201412231707.json delete mode 100644 tests/files/VMTests/RandomTests/201412231708.json delete mode 100644 tests/files/VMTests/RandomTests/201412231711.json delete mode 100644 tests/files/VMTests/RandomTests/201412231712.json delete mode 100644 tests/files/VMTests/RandomTests/201412231714.json delete mode 100644 tests/files/VMTests/RandomTests/201412231715.json delete mode 100644 tests/files/VMTests/RandomTests/201412231717.json delete mode 100644 tests/files/VMTests/RandomTests/201412231723.json delete mode 100644 tests/files/VMTests/RandomTests/201412231727.json delete mode 100644 tests/files/VMTests/RandomTests/201412232225.json delete mode 100644 tests/files/VMTests/RandomTests/201412232226.json delete mode 100644 tests/files/VMTests/RandomTests/201412232228.json delete mode 100644 tests/files/VMTests/RandomTests/201412232230.json delete mode 100644 tests/files/VMTests/RandomTests/201412232231.json delete mode 100644 tests/files/VMTests/RandomTests/201412232232.json delete mode 100644 tests/files/VMTests/RandomTests/201412232233.json delete mode 100644 tests/files/VMTests/RandomTests/201412232234.json delete mode 100644 tests/files/VMTests/RandomTests/201412232235.json delete mode 100644 tests/files/VMTests/RandomTests/201412232236.json delete mode 100644 tests/files/VMTests/RandomTests/201412232237.json delete mode 100644 tests/files/VMTests/RandomTests/201412232238.json delete mode 100644 tests/files/VMTests/RandomTests/201412232239.json delete mode 100644 tests/files/VMTests/RandomTests/201412232240.json delete mode 100644 tests/files/VMTests/RandomTests/201412232241.json delete mode 100644 tests/files/VMTests/RandomTests/201412232242.json delete mode 100644 tests/files/VMTests/RandomTests/201412232243.json delete mode 100644 tests/files/VMTests/RandomTests/201412232244.json delete mode 100644 tests/files/VMTests/RandomTests/201412232245.json delete mode 100644 tests/files/VMTests/RandomTests/201412232246.json delete mode 100644 tests/files/VMTests/RandomTests/201412232247.json delete mode 100644 tests/files/VMTests/RandomTests/201412232248.json delete mode 100644 tests/files/VMTests/RandomTests/201412232249.json delete mode 100644 tests/files/VMTests/RandomTests/201412232250.json delete mode 100644 tests/files/VMTests/RandomTests/201412232252.json delete mode 100644 tests/files/VMTests/RandomTests/201412232253.json delete mode 100644 tests/files/VMTests/RandomTests/201412232254.json delete mode 100644 tests/files/VMTests/RandomTests/201412232255.json delete mode 100644 tests/files/VMTests/RandomTests/201412232256.json delete mode 100644 tests/files/VMTests/RandomTests/201412232257.json delete mode 100644 tests/files/VMTests/RandomTests/201412232258.json delete mode 100644 tests/files/VMTests/RandomTests/201412232300.json delete mode 100644 tests/files/VMTests/RandomTests/201412232301.json delete mode 100644 tests/files/VMTests/RandomTests/201412232303.json delete mode 100644 tests/files/VMTests/RandomTests/201412232304.json delete mode 100644 tests/files/VMTests/RandomTests/201412232305.json delete mode 100644 tests/files/VMTests/RandomTests/201412232306.json delete mode 100644 tests/files/VMTests/RandomTests/201412232307.json delete mode 100644 tests/files/VMTests/RandomTests/201412232308.json delete mode 100644 tests/files/VMTests/RandomTests/201412232309.json delete mode 100644 tests/files/VMTests/RandomTests/201412232311.json delete mode 100644 tests/files/VMTests/RandomTests/201412232312.json delete mode 100644 tests/files/VMTests/RandomTests/201412232313.json delete mode 100644 tests/files/VMTests/RandomTests/201412232314.json delete mode 100644 tests/files/VMTests/RandomTests/201412232317.json delete mode 100644 tests/files/VMTests/RandomTests/201412232318.json delete mode 100644 tests/files/VMTests/RandomTests/201412232319.json delete mode 100644 tests/files/VMTests/RandomTests/201412232320.json delete mode 100644 tests/files/VMTests/RandomTests/201412232321.json delete mode 100644 tests/files/VMTests/RandomTests/201412232323.json delete mode 100644 tests/files/VMTests/RandomTests/201412232324.json delete mode 100644 tests/files/VMTests/RandomTests/201412232327.json delete mode 100644 tests/files/VMTests/RandomTests/201412232328.json delete mode 100644 tests/files/VMTests/RandomTests/201412232330.json delete mode 100644 tests/files/VMTests/RandomTests/201412232331.json delete mode 100644 tests/files/VMTests/RandomTests/201412232336.json delete mode 100644 tests/files/VMTests/RandomTests/201412232338.json delete mode 100644 tests/files/VMTests/RandomTests/201412232341.json delete mode 100644 tests/files/VMTests/RandomTests/201412232342.json delete mode 100644 tests/files/VMTests/RandomTests/201412232343.json delete mode 100644 tests/files/VMTests/RandomTests/201412232345.json delete mode 100644 tests/files/VMTests/RandomTests/201412232348.json delete mode 100644 tests/files/VMTests/RandomTests/201412232349.json delete mode 100644 tests/files/VMTests/RandomTests/201412232351.json delete mode 100644 tests/files/VMTests/RandomTests/201412232352.json delete mode 100644 tests/files/VMTests/RandomTests/201412232353.json delete mode 100644 tests/files/VMTests/RandomTests/201412232354.json delete mode 100644 tests/files/VMTests/RandomTests/201412232355.json delete mode 100644 tests/files/VMTests/RandomTests/201412232356.json delete mode 100644 tests/files/VMTests/RandomTests/201412232357.json delete mode 100644 tests/files/VMTests/RandomTests/201412232358.json delete mode 100644 tests/files/VMTests/RandomTests/201412232359.json delete mode 100644 tests/files/VMTests/RandomTests/201412240001.json delete mode 100644 tests/files/VMTests/RandomTests/201412240002.json delete mode 100644 tests/files/VMTests/RandomTests/201412240004.json delete mode 100644 tests/files/VMTests/RandomTests/201412240005.json delete mode 100644 tests/files/VMTests/RandomTests/201412240006.json delete mode 100644 tests/files/VMTests/RandomTests/201412240007.json delete mode 100644 tests/files/VMTests/RandomTests/201412240010.json delete mode 100644 tests/files/VMTests/RandomTests/201412240011.json delete mode 100644 tests/files/VMTests/RandomTests/201412240012.json delete mode 100644 tests/files/VMTests/RandomTests/201412240013.json delete mode 100644 tests/files/VMTests/RandomTests/201412240014.json delete mode 100644 tests/files/VMTests/RandomTests/201412240015.json delete mode 100644 tests/files/VMTests/RandomTests/201412240016.json delete mode 100644 tests/files/VMTests/RandomTests/201412240017.json delete mode 100644 tests/files/VMTests/RandomTests/201412240019.json delete mode 100644 tests/files/VMTests/RandomTests/201412240020.json delete mode 100644 tests/files/VMTests/RandomTests/201412240021.json delete mode 100644 tests/files/VMTests/RandomTests/201412240022.json delete mode 100644 tests/files/VMTests/RandomTests/201412240023.json delete mode 100644 tests/files/VMTests/RandomTests/201412240024.json delete mode 100644 tests/files/VMTests/RandomTests/201412240025.json delete mode 100644 tests/files/VMTests/RandomTests/201412240026.json delete mode 100644 tests/files/VMTests/RandomTests/201412240028.json delete mode 100644 tests/files/VMTests/RandomTests/201412240030.json delete mode 100644 tests/files/VMTests/RandomTests/201412240031.json delete mode 100644 tests/files/VMTests/RandomTests/201412240032.json delete mode 100644 tests/files/VMTests/RandomTests/201412240034.json delete mode 100644 tests/files/VMTests/RandomTests/201412240035.json delete mode 100644 tests/files/VMTests/RandomTests/201412240037.json delete mode 100644 tests/files/VMTests/RandomTests/201412240039.json delete mode 100644 tests/files/VMTests/RandomTests/201412240040.json delete mode 100644 tests/files/VMTests/RandomTests/201412240041.json delete mode 100644 tests/files/VMTests/RandomTests/201412240042.json delete mode 100644 tests/files/VMTests/RandomTests/201412240044.json delete mode 100644 tests/files/VMTests/RandomTests/201412240045.json delete mode 100644 tests/files/VMTests/RandomTests/201412240047.json delete mode 100644 tests/files/VMTests/RandomTests/201412240051.json delete mode 100644 tests/files/VMTests/RandomTests/201412240052.json delete mode 100644 tests/files/VMTests/RandomTests/201412240053.json delete mode 100644 tests/files/VMTests/RandomTests/201412240054.json delete mode 100644 tests/files/VMTests/RandomTests/201412240055.json delete mode 100644 tests/files/VMTests/RandomTests/201412240056.json delete mode 100644 tests/files/VMTests/RandomTests/201412240058.json delete mode 100644 tests/files/VMTests/RandomTests/201412240059.json delete mode 100644 tests/files/VMTests/RandomTests/201412240100.json delete mode 100644 tests/files/VMTests/RandomTests/201412240101.json delete mode 100644 tests/files/VMTests/RandomTests/201412240103.json delete mode 100644 tests/files/VMTests/RandomTests/201412240104.json delete mode 100644 tests/files/VMTests/RandomTests/201412240105.json delete mode 100644 tests/files/VMTests/RandomTests/201412240106.json delete mode 100644 tests/files/VMTests/RandomTests/201412240107.json delete mode 100644 tests/files/VMTests/RandomTests/201412240110.json delete mode 100644 tests/files/VMTests/RandomTests/201412240111.json delete mode 100644 tests/files/VMTests/RandomTests/201412240112.json delete mode 100644 tests/files/VMTests/RandomTests/201412240113.json delete mode 100644 tests/files/VMTests/RandomTests/201412240115.json delete mode 100644 tests/files/VMTests/RandomTests/201412240116.json delete mode 100644 tests/files/VMTests/RandomTests/201412240117.json delete mode 100644 tests/files/VMTests/RandomTests/201412240119.json delete mode 100644 tests/files/VMTests/RandomTests/201412240120.json delete mode 100644 tests/files/VMTests/RandomTests/201412240121.json delete mode 100644 tests/files/VMTests/RandomTests/201412240122.json delete mode 100644 tests/files/VMTests/RandomTests/201412240123.json delete mode 100644 tests/files/VMTests/RandomTests/201412240124.json delete mode 100644 tests/files/VMTests/RandomTests/201412240125.json delete mode 100644 tests/files/VMTests/RandomTests/201412240126.json delete mode 100644 tests/files/VMTests/RandomTests/201412240127.json delete mode 100644 tests/files/VMTests/RandomTests/201412240128.json delete mode 100644 tests/files/VMTests/RandomTests/201412240129.json delete mode 100644 tests/files/VMTests/RandomTests/201412240130.json delete mode 100644 tests/files/VMTests/RandomTests/201412240131.json delete mode 100644 tests/files/VMTests/RandomTests/201412240132.json delete mode 100644 tests/files/VMTests/RandomTests/201412240133.json delete mode 100644 tests/files/VMTests/RandomTests/201412240134.json delete mode 100644 tests/files/VMTests/RandomTests/201412240136.json delete mode 100644 tests/files/VMTests/RandomTests/201412240137.json delete mode 100644 tests/files/VMTests/RandomTests/201412240138.json delete mode 100644 tests/files/VMTests/RandomTests/201412240139.json delete mode 100644 tests/files/VMTests/RandomTests/201412240140.json delete mode 100644 tests/files/VMTests/RandomTests/201412240141.json delete mode 100644 tests/files/VMTests/RandomTests/201412240142.json delete mode 100644 tests/files/VMTests/RandomTests/201412240148.json delete mode 100644 tests/files/VMTests/RandomTests/201412240149.json delete mode 100644 tests/files/VMTests/RandomTests/201412240150.json delete mode 100644 tests/files/VMTests/RandomTests/201412240151.json delete mode 100644 tests/files/VMTests/RandomTests/201412240152.json delete mode 100644 tests/files/VMTests/RandomTests/201412240153.json delete mode 100644 tests/files/VMTests/RandomTests/201412240154.json delete mode 100644 tests/files/VMTests/RandomTests/201412240155.json delete mode 100644 tests/files/VMTests/RandomTests/201412240156.json delete mode 100644 tests/files/VMTests/RandomTests/201412240157.json delete mode 100644 tests/files/VMTests/RandomTests/201412240158.json delete mode 100644 tests/files/VMTests/RandomTests/201412240159.json delete mode 100644 tests/files/VMTests/RandomTests/201412240201.json delete mode 100644 tests/files/VMTests/RandomTests/201412240202.json delete mode 100644 tests/files/VMTests/RandomTests/201412240204.json diff --git a/tests/files/StateTests/stRecursiveCreate.json b/tests/files/StateTests/stRecursiveCreate.json index 9834314848..a478663292 100644 --- a/tests/files/StateTests/stRecursiveCreate.json +++ b/tests/files/StateTests/stRecursiveCreate.json @@ -1266,7 +1266,7 @@ } }, "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "465224", + "balance" : "112225", "code" : "0x", "nonce" : "0", "storage" : { @@ -4759,7 +4759,7 @@ } }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "999999999999434776", + "balance" : "999999999999787775", "code" : "0x", "nonce" : "1", "storage" : { diff --git a/tests/files/StateTests/stSystemOperationsTest.json b/tests/files/StateTests/stSystemOperationsTest.json index dd5d35c205..781be3368b 100644 --- a/tests/files/StateTests/stSystemOperationsTest.json +++ b/tests/files/StateTests/stSystemOperationsTest.json @@ -171,11 +171,11 @@ "code" : "0x6001600054016000556000600060006000600173945304eb96065b2a98b57a48a06ae28d285a71b56103e85a03f1", "nonce" : "0", "storage" : { - "0x" : "0x0200" + "0x" : "0x0201" } }, "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "8997504", + "balance" : "157725", "code" : "0x", "nonce" : "0", "storage" : { @@ -190,7 +190,7 @@ } }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "999999999990902496", + "balance" : "999999999999742275", "code" : "0x", "nonce" : "1", "storage" : { @@ -248,11 +248,11 @@ "code" : "0x6001600054016000556000600060006000600173945304eb96065b2a98b57a48a06ae28d285a71b56103e85a03f1", "nonce" : "0", "storage" : { - "0x" : "0x0200" + "0x" : "0x0201" } }, "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "8997504", + "balance" : "157725", "code" : "0x", "nonce" : "0", "storage" : { @@ -267,7 +267,7 @@ } }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "999999999990902496", + "balance" : "999999999999742275", "code" : "0x", "nonce" : "1", "storage" : { @@ -673,19 +673,19 @@ "code" : "0x600160005401600055600060006000600060003060e05a03f1600155", "nonce" : "0", "storage" : { - "0x" : "0x0400", + "0x" : "0x0401", "0x01" : "0x01" } }, "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "895752", + "balance" : "261250", "code" : "0x", "nonce" : "0", "storage" : { } }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "999999999999004248", + "balance" : "999999999999638750", "code" : "0x", "nonce" : "1", "storage" : { diff --git a/tests/files/VMTests/RandomTests/201412231524.json b/tests/files/VMTests/RandomTests/201412231524.json deleted file mode 100644 index 87796042cf..0000000000 --- a/tests/files/VMTests/RandomTests/201412231524.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x63705a0b6b69a11044518876953776", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x63705a0b6b69a11044518876953776", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x63705a0b6b69a11044518876953776", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231526.json b/tests/files/VMTests/RandomTests/201412231526.json deleted file mode 100644 index 17758b8d89..0000000000 --- a/tests/files/VMTests/RandomTests/201412231526.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x5b6ca284a383618e389e20848652", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x5b6ca284a383618e389e20848652", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x5b6ca284a383618e389e20848652", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231529.json b/tests/files/VMTests/RandomTests/201412231529.json deleted file mode 100644 index 782e78a1c4..0000000000 --- a/tests/files/VMTests/RandomTests/201412231529.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x6a5a558f440b6d7530533a356b7589", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6a5a558f440b6d7530533a356b7589", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6a5a558f440b6d7530533a356b7589", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231535.json b/tests/files/VMTests/RandomTests/201412231535.json deleted file mode 100644 index fc661805d9..0000000000 --- a/tests/files/VMTests/RandomTests/201412231535.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x68931051429d9b75069160636bff", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x68931051429d9b75069160636bff", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x68931051429d9b75069160636bff", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231543.json b/tests/files/VMTests/RandomTests/201412231543.json deleted file mode 100644 index 2a6d004ae8..0000000000 --- a/tests/files/VMTests/RandomTests/201412231543.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x5a385968087df24038513535", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9996", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x5a385968087df24038513535", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x5a385968087df24038513535", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231544.json b/tests/files/VMTests/RandomTests/201412231544.json deleted file mode 100644 index 4925a5abde..0000000000 --- a/tests/files/VMTests/RandomTests/201412231544.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x3463823507", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x3463823507", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x3463823507", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231545.json b/tests/files/VMTests/RandomTests/201412231545.json deleted file mode 100644 index ad2b3a27e9..0000000000 --- a/tests/files/VMTests/RandomTests/201412231545.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x66a3535b8b8af38a658b3b", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x66a3535b8b8af38a658b3b", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x66a3535b8b8af38a658b3b", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231546.json b/tests/files/VMTests/RandomTests/201412231546.json deleted file mode 100644 index 58e7cd2d1e..0000000000 --- a/tests/files/VMTests/RandomTests/201412231546.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x63794554ff426ef0a18a8a9c6e137a8c", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x63794554ff426ef0a18a8a9c6e137a8c", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x63794554ff426ef0a18a8a9c6e137a8c", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231549.json b/tests/files/VMTests/RandomTests/201412231549.json deleted file mode 100644 index 51a58e1a39..0000000000 --- a/tests/files/VMTests/RandomTests/201412231549.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x66509a88803091046789893377", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x66509a88803091046789893377", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x66509a88803091046789893377", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231551.json b/tests/files/VMTests/RandomTests/201412231551.json deleted file mode 100644 index fe7fad0628..0000000000 --- a/tests/files/VMTests/RandomTests/201412231551.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x426a507bf0a09c7b6a381314", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x426a507bf0a09c7b6a381314", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x426a507bf0a09c7b6a381314", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231552.json b/tests/files/VMTests/RandomTests/201412231552.json deleted file mode 100644 index 4d3acf6c21..0000000000 --- a/tests/files/VMTests/RandomTests/201412231552.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x306383a29e826a05865054039f36", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x306383a29e826a05865054039f36", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x306383a29e826a05865054039f36", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231553.json b/tests/files/VMTests/RandomTests/201412231553.json deleted file mode 100644 index 52d885a00c..0000000000 --- a/tests/files/VMTests/RandomTests/201412231553.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x66691196a4a00209506d8290855570", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x66691196a4a00209506d8290855570", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x66691196a4a00209506d8290855570", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231556.json b/tests/files/VMTests/RandomTests/201412231556.json deleted file mode 100644 index 334f6644c1..0000000000 --- a/tests/files/VMTests/RandomTests/201412231556.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x645b7753a4806e848481311373338b66", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x645b7753a4806e848481311373338b66", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x645b7753a4806e848481311373338b66", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231557.json b/tests/files/VMTests/RandomTests/201412231557.json deleted file mode 100644 index 7992fb0031..0000000000 --- a/tests/files/VMTests/RandomTests/201412231557.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x386609796d5a7b53", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x386609796d5a7b53", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x386609796d5a7b53", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231558.json b/tests/files/VMTests/RandomTests/201412231558.json deleted file mode 100644 index ef3b6ae10a..0000000000 --- a/tests/files/VMTests/RandomTests/201412231558.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x67767162694473797350685804", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x67767162694473797350685804", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x67767162694473797350685804", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231559.json b/tests/files/VMTests/RandomTests/201412231559.json deleted file mode 100644 index fe298915b1..0000000000 --- a/tests/files/VMTests/RandomTests/201412231559.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x33666b7c09ff376d", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x33666b7c09ff376d", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x33666b7c09ff376d", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231601.json b/tests/files/VMTests/RandomTests/201412231601.json deleted file mode 100644 index 09aa5b75b1..0000000000 --- a/tests/files/VMTests/RandomTests/201412231601.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x4368696e44388f615b36", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x4368696e44388f615b36", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x4368696e44388f615b36", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231602.json b/tests/files/VMTests/RandomTests/201412231602.json deleted file mode 100644 index 95e1ca48bb..0000000000 --- a/tests/files/VMTests/RandomTests/201412231602.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x323b42196b09660754097135335b", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9995", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x323b42196b09660754097135335b", - "nonce" : "0", - "storage" : { - } - }, - "cd1722f3947def4cf144679da39c4c32bdc35681" : { - "balance" : "0", - "code" : "0x", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x323b42196b09660754097135335b", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231604.json b/tests/files/VMTests/RandomTests/201412231604.json deleted file mode 100644 index 6516f112b8..0000000000 --- a/tests/files/VMTests/RandomTests/201412231604.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x6050693b0185f01830385835", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6050693b0185f01830385835", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6050693b0185f01830385835", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231606.json b/tests/files/VMTests/RandomTests/201412231606.json deleted file mode 100644 index 93d737617d..0000000000 --- a/tests/files/VMTests/RandomTests/201412231606.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x3a1563a385690668348e438532", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9996", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x3a1563a385690668348e438532", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x3a1563a385690668348e438532", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231610.json b/tests/files/VMTests/RandomTests/201412231610.json deleted file mode 100644 index c0c1941ac0..0000000000 --- a/tests/files/VMTests/RandomTests/201412231610.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x65329f329e31786a9905527af3", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x65329f329e31786a9905527af3", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x65329f329e31786a9905527af3", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231611.json b/tests/files/VMTests/RandomTests/201412231611.json deleted file mode 100644 index be169fdd37..0000000000 --- a/tests/files/VMTests/RandomTests/201412231611.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x648b099057166169", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x648b099057166169", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x648b099057166169", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231612.json b/tests/files/VMTests/RandomTests/201412231612.json deleted file mode 100644 index 272360cedc..0000000000 --- a/tests/files/VMTests/RandomTests/201412231612.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x648b418282a168170b7b", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x648b418282a168170b7b", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x648b418282a168170b7b", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231613.json b/tests/files/VMTests/RandomTests/201412231613.json deleted file mode 100644 index 5e573c9c3e..0000000000 --- a/tests/files/VMTests/RandomTests/201412231613.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x6168616716912009f154", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6168616716912009f154", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6168616716912009f154", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231616.json b/tests/files/VMTests/RandomTests/201412231616.json deleted file mode 100644 index 4668a5fa2c..0000000000 --- a/tests/files/VMTests/RandomTests/201412231616.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x44315a426414", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9976", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0000000000000000000000000000000000000100" : { - "balance" : "0", - "code" : "0x", - "nonce" : "0", - "storage" : { - } - }, - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x44315a426414", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x44315a426414", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231617.json b/tests/files/VMTests/RandomTests/201412231617.json deleted file mode 100644 index 319d75badb..0000000000 --- a/tests/files/VMTests/RandomTests/201412231617.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x366e5279a28d1262769a6a535a9c9558", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x366e5279a28d1262769a6a535a9c9558", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x366e5279a28d1262769a6a535a9c9558", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231619.json b/tests/files/VMTests/RandomTests/201412231619.json deleted file mode 100644 index 47dd53b736..0000000000 --- a/tests/files/VMTests/RandomTests/201412231619.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x305b6a96a1928e7c9c56076d", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x305b6a96a1928e7c9c56076d", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x305b6a96a1928e7c9c56076d", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231620.json b/tests/files/VMTests/RandomTests/201412231620.json deleted file mode 100644 index a34fc6960a..0000000000 --- a/tests/files/VMTests/RandomTests/201412231620.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x426c105531797997035a87408b18", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x426c105531797997035a87408b18", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x426c105531797997035a87408b18", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231622.json b/tests/files/VMTests/RandomTests/201412231622.json deleted file mode 100644 index e7b4a3ddef..0000000000 --- a/tests/files/VMTests/RandomTests/201412231622.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x336d0284979d526c2032f187667f17", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x336d0284979d526c2032f187667f17", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x336d0284979d526c2032f187667f17", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231623.json b/tests/files/VMTests/RandomTests/201412231623.json deleted file mode 100644 index 5aea43ebe8..0000000000 --- a/tests/files/VMTests/RandomTests/201412231623.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x436b748c52f188780b108c6b96", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x436b748c52f188780b108c6b96", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x436b748c52f188780b108c6b96", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231625.json b/tests/files/VMTests/RandomTests/201412231625.json deleted file mode 100644 index d1be27e2d0..0000000000 --- a/tests/files/VMTests/RandomTests/201412231625.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x69578e0b9af2098244338a6b9e", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x69578e0b9af2098244338a6b9e", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x69578e0b9af2098244338a6b9e", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231626.json b/tests/files/VMTests/RandomTests/201412231626.json deleted file mode 100644 index 81c9941241..0000000000 --- a/tests/files/VMTests/RandomTests/201412231626.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x698d73727651077b193857669659986c", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x698d73727651077b193857669659986c", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x698d73727651077b193857669659986c", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231627.json b/tests/files/VMTests/RandomTests/201412231627.json deleted file mode 100644 index 22db4ecd5a..0000000000 --- a/tests/files/VMTests/RandomTests/201412231627.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x61a3746479129d", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x61a3746479129d", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x61a3746479129d", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231629.json b/tests/files/VMTests/RandomTests/201412231629.json deleted file mode 100644 index 0766e10c89..0000000000 --- a/tests/files/VMTests/RandomTests/201412231629.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x638a058c78639b13", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x638a058c78639b13", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x638a058c78639b13", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231630.json b/tests/files/VMTests/RandomTests/201412231630.json deleted file mode 100644 index 67cf142294..0000000000 --- a/tests/files/VMTests/RandomTests/201412231630.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x41655674197220", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x41655674197220", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x41655674197220", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231631.json b/tests/files/VMTests/RandomTests/201412231631.json deleted file mode 100644 index 11062c07e3..0000000000 --- a/tests/files/VMTests/RandomTests/201412231631.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x6009316459a059", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9978", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0000000000000000000000000000000000000009" : { - "balance" : "0", - "code" : "0x", - "nonce" : "0", - "storage" : { - } - }, - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6009316459a059", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6009316459a059", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231632.json b/tests/files/VMTests/RandomTests/201412231632.json deleted file mode 100644 index 93c1344b98..0000000000 --- a/tests/files/VMTests/RandomTests/201412231632.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x443318426c6f956f0b336e78383c4369", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9995", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x443318426c6f956f0b336e78383c4369", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x443318426c6f956f0b336e78383c4369", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231633.json b/tests/files/VMTests/RandomTests/201412231633.json deleted file mode 100644 index f014bd1e2d..0000000000 --- a/tests/files/VMTests/RandomTests/201412231633.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x6473698a7f1340658e56", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6473698a7f1340658e56", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6473698a7f1340658e56", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231634.json b/tests/files/VMTests/RandomTests/201412231634.json deleted file mode 100644 index c7727700c8..0000000000 --- a/tests/files/VMTests/RandomTests/201412231634.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x65719aa3181753653597138b8e", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x65719aa3181753653597138b8e", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x65719aa3181753653597138b8e", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231635.json b/tests/files/VMTests/RandomTests/201412231635.json deleted file mode 100644 index c9c5212622..0000000000 --- a/tests/files/VMTests/RandomTests/201412231635.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x69798d6e9141115b131a6e6c1386", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x69798d6e9141115b131a6e6c1386", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x69798d6e9141115b131a6e6c1386", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231637.json b/tests/files/VMTests/RandomTests/201412231637.json deleted file mode 100644 index bdd16f0ff6..0000000000 --- a/tests/files/VMTests/RandomTests/201412231637.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x641378737e82670a328d789167", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x641378737e82670a328d789167", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x641378737e82670a328d789167", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231638.json b/tests/files/VMTests/RandomTests/201412231638.json deleted file mode 100644 index 80b936ea64..0000000000 --- a/tests/files/VMTests/RandomTests/201412231638.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x6045646b557c87", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6045646b557c87", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6045646b557c87", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231641.json b/tests/files/VMTests/RandomTests/201412231641.json deleted file mode 100644 index 29e23a5137..0000000000 --- a/tests/files/VMTests/RandomTests/201412231641.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x6272118c6d703a868015017b97162052", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6272118c6d703a868015017b97162052", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6272118c6d703a868015017b97162052", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231642.json b/tests/files/VMTests/RandomTests/201412231642.json deleted file mode 100644 index a09f74c74b..0000000000 --- a/tests/files/VMTests/RandomTests/201412231642.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x6b19134596f284a0353360996b6939", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6b19134596f284a0353360996b6939", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6b19134596f284a0353360996b6939", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231646.json b/tests/files/VMTests/RandomTests/201412231646.json deleted file mode 100644 index 071f396d5f..0000000000 --- a/tests/files/VMTests/RandomTests/201412231646.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x65951208a181326c767c9977396385", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x65951208a181326c767c9977396385", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x65951208a181326c767c9977396385", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231647.json b/tests/files/VMTests/RandomTests/201412231647.json deleted file mode 100644 index 9abe830e29..0000000000 --- a/tests/files/VMTests/RandomTests/201412231647.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x6a9f6ca23b118650a19f3a5167a0a459", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6a9f6ca23b118650a19f3a5167a0a459", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6a9f6ca23b118650a19f3a5167a0a459", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231648.json b/tests/files/VMTests/RandomTests/201412231648.json deleted file mode 100644 index 0950d81113..0000000000 --- a/tests/files/VMTests/RandomTests/201412231648.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x403211545b6567326896", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9975", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x403211545b6567326896", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x403211545b6567326896", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231649.json b/tests/files/VMTests/RandomTests/201412231649.json deleted file mode 100644 index a5fd738f49..0000000000 --- a/tests/files/VMTests/RandomTests/201412231649.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x36586333a18e", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x36586333a18e", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x36586333a18e", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231650.json b/tests/files/VMTests/RandomTests/201412231650.json deleted file mode 100644 index 9195dda7c3..0000000000 --- a/tests/files/VMTests/RandomTests/201412231650.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x698640897c149c02068770698888", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x698640897c149c02068770698888", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x698640897c149c02068770698888", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231652.json b/tests/files/VMTests/RandomTests/201412231652.json deleted file mode 100644 index 1e0d270e08..0000000000 --- a/tests/files/VMTests/RandomTests/201412231652.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x66086c52a2970b6e658ff067", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x66086c52a2970b6e658ff067", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x66086c52a2970b6e658ff067", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231655.json b/tests/files/VMTests/RandomTests/201412231655.json deleted file mode 100644 index 7cb1a645d4..0000000000 --- a/tests/files/VMTests/RandomTests/201412231655.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x33596a089c13547908f3ff8473", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x33596a089c13547908f3ff8473", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x33596a089c13547908f3ff8473", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231656.json b/tests/files/VMTests/RandomTests/201412231656.json deleted file mode 100644 index 002adc177f..0000000000 --- a/tests/files/VMTests/RandomTests/201412231656.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x658a3a577683633433698e0b92325815", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9996", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x658a3a577683633433698e0b92325815", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x658a3a577683633433698e0b92325815", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231657.json b/tests/files/VMTests/RandomTests/201412231657.json deleted file mode 100644 index 2c2d93ece6..0000000000 --- a/tests/files/VMTests/RandomTests/201412231657.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x677af1721211348a9669433c930b8493", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x677af1721211348a9669433c930b8493", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x677af1721211348a9669433c930b8493", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231700.json b/tests/files/VMTests/RandomTests/201412231700.json deleted file mode 100644 index d15f99283b..0000000000 --- a/tests/files/VMTests/RandomTests/201412231700.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x633c7060a16b38441a3a428f6f5a5680", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x633c7060a16b38441a3a428f6f5a5680", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x633c7060a16b38441a3a428f6f5a5680", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231706.json b/tests/files/VMTests/RandomTests/201412231706.json deleted file mode 100644 index 19fd77e9f2..0000000000 --- a/tests/files/VMTests/RandomTests/201412231706.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x6333557d6567168f658a", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6333557d6567168f658a", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6333557d6567168f658a", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231707.json b/tests/files/VMTests/RandomTests/201412231707.json deleted file mode 100644 index 0dbe95db29..0000000000 --- a/tests/files/VMTests/RandomTests/201412231707.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "randomVMtest" : { - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x440b6b0716", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x440b6b0716", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231708.json b/tests/files/VMTests/RandomTests/201412231708.json deleted file mode 100644 index f2f44c9803..0000000000 --- a/tests/files/VMTests/RandomTests/201412231708.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x404342416670057b", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9995", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x404342416670057b", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x404342416670057b", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231711.json b/tests/files/VMTests/RandomTests/201412231711.json deleted file mode 100644 index 086226a33b..0000000000 --- a/tests/files/VMTests/RandomTests/201412231711.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x64836b3c80336d72433566867b570b76", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x64836b3c80336d72433566867b570b76", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x64836b3c80336d72433566867b570b76", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231712.json b/tests/files/VMTests/RandomTests/201412231712.json deleted file mode 100644 index 0e460d2555..0000000000 --- a/tests/files/VMTests/RandomTests/201412231712.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x334160506964656e099f950258", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9996", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x334160506964656e099f950258", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x334160506964656e099f950258", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231714.json b/tests/files/VMTests/RandomTests/201412231714.json deleted file mode 100644 index 540d8aaec1..0000000000 --- a/tests/files/VMTests/RandomTests/201412231714.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x683a017b5334920742625a69588483", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x683a017b5334920742625a69588483", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x683a017b5334920742625a69588483", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231715.json b/tests/files/VMTests/RandomTests/201412231715.json deleted file mode 100644 index 96662a2121..0000000000 --- a/tests/files/VMTests/RandomTests/201412231715.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x628f190b6276399b5440647c3b7136", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9976", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x628f190b6276399b5440647c3b7136", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x628f190b6276399b5440647c3b7136", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231717.json b/tests/files/VMTests/RandomTests/201412231717.json deleted file mode 100644 index 46303f2e4c..0000000000 --- a/tests/files/VMTests/RandomTests/201412231717.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x609b6c3a715134389e7d40301aff", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x609b6c3a715134389e7d40301aff", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x609b6c3a715134389e7d40301aff", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231723.json b/tests/files/VMTests/RandomTests/201412231723.json deleted file mode 100644 index f00ef52395..0000000000 --- a/tests/files/VMTests/RandomTests/201412231723.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x6911699262109b5982168768456836", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6911699262109b5982168768456836", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6911699262109b5982168768456836", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412231727.json b/tests/files/VMTests/RandomTests/201412231727.json deleted file mode 100644 index 3a20f94fef..0000000000 --- a/tests/files/VMTests/RandomTests/201412231727.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x66ff3c049d079833672059996fa1", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x66ff3c049d079833672059996fa1", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x66ff3c049d079833672059996fa1", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232225.json b/tests/files/VMTests/RandomTests/201412232225.json deleted file mode 100644 index 610e96357b..0000000000 --- a/tests/files/VMTests/RandomTests/201412232225.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x6431703c0aa36a6d9da05791", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6431703c0aa36a6d9da05791", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6431703c0aa36a6d9da05791", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232226.json b/tests/files/VMTests/RandomTests/201412232226.json deleted file mode 100644 index dd49687bdb..0000000000 --- a/tests/files/VMTests/RandomTests/201412232226.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "randomVMtest" : { - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x624314060b38", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x624314060b38", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232228.json b/tests/files/VMTests/RandomTests/201412232228.json deleted file mode 100644 index f310618c57..0000000000 --- a/tests/files/VMTests/RandomTests/201412232228.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x6565877c6056136a7e670967", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6565877c6056136a7e670967", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6565877c6056136a7e670967", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232230.json b/tests/files/VMTests/RandomTests/201412232230.json deleted file mode 100644 index c692af1a30..0000000000 --- a/tests/files/VMTests/RandomTests/201412232230.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x458010546b909b3b42049d2012", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9976", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x458010546b909b3b42049d2012", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x458010546b909b3b42049d2012", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232231.json b/tests/files/VMTests/RandomTests/201412232231.json deleted file mode 100644 index a6f68ee386..0000000000 --- a/tests/files/VMTests/RandomTests/201412232231.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x621690786a6692556c510a8862107e", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x621690786a6692556c510a8862107e", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x621690786a6692556c510a8862107e", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232232.json b/tests/files/VMTests/RandomTests/201412232232.json deleted file mode 100644 index ced426ebf7..0000000000 --- a/tests/files/VMTests/RandomTests/201412232232.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x698d99f10970f07020ff825063619317", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x698d99f10970f07020ff825063619317", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x698d99f10970f07020ff825063619317", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232233.json b/tests/files/VMTests/RandomTests/201412232233.json deleted file mode 100644 index 6f2685b554..0000000000 --- a/tests/files/VMTests/RandomTests/201412232233.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x6341409a85368162177e", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9996", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6341409a85368162177e", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6341409a85368162177e", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232234.json b/tests/files/VMTests/RandomTests/201412232234.json deleted file mode 100644 index 148480178e..0000000000 --- a/tests/files/VMTests/RandomTests/201412232234.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x4463190344", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x4463190344", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x4463190344", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232235.json b/tests/files/VMTests/RandomTests/201412232235.json deleted file mode 100644 index 24e84b4f61..0000000000 --- a/tests/files/VMTests/RandomTests/201412232235.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x4031620143", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9978", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x4031620143", - "nonce" : "0", - "storage" : { - } - }, - "c63e079ee08998b6045136a8ce6635c7912ec0b6" : { - "balance" : "0", - "code" : "0x", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x4031620143", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232236.json b/tests/files/VMTests/RandomTests/201412232236.json deleted file mode 100644 index bd8cf6a8d0..0000000000 --- a/tests/files/VMTests/RandomTests/201412232236.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x33698b6f60084314598655", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x33698b6f60084314598655", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x33698b6f60084314598655", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232237.json b/tests/files/VMTests/RandomTests/201412232237.json deleted file mode 100644 index 7431224db6..0000000000 --- a/tests/files/VMTests/RandomTests/201412232237.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x6615431505719a756a803a9b03", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6615431505719a756a803a9b03", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6615431505719a756a803a9b03", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232238.json b/tests/files/VMTests/RandomTests/201412232238.json deleted file mode 100644 index fe57fadc47..0000000000 --- a/tests/files/VMTests/RandomTests/201412232238.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x638f9f9b6c623412", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x638f9f9b6c623412", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x638f9f9b6c623412", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232239.json b/tests/files/VMTests/RandomTests/201412232239.json deleted file mode 100644 index 6954e5552b..0000000000 --- a/tests/files/VMTests/RandomTests/201412232239.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x3266049b39391235", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x3266049b39391235", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x3266049b39391235", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232240.json b/tests/files/VMTests/RandomTests/201412232240.json deleted file mode 100644 index 016007e5d6..0000000000 --- a/tests/files/VMTests/RandomTests/201412232240.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x6354996306699a91179702", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6354996306699a91179702", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6354996306699a91179702", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232241.json b/tests/files/VMTests/RandomTests/201412232241.json deleted file mode 100644 index e06f002561..0000000000 --- a/tests/files/VMTests/RandomTests/201412232241.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x6667703417606679651a6f8e", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6667703417606679651a6f8e", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6667703417606679651a6f8e", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232242.json b/tests/files/VMTests/RandomTests/201412232242.json deleted file mode 100644 index 187beecc99..0000000000 --- a/tests/files/VMTests/RandomTests/201412232242.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x5a627678", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x5a627678", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x5a627678", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232243.json b/tests/files/VMTests/RandomTests/201412232243.json deleted file mode 100644 index 9c4debb695..0000000000 --- a/tests/files/VMTests/RandomTests/201412232243.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x32681550a4907a8e7305", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x32681550a4907a8e7305", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x32681550a4907a8e7305", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232244.json b/tests/files/VMTests/RandomTests/201412232244.json deleted file mode 100644 index 2221e2d098..0000000000 --- a/tests/files/VMTests/RandomTests/201412232244.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x32628c38", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x32628c38", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x32628c38", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232245.json b/tests/files/VMTests/RandomTests/201412232245.json deleted file mode 100644 index 744d0c09be..0000000000 --- a/tests/files/VMTests/RandomTests/201412232245.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x6b9371f376696fa17f15816789446e06", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6b9371f376696fa17f15816789446e06", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6b9371f376696fa17f15816789446e06", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232246.json b/tests/files/VMTests/RandomTests/201412232246.json deleted file mode 100644 index 10570bd098..0000000000 --- a/tests/files/VMTests/RandomTests/201412232246.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x627fa209666832659b6612", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x627fa209666832659b6612", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x627fa209666832659b6612", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232247.json b/tests/files/VMTests/RandomTests/201412232247.json deleted file mode 100644 index 5a4e4b8c8c..0000000000 --- a/tests/files/VMTests/RandomTests/201412232247.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x65647255418f7f644408", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x65647255418f7f644408", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x65647255418f7f644408", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232248.json b/tests/files/VMTests/RandomTests/201412232248.json deleted file mode 100644 index 090cfd12b5..0000000000 --- a/tests/files/VMTests/RandomTests/201412232248.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x6254938f669a177382456f", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6254938f669a177382456f", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6254938f669a177382456f", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232249.json b/tests/files/VMTests/RandomTests/201412232249.json deleted file mode 100644 index dae482455c..0000000000 --- a/tests/files/VMTests/RandomTests/201412232249.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x5868f00502361950688f", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x5868f00502361950688f", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x5868f00502361950688f", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232250.json b/tests/files/VMTests/RandomTests/201412232250.json deleted file mode 100644 index 78ad035781..0000000000 --- a/tests/files/VMTests/RandomTests/201412232250.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x606262556d", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x606262556d", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x606262556d", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232252.json b/tests/files/VMTests/RandomTests/201412232252.json deleted file mode 100644 index 6ec63467a0..0000000000 --- a/tests/files/VMTests/RandomTests/201412232252.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x626c6f0a63f08d", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x626c6f0a63f08d", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x626c6f0a63f08d", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232253.json b/tests/files/VMTests/RandomTests/201412232253.json deleted file mode 100644 index 2af0327d5a..0000000000 --- a/tests/files/VMTests/RandomTests/201412232253.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x6370199c7142383b4165196164", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9994", - "logs" : [ - ], - "out" : "0x", - "post" : { - "000000000000000000000000000000000000000d" : { - "balance" : "0", - "code" : "0x", - "nonce" : "0", - "storage" : { - } - }, - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6370199c7142383b4165196164", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6370199c7142383b4165196164", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232254.json b/tests/files/VMTests/RandomTests/201412232254.json deleted file mode 100644 index fd81675757..0000000000 --- a/tests/files/VMTests/RandomTests/201412232254.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x615833336c39a47d997244066a743740", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x615833336c39a47d997244066a743740", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x615833336c39a47d997244066a743740", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232255.json b/tests/files/VMTests/RandomTests/201412232255.json deleted file mode 100644 index afdb01d7f4..0000000000 --- a/tests/files/VMTests/RandomTests/201412232255.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x426c343b76548989536320300175", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x426c343b76548989536320300175", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x426c343b76548989536320300175", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232256.json b/tests/files/VMTests/RandomTests/201412232256.json deleted file mode 100644 index 20ae3118b1..0000000000 --- a/tests/files/VMTests/RandomTests/201412232256.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x3a609a316439f38370", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9977", - "logs" : [ - ], - "out" : "0x", - "post" : { - "000000000000000000000000000000000000009a" : { - "balance" : "0", - "code" : "0x", - "nonce" : "0", - "storage" : { - } - }, - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x3a609a316439f38370", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x3a609a316439f38370", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232257.json b/tests/files/VMTests/RandomTests/201412232257.json deleted file mode 100644 index c55291821f..0000000000 --- a/tests/files/VMTests/RandomTests/201412232257.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x63818808146c71949e8430744411", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x63818808146c71949e8430744411", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x63818808146c71949e8430744411", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232258.json b/tests/files/VMTests/RandomTests/201412232258.json deleted file mode 100644 index 446b11a8fb..0000000000 --- a/tests/files/VMTests/RandomTests/201412232258.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x336441839b081364091a9d03", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x336441839b081364091a9d03", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x336441839b081364091a9d03", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232300.json b/tests/files/VMTests/RandomTests/201412232300.json deleted file mode 100644 index 777dfdee60..0000000000 --- a/tests/files/VMTests/RandomTests/201412232300.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x42336a98a03b816642831584", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x42336a98a03b816642831584", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x42336a98a03b816642831584", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232301.json b/tests/files/VMTests/RandomTests/201412232301.json deleted file mode 100644 index 1904566d8f..0000000000 --- a/tests/files/VMTests/RandomTests/201412232301.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x6a67189e8545a236998870a36d5792", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6a67189e8545a236998870a36d5792", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6a67189e8545a236998870a36d5792", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232303.json b/tests/files/VMTests/RandomTests/201412232303.json deleted file mode 100644 index 950cbdb9e3..0000000000 --- a/tests/files/VMTests/RandomTests/201412232303.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x669937456d60798d6b019b17f09a", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x669937456d60798d6b019b17f09a", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x669937456d60798d6b019b17f09a", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232304.json b/tests/files/VMTests/RandomTests/201412232304.json deleted file mode 100644 index ca840ed47e..0000000000 --- a/tests/files/VMTests/RandomTests/201412232304.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x61191965ff3b07f0", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x61191965ff3b07f0", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x61191965ff3b07f0", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232305.json b/tests/files/VMTests/RandomTests/201412232305.json deleted file mode 100644 index a18a42c3e5..0000000000 --- a/tests/files/VMTests/RandomTests/201412232305.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x38156d0978a30b33655113a245588992", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x38156d0978a30b33655113a245588992", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x38156d0978a30b33655113a245588992", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232306.json b/tests/files/VMTests/RandomTests/201412232306.json deleted file mode 100644 index b565d84c0d..0000000000 --- a/tests/files/VMTests/RandomTests/201412232306.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x3a660739441536366e548167797b9e", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9976", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x3a660739441536366e548167797b9e", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x3a660739441536366e548167797b9e", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232307.json b/tests/files/VMTests/RandomTests/201412232307.json deleted file mode 100644 index 12ceb63e40..0000000000 --- a/tests/files/VMTests/RandomTests/201412232307.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x3a596596315259", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x3a596596315259", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x3a596596315259", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232308.json b/tests/files/VMTests/RandomTests/201412232308.json deleted file mode 100644 index 7e6a515110..0000000000 --- a/tests/files/VMTests/RandomTests/201412232308.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x68747b45999d950a1369688e6f6e", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x68747b45999d950a1369688e6f6e", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x68747b45999d950a1369688e6f6e", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232309.json b/tests/files/VMTests/RandomTests/201412232309.json deleted file mode 100644 index 5dbbe3376b..0000000000 --- a/tests/files/VMTests/RandomTests/201412232309.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x5b6bf07aa4813b1389f0207e14", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x5b6bf07aa4813b1389f0207e14", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x5b6bf07aa4813b1389f0207e14", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232311.json b/tests/files/VMTests/RandomTests/201412232311.json deleted file mode 100644 index 4e2cca5dce..0000000000 --- a/tests/files/VMTests/RandomTests/201412232311.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x3659608b0452638303", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9993", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x3659608b0452638303", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x3659608b0452638303", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232312.json b/tests/files/VMTests/RandomTests/201412232312.json deleted file mode 100644 index d70461cfd6..0000000000 --- a/tests/files/VMTests/RandomTests/201412232312.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "randomVMtest" : { - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x5a0b73807b793b", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x5a0b73807b793b", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232313.json b/tests/files/VMTests/RandomTests/201412232313.json deleted file mode 100644 index 19ee3e8b95..0000000000 --- a/tests/files/VMTests/RandomTests/201412232313.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x610b89336c956951a03597619d8801", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x610b89336c956951a03597619d8801", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x610b89336c956951a03597619d8801", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232314.json b/tests/files/VMTests/RandomTests/201412232314.json deleted file mode 100644 index ac7c63297f..0000000000 --- a/tests/files/VMTests/RandomTests/201412232314.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x6244169d620b9e93690770", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6244169d620b9e93690770", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6244169d620b9e93690770", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232317.json b/tests/files/VMTests/RandomTests/201412232317.json deleted file mode 100644 index b16ef5077f..0000000000 --- a/tests/files/VMTests/RandomTests/201412232317.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x3854627693", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9978", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x3854627693", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x3854627693", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232318.json b/tests/files/VMTests/RandomTests/201412232318.json deleted file mode 100644 index 9c227c2a6d..0000000000 --- a/tests/files/VMTests/RandomTests/201412232318.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x596b6e19676c0237f0a47f7b39", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x596b6e19676c0237f0a47f7b39", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x596b6e19676c0237f0a47f7b39", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232319.json b/tests/files/VMTests/RandomTests/201412232319.json deleted file mode 100644 index 53837b6413..0000000000 --- a/tests/files/VMTests/RandomTests/201412232319.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x69853b20959c5af0838d3842663250", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x69853b20959c5af0838d3842663250", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x69853b20959c5af0838d3842663250", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232320.json b/tests/files/VMTests/RandomTests/201412232320.json deleted file mode 100644 index 87e41146f9..0000000000 --- a/tests/files/VMTests/RandomTests/201412232320.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x69637511458a923a99425b68993b6169", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x69637511458a923a99425b68993b6169", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x69637511458a923a99425b68993b6169", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232321.json b/tests/files/VMTests/RandomTests/201412232321.json deleted file mode 100644 index b415205d66..0000000000 --- a/tests/files/VMTests/RandomTests/201412232321.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "randomVMtest" : { - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x3a0b7176", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x3a0b7176", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232323.json b/tests/files/VMTests/RandomTests/201412232323.json deleted file mode 100644 index e089db9369..0000000000 --- a/tests/files/VMTests/RandomTests/201412232323.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x653c8a5591898e6d3b4364806d023714", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x653c8a5591898e6d3b4364806d023714", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x653c8a5591898e6d3b4364806d023714", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232324.json b/tests/files/VMTests/RandomTests/201412232324.json deleted file mode 100644 index 29852711f5..0000000000 --- a/tests/files/VMTests/RandomTests/201412232324.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x64f187a10b95667b5a6a", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x64f187a10b95667b5a6a", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x64f187a10b95667b5a6a", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232327.json b/tests/files/VMTests/RandomTests/201412232327.json deleted file mode 100644 index f6ea120fb5..0000000000 --- a/tests/files/VMTests/RandomTests/201412232327.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x5b306a91608b949b07349c8951", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x5b306a91608b949b07349c8951", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x5b306a91608b949b07349c8951", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232328.json b/tests/files/VMTests/RandomTests/201412232328.json deleted file mode 100644 index b5ed168d00..0000000000 --- a/tests/files/VMTests/RandomTests/201412232328.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x606c456e74418b673c39335159456af3", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x606c456e74418b673c39335159456af3", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x606c456e74418b673c39335159456af3", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232330.json b/tests/files/VMTests/RandomTests/201412232330.json deleted file mode 100644 index c260f35ec1..0000000000 --- a/tests/files/VMTests/RandomTests/201412232330.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x583830696d6d4398a35b86608e", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9996", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x583830696d6d4398a35b86608e", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x583830696d6d4398a35b86608e", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232331.json b/tests/files/VMTests/RandomTests/201412232331.json deleted file mode 100644 index ec4f5cf324..0000000000 --- a/tests/files/VMTests/RandomTests/201412232331.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x65635a9840643b6b6b30970536659786", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x65635a9840643b6b6b30970536659786", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x65635a9840643b6b6b30970536659786", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232336.json b/tests/files/VMTests/RandomTests/201412232336.json deleted file mode 100644 index 6fd26bc5c7..0000000000 --- a/tests/files/VMTests/RandomTests/201412232336.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x6a675a67316d869b93758b916191", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6a675a67316d869b93758b916191", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6a675a67316d869b93758b916191", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232338.json b/tests/files/VMTests/RandomTests/201412232338.json deleted file mode 100644 index 07a4c3489a..0000000000 --- a/tests/files/VMTests/RandomTests/201412232338.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x636664690267a085518b8f7986", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x636664690267a085518b8f7986", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x636664690267a085518b8f7986", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232341.json b/tests/files/VMTests/RandomTests/201412232341.json deleted file mode 100644 index 4979c02852..0000000000 --- a/tests/files/VMTests/RandomTests/201412232341.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x406d1732976170a436736f206104f1", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x406d1732976170a436736f206104f1", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x406d1732976170a436736f206104f1", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232342.json b/tests/files/VMTests/RandomTests/201412232342.json deleted file mode 100644 index 23122711dd..0000000000 --- a/tests/files/VMTests/RandomTests/201412232342.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x656b439a6e830b44106b43745411", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9996", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x656b439a6e830b44106b43745411", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x656b439a6e830b44106b43745411", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232343.json b/tests/files/VMTests/RandomTests/201412232343.json deleted file mode 100644 index 22f293187c..0000000000 --- a/tests/files/VMTests/RandomTests/201412232343.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x3264633c34545265f0a267916d", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x3264633c34545265f0a267916d", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x3264633c34545265f0a267916d", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232345.json b/tests/files/VMTests/RandomTests/201412232345.json deleted file mode 100644 index 0a7ca313f3..0000000000 --- a/tests/files/VMTests/RandomTests/201412232345.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x33505b6b3240458e869237774370", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9996", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x33505b6b3240458e869237774370", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x33505b6b3240458e869237774370", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232348.json b/tests/files/VMTests/RandomTests/201412232348.json deleted file mode 100644 index 6a630a206e..0000000000 --- a/tests/files/VMTests/RandomTests/201412232348.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "randomVMtest" : { - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x400b40ff", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x400b40ff", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232349.json b/tests/files/VMTests/RandomTests/201412232349.json deleted file mode 100644 index 5abc60d571..0000000000 --- a/tests/files/VMTests/RandomTests/201412232349.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x621a8e7a698d209a9457993831f2", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x621a8e7a698d209a9457993831f2", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x621a8e7a698d209a9457993831f2", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232351.json b/tests/files/VMTests/RandomTests/201412232351.json deleted file mode 100644 index c42707c041..0000000000 --- a/tests/files/VMTests/RandomTests/201412232351.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x5b6c11303b937a750885a06d8bf1", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x5b6c11303b937a750885a06d8bf1", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x5b6c11303b937a750885a06d8bf1", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232352.json b/tests/files/VMTests/RandomTests/201412232352.json deleted file mode 100644 index c91bab832b..0000000000 --- a/tests/files/VMTests/RandomTests/201412232352.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "randomVMtest" : { - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x410b", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x410b", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232353.json b/tests/files/VMTests/RandomTests/201412232353.json deleted file mode 100644 index 2ddd8bb0e5..0000000000 --- a/tests/files/VMTests/RandomTests/201412232353.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x63338b4367805a6d7691519d403c506b", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9996", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x63338b4367805a6d7691519d403c506b", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x63338b4367805a6d7691519d403c506b", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232354.json b/tests/files/VMTests/RandomTests/201412232354.json deleted file mode 100644 index 2e3332259d..0000000000 --- a/tests/files/VMTests/RandomTests/201412232354.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x66895a35159e1242695377", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x66895a35159e1242695377", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x66895a35159e1242695377", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232355.json b/tests/files/VMTests/RandomTests/201412232355.json deleted file mode 100644 index b7951de1e3..0000000000 --- a/tests/files/VMTests/RandomTests/201412232355.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x62868d685967a159076a39", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x62868d685967a159076a39", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x62868d685967a159076a39", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232356.json b/tests/files/VMTests/RandomTests/201412232356.json deleted file mode 100644 index 23f796d25a..0000000000 --- a/tests/files/VMTests/RandomTests/201412232356.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x306ef08b8f387255096581203a6e3b5a", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x306ef08b8f387255096581203a6e3b5a", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x306ef08b8f387255096581203a6e3b5a", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232357.json b/tests/files/VMTests/RandomTests/201412232357.json deleted file mode 100644 index 51a5588855..0000000000 --- a/tests/files/VMTests/RandomTests/201412232357.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x4563154564", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x4563154564", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x4563154564", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232358.json b/tests/files/VMTests/RandomTests/201412232358.json deleted file mode 100644 index 346a08a81f..0000000000 --- a/tests/files/VMTests/RandomTests/201412232358.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x607467780a35a43c9b1a", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x607467780a35a43c9b1a", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x607467780a35a43c9b1a", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412232359.json b/tests/files/VMTests/RandomTests/201412232359.json deleted file mode 100644 index 3a51d6cd81..0000000000 --- a/tests/files/VMTests/RandomTests/201412232359.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "randomVMtest" : { - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x63777703320b6d86f352", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x63777703320b6d86f352", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240001.json b/tests/files/VMTests/RandomTests/201412240001.json deleted file mode 100644 index 4fc212c6c0..0000000000 --- a/tests/files/VMTests/RandomTests/201412240001.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x4463446c3172666c318655", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x4463446c3172666c318655", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x4463446c3172666c318655", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240002.json b/tests/files/VMTests/RandomTests/201412240002.json deleted file mode 100644 index 7e65c1ee3e..0000000000 --- a/tests/files/VMTests/RandomTests/201412240002.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x42657d6e3b593c", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x42657d6e3b593c", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x42657d6e3b593c", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240004.json b/tests/files/VMTests/RandomTests/201412240004.json deleted file mode 100644 index 47b38fd28c..0000000000 --- a/tests/files/VMTests/RandomTests/201412240004.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "randomVMtest" : { - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x6153030b7b", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6153030b7b", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240005.json b/tests/files/VMTests/RandomTests/201412240005.json deleted file mode 100644 index e387cce6b2..0000000000 --- a/tests/files/VMTests/RandomTests/201412240005.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x5b6cf234675b5162730291176e01", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x5b6cf234675b5162730291176e01", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x5b6cf234675b5162730291176e01", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240006.json b/tests/files/VMTests/RandomTests/201412240006.json deleted file mode 100644 index aecb337baf..0000000000 --- a/tests/files/VMTests/RandomTests/201412240006.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x61864162457c", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x61864162457c", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x61864162457c", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240007.json b/tests/files/VMTests/RandomTests/201412240007.json deleted file mode 100644 index 85f6ace5eb..0000000000 --- a/tests/files/VMTests/RandomTests/201412240007.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x6692a19ea30aa17e6a7b6351418c8e", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6692a19ea30aa17e6a7b6351418c8e", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6692a19ea30aa17e6a7b6351418c8e", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240010.json b/tests/files/VMTests/RandomTests/201412240010.json deleted file mode 100644 index add2acbeef..0000000000 --- a/tests/files/VMTests/RandomTests/201412240010.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x583066060b85637c8e", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x583066060b85637c8e", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x583066060b85637c8e", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240011.json b/tests/files/VMTests/RandomTests/201412240011.json deleted file mode 100644 index 1b4d8c88b2..0000000000 --- a/tests/files/VMTests/RandomTests/201412240011.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x3836643095353652676d", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9996", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x3836643095353652676d", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x3836643095353652676d", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240012.json b/tests/files/VMTests/RandomTests/201412240012.json deleted file mode 100644 index 0469b08eaa..0000000000 --- a/tests/files/VMTests/RandomTests/201412240012.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x6780a4019a829659446653510185f2", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6780a4019a829659446653510185f2", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6780a4019a829659446653510185f2", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240013.json b/tests/files/VMTests/RandomTests/201412240013.json deleted file mode 100644 index 249196e8d0..0000000000 --- a/tests/files/VMTests/RandomTests/201412240013.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x657da3560988606b777a77128f12", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x657da3560988606b777a77128f12", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x657da3560988606b777a77128f12", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240014.json b/tests/files/VMTests/RandomTests/201412240014.json deleted file mode 100644 index c95992dcfb..0000000000 --- a/tests/files/VMTests/RandomTests/201412240014.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x637a809755695692921272116d9d8b", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x637a809755695692921272116d9d8b", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x637a809755695692921272116d9d8b", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240015.json b/tests/files/VMTests/RandomTests/201412240015.json deleted file mode 100644 index 0443ae12f5..0000000000 --- a/tests/files/VMTests/RandomTests/201412240015.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x596a6fa050678e6491885a95", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x596a6fa050678e6491885a95", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x596a6fa050678e6491885a95", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240016.json b/tests/files/VMTests/RandomTests/201412240016.json deleted file mode 100644 index 63534bf530..0000000000 --- a/tests/files/VMTests/RandomTests/201412240016.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x40406c30114210346a1a9b30721292", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x40406c30114210346a1a9b30721292", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x40406c30114210346a1a9b30721292", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240017.json b/tests/files/VMTests/RandomTests/201412240017.json deleted file mode 100644 index bc97885436..0000000000 --- a/tests/files/VMTests/RandomTests/201412240017.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x648610a31a9d6330", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x648610a31a9d6330", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x648610a31a9d6330", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240019.json b/tests/files/VMTests/RandomTests/201412240019.json deleted file mode 100644 index b9e91d6b59..0000000000 --- a/tests/files/VMTests/RandomTests/201412240019.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x636f93019840326887a4108f52", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9996", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x636f93019840326887a4108f52", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x636f93019840326887a4108f52", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240020.json b/tests/files/VMTests/RandomTests/201412240020.json deleted file mode 100644 index 469541b726..0000000000 --- a/tests/files/VMTests/RandomTests/201412240020.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x608268357e7d3308836d40", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x608268357e7d3308836d40", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x608268357e7d3308836d40", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240021.json b/tests/files/VMTests/RandomTests/201412240021.json deleted file mode 100644 index f336bd0c6e..0000000000 --- a/tests/files/VMTests/RandomTests/201412240021.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x44506276", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x44506276", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x44506276", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240022.json b/tests/files/VMTests/RandomTests/201412240022.json deleted file mode 100644 index 34040d50b4..0000000000 --- a/tests/files/VMTests/RandomTests/201412240022.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x386a78800a30078e3132a207", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x386a78800a30078e3132a207", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x386a78800a30078e3132a207", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240023.json b/tests/files/VMTests/RandomTests/201412240023.json deleted file mode 100644 index 59ebb5276a..0000000000 --- a/tests/files/VMTests/RandomTests/201412240023.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x66587a629c69345a5465f1984532", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9978", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x66587a629c69345a5465f1984532", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x66587a629c69345a5465f1984532", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240024.json b/tests/files/VMTests/RandomTests/201412240024.json deleted file mode 100644 index 8a38487146..0000000000 --- a/tests/files/VMTests/RandomTests/201412240024.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x59649368198f", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x59649368198f", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x59649368198f", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240025.json b/tests/files/VMTests/RandomTests/201412240025.json deleted file mode 100644 index 224784e079..0000000000 --- a/tests/files/VMTests/RandomTests/201412240025.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x5a64428f1789666655f0", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x5a64428f1789666655f0", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x5a64428f1789666655f0", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240026.json b/tests/files/VMTests/RandomTests/201412240026.json deleted file mode 100644 index e3591cc051..0000000000 --- a/tests/files/VMTests/RandomTests/201412240026.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x676a16558b78588c886471", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x676a16558b78588c886471", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x676a16558b78588c886471", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240028.json b/tests/files/VMTests/RandomTests/201412240028.json deleted file mode 100644 index 1289b31894..0000000000 --- a/tests/files/VMTests/RandomTests/201412240028.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x689c098116ff14a4f1136c74379b", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x689c098116ff14a4f1136c74379b", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x689c098116ff14a4f1136c74379b", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240030.json b/tests/files/VMTests/RandomTests/201412240030.json deleted file mode 100644 index ea21a15a13..0000000000 --- a/tests/files/VMTests/RandomTests/201412240030.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "randomVMtest" : { - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x607e0b336d18533463", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x607e0b336d18533463", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240031.json b/tests/files/VMTests/RandomTests/201412240031.json deleted file mode 100644 index a59e7139a8..0000000000 --- a/tests/files/VMTests/RandomTests/201412240031.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x6558838b0404595a1634676d", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9995", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6558838b0404595a1634676d", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6558838b0404595a1634676d", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240032.json b/tests/files/VMTests/RandomTests/201412240032.json deleted file mode 100644 index 4f2ed42537..0000000000 --- a/tests/files/VMTests/RandomTests/201412240032.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "randomVMtest" : { - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x330b6b73", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x330b6b73", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240034.json b/tests/files/VMTests/RandomTests/201412240034.json deleted file mode 100644 index 0dc11d5622..0000000000 --- a/tests/files/VMTests/RandomTests/201412240034.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x4535416b597c9e0415a4320a9f44", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9996", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x4535416b597c9e0415a4320a9f44", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x4535416b597c9e0415a4320a9f44", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240035.json b/tests/files/VMTests/RandomTests/201412240035.json deleted file mode 100644 index b1cdfaf49c..0000000000 --- a/tests/files/VMTests/RandomTests/201412240035.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "randomVMtest" : { - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x6698173681448d7b5b0b", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6698173681448d7b5b0b", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240037.json b/tests/files/VMTests/RandomTests/201412240037.json deleted file mode 100644 index 12a0c50176..0000000000 --- a/tests/files/VMTests/RandomTests/201412240037.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x659859849f9859681945", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x659859849f9859681945", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x659859849f9859681945", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240039.json b/tests/files/VMTests/RandomTests/201412240039.json deleted file mode 100644 index 949caeafd8..0000000000 --- a/tests/files/VMTests/RandomTests/201412240039.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x63316053033569836a065a", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x63316053033569836a065a", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x63316053033569836a065a", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240040.json b/tests/files/VMTests/RandomTests/201412240040.json deleted file mode 100644 index 098b397f98..0000000000 --- a/tests/files/VMTests/RandomTests/201412240040.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x66459e3511a39d1466868b1a7e5b", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x66459e3511a39d1466868b1a7e5b", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x66459e3511a39d1466868b1a7e5b", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240041.json b/tests/files/VMTests/RandomTests/201412240041.json deleted file mode 100644 index b4214c4ff1..0000000000 --- a/tests/files/VMTests/RandomTests/201412240041.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x638536ff74683a076f7d648e5261", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x638536ff74683a076f7d648e5261", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x638536ff74683a076f7d648e5261", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240042.json b/tests/files/VMTests/RandomTests/201412240042.json deleted file mode 100644 index 7a7711682f..0000000000 --- a/tests/files/VMTests/RandomTests/201412240042.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x626f8a571965155943", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x626f8a571965155943", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x626f8a571965155943", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240044.json b/tests/files/VMTests/RandomTests/201412240044.json deleted file mode 100644 index fbb10dd942..0000000000 --- a/tests/files/VMTests/RandomTests/201412240044.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x4569761168a085ff08527b", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x4569761168a085ff08527b", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x4569761168a085ff08527b", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240045.json b/tests/files/VMTests/RandomTests/201412240045.json deleted file mode 100644 index 2c19c86675..0000000000 --- a/tests/files/VMTests/RandomTests/201412240045.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "randomVMtest" : { - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x440b7d521009763c", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x440b7d521009763c", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240047.json b/tests/files/VMTests/RandomTests/201412240047.json deleted file mode 100644 index 93210a7126..0000000000 --- a/tests/files/VMTests/RandomTests/201412240047.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x66350780181278f3675a5564a4a03b8d", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x66350780181278f3675a5564a4a03b8d", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x66350780181278f3675a5564a4a03b8d", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240051.json b/tests/files/VMTests/RandomTests/201412240051.json deleted file mode 100644 index df5777d587..0000000000 --- a/tests/files/VMTests/RandomTests/201412240051.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x34687b343b1679186e09", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x34687b343b1679186e09", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x34687b343b1679186e09", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240052.json b/tests/files/VMTests/RandomTests/201412240052.json deleted file mode 100644 index 1b2dac5d6e..0000000000 --- a/tests/files/VMTests/RandomTests/201412240052.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x646e303b8f516b62715952a08143", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x646e303b8f516b62715952a08143", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x646e303b8f516b62715952a08143", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240053.json b/tests/files/VMTests/RandomTests/201412240053.json deleted file mode 100644 index 3bf5674f3b..0000000000 --- a/tests/files/VMTests/RandomTests/201412240053.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x43665a1935346e75", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x43665a1935346e75", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x43665a1935346e75", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240054.json b/tests/files/VMTests/RandomTests/201412240054.json deleted file mode 100644 index d3d79807b8..0000000000 --- a/tests/files/VMTests/RandomTests/201412240054.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x62417cf166f27f169737789a6c9c0b", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x62417cf166f27f169737789a6c9c0b", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x62417cf166f27f169737789a6c9c0b", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240055.json b/tests/files/VMTests/RandomTests/201412240055.json deleted file mode 100644 index 23101221b9..0000000000 --- a/tests/files/VMTests/RandomTests/201412240055.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x659f32357bf28c306b459d9395068a", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x659f32357bf28c306b459d9395068a", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x659f32357bf28c306b459d9395068a", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240056.json b/tests/files/VMTests/RandomTests/201412240056.json deleted file mode 100644 index 16703dd22e..0000000000 --- a/tests/files/VMTests/RandomTests/201412240056.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x3067309a427d917340", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x3067309a427d917340", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x3067309a427d917340", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240058.json b/tests/files/VMTests/RandomTests/201412240058.json deleted file mode 100644 index e503a12010..0000000000 --- a/tests/files/VMTests/RandomTests/201412240058.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x446a509893399956357f397c", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x446a509893399956357f397c", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x446a509893399956357f397c", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240059.json b/tests/files/VMTests/RandomTests/201412240059.json deleted file mode 100644 index dc87049050..0000000000 --- a/tests/files/VMTests/RandomTests/201412240059.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "randomVMtest" : { - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x651994649651940b", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x651994649651940b", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240100.json b/tests/files/VMTests/RandomTests/201412240100.json deleted file mode 100644 index cf7080e616..0000000000 --- a/tests/files/VMTests/RandomTests/201412240100.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x6875f1151657436c6b9c690162", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6875f1151657436c6b9c690162", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6875f1151657436c6b9c690162", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240101.json b/tests/files/VMTests/RandomTests/201412240101.json deleted file mode 100644 index 121d7d20c6..0000000000 --- a/tests/files/VMTests/RandomTests/201412240101.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x689863403864640984ff6612046552", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x689863403864640984ff6612046552", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x689863403864640984ff6612046552", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240103.json b/tests/files/VMTests/RandomTests/201412240103.json deleted file mode 100644 index 48ed88b8d0..0000000000 --- a/tests/files/VMTests/RandomTests/201412240103.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x646b6272f1386837a175019344", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x646b6272f1386837a175019344", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x646b6272f1386837a175019344", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240104.json b/tests/files/VMTests/RandomTests/201412240104.json deleted file mode 100644 index 51ae819e0f..0000000000 --- a/tests/files/VMTests/RandomTests/201412240104.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x5b64808c6c94", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x5b64808c6c94", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x5b64808c6c94", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240105.json b/tests/files/VMTests/RandomTests/201412240105.json deleted file mode 100644 index 1efb2ca7bf..0000000000 --- a/tests/files/VMTests/RandomTests/201412240105.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x30368013638a7e613350675b0b6552", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9993", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x30368013638a7e613350675b0b6552", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x30368013638a7e613350675b0b6552", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240106.json b/tests/files/VMTests/RandomTests/201412240106.json deleted file mode 100644 index a4625e3a3c..0000000000 --- a/tests/files/VMTests/RandomTests/201412240106.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x6aa0148488059a767a88828d6752", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6aa0148488059a767a88828d6752", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6aa0148488059a767a88828d6752", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240107.json b/tests/files/VMTests/RandomTests/201412240107.json deleted file mode 100644 index cd84f56b05..0000000000 --- a/tests/files/VMTests/RandomTests/201412240107.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x6b50533490793104f2923c68126858", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6b50533490793104f2923c68126858", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6b50533490793104f2923c68126858", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240110.json b/tests/files/VMTests/RandomTests/201412240110.json deleted file mode 100644 index d817941a39..0000000000 --- a/tests/files/VMTests/RandomTests/201412240110.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x44697507709b52f0835389", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x44697507709b52f0835389", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x44697507709b52f0835389", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240111.json b/tests/files/VMTests/RandomTests/201412240111.json deleted file mode 100644 index 0e5d2061ec..0000000000 --- a/tests/files/VMTests/RandomTests/201412240111.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x306e5af3368764706e1985938b928711", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x306e5af3368764706e1985938b928711", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x306e5af3368764706e1985938b928711", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240112.json b/tests/files/VMTests/RandomTests/201412240112.json deleted file mode 100644 index bc76f4449c..0000000000 --- a/tests/files/VMTests/RandomTests/201412240112.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x6991a114026998746040f26c40536c", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6991a114026998746040f26c40536c", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6991a114026998746040f26c40536c", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240113.json b/tests/files/VMTests/RandomTests/201412240113.json deleted file mode 100644 index 224e2279a9..0000000000 --- a/tests/files/VMTests/RandomTests/201412240113.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x34684076f38370533393", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x34684076f38370533393", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x34684076f38370533393", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240115.json b/tests/files/VMTests/RandomTests/201412240115.json deleted file mode 100644 index c23b358080..0000000000 --- a/tests/files/VMTests/RandomTests/201412240115.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x34336a630542a1f34074139f90", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x34336a630542a1f34074139f90", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x34336a630542a1f34074139f90", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240116.json b/tests/files/VMTests/RandomTests/201412240116.json deleted file mode 100644 index d6e9dcad98..0000000000 --- a/tests/files/VMTests/RandomTests/201412240116.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x416b77018c6a3b6085418f6a3a", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x416b77018c6a3b6085418f6a3a", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x416b77018c6a3b6085418f6a3a", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240117.json b/tests/files/VMTests/RandomTests/201412240117.json deleted file mode 100644 index c91bab832b..0000000000 --- a/tests/files/VMTests/RandomTests/201412240117.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "randomVMtest" : { - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x410b", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x410b", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240119.json b/tests/files/VMTests/RandomTests/201412240119.json deleted file mode 100644 index 5628640206..0000000000 --- a/tests/files/VMTests/RandomTests/201412240119.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x633207887d65508510", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x633207887d65508510", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x633207887d65508510", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240120.json b/tests/files/VMTests/RandomTests/201412240120.json deleted file mode 100644 index d9bd81435e..0000000000 --- a/tests/files/VMTests/RandomTests/201412240120.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x59156d8e8866166a03526fa040670296", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x59156d8e8866166a03526fa040670296", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x59156d8e8866166a03526fa040670296", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240121.json b/tests/files/VMTests/RandomTests/201412240121.json deleted file mode 100644 index 95faf8f007..0000000000 --- a/tests/files/VMTests/RandomTests/201412240121.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x58455a13326590", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9994", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x58455a13326590", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x58455a13326590", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240122.json b/tests/files/VMTests/RandomTests/201412240122.json deleted file mode 100644 index 6ccd3a9ae3..0000000000 --- a/tests/files/VMTests/RandomTests/201412240122.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x659a573a376ef262059e590a4364a471", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9989", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x659a573a376ef262059e590a4364a471", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x659a573a376ef262059e590a4364a471", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240123.json b/tests/files/VMTests/RandomTests/201412240123.json deleted file mode 100644 index 9ddf2dffaa..0000000000 --- a/tests/files/VMTests/RandomTests/201412240123.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x659e394455318d66389b386c", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x659e394455318d66389b386c", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x659e394455318d66389b386c", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240124.json b/tests/files/VMTests/RandomTests/201412240124.json deleted file mode 100644 index a29e0c49e9..0000000000 --- a/tests/files/VMTests/RandomTests/201412240124.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "randomVMtest" : { - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x440b7967049a94453c8d8077a16769", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x440b7967049a94453c8d8077a16769", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240125.json b/tests/files/VMTests/RandomTests/201412240125.json deleted file mode 100644 index 1b71caa619..0000000000 --- a/tests/files/VMTests/RandomTests/201412240125.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x627642376c8d87185a5406328950840a", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x627642376c8d87185a5406328950840a", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x627642376c8d87185a5406328950840a", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240126.json b/tests/files/VMTests/RandomTests/201412240126.json deleted file mode 100644 index fe4e1f7512..0000000000 --- a/tests/files/VMTests/RandomTests/201412240126.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x386d5bf08365179b18898f58559776", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x386d5bf08365179b18898f58559776", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x386d5bf08365179b18898f58559776", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240127.json b/tests/files/VMTests/RandomTests/201412240127.json deleted file mode 100644 index 61f14cda70..0000000000 --- a/tests/files/VMTests/RandomTests/201412240127.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x34677d137f571a8450", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x34677d137f571a8450", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x34677d137f571a8450", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240128.json b/tests/files/VMTests/RandomTests/201412240128.json deleted file mode 100644 index 2807e44209..0000000000 --- a/tests/files/VMTests/RandomTests/201412240128.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x44625056", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x44625056", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x44625056", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240129.json b/tests/files/VMTests/RandomTests/201412240129.json deleted file mode 100644 index eb993999e6..0000000000 --- a/tests/files/VMTests/RandomTests/201412240129.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x69388e2091a41aa4417055697442", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x69388e2091a41aa4417055697442", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x69388e2091a41aa4417055697442", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240130.json b/tests/files/VMTests/RandomTests/201412240130.json deleted file mode 100644 index df14911a98..0000000000 --- a/tests/files/VMTests/RandomTests/201412240130.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x6991949e36033412978f906513890653", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6991949e36033412978f906513890653", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6991949e36033412978f906513890653", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240131.json b/tests/files/VMTests/RandomTests/201412240131.json deleted file mode 100644 index 1d393795b9..0000000000 --- a/tests/files/VMTests/RandomTests/201412240131.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "randomVMtest" : { - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x60550b7a689d617c666b113573140a", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x60550b7a689d617c666b113573140a", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240132.json b/tests/files/VMTests/RandomTests/201412240132.json deleted file mode 100644 index 996cceb38c..0000000000 --- a/tests/files/VMTests/RandomTests/201412240132.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x4030687074850654657477", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x4030687074850654657477", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x4030687074850654657477", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240133.json b/tests/files/VMTests/RandomTests/201412240133.json deleted file mode 100644 index 2ed09c3087..0000000000 --- a/tests/files/VMTests/RandomTests/201412240133.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x664011374176203b65036770", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x664011374176203b65036770", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x664011374176203b65036770", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240134.json b/tests/files/VMTests/RandomTests/201412240134.json deleted file mode 100644 index 1b95fc3566..0000000000 --- a/tests/files/VMTests/RandomTests/201412240134.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x63336f042068628d417f7966", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x63336f042068628d417f7966", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x63336f042068628d417f7966", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240136.json b/tests/files/VMTests/RandomTests/201412240136.json deleted file mode 100644 index 1711a25184..0000000000 --- a/tests/files/VMTests/RandomTests/201412240136.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "randomVMtest" : { - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x6698059a329a72900b", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6698059a329a72900b", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240137.json b/tests/files/VMTests/RandomTests/201412240137.json deleted file mode 100644 index b712123638..0000000000 --- a/tests/files/VMTests/RandomTests/201412240137.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x32430268f380158b93517e", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9996", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x32430268f380158b93517e", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x32430268f380158b93517e", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240138.json b/tests/files/VMTests/RandomTests/201412240138.json deleted file mode 100644 index 13ee5245a0..0000000000 --- a/tests/files/VMTests/RandomTests/201412240138.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x586738973b57f26b95", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x586738973b57f26b95", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x586738973b57f26b95", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240139.json b/tests/files/VMTests/RandomTests/201412240139.json deleted file mode 100644 index ef5719cc28..0000000000 --- a/tests/files/VMTests/RandomTests/201412240139.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x6018646d166ca3", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6018646d166ca3", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6018646d166ca3", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240140.json b/tests/files/VMTests/RandomTests/201412240140.json deleted file mode 100644 index 50af4ddb5a..0000000000 --- a/tests/files/VMTests/RandomTests/201412240140.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x4542687b369e528b4479", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x4542687b369e528b4479", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x4542687b369e528b4479", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240141.json b/tests/files/VMTests/RandomTests/201412240141.json deleted file mode 100644 index d30c379a94..0000000000 --- a/tests/files/VMTests/RandomTests/201412240141.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x3a663bf314860414", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x3a663bf314860414", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x3a663bf314860414", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240142.json b/tests/files/VMTests/RandomTests/201412240142.json deleted file mode 100644 index f0d652a41e..0000000000 --- a/tests/files/VMTests/RandomTests/201412240142.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x426d16f1420890106a6164558c7551", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x426d16f1420890106a6164558c7551", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x426d16f1420890106a6164558c7551", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240148.json b/tests/files/VMTests/RandomTests/201412240148.json deleted file mode 100644 index 04ab40ea8f..0000000000 --- a/tests/files/VMTests/RandomTests/201412240148.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x666e3994068640536445710b", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x666e3994068640536445710b", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x666e3994068640536445710b", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240149.json b/tests/files/VMTests/RandomTests/201412240149.json deleted file mode 100644 index 6b6006f78e..0000000000 --- a/tests/files/VMTests/RandomTests/201412240149.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x446c7e94116bf2168107398b1639", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x446c7e94116bf2168107398b1639", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x446c7e94116bf2168107398b1639", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240150.json b/tests/files/VMTests/RandomTests/201412240150.json deleted file mode 100644 index d098717123..0000000000 --- a/tests/files/VMTests/RandomTests/201412240150.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x66516185a4ff78406d90057a819345", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x66516185a4ff78406d90057a819345", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x66516185a4ff78406d90057a819345", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240151.json b/tests/files/VMTests/RandomTests/201412240151.json deleted file mode 100644 index 610739e5c0..0000000000 --- a/tests/files/VMTests/RandomTests/201412240151.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x6b6d8f998e8d739789868365766e408b", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6b6d8f998e8d739789868365766e408b", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6b6d8f998e8d739789868365766e408b", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240152.json b/tests/files/VMTests/RandomTests/201412240152.json deleted file mode 100644 index bb2942d65b..0000000000 --- a/tests/files/VMTests/RandomTests/201412240152.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x63076f9d3866a17f41958939", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x63076f9d3866a17f41958939", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x63076f9d3866a17f41958939", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240153.json b/tests/files/VMTests/RandomTests/201412240153.json deleted file mode 100644 index b773adc8ed..0000000000 --- a/tests/files/VMTests/RandomTests/201412240153.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x40617b3c1668929167f3", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9996", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x40617b3c1668929167f3", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x40617b3c1668929167f3", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240154.json b/tests/files/VMTests/RandomTests/201412240154.json deleted file mode 100644 index f22abf009c..0000000000 --- a/tests/files/VMTests/RandomTests/201412240154.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x65a4f29b9d028b66959158", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x65a4f29b9d028b66959158", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x65a4f29b9d028b66959158", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240155.json b/tests/files/VMTests/RandomTests/201412240155.json deleted file mode 100644 index c616e6e132..0000000000 --- a/tests/files/VMTests/RandomTests/201412240155.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x426b8d795802900176423a7a63", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x426b8d795802900176423a7a63", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x426b8d795802900176423a7a63", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240156.json b/tests/files/VMTests/RandomTests/201412240156.json deleted file mode 100644 index e5d7d42bc5..0000000000 --- a/tests/files/VMTests/RandomTests/201412240156.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x595a65173745917f", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x595a65173745917f", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x595a65173745917f", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240157.json b/tests/files/VMTests/RandomTests/201412240157.json deleted file mode 100644 index 9760e6fae8..0000000000 --- a/tests/files/VMTests/RandomTests/201412240157.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x699e52966c9a9175f17d1067813859", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x699e52966c9a9175f17d1067813859", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x699e52966c9a9175f17d1067813859", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240158.json b/tests/files/VMTests/RandomTests/201412240158.json deleted file mode 100644 index dbcb6e1e3b..0000000000 --- a/tests/files/VMTests/RandomTests/201412240158.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x677e6e5841a45096a215316a1601", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9977", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0000000000000000000000000000000000000000" : { - "balance" : "0", - "code" : "0x", - "nonce" : "0", - "storage" : { - } - }, - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x677e6e5841a45096a215316a1601", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x677e6e5841a45096a215316a1601", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240159.json b/tests/files/VMTests/RandomTests/201412240159.json deleted file mode 100644 index 99c475b29b..0000000000 --- a/tests/files/VMTests/RandomTests/201412240159.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x68919c56988603750974666d6b098e5a", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x68919c56988603750974666d6b098e5a", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x68919c56988603750974666d6b098e5a", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240201.json b/tests/files/VMTests/RandomTests/201412240201.json deleted file mode 100644 index f9b8c54396..0000000000 --- a/tests/files/VMTests/RandomTests/201412240201.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x343569541588518d719563f3", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x343569541588518d719563f3", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x343569541588518d719563f3", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240202.json b/tests/files/VMTests/RandomTests/201412240202.json deleted file mode 100644 index aff74db9e6..0000000000 --- a/tests/files/VMTests/RandomTests/201412240202.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x6292797167197b1205344281", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9998", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6292797167197b1205344281", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x6292797167197b1205344281", - "nonce" : "0", - "storage" : { - } - } - } - } -} diff --git a/tests/files/VMTests/RandomTests/201412240204.json b/tests/files/VMTests/RandomTests/201412240204.json deleted file mode 100644 index 27ae65712b..0000000000 --- a/tests/files/VMTests/RandomTests/201412240204.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "randomVMtest" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x65878e80f142515a65159511", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9997", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x65878e80f142515a65159511", - "nonce" : "0", - "storage" : { - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x65878e80f142515a65159511", - "nonce" : "0", - "storage" : { - } - } - } - } -} From ec4dee0fcd6cd571ffd146cbebb7367e91457a46 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Mon, 5 Jan 2015 17:42:20 +0100 Subject: [PATCH 082/132] cmd/rlpdump: remove extra buffer --- cmd/rlpdump/main.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/rlpdump/main.go b/cmd/rlpdump/main.go index 2454d22793..4c188e179d 100644 --- a/cmd/rlpdump/main.go +++ b/cmd/rlpdump/main.go @@ -19,7 +19,6 @@ package main import ( - "bufio" "bytes" "encoding/hex" "flag" @@ -67,7 +66,7 @@ func main() { die(err) } defer fd.Close() - r = bufio.NewReader(fd) + r = fd default: fmt.Fprintln(os.Stderr, "Error: too many arguments") From c9985bf563888d5f346408d2ff174167e8b65880 Mon Sep 17 00:00:00 2001 From: obscuren Date: Mon, 5 Jan 2015 19:53:53 +0100 Subject: [PATCH 083/132] Fixed peer window. Minor tweaks and fixes --- cmd/ethereum/main.go | 2 +- cmd/mist/assets/qml/main.qml | 20 ++++++------- cmd/mist/assets/qml/views/whisper.qml | 1 - cmd/mist/bindings.go | 2 +- cmd/mist/gui.go | 19 ++++++------- cmd/mist/main.go | 3 +- pow/ezp/pow.go | 2 +- xeth/js_types.go | 41 ++++++++++----------------- 8 files changed, 37 insertions(+), 53 deletions(-) diff --git a/cmd/ethereum/main.go b/cmd/ethereum/main.go index 8b83bbd376..3c143aca10 100644 --- a/cmd/ethereum/main.go +++ b/cmd/ethereum/main.go @@ -32,7 +32,7 @@ import ( const ( ClientIdentifier = "Ethereum(G)" - Version = "0.8.0" + Version = "0.8.1" ) var clilogger = logger.NewLogger("CLI") diff --git a/cmd/mist/assets/qml/main.qml b/cmd/mist/assets/qml/main.qml index 0848d13d53..111bef8bb4 100644 --- a/cmd/mist/assets/qml/main.qml +++ b/cmd/mist/assets/qml/main.qml @@ -512,18 +512,17 @@ ApplicationWindow { var section; switch(options.section) { case "ethereum": - section = menuDefault; - break; + section = menuDefault; + break; case "legacy": - section = menuLegacy; - break; + section = menuLegacy; + break; default: - section = menuApps; - break; + section = menuApps; + break; } var comp = menuItemTemplate.createObject(section) - comp.view = view comp.title = view.title @@ -771,12 +770,9 @@ ApplicationWindow { anchors.fill: parent id: peerTable model: peerModel - TableViewColumn{width: 100; role: "ip" ; title: "IP" } - TableViewColumn{width: 60; role: "port" ; title: "Port" } - TableViewColumn{width: 140; role: "lastResponse"; title: "Last event" } - TableViewColumn{width: 100; role: "latency"; title: "Latency" } + TableViewColumn{width: 200; role: "ip" ; title: "IP" } TableViewColumn{width: 260; role: "version" ; title: "Version" } - TableViewColumn{width: 80; role: "caps" ; title: "Capabilities" } + TableViewColumn{width: 180; role: "caps" ; title: "Capabilities" } } } } diff --git a/cmd/mist/assets/qml/views/whisper.qml b/cmd/mist/assets/qml/views/whisper.qml index 56c4f1b070..029376c451 100644 --- a/cmd/mist/assets/qml/views/whisper.qml +++ b/cmd/mist/assets/qml/views/whisper.qml @@ -10,7 +10,6 @@ import Ethereum 1.0 Rectangle { id: root property var title: "Whisper Traffic" - property var iconSource: "../facet.png" property var menuItem objectName: "whisperView" diff --git a/cmd/mist/bindings.go b/cmd/mist/bindings.go index 66d8d14916..9e55592e60 100644 --- a/cmd/mist/bindings.go +++ b/cmd/mist/bindings.go @@ -57,7 +57,7 @@ func (gui *Gui) Transact(recipient, value, gas, gasPrice, d string) (string, err data = ethutil.Bytes2Hex(utils.FormatTransactionData(d)) } - return gui.pipe.Transact(gui.privateKey(), recipient, value, gas, gasPrice, data) + return gui.xeth.Transact(gui.privateKey(), recipient, value, gas, gasPrice, data) } func (gui *Gui) SetCustomIdentifier(customIdentifier string) { diff --git a/cmd/mist/gui.go b/cmd/mist/gui.go index 9efec65276..2c31bb3cdf 100644 --- a/cmd/mist/gui.go +++ b/cmd/mist/gui.go @@ -64,7 +64,7 @@ type Gui struct { logLevel logger.LogLevel open bool - pipe *xeth.JSXEth + xeth *xeth.JSXEth Session string clientIdentity *p2p.SimpleClientIdentity @@ -82,8 +82,8 @@ func NewWindow(ethereum *eth.Ethereum, config *ethutil.ConfigManager, clientIden panic(err) } - pipe := xeth.NewJSXEth(ethereum) - gui := &Gui{eth: ethereum, txDb: db, pipe: pipe, logLevel: logger.LogLevel(logLevel), Session: session, open: false, clientIdentity: clientIdentity, config: config, plugins: make(map[string]plugin)} + xeth := xeth.NewJSXEth(ethereum) + gui := &Gui{eth: ethereum, txDb: db, xeth: xeth, logLevel: logger.LogLevel(logLevel), Session: session, open: false, clientIdentity: clientIdentity, config: config, plugins: make(map[string]plugin)} data, _ := ethutil.ReadAllFile(path.Join(ethutil.Config.ExecPath, "plugins.json")) json.Unmarshal([]byte(data), &gui.plugins) @@ -228,7 +228,7 @@ func (gui *Gui) setInitialChain(ancientBlocks bool) { func (gui *Gui) loadAddressBook() { view := gui.getObjectByName("infoView") - nameReg := gui.pipe.World().Config().Get("NameReg") + nameReg := gui.xeth.World().Config().Get("NameReg") if nameReg != nil { it := nameReg.Trie().Iterator() for it.Next() { @@ -243,7 +243,7 @@ func (gui *Gui) loadAddressBook() { func (self *Gui) loadMergedMiningOptions() { view := self.getObjectByName("mergedMiningModel") - mergeMining := self.pipe.World().Config().Get("MergeMining") + mergeMining := self.xeth.World().Config().Get("MergeMining") if mergeMining != nil { i := 0 it := mergeMining.Trie().Iterator() @@ -261,8 +261,7 @@ func (self *Gui) loadMergedMiningOptions() { } func (gui *Gui) insertTransaction(window string, tx *types.Transaction) { - pipe := xeth.New(gui.eth) - nameReg := pipe.World().Config().Get("NameReg") + nameReg := gui.xeth.World().Config().Get("NameReg") addr := gui.address() var inout string @@ -273,7 +272,7 @@ func (gui *Gui) insertTransaction(window string, tx *types.Transaction) { } var ( - ptx = xeth.NewJSTx(tx, pipe.World().State()) + ptx = xeth.NewJSTx(tx, gui.xeth.World().State()) send = nameReg.Storage(tx.From()) rec = nameReg.Storage(tx.To()) s, r string @@ -319,7 +318,7 @@ func (gui *Gui) readPreviousTransactions() { } func (gui *Gui) processBlock(block *types.Block, initial bool) { - name := strings.Trim(gui.pipe.World().Config().Get("NameReg").Storage(block.Coinbase()).Str(), "\x00") + name := strings.Trim(gui.xeth.World().Config().Get("NameReg").Storage(block.Coinbase()).Str(), "\x00") b := xeth.NewJSBlock(block) b.Name = name @@ -488,7 +487,7 @@ NumGC: %d func (gui *Gui) setPeerInfo() { gui.win.Root().Call("setPeers", fmt.Sprintf("%d / %d", gui.eth.PeerCount(), gui.eth.MaxPeers)) gui.win.Root().Call("resetPeers") - for _, peer := range gui.pipe.Peers() { + for _, peer := range gui.xeth.Peers() { gui.win.Root().Call("addPeer", peer) } } diff --git a/cmd/mist/main.go b/cmd/mist/main.go index ce5e8449a0..b8b58a36af 100644 --- a/cmd/mist/main.go +++ b/cmd/mist/main.go @@ -32,7 +32,7 @@ import ( const ( ClientIdentifier = "Mist" - Version = "0.8.0" + Version = "0.8.1" ) var ethereum *eth.Ethereum @@ -58,6 +58,7 @@ func run() error { NATType: PMPGateway, PMPGateway: PMPGateway, KeyRing: KeyRing, + Dial: true, }) if err != nil { mainlogger.Fatalln(err) diff --git a/pow/ezp/pow.go b/pow/ezp/pow.go index f9f27326fa..8c164798ac 100644 --- a/pow/ezp/pow.go +++ b/pow/ezp/pow.go @@ -21,7 +21,7 @@ type EasyPow struct { } func New() *EasyPow { - return &EasyPow{turbo: true} + return &EasyPow{turbo: false} } func (pow *EasyPow) GetHashrate() int64 { diff --git a/xeth/js_types.go b/xeth/js_types.go index 4bb1f4e7da..dbddcb7a32 100644 --- a/xeth/js_types.go +++ b/xeth/js_types.go @@ -1,6 +1,7 @@ package xeth import ( + "fmt" "strings" "github.com/ethereum/go-ethereum/core" @@ -154,36 +155,24 @@ func NewPReciept(contractCreation bool, creationAddress, hash, address []byte) * // Peer interface exposed to QML type JSPeer struct { - ref *p2p.Peer - // Inbound bool `json:"isInbound"` - // LastSend int64 `json:"lastSend"` - // LastPong int64 `json:"lastPong"` - // Ip string `json:"ip"` - // Port int `json:"port"` - // Version string `json:"version"` - // LastResponse string `json:"lastResponse"` - // Latency string `json:"latency"` - // Caps string `json:"caps"` + ref *p2p.Peer + Ip string `json:"ip"` + Version string `json:"version"` + Caps string `json:"caps"` } func NewJSPeer(peer *p2p.Peer) *JSPeer { + var caps []string + for _, cap := range peer.Caps() { + caps = append(caps, fmt.Sprintf("%s/%d", cap.Name, cap.Version)) + } - // var ip []string - // for _, i := range peer.Host() { - // ip = append(ip, strconv.Itoa(int(i))) - // } - // ipAddress := strings.Join(ip, ".") - - // var caps []string - // capsIt := peer.Caps().NewIterator() - // for capsIt.Next() { - // cap := capsIt.Value().Get(0).Str() - // ver := capsIt.Value().Get(1).Uint() - // caps = append(caps, fmt.Sprintf("%s/%d", cap, ver)) - // } - - return &JSPeer{ref: peer} - // return &JSPeer{ref: &peer, Inbound: peer.Inbound(), LastSend: peer.LastSend().Unix(), LastPong: peer.LastPong(), Version: peer.Version(), Ip: ipAddress, Port: int(peer.Port()), Latency: peer.PingTime(), Caps: "[" + strings.Join(caps, ", ") + "]"} + return &JSPeer{ + ref: peer, + Ip: peer.RemoteAddr().String(), + Version: peer.Identity().String(), + Caps: fmt.Sprintf("%v", caps), + } } type JSReceipt struct { From cc7f8f58e81b3607d5a003fe7789dadb7a99fe54 Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 6 Jan 2015 00:17:05 +0100 Subject: [PATCH 084/132] Limit block extra to 1024 --- core/block_processor.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/block_processor.go b/core/block_processor.go index 83399f4728..127e979211 100644 --- a/core/block_processor.go +++ b/core/block_processor.go @@ -258,6 +258,10 @@ func (sm *BlockProcessor) CalculateTD(block *types.Block) (*big.Int, bool) { // an uncle or anything that isn't on the current block chain. // Validation validates easy over difficult (dagger takes longer time = difficult) func (sm *BlockProcessor) ValidateBlock(block, parent *types.Block) error { + if len(block.Header().Extra) > 1024 { + return fmt.Errorf("Block extra data too long (%d)", len(block.Header().Extra)) + } + expd := CalcDifficulty(block, parent) if expd.Cmp(block.Header().Difficulty) < 0 { return fmt.Errorf("Difficulty check failed for block %v, %v", block.Header().Difficulty, expd) From 47e6b2cef8ee0164e82d119c6a9359b55259d645 Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 6 Jan 2015 00:19:07 +0100 Subject: [PATCH 085/132] Allow extra to be set for mined blocks --- cmd/mist/assets/qml/views/miner.qml | 19 +++++++++++++++++++ cmd/mist/ui_lib.go | 4 ++++ miner/miner.go | 2 ++ 3 files changed, 25 insertions(+) diff --git a/cmd/mist/assets/qml/views/miner.qml b/cmd/mist/assets/qml/views/miner.qml index e0182649fb..193ce37bea 100644 --- a/cmd/mist/assets/qml/views/miner.qml +++ b/cmd/mist/assets/qml/views/miner.qml @@ -46,6 +46,7 @@ Rectangle { text: "Start" onClicked: { eth.setGasPrice(minGasPrice.text || "10000000000000"); + eth.setExtra(blockExtra.text) if (eth.toggleMining()) { this.text = "Stop"; } else { @@ -55,6 +56,7 @@ Rectangle { } Rectangle { + id: minGasPriceRect anchors.top: parent.top anchors.topMargin: 2 width: 200 @@ -65,6 +67,23 @@ Rectangle { validator: RegExpValidator { regExp: /\d*/ } } } + + Rectangle { + width: 300 + anchors { + left: minGasPriceRect.right + leftMargin: 5 + top: parent.top + topMargin: 2 + } + + TextField { + id: blockExtra + placeholderText: "Extra" + width: parent.width + maximumLength: 1024 + } + } } } diff --git a/cmd/mist/ui_lib.go b/cmd/mist/ui_lib.go index 0aabb87d09..933c323de8 100644 --- a/cmd/mist/ui_lib.go +++ b/cmd/mist/ui_lib.go @@ -279,6 +279,10 @@ func (self *UiLib) SetGasPrice(price string) { self.miner.MinAcceptedGasPrice = ethutil.Big(price) } +func (self *UiLib) SetExtra(extra string) { + self.miner.Extra = extra +} + func (self *UiLib) ToggleMining() bool { if !self.miner.Mining() { self.miner.Start() diff --git a/miner/miner.go b/miner/miner.go index 949227d983..f80ae51c68 100644 --- a/miner/miner.go +++ b/miner/miner.go @@ -69,6 +69,7 @@ type Miner struct { mining bool MinAcceptedGasPrice *big.Int + Extra string } func New(coinbase []byte, eth *eth.Ethereum) *Miner { @@ -178,6 +179,7 @@ func (self *Miner) mine() { chainMan = self.eth.ChainManager() block = chainMan.NewBlock(self.Coinbase) ) + block.Header().Extra = self.Extra // Apply uncles if len(self.uncles) > 0 { From a26aecdfdb0223b2fb54ca2d40adb2b531512d42 Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 6 Jan 2015 11:44:22 +0100 Subject: [PATCH 086/132] Updated WS API. Fixes #219. Closes #220 --- cmd/utils/websockets.go | 70 ++++++++++++++++++++--------------------- websocket/client.go | 6 ++-- websocket/message.go | 2 +- websocket/server.go | 2 -- 4 files changed, 38 insertions(+), 42 deletions(-) diff --git a/cmd/utils/websockets.go b/cmd/utils/websockets.go index e4bc1b1854..ef9de192b4 100644 --- a/cmd/utils/websockets.go +++ b/cmd/utils/websockets.go @@ -33,73 +33,73 @@ func (self *WebSocketServer) Serv() { data := ethutil.NewValue(msg.Args) bcode, err := ethutil.Compile(data.Get(0).Str(), false) if err != nil { - c.Write(args(nil, err.Error()), msg.Seed) + c.Write(args(nil, err.Error()), msg.Id) } code := ethutil.Bytes2Hex(bcode) - c.Write(args(code, nil), msg.Seed) - case "getBlockByNumber": + c.Write(args(code, nil), msg.Id) + case "eth_blockByNumber": args := msg.Arguments() block := pipe.BlockByNumber(int32(args.Get(0).Uint())) - c.Write(block, msg.Seed) + c.Write(block, msg.Id) - case "getKey": - c.Write(pipe.Key().PrivateKey, msg.Seed) - case "transact": + case "eth_blockByHash": + args := msg.Arguments() + + c.Write(pipe.BlockByHash(args.Get(0).Str()), msg.Id) + + case "eth_transact": if mp, ok := msg.Args[0].(map[string]interface{}); ok { object := mapToTxParams(mp) c.Write( - args(pipe.Transact(object["from"], object["to"], object["value"], object["gas"], object["gasPrice"], object["data"])), - msg.Seed, + args(pipe.Transact(pipe.Key().PrivateKey, object["to"], object["value"], object["gas"], object["gasPrice"], object["data"])), + msg.Id, ) } - case "getCoinBase": - c.Write(pipe.CoinBase(), msg.Seed) + case "eth_gasPrice": + c.Write("10000000000000", msg.Id) + case "eth_coinbase": + c.Write(pipe.CoinBase(), msg.Id) - case "getIsListening": - c.Write(pipe.IsListening(), msg.Seed) + case "eth_listening": + c.Write(pipe.IsListening(), msg.Id) - case "getIsMining": - c.Write(pipe.IsMining(), msg.Seed) + case "eth_mining": + c.Write(pipe.IsMining(), msg.Id) - case "getPeerCoint": - c.Write(pipe.PeerCount(), msg.Seed) + case "eth_peerCount": + c.Write(pipe.PeerCount(), msg.Id) - case "getCountAt": + case "eth_countAt": args := msg.Arguments() - c.Write(pipe.TxCountAt(args.Get(0).Str()), msg.Seed) + c.Write(pipe.TxCountAt(args.Get(0).Str()), msg.Id) - case "getCodeAt": + case "eth_codeAt": args := msg.Arguments() - c.Write(len(pipe.CodeAt(args.Get(0).Str())), msg.Seed) + c.Write(len(pipe.CodeAt(args.Get(0).Str())), msg.Id) - case "getBlockByHash": + case "eth_storageAt": args := msg.Arguments() - c.Write(pipe.BlockByHash(args.Get(0).Str()), msg.Seed) + c.Write(pipe.StorageAt(args.Get(0).Str(), args.Get(1).Str()), msg.Id) - case "getStorageAt": + case "eth_balanceAt": args := msg.Arguments() - c.Write(pipe.StorageAt(args.Get(0).Str(), args.Get(1).Str()), msg.Seed) + c.Write(pipe.BalanceAt(args.Get(0).Str()), msg.Id) - case "getBalanceAt": + case "eth_secretToAddress": args := msg.Arguments() - c.Write(pipe.BalanceAt(args.Get(0).Str()), msg.Seed) + c.Write(pipe.SecretToAddress(args.Get(0).Str()), msg.Id) - case "getSecretToAddress": - args := msg.Arguments() - - c.Write(pipe.SecretToAddress(args.Get(0).Str()), msg.Seed) - - case "newFilter": - case "newFilterString": - case "messages": + case "eth_newFilter": + case "eth_newFilterString": + case "eth_messages": // TODO } diff --git a/websocket/client.go b/websocket/client.go index d961816e8d..db2c8e5c91 100644 --- a/websocket/client.go +++ b/websocket/client.go @@ -50,8 +50,8 @@ func (c *Client) Conn() *ws.Conn { return c.ws } -func (c *Client) Write(data interface{}, seed int) { - msg := &Message{Seed: seed, Data: data} +func (c *Client) Write(data interface{}, id int) { + msg := &Message{Id: id, Data: data} select { case c.ch <- msg: default: @@ -73,7 +73,6 @@ func (c *Client) Listen() { // Listen write request via chanel func (c *Client) listenWrite() { - wslogger.Debugln("Listening write to client") for { select { @@ -93,7 +92,6 @@ func (c *Client) listenWrite() { // Listen read request via chanel func (c *Client) listenRead() { - wslogger.Debugln("Listening read from client") for { select { diff --git a/websocket/message.go b/websocket/message.go index 67289c4c49..73b47456f6 100644 --- a/websocket/message.go +++ b/websocket/message.go @@ -5,7 +5,7 @@ import "github.com/ethereum/go-ethereum/ethutil" type Message struct { Call string `json:"call"` Args []interface{} `json:"args"` - Seed int `json:"seed"` + Id int `json:"_id"` Data interface{} `json:"data"` } diff --git a/websocket/server.go b/websocket/server.go index 5fd923a0c6..b0658b1b44 100644 --- a/websocket/server.go +++ b/websocket/server.go @@ -81,8 +81,6 @@ func (s *Server) MessageFunc(f MsgFunc) { // Listen and serve. // It serves client connection and broadcast request. func (s *Server) Listen() { - wslogger.Debugln("Listening server...") - // ws handler onConnected := func(ws *ws.Conn) { defer func() { From 117f66e82375b752cc6a9ff22aa0d398ac337bb4 Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 6 Jan 2015 12:13:57 +0100 Subject: [PATCH 087/132] Added license headers --- cmd/ethereum/cmd.go | 35 +++++++++++++++++++---------------- cmd/ethereum/flags.go | 35 +++++++++++++++++++---------------- cmd/ethereum/main.go | 35 +++++++++++++++++++---------------- cmd/ethtest/main.go | 2 -- cmd/evm/main.go | 2 -- cmd/mist/bindings.go | 35 +++++++++++++++++++---------------- cmd/mist/debugger.go | 35 +++++++++++++++++++---------------- cmd/mist/errors.go | 35 +++++++++++++++++++---------------- cmd/mist/ext_app.go | 35 +++++++++++++++++++---------------- cmd/mist/flags.go | 35 +++++++++++++++++++---------------- cmd/mist/gui.go | 35 +++++++++++++++++++---------------- cmd/mist/html_container.go | 35 +++++++++++++++++++---------------- cmd/mist/main.go | 35 +++++++++++++++++++---------------- cmd/mist/qml_container.go | 36 ++++++++++++++++++++---------------- cmd/mist/ui_lib.go | 35 +++++++++++++++++++---------------- cmd/peerserver/main.go | 16 ++++++++++++++++ cmd/rlpdump/main.go | 4 ++++ cmd/utils/cmd.go | 21 +++++++++++++++++++++ cmd/utils/vm_env.go | 20 ++++++++++++++++++++ cmd/utils/websockets.go | 20 ++++++++++++++++++++ 20 files changed, 329 insertions(+), 212 deletions(-) diff --git a/cmd/ethereum/cmd.go b/cmd/ethereum/cmd.go index d8b9ea4875..8ffd868ed0 100644 --- a/cmd/ethereum/cmd.go +++ b/cmd/ethereum/cmd.go @@ -1,20 +1,23 @@ -// Copyright (c) 2013-2014, Jeffrey Wilcke. All rights reserved. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -// MA 02110-1301 USA +/* + This file is part of go-ethereum + go-ethereum is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + go-ethereum is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with go-ethereum. If not, see . +*/ +/** + * @authors + * Jeffrey Wilcke + */ package main import ( diff --git a/cmd/ethereum/flags.go b/cmd/ethereum/flags.go index 275fcf248c..57e5d8b8c1 100644 --- a/cmd/ethereum/flags.go +++ b/cmd/ethereum/flags.go @@ -1,20 +1,23 @@ -// Copyright (c) 2013-2014, Jeffrey Wilcke. All rights reserved. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -// MA 02110-1301 USA +/* + This file is part of go-ethereum + go-ethereum is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + go-ethereum is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with go-ethereum. If not, see . +*/ +/** + * @authors + * Jeffrey Wilcke + */ package main import ( diff --git a/cmd/ethereum/main.go b/cmd/ethereum/main.go index 3c143aca10..481914aead 100644 --- a/cmd/ethereum/main.go +++ b/cmd/ethereum/main.go @@ -1,20 +1,23 @@ -// Copyright (c) 2013-2014, Jeffrey Wilcke. All rights reserved. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -// MA 02110-1301 USA +/* + This file is part of go-ethereum + go-ethereum is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + go-ethereum is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with go-ethereum. If not, see . +*/ +/** + * @authors + * Jeffrey Wilcke + */ package main import ( diff --git a/cmd/ethtest/main.go b/cmd/ethtest/main.go index 96ef94e401..05e99564c1 100644 --- a/cmd/ethtest/main.go +++ b/cmd/ethtest/main.go @@ -17,8 +17,6 @@ /** * @authors: * Jeffrey Wilcke - * @date 2014 - * */ package main diff --git a/cmd/evm/main.go b/cmd/evm/main.go index 31b7da3c82..84ab0dc274 100644 --- a/cmd/evm/main.go +++ b/cmd/evm/main.go @@ -17,8 +17,6 @@ /** * @authors * Jeffrey Wilcke - * @date 2014 - * */ package main diff --git a/cmd/mist/bindings.go b/cmd/mist/bindings.go index 9e55592e60..e91a157dc3 100644 --- a/cmd/mist/bindings.go +++ b/cmd/mist/bindings.go @@ -1,20 +1,23 @@ -// Copyright (c) 2013-2014, Jeffrey Wilcke. All rights reserved. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -// MA 02110-1301 USA +/* + This file is part of go-ethereum + go-ethereum is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + go-ethereum is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with go-ethereum. If not, see . +*/ +/** + * @authors + * Jeffrey Wilcke + */ package main import ( diff --git a/cmd/mist/debugger.go b/cmd/mist/debugger.go index 618e31f4ed..b960e52cf7 100644 --- a/cmd/mist/debugger.go +++ b/cmd/mist/debugger.go @@ -1,20 +1,23 @@ -// Copyright (c) 2013-2014, Jeffrey Wilcke. All rights reserved. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -// MA 02110-1301 USA +/* + This file is part of go-ethereum + go-ethereum is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + go-ethereum is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with go-ethereum. If not, see . +*/ +/** + * @authors + * Jeffrey Wilcke + */ package main import ( diff --git a/cmd/mist/errors.go b/cmd/mist/errors.go index 2069bf26d9..26a172ce95 100644 --- a/cmd/mist/errors.go +++ b/cmd/mist/errors.go @@ -1,20 +1,23 @@ -// Copyright (c) 2013-2014, Jeffrey Wilcke. All rights reserved. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -// MA 02110-1301 USA +/* + This file is part of go-ethereum + go-ethereum is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + go-ethereum is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with go-ethereum. If not, see . +*/ +/** + * @authors + * Jeffrey Wilcke + */ package main import ( diff --git a/cmd/mist/ext_app.go b/cmd/mist/ext_app.go index 33c420a7a1..012c94923a 100644 --- a/cmd/mist/ext_app.go +++ b/cmd/mist/ext_app.go @@ -1,20 +1,23 @@ -// Copyright (c) 2013-2014, Jeffrey Wilcke. All rights reserved. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -// MA 02110-1301 USA +/* + This file is part of go-ethereum + go-ethereum is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + go-ethereum is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with go-ethereum. If not, see . +*/ +/** + * @authors + * Jeffrey Wilcke + */ package main import ( diff --git a/cmd/mist/flags.go b/cmd/mist/flags.go index fcee28f19b..2f0790b76a 100644 --- a/cmd/mist/flags.go +++ b/cmd/mist/flags.go @@ -1,20 +1,23 @@ -// Copyright (c) 2013-2014, Jeffrey Wilcke. All rights reserved. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -// MA 02110-1301 USA +/* + This file is part of go-ethereum + go-ethereum is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + go-ethereum is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with go-ethereum. If not, see . +*/ +/** + * @authors + * Jeffrey Wilcke + */ package main import ( diff --git a/cmd/mist/gui.go b/cmd/mist/gui.go index 2c31bb3cdf..26239c4dbf 100644 --- a/cmd/mist/gui.go +++ b/cmd/mist/gui.go @@ -1,20 +1,23 @@ -// Copyright (c) 2013-2014, Jeffrey Wilcke. All rights reserved. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -// MA 02110-1301 USA +/* + This file is part of go-ethereum + go-ethereum is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + go-ethereum is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with go-ethereum. If not, see . +*/ +/** + * @authors + * Jeffrey Wilcke + */ package main import "C" diff --git a/cmd/mist/html_container.go b/cmd/mist/html_container.go index bd11ccd57e..f2ba6fbe24 100644 --- a/cmd/mist/html_container.go +++ b/cmd/mist/html_container.go @@ -1,20 +1,23 @@ -// Copyright (c) 2013-2014, Jeffrey Wilcke. All rights reserved. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -// MA 02110-1301 USA +/* + This file is part of go-ethereum + go-ethereum is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + go-ethereum is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with go-ethereum. If not, see . +*/ +/** + * @authors + * Jeffrey Wilcke + */ package main import ( diff --git a/cmd/mist/main.go b/cmd/mist/main.go index b8b58a36af..eb0a80addf 100644 --- a/cmd/mist/main.go +++ b/cmd/mist/main.go @@ -1,20 +1,23 @@ -// Copyright (c) 2013-2014, Jeffrey Wilcke. All rights reserved. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -// MA 02110-1301 USA +/* + This file is part of go-ethereum + go-ethereum is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + go-ethereum is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with go-ethereum. If not, see . +*/ +/** + * @authors + * Jeffrey Wilcke + */ package main import ( diff --git a/cmd/mist/qml_container.go b/cmd/mist/qml_container.go index ed24737d0e..7f5d97bec1 100644 --- a/cmd/mist/qml_container.go +++ b/cmd/mist/qml_container.go @@ -1,19 +1,23 @@ -// Copyright (c) 2013-2014, Jeffrey Wilcke. All rights reserved. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -// MA 02110-1301 USA +/* + This file is part of go-ethereum + + go-ethereum is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + go-ethereum is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with go-ethereum. If not, see . +*/ +/** + * @authors + * Jeffrey Wilcke + */ package main diff --git a/cmd/mist/ui_lib.go b/cmd/mist/ui_lib.go index 933c323de8..60c7181c12 100644 --- a/cmd/mist/ui_lib.go +++ b/cmd/mist/ui_lib.go @@ -1,20 +1,23 @@ -// Copyright (c) 2013-2014, Jeffrey Wilcke. All rights reserved. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -// MA 02110-1301 USA +/* + This file is part of go-ethereum + go-ethereum is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + go-ethereum is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with go-ethereum. If not, see . +*/ +/** + * @authors + * Jeffrey Wilcke + */ package main import ( diff --git a/cmd/peerserver/main.go b/cmd/peerserver/main.go index 18d183f0bd..eb0900f8b4 100644 --- a/cmd/peerserver/main.go +++ b/cmd/peerserver/main.go @@ -1,3 +1,19 @@ +/* + This file is part of go-ethereum + + go-ethereum is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + go-ethereum is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with go-ethereum. If not, see . +*/ package main import ( diff --git a/cmd/rlpdump/main.go b/cmd/rlpdump/main.go index 4c188e179d..8f1c4a8c2e 100644 --- a/cmd/rlpdump/main.go +++ b/cmd/rlpdump/main.go @@ -14,6 +14,10 @@ You should have received a copy of the GNU General Public License along with go-ethereum. If not, see . */ +/** + * @authors + * Felix Lange + */ // rlpdump is a pretty-printer for RLP data. package main diff --git a/cmd/utils/cmd.go b/cmd/utils/cmd.go index d01d9da9f9..1a85668b03 100644 --- a/cmd/utils/cmd.go +++ b/cmd/utils/cmd.go @@ -1,3 +1,24 @@ +/* + This file is part of go-ethereum + + go-ethereum is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + go-ethereum is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with go-ethereum. If not, see . +*/ +/** + * @authors + * Jeffrey Wilcke + * Viktor Tron + */ package utils import ( diff --git a/cmd/utils/vm_env.go b/cmd/utils/vm_env.go index acc2ffad95..5eaf63b651 100644 --- a/cmd/utils/vm_env.go +++ b/cmd/utils/vm_env.go @@ -1,3 +1,23 @@ +/* + This file is part of go-ethereum + + go-ethereum is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + go-ethereum is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with go-ethereum. If not, see . +*/ +/** + * @authors + * Jeffrey Wilcke + */ package utils import ( diff --git a/cmd/utils/websockets.go b/cmd/utils/websockets.go index ef9de192b4..003e1bc227 100644 --- a/cmd/utils/websockets.go +++ b/cmd/utils/websockets.go @@ -1,3 +1,23 @@ +/* + This file is part of go-ethereum + + go-ethereum is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + go-ethereum is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with go-ethereum. If not, see . +*/ +/** + * @authors + * Jeffrey Wilcke + */ package utils import ( From fde0ddb324788a51a94bd0f605bb8f935db2f7f4 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 6 Jan 2015 10:58:36 +0100 Subject: [PATCH 088/132] cmd/rlpdump: remove stray return --- cmd/rlpdump/main.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/rlpdump/main.go b/cmd/rlpdump/main.go index 8f1c4a8c2e..8567dcff83 100644 --- a/cmd/rlpdump/main.go +++ b/cmd/rlpdump/main.go @@ -110,8 +110,7 @@ func dump(s *rlp.Stream, depth int) error { s.List() defer s.ListEnd() if size == 0 { - fmt.Printf(ws(depth) + "[]") - return nil + fmt.Print(ws(depth) + "[]") } else { fmt.Println(ws(depth) + "[") for i := 0; ; i++ { From be977858562941ed8b8bd96eff65fbca1d1c4e4f Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 6 Jan 2015 11:07:05 +0100 Subject: [PATCH 089/132] cmd/evm: add dummy implementation for GetHash Fixes the build. AFAIK evm does not bother keeping a chain and cannot provide a real implementation. --- cmd/evm/main.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/evm/main.go b/cmd/evm/main.go index 84ab0dc274..f902c99e51 100644 --- a/cmd/evm/main.go +++ b/cmd/evm/main.go @@ -131,6 +131,12 @@ func (self *VMEnv) Value() *big.Int { return self.value } func (self *VMEnv) GasLimit() *big.Int { return big.NewInt(1000000000) } func (self *VMEnv) Depth() int { return 0 } func (self *VMEnv) SetDepth(i int) { self.depth = i } +func (self *VMEnv) GetHash(n uint64) []byte { + if self.block.Number().Cmp(big.NewInt(int64(n))) == 0 { + return self.block.Hash() + } + return nil +} func (self *VMEnv) AddLog(log state.Log) { self.state.AddLog(log) } From 545e14691bd467992c905aa34fac71e25ef76108 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 6 Jan 2015 11:09:47 +0100 Subject: [PATCH 090/132] cmd/peerserver: fix for new client identity type --- cmd/peerserver/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/peerserver/main.go b/cmd/peerserver/main.go index eb0900f8b4..ce0c7ba0c1 100644 --- a/cmd/peerserver/main.go +++ b/cmd/peerserver/main.go @@ -35,7 +35,7 @@ func main() { srv := p2p.Server{ MaxPeers: 100, - Identity: p2p.NewSimpleClientIdentity("Ethereum(G)", "0.1", "Peer Server Two", string(marshaled)), + Identity: p2p.NewSimpleClientIdentity("Ethereum(G)", "0.1", "Peer Server Two", marshaled), ListenAddr: ":30301", NAT: p2p.UPNP(), } From 4c8c115a7633e39b85738cd7919c7d3e3e722e7a Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 6 Jan 2015 11:10:20 +0100 Subject: [PATCH 091/132] cmd/peerserver: use NoDial, don't use seed peers --- cmd/peerserver/main.go | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/cmd/peerserver/main.go b/cmd/peerserver/main.go index ce0c7ba0c1..7a5d5708ea 100644 --- a/cmd/peerserver/main.go +++ b/cmd/peerserver/main.go @@ -18,9 +18,7 @@ package main import ( "crypto/elliptic" - "fmt" "log" - "net" "os" "github.com/ethereum/go-ethereum/crypto" @@ -38,19 +36,10 @@ func main() { Identity: p2p.NewSimpleClientIdentity("Ethereum(G)", "0.1", "Peer Server Two", marshaled), ListenAddr: ":30301", NAT: p2p.UPNP(), + NoDial: true, } if err := srv.Start(); err != nil { - fmt.Println("could not start server:", err) - os.Exit(1) + log.Fatal("could not start server:", err) } - - // add seed peers - seed, err := net.ResolveTCPAddr("tcp", "poc-8.ethdev.com:30303") - if err != nil { - fmt.Println("couldn't resolve:", err) - } else { - srv.SuggestPeer(seed.IP, seed.Port, nil) - } - select {} } From 36e1e5f15142b37801844a072eb46ea67fbc8868 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 6 Jan 2015 11:15:37 +0100 Subject: [PATCH 092/132] cmd/peerserver: add some command line switches --- cmd/peerserver/main.go | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/cmd/peerserver/main.go b/cmd/peerserver/main.go index 7a5d5708ea..341c4dbb9d 100644 --- a/cmd/peerserver/main.go +++ b/cmd/peerserver/main.go @@ -18,6 +18,7 @@ package main import ( "crypto/elliptic" + "flag" "log" "os" @@ -26,7 +27,19 @@ import ( "github.com/ethereum/go-ethereum/p2p" ) +var ( + natType = flag.String("nat", "", "NAT traversal implementation") + pmpGateway = flag.String("gateway", "", "gateway address for NAT-PMP") + listenAddr = flag.String("addr", ":30301", "listen address") +) + func main() { + flag.Parse() + nat, err := p2p.ParseNAT(*natType, *pmpGateway) + if err != nil { + log.Fatal("invalid nat:", err) + } + logger.AddLogSystem(logger.NewStdLogSystem(os.Stdout, log.LstdFlags, logger.InfoLevel)) key, _ := crypto.GenerateKey() marshaled := elliptic.Marshal(crypto.S256(), key.PublicKey.X, key.PublicKey.Y) @@ -34,8 +47,8 @@ func main() { srv := p2p.Server{ MaxPeers: 100, Identity: p2p.NewSimpleClientIdentity("Ethereum(G)", "0.1", "Peer Server Two", marshaled), - ListenAddr: ":30301", - NAT: p2p.UPNP(), + ListenAddr: *listenAddr, + NAT: nat, NoDial: true, } if err := srv.Start(); err != nil { From eb0e7b1b8120852a1d56aa0ebd3a98e652965635 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 6 Jan 2015 11:35:09 +0100 Subject: [PATCH 093/132] eth, p2p: remove EncodeMsg from p2p.MsgWriter ...and make it a top-level function instead. The original idea behind having EncodeMsg in the interface was that implementations might be able to encode RLP data to their underlying writer directly instead of buffering the encoded data. The encoder will buffer anyway, so that doesn't matter anymore. Given the recent problems with EncodeMsg (copy-pasted implementation bug) I'd rather implement once, correctly. --- eth/protocol.go | 8 ++++---- eth/protocol_test.go | 4 ---- p2p/message.go | 20 +++++++++----------- p2p/message_test.go | 6 +++--- p2p/peer_test.go | 4 ++-- p2p/protocol.go | 10 +++++----- p2p/protocol_test.go | 4 ++-- 7 files changed, 25 insertions(+), 31 deletions(-) diff --git a/eth/protocol.go b/eth/protocol.go index b67e5aaeab..723ab5502e 100644 --- a/eth/protocol.go +++ b/eth/protocol.go @@ -140,7 +140,7 @@ func (self *ethProtocol) handle() error { return self.protoError(ErrDecode, "->msg %v: %v", msg, err) } hashes := self.chainManager.GetBlockHashesFromHash(request.Hash, request.Amount) - return self.rw.EncodeMsg(BlockHashesMsg, ethutil.ByteSliceToInterface(hashes)...) + return p2p.EncodeMsg(self.rw, BlockHashesMsg, ethutil.ByteSliceToInterface(hashes)...) case BlockHashesMsg: // TODO: redo using lazy decode , this way very inefficient on known chains @@ -185,7 +185,7 @@ func (self *ethProtocol) handle() error { break } } - return self.rw.EncodeMsg(BlocksMsg, blocks...) + return p2p.EncodeMsg(self.rw, BlocksMsg, blocks...) case BlocksMsg: msgStream := rlp.NewStream(msg.Payload) @@ -298,12 +298,12 @@ func (self *ethProtocol) handleStatus() error { func (self *ethProtocol) requestBlockHashes(from []byte) error { self.peer.Debugf("fetching hashes (%d) %x...\n", blockHashesBatchSize, from[0:4]) - return self.rw.EncodeMsg(GetBlockHashesMsg, interface{}(from), uint64(blockHashesBatchSize)) + return p2p.EncodeMsg(self.rw, GetBlockHashesMsg, interface{}(from), uint64(blockHashesBatchSize)) } func (self *ethProtocol) requestBlocks(hashes [][]byte) error { self.peer.Debugf("fetching %v blocks", len(hashes)) - return self.rw.EncodeMsg(GetBlocksMsg, ethutil.ByteSliceToInterface(hashes)...) + return p2p.EncodeMsg(self.rw, GetBlocksMsg, ethutil.ByteSliceToInterface(hashes)...) } func (self *ethProtocol) protoError(code int, format string, params ...interface{}) (err *protocolError) { diff --git a/eth/protocol_test.go b/eth/protocol_test.go index ab2aa289f0..224b59abd3 100644 --- a/eth/protocol_test.go +++ b/eth/protocol_test.go @@ -41,10 +41,6 @@ func (self *testMsgReadWriter) WriteMsg(msg p2p.Msg) error { return nil } -func (self *testMsgReadWriter) EncodeMsg(code uint64, data ...interface{}) error { - return self.WriteMsg(p2p.NewMsg(code, data...)) -} - func (self *testMsgReadWriter) ReadMsg() (p2p.Msg, error) { msg, ok := <-self.in if !ok { diff --git a/p2p/message.go b/p2p/message.go index a6f62ec4c8..daf2bf05c1 100644 --- a/p2p/message.go +++ b/p2p/message.go @@ -71,14 +71,11 @@ type MsgReader interface { } type MsgWriter interface { - // WriteMsg sends an existing message. - // The Payload reader of the message is consumed. + // WriteMsg sends a message. It will block until the message's + // Payload has been consumed by the other end. + // // Note that messages can be sent only once. WriteMsg(Msg) error - - // EncodeMsg writes an RLP-encoded message with the given - // code and data elements. - EncodeMsg(code uint64, data ...interface{}) error } // MsgReadWriter provides reading and writing of encoded messages. @@ -87,6 +84,12 @@ type MsgReadWriter interface { MsgWriter } +// EncodeMsg writes an RLP-encoded message with the given code and +// data elements. +func EncodeMsg(w MsgWriter, code uint64, data ...interface{}) error { + return w.WriteMsg(NewMsg(code, data...)) +} + var magicToken = []byte{34, 64, 8, 145} func writeMsg(w io.Writer, msg Msg) error { @@ -209,11 +212,6 @@ func (p *MsgPipeRW) WriteMsg(msg Msg) error { return ErrPipeClosed } -// EncodeMsg is a convenient shorthand for sending an RLP-encoded message. -func (p *MsgPipeRW) EncodeMsg(code uint64, data ...interface{}) error { - return p.WriteMsg(NewMsg(code, data...)) -} - // ReadMsg returns a message sent on the other end of the pipe. func (p *MsgPipeRW) ReadMsg() (Msg, error) { if atomic.LoadInt32(p.closed) == 0 { diff --git a/p2p/message_test.go b/p2p/message_test.go index 066d2516d4..5cde9abf5b 100644 --- a/p2p/message_test.go +++ b/p2p/message_test.go @@ -75,8 +75,8 @@ func TestDecodeRealMsg(t *testing.T) { func ExampleMsgPipe() { rw1, rw2 := MsgPipe() go func() { - rw1.EncodeMsg(8, []byte{0, 0}) - rw1.EncodeMsg(5, []byte{1, 1}) + EncodeMsg(rw1, 8, []byte{0, 0}) + EncodeMsg(rw1, 5, []byte{1, 1}) rw1.Close() }() @@ -100,7 +100,7 @@ loop: rw1, rw2 := MsgPipe() done := make(chan struct{}) go func() { - if err := rw1.EncodeMsg(1); err == nil { + if err := EncodeMsg(rw1, 1); err == nil { t.Error("EncodeMsg returned nil error") } else if err != ErrPipeClosed { t.Error("EncodeMsg returned wrong error: got %v, want %v", err, ErrPipeClosed) diff --git a/p2p/peer_test.go b/p2p/peer_test.go index 5b9e9e7847..4ee88f112b 100644 --- a/p2p/peer_test.go +++ b/p2p/peer_test.go @@ -126,10 +126,10 @@ func TestPeerProtoEncodeMsg(t *testing.T) { Name: "a", Length: 2, Run: func(peer *Peer, rw MsgReadWriter) error { - if err := rw.EncodeMsg(2); err == nil { + if err := EncodeMsg(rw, 2); err == nil { t.Error("expected error for out-of-range msg code, got nil") } - if err := rw.EncodeMsg(1, "foo", "bar"); err != nil { + if err := EncodeMsg(rw, 1, "foo", "bar"); err != nil { t.Errorf("write error: %v", err) } return nil diff --git a/p2p/protocol.go b/p2p/protocol.go index dd8cbc4ecd..969937076b 100644 --- a/p2p/protocol.go +++ b/p2p/protocol.go @@ -119,14 +119,14 @@ func (bp *baseProtocol) loop(quit <-chan error) error { getPeersTick := time.NewTicker(10 * time.Second) defer getPeersTick.Stop() - err := bp.rw.EncodeMsg(getPeersMsg) + err := EncodeMsg(bp.rw, getPeersMsg) for err == nil { select { case err = <-quit: return err case <-getPeersTick.C: - err = bp.rw.EncodeMsg(getPeersMsg) + err = EncodeMsg(bp.rw, getPeersMsg) case event := <-activity.Chan(): ping.Reset(pingTimeout) lastActive = event.(time.Time) @@ -134,7 +134,7 @@ func (bp *baseProtocol) loop(quit <-chan error) error { if lastActive.Add(pingTimeout * 2).Before(t) { err = newPeerError(errPingTimeout, "") } else if lastActive.Add(pingTimeout).Before(t) { - err = bp.rw.EncodeMsg(pingMsg) + err = EncodeMsg(bp.rw, pingMsg) } } } @@ -164,7 +164,7 @@ func (bp *baseProtocol) handle(rw MsgReadWriter) error { return discRequestedError(reason[0]) case pingMsg: - return bp.rw.EncodeMsg(pongMsg) + return EncodeMsg(bp.rw, pongMsg) case pongMsg: @@ -177,7 +177,7 @@ func (bp *baseProtocol) handle(rw MsgReadWriter) error { // // TODO: add event mechanism to notify baseProtocol for new peers if len(peers) > 0 { - return bp.rw.EncodeMsg(peersMsg, peers...) + return EncodeMsg(bp.rw, peersMsg, peers...) } case peersMsg: diff --git a/p2p/protocol_test.go b/p2p/protocol_test.go index ce25b3e1b5..ba5e95c021 100644 --- a/p2p/protocol_test.go +++ b/p2p/protocol_test.go @@ -93,7 +93,7 @@ func TestBaseProtocolDisconnect(t *testing.T) { if err := expectMsg(rw2, handshakeMsg); err != nil { t.Error(err) } - err := rw2.EncodeMsg(handshakeMsg, + err := EncodeMsg(rw2, handshakeMsg, baseProtocolVersion, "", []interface{}{}, @@ -106,7 +106,7 @@ func TestBaseProtocolDisconnect(t *testing.T) { if err := expectMsg(rw2, getPeersMsg); err != nil { t.Error(err) } - if err := rw2.EncodeMsg(discMsg, DiscQuitting); err != nil { + if err := EncodeMsg(rw2, discMsg, DiscQuitting); err != nil { t.Error(err) } From b0ff946b55c23f0fffc50a700bcb255f95855afc Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 6 Jan 2015 12:14:29 +0100 Subject: [PATCH 094/132] p2p: move peerList back into baseProtocol It had been moved to Peer, probably for debugging. --- p2p/peer.go | 22 ---------------------- p2p/protocol.go | 24 +++++++++++++++++++++++- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/p2p/peer.go b/p2p/peer.go index 0d7eec9f46..2380a3285b 100644 --- a/p2p/peer.go +++ b/p2p/peer.go @@ -460,25 +460,3 @@ func (r *eofSignal) Read(buf []byte) (int, error) { } return n, err } - -func (peer *Peer) PeerList() []interface{} { - peers := peer.otherPeers() - ds := make([]interface{}, 0, len(peers)) - for _, p := range peers { - p.infolock.Lock() - addr := p.listenAddr - p.infolock.Unlock() - // filter out this peer and peers that are not listening or - // have not completed the handshake. - // TODO: track previously sent peers and exclude them as well. - if p == peer || addr == nil { - continue - } - ds = append(ds, addr) - } - ourAddr := peer.ourListenAddr - if ourAddr != nil && !ourAddr.IP.IsLoopback() && !ourAddr.IP.IsUnspecified() { - ds = append(ds, ourAddr) - } - return ds -} diff --git a/p2p/protocol.go b/p2p/protocol.go index 969937076b..1d121a8855 100644 --- a/p2p/protocol.go +++ b/p2p/protocol.go @@ -169,7 +169,7 @@ func (bp *baseProtocol) handle(rw MsgReadWriter) error { case pongMsg: case getPeersMsg: - peers := bp.peer.PeerList() + peers := bp.peerList() // this is dangerous. the spec says that we should _delay_ // sending the response if no new information is available. // this means that would need to send a response later when @@ -264,3 +264,25 @@ func (bp *baseProtocol) handshakeMsg() Msg { bp.peer.ourID.Pubkey()[1:], ) } + +func (bp *baseProtocol) peerList() []interface{} { + peers := bp.peer.otherPeers() + ds := make([]interface{}, 0, len(peers)) + for _, p := range peers { + p.infolock.Lock() + addr := p.listenAddr + p.infolock.Unlock() + // filter out this peer and peers that are not listening or + // have not completed the handshake. + // TODO: track previously sent peers and exclude them as well. + if p == bp.peer || addr == nil { + continue + } + ds = append(ds, addr) + } + ourAddr := bp.peer.ourListenAddr + if ourAddr != nil && !ourAddr.IP.IsLoopback() && !ourAddr.IP.IsUnspecified() { + ds = append(ds, ourAddr) + } + return ds +} From 3caa4ad1baba3019c06733e1a80d78d9a57137bb Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 6 Jan 2015 12:15:51 +0100 Subject: [PATCH 095/132] p2p: improve test for peers message The test now checks that the number of of addresses is correct and terminates cleanly. --- p2p/protocol_test.go | 64 +++++++++++++++++++++++++++++--------------- 1 file changed, 43 insertions(+), 21 deletions(-) diff --git a/p2p/protocol_test.go b/p2p/protocol_test.go index ba5e95c021..b1d10ac536 100644 --- a/p2p/protocol_test.go +++ b/p2p/protocol_test.go @@ -4,6 +4,7 @@ import ( "fmt" "net" "reflect" + "sync" "testing" "github.com/ethereum/go-ethereum/crypto" @@ -36,50 +37,71 @@ func newTestPeer() (peer *Peer) { } func TestBaseProtocolPeers(t *testing.T) { - cannedPeerList := []*peerAddr{ + peerList := []*peerAddr{ {IP: net.ParseIP("1.2.3.4"), Port: 2222, Pubkey: []byte{}}, {IP: net.ParseIP("5.6.7.8"), Port: 3333, Pubkey: []byte{}}, } - var ownAddr *peerAddr = &peerAddr{IP: net.ParseIP("1.3.5.7"), Port: 1111, Pubkey: []byte{}} + listenAddr := &peerAddr{IP: net.ParseIP("1.3.5.7"), Port: 1111, Pubkey: []byte{}} rw1, rw2 := MsgPipe() + defer rw1.Close() + wg := new(sync.WaitGroup) + // run matcher, close pipe when addresses have arrived - addrChan := make(chan *peerAddr, len(cannedPeerList)) + numPeers := len(peerList) + 1 + addrChan := make(chan *peerAddr) + wg.Add(1) go func() { - for _, want := range cannedPeerList { - got := <-addrChan - t.Logf("got peer: %+v", got) + i := 0 + for got := range addrChan { + var want *peerAddr + switch { + case i < len(peerList): + want = peerList[i] + case i == len(peerList): + want = listenAddr // listenAddr should be the last thing sent + } + t.Logf("got peer %d/%d: %v", i+1, numPeers, got) if !reflect.DeepEqual(want, got) { - t.Errorf("mismatch: got %#v, want %#v", got, want) + t.Errorf("mismatch: got %+v, want %+v", got, want) + } + i++ + if i == numPeers { + break } } - close(addrChan) - var own []*peerAddr - var got *peerAddr - for got = range addrChan { - own = append(own, got) + if i != numPeers { + t.Errorf("wrong number of peers received: got %d, want %d", i, numPeers) } - if len(own) != 1 || !reflect.DeepEqual(ownAddr, own[0]) { - t.Errorf("mismatch: peers own address is incorrectly or not given, got %v, want %#v", ownAddr) - } - rw2.Close() + rw1.Close() + wg.Done() }() - // run first peer + + // run first peer (in background) peer1 := newTestPeer() - peer1.ourListenAddr = ownAddr + peer1.ourListenAddr = listenAddr peer1.otherPeers = func() []*Peer { - pl := make([]*Peer, len(cannedPeerList)) - for i, addr := range cannedPeerList { + pl := make([]*Peer, len(peerList)) + for i, addr := range peerList { pl[i] = &Peer{listenAddr: addr} } return pl } - go runBaseProtocol(peer1, rw1) + wg.Add(1) + go func() { + runBaseProtocol(peer1, rw1) + wg.Done() + }() + // run second peer peer2 := newTestPeer() peer2.newPeerAddr = addrChan // feed peer suggestions into matcher if err := runBaseProtocol(peer2, rw2); err != ErrPipeClosed { t.Errorf("peer2 terminated with unexpected error: %v", err) } + + // terminate matcher + close(addrChan) + wg.Wait() } func TestBaseProtocolDisconnect(t *testing.T) { From 564f02aa2b1188a2a736a9345f2afaa13e50ef45 Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 6 Jan 2015 13:18:09 +0100 Subject: [PATCH 096/132] Fixed tests --- core/chain_manager_test.go | 4 ++-- core/transaction_pool_test.go | 6 +++--- xeth/js_types.go | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/chain_manager_test.go b/core/chain_manager_test.go index 2ed3c6c9e0..6c66961b0a 100644 --- a/core/chain_manager_test.go +++ b/core/chain_manager_test.go @@ -71,7 +71,7 @@ func TestChainInsertions(t *testing.T) { var eventMux event.TypeMux chainMan := NewChainManager(&eventMux) txPool := NewTxPool(&eventMux) - blockMan := NewBlockManager(txPool, chainMan, &eventMux) + blockMan := NewBlockProcessor(txPool, chainMan, &eventMux) chainMan.SetProcessor(blockMan) const max = 2 @@ -115,7 +115,7 @@ func TestChainMultipleInsertions(t *testing.T) { var eventMux event.TypeMux chainMan := NewChainManager(&eventMux) txPool := NewTxPool(&eventMux) - blockMan := NewBlockManager(txPool, chainMan, &eventMux) + blockMan := NewBlockProcessor(txPool, chainMan, &eventMux) chainMan.SetProcessor(blockMan) done := make(chan bool, max) for i, chain := range chains { diff --git a/core/transaction_pool_test.go b/core/transaction_pool_test.go index e77d7a1aed..2e1debfbee 100644 --- a/core/transaction_pool_test.go +++ b/core/transaction_pool_test.go @@ -55,7 +55,7 @@ func TestAddInvalidTx(t *testing.T) { func TestRemoveSet(t *testing.T) { pool, _ := setup() tx1 := transaction() - pool.pool.Add(tx1) + pool.addTx(tx1) pool.RemoveSet(types.Transactions{tx1}) if pool.Size() > 0 { t.Error("expected pool size to be 0") @@ -65,7 +65,7 @@ func TestRemoveSet(t *testing.T) { func TestRemoveInvalid(t *testing.T) { pool, key := setup() tx1 := transaction() - pool.pool.Add(tx1) + pool.addTx(tx1) pool.RemoveInvalid(stateQuery{}) if pool.Size() > 0 { t.Error("expected pool size to be 0") @@ -73,7 +73,7 @@ func TestRemoveInvalid(t *testing.T) { tx1.SetNonce(1) tx1.SignECDSA(key) - pool.pool.Add(tx1) + pool.addTx(tx1) pool.RemoveInvalid(stateQuery{}) if pool.Size() != 1 { t.Error("expected pool size to be 1, is", pool.Size()) diff --git a/xeth/js_types.go b/xeth/js_types.go index dbddcb7a32..e7a1e95e9f 100644 --- a/xeth/js_types.go +++ b/xeth/js_types.go @@ -169,8 +169,8 @@ func NewJSPeer(peer *p2p.Peer) *JSPeer { return &JSPeer{ ref: peer, - Ip: peer.RemoteAddr().String(), - Version: peer.Identity().String(), + Ip: fmt.Sprintf("%v", peer.RemoteAddr()), + Version: fmt.Sprintf("%v", peer.Identity()), Caps: fmt.Sprintf("%v", caps), } } From 4e7f53adf00d25ada6fe6c52c2795a78cce7e795 Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 6 Jan 2015 13:31:08 +0100 Subject: [PATCH 097/132] Changed to poc-8 & removed GetTxs --- eth/backend.go | 2 +- eth/protocol.go | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/eth/backend.go b/eth/backend.go index 065a4f7d84..2971df4222 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -18,7 +18,7 @@ import ( ) const ( - seedNodeAddress = "poc-7.ethdev.com:30300" + seedNodeAddress = "poc-8.ethdev.com:30300" ) type Config struct { diff --git a/eth/protocol.go b/eth/protocol.go index 723ab5502e..f52d935e87 100644 --- a/eth/protocol.go +++ b/eth/protocol.go @@ -22,7 +22,6 @@ const ( // eth protocol message codes const ( StatusMsg = iota - GetTxMsg // unused TxMsg GetBlockHashesMsg BlockHashesMsg From 1b903767e0418c4e11221f271107a825c2a23933 Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 6 Jan 2015 13:31:52 +0100 Subject: [PATCH 098/132] Fixed port num --- eth/backend.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eth/backend.go b/eth/backend.go index 2971df4222..a6ff527480 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -18,7 +18,7 @@ import ( ) const ( - seedNodeAddress = "poc-8.ethdev.com:30300" + seedNodeAddress = "poc-8.ethdev.com:30303" ) type Config struct { From a76b7dadaee6eddf64cba8ad8dd6ce71c785a7ee Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 6 Jan 2015 13:39:01 +0100 Subject: [PATCH 099/132] Don't auto push jeff ... --- eth/protocol.go | 1 + 1 file changed, 1 insertion(+) diff --git a/eth/protocol.go b/eth/protocol.go index f52d935e87..723ab5502e 100644 --- a/eth/protocol.go +++ b/eth/protocol.go @@ -22,6 +22,7 @@ const ( // eth protocol message codes const ( StatusMsg = iota + GetTxMsg // unused TxMsg GetBlockHashesMsg BlockHashesMsg From 25e6c4eff8364770cfd2908db9c54a012b9e4ec4 Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 6 Jan 2015 14:02:47 +0100 Subject: [PATCH 100/132] Adjusted difficulty and skip get tx messages --- core/block_processor.go | 1 + core/chain_manager.go | 2 +- eth/protocol.go | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/block_processor.go b/core/block_processor.go index 127e979211..233e5e4db3 100644 --- a/core/block_processor.go +++ b/core/block_processor.go @@ -264,6 +264,7 @@ func (sm *BlockProcessor) ValidateBlock(block, parent *types.Block) error { expd := CalcDifficulty(block, parent) if expd.Cmp(block.Header().Difficulty) < 0 { + fmt.Println("parent\n", parent) return fmt.Errorf("Difficulty check failed for block %v, %v", block.Header().Difficulty, expd) } diff --git a/core/chain_manager.go b/core/chain_manager.go index 82b17cd931..e73ea63788 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -25,7 +25,7 @@ func CalcDifficulty(block, parent *types.Block) *big.Int { bh, ph := block.Header(), parent.Header() adjust := new(big.Int).Rsh(ph.Difficulty, 10) - if bh.Time >= ph.Time+5 { + if bh.Time >= ph.Time+13 { diff.Sub(ph.Difficulty, adjust) } else { diff.Add(ph.Difficulty, adjust) diff --git a/eth/protocol.go b/eth/protocol.go index 723ab5502e..736bcd94bb 100644 --- a/eth/protocol.go +++ b/eth/protocol.go @@ -122,7 +122,7 @@ func (self *ethProtocol) handle() error { defer msg.Discard() switch msg.Code { - + case GetTxMsg: // ignore case StatusMsg: return self.protoError(ErrExtraStatusMsg, "") From f0ec75123747424ab2606fe6ef650b13520fac22 Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 6 Jan 2015 20:22:31 +0100 Subject: [PATCH 101/132] Updated tests --- .../StateTests/stSystemOperationsTest.json | 150 ++++++++++++ tests/files/VMTests/vmBlockInfoTest.json | 221 ++++++++++++++---- .../VMTests/vmEnvironmentalInfoTest.json | 113 ++++++++- vm/common.go | 2 +- 4 files changed, 434 insertions(+), 52 deletions(-) diff --git a/tests/files/StateTests/stSystemOperationsTest.json b/tests/files/StateTests/stSystemOperationsTest.json index 781be3368b..4120f3cab6 100644 --- a/tests/files/StateTests/stSystemOperationsTest.json +++ b/tests/files/StateTests/stSystemOperationsTest.json @@ -4673,6 +4673,81 @@ "value" : "100000" } }, + "CallToNameRegistratorZeorSizeMemExpansion" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "10000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000099977", + "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6000527faaffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaa6020526000600060006000601773945304eb96065b2a98b57a48a06ae28d285a71b56103e8f1600055", + "nonce" : "0", + "storage" : { + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "1636", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "945304eb96065b2a98b57a48a06ae28d285a71b5" : { + "balance" : "46", + "code" : "0x60003554156009570060203560003555", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "999999999999898364", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6000527faaffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaa6020526000600060006000601773945304eb96065b2a98b57a48a06ae28d285a71b56103e8f1600055", + "nonce" : "0", + "storage" : { + } + }, + "945304eb96065b2a98b57a48a06ae28d285a71b5" : { + "balance" : "23", + "code" : "0x60003554156009570060203560003555", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000000000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "10000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "100000" + } + }, "CallToReturn1" : { "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", @@ -5023,6 +5098,81 @@ "value" : "100000" } }, + "callcodeToNameRegistratorZeroMemExpanion" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "10000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000100000", + "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6000527faaffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaa6020526000600060006000601773945304eb96065b2a98b57a48a06ae28d285a71b56103e8f2600055", + "nonce" : "0", + "storage" : { + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "1636", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "945304eb96065b2a98b57a48a06ae28d285a71b5" : { + "balance" : "23", + "code" : "0x60003554156009570060203560003555", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "999999999999898364", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6000527faaffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaa6020526000600060006000601773945304eb96065b2a98b57a48a06ae28d285a71b56103e8f2600055", + "nonce" : "0", + "storage" : { + } + }, + "945304eb96065b2a98b57a48a06ae28d285a71b5" : { + "balance" : "23", + "code" : "0x60003554156009570060203560003555", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000000000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "1000000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "100000" + } + }, "callcodeToReturn1" : { "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", diff --git a/tests/files/VMTests/vmBlockInfoTest.json b/tests/files/VMTests/vmBlockInfoTest.json index 90fa77a3de..67ec9dbf82 100644 --- a/tests/files/VMTests/vmBlockInfoTest.json +++ b/tests/files/VMTests/vmBlockInfoTest.json @@ -1,4 +1,180 @@ { + "blockhash257Block" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "257", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x600040600055", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9897", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600040600055", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600040600055", + "nonce" : "0", + "storage" : { + } + } + } + }, + "blockhash258Block" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "258", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x600140600055", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9897", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600140600055", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600140600055", + "nonce" : "0", + "storage" : { + } + } + } + }, + "blockhashMyBlock" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "1", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x600140600055", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9897", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600140600055", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600140600055", + "nonce" : "0", + "storage" : { + } + } + } + }, + "blockhashNotExistingBlock" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "1", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x600240600055", + "data" : "0x", + "gas" : "10000", + "gasPrice" : "100000000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "9897", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600240600055", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x600240600055", + "nonce" : "0", + "storage" : { + } + } + } + }, "coinbase" : { "callcreates" : [ ], @@ -178,51 +354,6 @@ } } }, - "prevhash" : { - "callcreates" : [ - ], - "env" : { - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "256", - "currentGasLimit" : "1000000", - "currentNumber" : "0", - "currentTimestamp" : "1", - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x40600055", - "data" : "0x", - "gas" : "10000", - "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000" - }, - "gas" : "9698", - "logs" : [ - ], - "out" : "0x", - "post" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x40600055", - "nonce" : "0", - "storage" : { - "0x" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" - } - } - }, - "pre" : { - "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "1000000000000000000", - "code" : "0x40600055", - "nonce" : "0", - "storage" : { - } - } - } - }, "timestamp" : { "callcreates" : [ ], diff --git a/tests/files/VMTests/vmEnvironmentalInfoTest.json b/tests/files/VMTests/vmEnvironmentalInfoTest.json index 37563707b5..88f22027ea 100644 --- a/tests/files/VMTests/vmEnvironmentalInfoTest.json +++ b/tests/files/VMTests/vmEnvironmentalInfoTest.json @@ -416,6 +416,50 @@ } } }, + "calldatacopyZeroMemExpansion" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x60006000600037600051600055", + "data" : "0x01234567890abcdef01234567890abcdef", + "gas" : "100000000000", + "gasPrice" : "1000000000", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "99999999892", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60006000600037600051600055", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x60006000600037600051600055", + "nonce" : "0", + "storage" : { + } + } + } + }, "calldatacopy_DataIndexTooHigh" : { "callcreates" : [ ], @@ -953,7 +997,7 @@ } } }, - "codecopy1" : { + "codecopyZeroMemExpansion" : { "callcreates" : [ ], "env" : { @@ -967,31 +1011,30 @@ "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x386000600039600051600055", + "code" : "0x60006000600039600051600055", "data" : "0x01234567890abcdef01234567890abcdef", "gas" : "100000000000", "gasPrice" : "1000000000", "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, - "gas" : "99999999691", + "gas" : "99999999892", "logs" : [ ], "out" : "0x", "post" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", - "code" : "0x386000600039600051600055", + "code" : "0x60006000600039600051600055", "nonce" : "0", "storage" : { - "0x" : "0x3860006000396000516000550000000000000000000000000000000000000000" } } }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", - "code" : "0x386000600039600051600055", + "code" : "0x60006000600039600051600055", "nonce" : "0", "storage" : { } @@ -1146,6 +1189,64 @@ } } }, + "extcodecopyZeroMemExpansion" : { + "callcreates" : [ + ], + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : "1", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "code" : "0x", + "data" : "0x01234567890abcdef01234567890abcdef", + "gas" : "100000000000", + "gasPrice" : "123456789", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000" + }, + "gas" : "100000000000", + "logs" : [ + ], + "out" : "0x", + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "cd1722f3947def4cf144679da39c4c32bdc35681" : { + "balance" : "1000000000000000000", + "code" : "0x6005600055", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "cd1722f3947def4cf144679da39c4c32bdc35681" : { + "balance" : "1000000000000000000", + "code" : "0x6005600055", + "nonce" : "0", + "storage" : { + } + } + } + }, "extcodecopy_DataIndexTooHigh" : { "callcreates" : [ ], diff --git a/vm/common.go b/vm/common.go index acf18eede1..f19b0fe4bc 100644 --- a/vm/common.go +++ b/vm/common.go @@ -49,7 +49,7 @@ var ( S256 = ethutil.S256 ) -const MaxCallDepth = 1024 +const MaxCallDepth = 1025 func calcMemSize(off, l *big.Int) *big.Int { if l.Cmp(ethutil.Big0) == 0 { From 60d9611c2365512c9a3e1576e875c5755ea0c74b Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 7 Jan 2015 01:21:45 +0100 Subject: [PATCH 102/132] Fixed tests where txs weren't properly removed --- core/transaction_pool.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/transaction_pool.go b/core/transaction_pool.go index ff6c21aa97..d3aec90502 100644 --- a/core/transaction_pool.go +++ b/core/transaction_pool.go @@ -56,11 +56,6 @@ func NewTxPool(eventMux *event.TypeMux) *TxPool { } func (pool *TxPool) ValidateTransaction(tx *types.Transaction) error { - hash := tx.Hash() - if pool.txs[string(hash)] != nil { - return fmt.Errorf("Known transaction (%x)", hash[0:4]) - } - if len(tx.To()) != 0 && len(tx.To()) != 20 { return fmt.Errorf("Invalid recipient. len = %d", len(tx.To())) } @@ -97,6 +92,10 @@ func (self *TxPool) addTx(tx *types.Transaction) { } func (self *TxPool) Add(tx *types.Transaction) error { + if self.txs[string(tx.Hash())] != nil { + return fmt.Errorf("Known transaction (%x)", tx.Hash()[0:4]) + } + err := self.ValidateTransaction(tx) if err != nil { return err @@ -149,6 +148,7 @@ func (pool *TxPool) RemoveInvalid(query StateQuery) { for _, tx := range pool.txs { sender := query.GetAccount(tx.From()) err := pool.ValidateTransaction(tx) + fmt.Println(err, sender.Nonce, tx.Nonce()) if err != nil || sender.Nonce >= tx.Nonce() { removedTxs = append(removedTxs, tx) } From 032ab665299d75bffc25260e8fa477ace19db06a Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 7 Jan 2015 01:21:55 +0100 Subject: [PATCH 103/132] Added version flag --- cmd/ethereum/flags.go | 2 ++ cmd/ethereum/main.go | 15 +++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/cmd/ethereum/flags.go b/cmd/ethereum/flags.go index 57e5d8b8c1..f829744dc9 100644 --- a/cmd/ethereum/flags.go +++ b/cmd/ethereum/flags.go @@ -64,6 +64,7 @@ var ( ImportChain string SHH bool Dial bool + PrintVersion bool ) // flags specific to cli client @@ -120,6 +121,7 @@ func Init() { flag.BoolVar(&StartMining, "mine", false, "start dagger mining") flag.BoolVar(&StartJsConsole, "js", false, "launches javascript console") + flag.BoolVar(&PrintVersion, "version", false, "prints version number") flag.Parse() diff --git a/cmd/ethereum/main.go b/cmd/ethereum/main.go index 481914aead..3243cc7fb2 100644 --- a/cmd/ethereum/main.go +++ b/cmd/ethereum/main.go @@ -52,6 +52,11 @@ func main() { // precedence: code-internal flag default < config file < environment variables < command line Init() // parsing command line + if PrintVersion { + printVersion() + return + } + utils.InitConfig(VmType, ConfigFile, Datadir, "ETH") ethereum, err := eth.New(ð.Config{ @@ -137,3 +142,13 @@ func main() { // this blocks the thread ethereum.WaitForShutdown() } + +func printVersion() { + fmt.Printf(`%v %v +PV=%d +GOOS=%s +GO=%s +GOPATH=%s +GOROOT=%s +`, ClientIdentifier, Version, eth.ProtocolVersion, runtime.GOOS, runtime.Version(), os.Getenv("GOPATH"), runtime.GOROOT()) +} From ec7cb9981cdedabf0c18c2fdc51cc20941dcb1fa Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Wed, 7 Jan 2015 12:56:20 +0100 Subject: [PATCH 104/132] add license tool and initial mailmap --- .mailmap | 12 +++ update-license.go | 248 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 260 insertions(+) create mode 100644 .mailmap create mode 100644 update-license.go diff --git a/.mailmap b/.mailmap new file mode 100644 index 0000000000..cc9834bb9f --- /dev/null +++ b/.mailmap @@ -0,0 +1,12 @@ +Jeffrey Wilcke +Jeffrey Wilcke +Jeffrey Wilcke +Jeffrey Wilcke + +Viktor Trón + +Joseph Goulden + +Nick Savers + +Maran Hidskes \ No newline at end of file diff --git a/update-license.go b/update-license.go new file mode 100644 index 0000000000..ab76e0f312 --- /dev/null +++ b/update-license.go @@ -0,0 +1,248 @@ +// +build none + +/* +This command generates GPL license headers on top of all source files. +You can run it once per month, before cutting a release or just +whenever you feel like it. + + go run update-licenses.go + +The copyright in each file is assigned to any authors for which git +can find commits in the file's history. It will try to follow renames +throughout history. The author names are mapped and deduplicated using +the .mailmap file. You can use .mailmap to set the canonical name and +address for each author. See git-shortlog(1) for an explanation +of the .mailmap format. + +Please review the resulting diff to check whether the correct +copyright assignments are performed. +*/ +package main + +import ( + "bufio" + "bytes" + "fmt" + "io/ioutil" + "os" + "os/exec" + "path" + "regexp" + "runtime" + "sort" + "strings" + "sync" + "text/template" +) + +var ( + // only files with these extensions will be considered + extensions = []string{".go", ".js", ".qml"} + + // paths with any of these prefixes will be skipped + skipPrefixes = []string{"tests/files/", "cmd/mist/assets/ext/", "cmd/mist/assets/muted/"} + + // paths with this prefix are licensed as GPL. all other files are LGPL. + gplPrefixes = []string{"cmd/"} + + // this regexp must match the entire license comment at the + // beginning of each file. + licenseCommentRE = regexp.MustCompile(`(?s)^/\*\s*(Copyright|This file is part of) .*?\*/\n*`) + + // this line is used when git doesn't find any authors for a file + defaultCopyright = "Copyright (C) 2014 Jeffrey Wilcke " +) + +// this template generates the license comment. +// its input is an info structure. +var licenseT = template.Must(template.New("").Parse(`/* + {{.Copyrights}} + + This file is part of go-ethereum + + go-ethereum is free software: you can redistribute it and/or modify + it under the terms of the GNU {{.License}} as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + go-ethereum is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU {{.License}} for more details. + + You should have received a copy of the GNU {{.License}} + along with go-ethereum. If not, see . +*/ + +`)) + +type info struct { + file string + mode os.FileMode + authors map[string][]string // map keys are authors, values are years + gpl bool +} + +func (i info) Copyrights() string { + var lines []string + for name, years := range i.authors { + lines = append(lines, "Copyright (C) "+strings.Join(years, ", ")+" "+name) + } + if len(lines) == 0 { + lines = []string{defaultCopyright} + } + sort.Strings(lines) + return strings.Join(lines, "\n\t") +} + +func (i info) License() string { + if i.gpl { + return "General Public License" + } else { + return "Lesser General Public License" + } +} + +func (i info) ShortLicense() string { + if i.gpl { + return "GPL" + } else { + return "LGPL" + } +} + +func (i *info) addAuthorYear(name, year string) { + for _, y := range i.authors[name] { + if y == year { + return + } + } + i.authors[name] = append(i.authors[name], year) + sort.Strings(i.authors[name]) +} + +func main() { + files := make(chan string) + infos := make(chan *info) + wg := new(sync.WaitGroup) + + go getFiles(files) + for i := runtime.NumCPU(); i >= 0; i-- { + // getting file info is slow and needs to be parallel + wg.Add(1) + go getInfo(files, infos, wg) + } + go func() { wg.Wait(); close(infos) }() + writeLicenses(infos) +} + +func getFiles(out chan<- string) { + cmd := exec.Command("git", "ls-tree", "-r", "--name-only", "HEAD") + err := doLines(cmd, func(line string) { + for _, p := range skipPrefixes { + if strings.HasPrefix(line, p) { + return + } + } + ext := path.Ext(line) + for _, wantExt := range extensions { + if ext == wantExt { + goto send + } + } + return + + send: + out <- line + }) + if err != nil { + fmt.Println("error getting files:", err) + } + close(out) +} + +func getInfo(files <-chan string, out chan<- *info, wg *sync.WaitGroup) { + for file := range files { + stat, err := os.Lstat(file) + if err != nil { + fmt.Printf("ERROR %s: %v\n", file, err) + continue + } + if !stat.Mode().IsRegular() { + continue + } + info, err := fileInfo(file) + if err != nil { + fmt.Printf("ERROR %s: %v\n", file, err) + continue + } + info.mode = stat.Mode() + out <- info + } + wg.Done() +} + +func fileInfo(file string) (*info, error) { + info := &info{file: file, authors: make(map[string][]string)} + for _, p := range gplPrefixes { + if strings.HasPrefix(file, p) { + info.gpl = true + break + } + } + cmd := exec.Command("git", "log", "--follow", "--find-copies", "--pretty=format:%aI | %aN <%aE>", "--", file) + err := doLines(cmd, func(line string) { + sep := strings.IndexByte(line, '|') + year, name := line[:4], line[sep+2:] + info.addAuthorYear(name, year) + }) + return info, err +} + +func writeLicenses(infos <-chan *info) error { + buf := new(bytes.Buffer) + for info := range infos { + content, err := ioutil.ReadFile(info.file) + if err != nil { + fmt.Printf("ERROR: couldn't read %s: %v\n", info.file, err) + } + + // construct new file content + buf.Reset() + licenseT.Execute(buf, info) + if m := licenseCommentRE.FindIndex(content); m != nil && m[0] == 0 { + buf.Write(content[m[1]:]) + } else { + buf.Write(content) + } + + if !bytes.Equal(content, buf.Bytes()) { + fmt.Println("writing", info.ShortLicense(), info.file) + if err := ioutil.WriteFile(info.file, buf.Bytes(), info.mode); err != nil { + return err + } + } + } + return nil +} + +func doLines(cmd *exec.Cmd, f func(string)) error { + stdout, err := cmd.StdoutPipe() + if err != nil { + return err + } + if err := cmd.Start(); err != nil { + return err + } + s := bufio.NewScanner(stdout) + for s.Scan() { + f(s.Text()) + } + if s.Err() != nil { + return s.Err() + } + if err := cmd.Wait(); err != nil { + return fmt.Errorf("%v (for %s)", err, strings.Join(cmd.Args, " ")) + } + return nil +} From fed3e6a808921fb8274b50043c5c39a24a1bbccf Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 7 Jan 2015 13:17:48 +0100 Subject: [PATCH 105/132] Refactored ethutil.Config.Db out --- cmd/ethereum/main.go | 4 +- cmd/ethtest/main.go | 10 ++- cmd/evm/main.go | 3 +- cmd/mist/bindings.go | 3 +- cmd/mist/gui.go | 19 +---- cmd/utils/cmd.go | 4 +- core/block_processor.go | 10 ++- core/chain_manager.go | 29 ++++---- core/chain_manager_test.go | 20 ++--- core/genesis.go | 5 +- core/helper_test.go | 1 - core/transaction_pool_test.go | 14 +++- core/types/block.go | 22 +++--- core/types/derive_sha.go | 4 +- eth/backend.go | 8 +- ethutil/config.go | 2 - javascript/javascript_runtime.go | 9 +-- miner/miner.go | 6 +- pow/ar/block.go | 12 --- pow/ar/ops.go | 54 -------------- pow/ar/pow.go | 122 ------------------------------- pow/ar/pow_test.go | 47 ------------ pow/ar/rnd.go | 66 ----------------- state/dump.go | 2 +- state/state_object.go | 25 +++---- state/state_test.go | 6 +- state/statedb.go | 19 +++-- tests/helper/init.go | 1 - tests/vm/gh_test.go | 10 ++- trie/iterator.go | 2 + trie/trie.go | 14 ++-- trie/trie_test.go | 55 +------------- xeth/js_types.go | 6 +- xeth/world.go | 2 +- xeth/xeth.go | 2 +- 35 files changed, 125 insertions(+), 493 deletions(-) delete mode 100644 pow/ar/block.go delete mode 100644 pow/ar/ops.go delete mode 100644 pow/ar/pow.go delete mode 100644 pow/ar/pow_test.go delete mode 100644 pow/ar/rnd.go diff --git a/cmd/ethereum/main.go b/cmd/ethereum/main.go index 3243cc7fb2..b816c678e7 100644 --- a/cmd/ethereum/main.go +++ b/cmd/ethereum/main.go @@ -31,6 +31,7 @@ import ( "github.com/ethereum/go-ethereum/eth" "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/logger" + "github.com/ethereum/go-ethereum/state" ) const ( @@ -103,7 +104,8 @@ func main() { } // Leave the Println. This needs clean output for piping - fmt.Printf("%s\n", block.State().Dump()) + statedb := state.New(block.Root(), ethereum.Db()) + fmt.Printf("%s\n", statedb.Dump()) fmt.Println(block) diff --git a/cmd/ethtest/main.go b/cmd/ethtest/main.go index 05e99564c1..7d1c3de01d 100644 --- a/cmd/ethtest/main.go +++ b/cmd/ethtest/main.go @@ -29,6 +29,7 @@ import ( "os" "strings" + "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/state" "github.com/ethereum/go-ethereum/tests/helper" @@ -41,8 +42,8 @@ type Account struct { Storage map[string]string } -func StateObjectFromAccount(addr string, account Account) *state.StateObject { - obj := state.NewStateObject(ethutil.Hex2Bytes(addr)) +func StateObjectFromAccount(db ethutil.Database, addr string, account Account) *state.StateObject { + obj := state.NewStateObject(ethutil.Hex2Bytes(addr), db) obj.SetBalance(ethutil.Big(account.Balance)) if ethutil.IsHex(account.Code) { @@ -74,9 +75,10 @@ func RunVmTest(js string) (failed int) { } for name, test := range tests { - state := state.New(helper.NewTrie()) + db, _ := ethdb.NewMemDatabase() + state := state.New(nil, db) for addr, account := range test.Pre { - obj := StateObjectFromAccount(addr, account) + obj := StateObjectFromAccount(db, addr, account) state.SetStateObject(obj) } diff --git a/cmd/evm/main.go b/cmd/evm/main.go index f902c99e51..f819386fe0 100644 --- a/cmd/evm/main.go +++ b/cmd/evm/main.go @@ -35,7 +35,6 @@ import ( "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/ptrie" "github.com/ethereum/go-ethereum/state" "github.com/ethereum/go-ethereum/vm" ) @@ -63,7 +62,7 @@ func main() { ethutil.ReadConfig("/tmp/evmtest", "/tmp/evm", "") db, _ := ethdb.NewMemDatabase() - statedb := state.New(ptrie.New(nil, db)) + statedb := state.New(nil, db) sender := statedb.NewStateObject([]byte("sender")) receiver := statedb.NewStateObject([]byte("receiver")) //receiver.SetCode([]byte(*code)) diff --git a/cmd/mist/bindings.go b/cmd/mist/bindings.go index e91a157dc3..f6d1c40da5 100644 --- a/cmd/mist/bindings.go +++ b/cmd/mist/bindings.go @@ -29,6 +29,7 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/logger" + "github.com/ethereum/go-ethereum/state" ) type plugin struct { @@ -121,7 +122,7 @@ func (self *Gui) DumpState(hash, path string) { return } - stateDump = block.State().Dump() + stateDump = state.New(block.Root(), self.eth.Db()).Dump() } file, err := os.OpenFile(path[7:], os.O_CREATE|os.O_RDWR, os.ModePerm) diff --git a/cmd/mist/gui.go b/cmd/mist/gui.go index 26239c4dbf..2e3f329b2a 100644 --- a/cmd/mist/gui.go +++ b/cmd/mist/gui.go @@ -117,18 +117,7 @@ func (gui *Gui) Start(assetPath string) { context.SetVar("eth", gui.uiLib) context.SetVar("shh", gui.whisper) - // Load the main QML interface - data, _ := ethutil.Config.Db.Get([]byte("KeyRing")) - - var win *qml.Window - var err error - var addlog = false - if len(data) == 0 { - win, err = gui.showKeyImport(context) - } else { - win, err = gui.showWallet(context) - addlog = true - } + win, err := gui.showWallet(context) if err != nil { guilogger.Errorln("asset not found: you can set an alternative asset path on the command line using option 'asset_path'", err) @@ -139,9 +128,7 @@ func (gui *Gui) Start(assetPath string) { win.Show() // only add the gui guilogger after window is shown otherwise slider wont be shown - if addlog { - logger.AddLogSystem(gui) - } + logger.AddLogSystem(gui) win.Wait() // need to silence gui guilogger after window closed otherwise logsystem hangs (but do not save loglevel) @@ -275,7 +262,7 @@ func (gui *Gui) insertTransaction(window string, tx *types.Transaction) { } var ( - ptx = xeth.NewJSTx(tx, gui.xeth.World().State()) + ptx = xeth.NewJSTx(tx) send = nameReg.Storage(tx.From()) rec = nameReg.Storage(tx.To()) s, r string diff --git a/cmd/utils/cmd.go b/cmd/utils/cmd.go index 1a85668b03..a57d3266f1 100644 --- a/cmd/utils/cmd.go +++ b/cmd/utils/cmd.go @@ -39,6 +39,7 @@ import ( "github.com/ethereum/go-ethereum/miner" "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/rpc" + "github.com/ethereum/go-ethereum/state" "github.com/ethereum/go-ethereum/xeth" ) @@ -259,7 +260,8 @@ func BlockDo(ethereum *eth.Ethereum, hash []byte) error { parent := ethereum.ChainManager().GetBlock(block.ParentHash()) - _, err := ethereum.BlockProcessor().TransitionState(parent.State(), parent, block) + statedb := state.New(parent.Root(), ethereum.Db()) + _, err := ethereum.BlockProcessor().TransitionState(statedb, parent, block) if err != nil { return err } diff --git a/core/block_processor.go b/core/block_processor.go index 233e5e4db3..87e8233627 100644 --- a/core/block_processor.go +++ b/core/block_processor.go @@ -36,6 +36,7 @@ type EthManager interface { } type BlockProcessor struct { + db ethutil.Database // Mutex for locking the block processor. Blocks can only be handled one at a time mutex sync.Mutex // Canonical block chain @@ -57,8 +58,9 @@ type BlockProcessor struct { eventMux *event.TypeMux } -func NewBlockProcessor(txpool *TxPool, chainManager *ChainManager, eventMux *event.TypeMux) *BlockProcessor { +func NewBlockProcessor(db ethutil.Database, txpool *TxPool, chainManager *ChainManager, eventMux *event.TypeMux) *BlockProcessor { sm := &BlockProcessor{ + db: db, mem: make(map[string]*big.Int), Pow: ezp.New(), bc: chainManager, @@ -170,7 +172,8 @@ func (sm *BlockProcessor) Process(block *types.Block) (td *big.Int, msgs state.M func (sm *BlockProcessor) ProcessWithParent(block, parent *types.Block) (td *big.Int, messages state.Messages, err error) { sm.lastAttemptedBlock = block - state := state.New(parent.Trie().Copy()) + state := state.New(parent.Root(), sm.db) + //state := state.New(parent.Trie().Copy()) // Block validation if err = sm.ValidateBlock(block, parent); err != nil { @@ -352,7 +355,8 @@ func (sm *BlockProcessor) GetMessages(block *types.Block) (messages []*state.Mes var ( parent = sm.bc.GetBlock(block.Header().ParentHash) - state = state.New(parent.Trie().Copy()) + //state = state.New(parent.Trie().Copy()) + state = state.New(parent.Root(), sm.db) ) defer state.Reset() diff --git a/core/chain_manager.go b/core/chain_manager.go index e73ea63788..2d4001f0f9 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -55,6 +55,7 @@ func CalcGasLimit(parent, block *types.Block) *big.Int { type ChainManager struct { //eth EthManager + db ethutil.Database processor types.BlockProcessor eventMux *event.TypeMux genesisBlock *types.Block @@ -96,13 +97,9 @@ func (self *ChainManager) CurrentBlock() *types.Block { return self.currentBlock } -func NewChainManager(mux *event.TypeMux) *ChainManager { - bc := &ChainManager{} - bc.genesisBlock = GenesisBlock() - bc.eventMux = mux - +func NewChainManager(db ethutil.Database, mux *event.TypeMux) *ChainManager { + bc := &ChainManager{db: db, genesisBlock: GenesisBlock(db), eventMux: mux} bc.setLastBlock() - bc.transState = bc.State().Copy() return bc @@ -120,7 +117,7 @@ func (self *ChainManager) SetProcessor(proc types.BlockProcessor) { } func (self *ChainManager) State() *state.StateDB { - return state.New(self.CurrentBlock().Trie()) + return state.New(self.CurrentBlock().Root(), self.db) } func (self *ChainManager) TransState() *state.StateDB { @@ -128,7 +125,7 @@ func (self *ChainManager) TransState() *state.StateDB { } func (bc *ChainManager) setLastBlock() { - data, _ := ethutil.Config.Db.Get([]byte("LastBlock")) + data, _ := bc.db.Get([]byte("LastBlock")) if len(data) != 0 { var block types.Block rlp.Decode(bytes.NewReader(data), &block) @@ -137,7 +134,7 @@ func (bc *ChainManager) setLastBlock() { bc.lastBlockNumber = block.Header().Number.Uint64() // Set the last know difficulty (might be 0x0 as initial value, Genesis) - bc.td = ethutil.BigD(ethutil.Config.Db.LastKnownTD()) + bc.td = ethutil.BigD(bc.db.LastKnownTD()) } else { bc.Reset() } @@ -183,7 +180,7 @@ func (bc *ChainManager) Reset() { defer bc.mu.Unlock() for block := bc.currentBlock; block != nil; block = bc.GetBlock(block.Header().ParentHash) { - ethutil.Config.Db.Delete(block.Hash()) + bc.db.Delete(block.Hash()) } // Prepare the genesis block @@ -210,7 +207,7 @@ func (self *ChainManager) Export() []byte { func (bc *ChainManager) insert(block *types.Block) { encodedBlock := ethutil.Encode(block) - ethutil.Config.Db.Put([]byte("LastBlock"), encodedBlock) + bc.db.Put([]byte("LastBlock"), encodedBlock) bc.currentBlock = block bc.lastBlockHash = block.Hash() } @@ -219,7 +216,7 @@ func (bc *ChainManager) write(block *types.Block) { bc.writeBlockInfo(block) encodedBlock := ethutil.Encode(block) - ethutil.Config.Db.Put(block.Hash(), encodedBlock) + bc.db.Put(block.Hash(), encodedBlock) } // Accessors @@ -229,7 +226,7 @@ func (bc *ChainManager) Genesis() *types.Block { // Block fetching methods func (bc *ChainManager) HasBlock(hash []byte) bool { - data, _ := ethutil.Config.Db.Get(hash) + data, _ := bc.db.Get(hash) return len(data) != 0 } @@ -254,7 +251,7 @@ func (self *ChainManager) GetBlockHashesFromHash(hash []byte, max uint64) (chain } func (self *ChainManager) GetBlock(hash []byte) *types.Block { - data, _ := ethutil.Config.Db.Get(hash) + data, _ := self.db.Get(hash) if len(data) == 0 { return nil } @@ -286,7 +283,7 @@ func (self *ChainManager) GetBlockByNumber(num uint64) *types.Block { } func (bc *ChainManager) setTotalDifficulty(td *big.Int) { - ethutil.Config.Db.Put([]byte("LTD"), td.Bytes()) + bc.db.Put([]byte("LTD"), td.Bytes()) bc.td = td } @@ -348,7 +345,7 @@ func (self *ChainManager) InsertChain(chain types.Blocks) error { self.setTotalDifficulty(td) self.insert(block) - self.transState = state.New(cblock.Trie().Copy()) + self.transState = state.New(cblock.Root(), self.db) //state.New(cblock.Trie().Copy()) } } diff --git a/core/chain_manager_test.go b/core/chain_manager_test.go index 6c66961b0a..b384c49264 100644 --- a/core/chain_manager_test.go +++ b/core/chain_manager_test.go @@ -21,14 +21,6 @@ func init() { ethutil.ReadConfig("/tmp/ethtest", "/tmp/ethtest", "ETH") } -func reset() { - db, err := ethdb.NewMemDatabase() - if err != nil { - panic("Could not create mem-db, failing") - } - ethutil.Config.Db = db -} - func loadChain(fn string, t *testing.T) (types.Blocks, error) { fh, err := os.OpenFile(path.Join(os.Getenv("GOPATH"), "src", "github.com", "ethereum", "go-ethereum", "_data", fn), os.O_RDONLY, os.ModePerm) if err != nil { @@ -54,7 +46,7 @@ func insertChain(done chan bool, chainMan *ChainManager, chain types.Blocks, t * } func TestChainInsertions(t *testing.T) { - reset() + db, _ := ethdb.NewMemDatabase() chain1, err := loadChain("valid1", t) if err != nil { @@ -69,9 +61,9 @@ func TestChainInsertions(t *testing.T) { } var eventMux event.TypeMux - chainMan := NewChainManager(&eventMux) + chainMan := NewChainManager(db, &eventMux) txPool := NewTxPool(&eventMux) - blockMan := NewBlockProcessor(txPool, chainMan, &eventMux) + blockMan := NewBlockProcessor(db, txPool, chainMan, &eventMux) chainMan.SetProcessor(blockMan) const max = 2 @@ -94,7 +86,7 @@ func TestChainInsertions(t *testing.T) { } func TestChainMultipleInsertions(t *testing.T) { - reset() + db, _ := ethdb.NewMemDatabase() const max = 4 chains := make([]types.Blocks, max) @@ -113,9 +105,9 @@ func TestChainMultipleInsertions(t *testing.T) { } } var eventMux event.TypeMux - chainMan := NewChainManager(&eventMux) + chainMan := NewChainManager(db, &eventMux) txPool := NewTxPool(&eventMux) - blockMan := NewBlockProcessor(txPool, chainMan, &eventMux) + blockMan := NewBlockProcessor(db, txPool, chainMan, &eventMux) chainMan.SetProcessor(blockMan) done := make(chan bool, max) for i, chain := range chains { diff --git a/core/genesis.go b/core/genesis.go index 10b40516ff..1590818a8f 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -19,7 +19,7 @@ var ZeroHash512 = make([]byte, 64) var EmptyShaList = crypto.Sha3(ethutil.Encode([]interface{}{})) var EmptyListRoot = crypto.Sha3(ethutil.Encode("")) -func GenesisBlock() *types.Block { +func GenesisBlock(db ethutil.Database) *types.Block { genesis := types.NewBlock(ZeroHash256, ZeroHash160, nil, big.NewInt(131072), crypto.Sha3(big.NewInt(42).Bytes()), "") genesis.Header().Number = ethutil.Big0 genesis.Header().GasLimit = big.NewInt(1000000) @@ -30,7 +30,8 @@ func GenesisBlock() *types.Block { genesis.SetTransactions(types.Transactions{}) genesis.SetReceipts(types.Receipts{}) - statedb := state.New(genesis.Trie()) + statedb := state.New(genesis.Root(), db) + //statedb := state.New(genesis.Trie()) for _, addr := range []string{ "51ba59315b3a95761d0863b05ccc7a7f54703d99", "e4157b34ea9615cfbde6b4fda419828124b70c78", diff --git a/core/helper_test.go b/core/helper_test.go index b8bf254d76..7b41b86f15 100644 --- a/core/helper_test.go +++ b/core/helper_test.go @@ -77,7 +77,6 @@ func NewTestManager() *TestManager { fmt.Println("Could not create mem-db, failing") return nil } - ethutil.Config.Db = db testManager := &TestManager{} testManager.eventMux = new(event.TypeMux) diff --git a/core/transaction_pool_test.go b/core/transaction_pool_test.go index 2e1debfbee..7f192fc4dd 100644 --- a/core/transaction_pool_test.go +++ b/core/transaction_pool_test.go @@ -6,16 +6,22 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/state" ) // State query interface -type stateQuery struct{} +type stateQuery struct{ db ethutil.Database } + +func SQ() stateQuery { + db, _ := ethdb.NewMemDatabase() + return stateQuery{db: db} +} func (self stateQuery) GetAccount(addr []byte) *state.StateObject { - return state.NewStateObject(addr) + return state.NewStateObject(addr, self.db) } func transaction() *types.Transaction { @@ -66,7 +72,7 @@ func TestRemoveInvalid(t *testing.T) { pool, key := setup() tx1 := transaction() pool.addTx(tx1) - pool.RemoveInvalid(stateQuery{}) + pool.RemoveInvalid(SQ()) if pool.Size() > 0 { t.Error("expected pool size to be 0") } @@ -74,7 +80,7 @@ func TestRemoveInvalid(t *testing.T) { tx1.SetNonce(1) tx1.SignECDSA(key) pool.addTx(tx1) - pool.RemoveInvalid(stateQuery{}) + pool.RemoveInvalid(SQ()) if pool.Size() != 1 { t.Error("expected pool size to be 1, is", pool.Size()) } diff --git a/core/types/block.go b/core/types/block.go index 7e19d003f5..be57e86a65 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -9,9 +9,7 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethutil" - "github.com/ethereum/go-ethereum/ptrie" "github.com/ethereum/go-ethereum/rlp" - "github.com/ethereum/go-ethereum/state" ) type Header struct { @@ -168,16 +166,18 @@ func (self *Block) RlpDataForStorage() interface{} { } // Header accessors (add as you need them) -func (self *Block) Number() *big.Int { return self.header.Number } -func (self *Block) NumberU64() uint64 { return self.header.Number.Uint64() } -func (self *Block) Bloom() []byte { return self.header.Bloom } -func (self *Block) Coinbase() []byte { return self.header.Coinbase } -func (self *Block) Time() int64 { return int64(self.header.Time) } -func (self *Block) GasLimit() *big.Int { return self.header.GasLimit } -func (self *Block) GasUsed() *big.Int { return self.header.GasUsed } -func (self *Block) Trie() *ptrie.Trie { return ptrie.New(self.header.Root, ethutil.Config.Db) } +func (self *Block) Number() *big.Int { return self.header.Number } +func (self *Block) NumberU64() uint64 { return self.header.Number.Uint64() } +func (self *Block) Bloom() []byte { return self.header.Bloom } +func (self *Block) Coinbase() []byte { return self.header.Coinbase } +func (self *Block) Time() int64 { return int64(self.header.Time) } +func (self *Block) GasLimit() *big.Int { return self.header.GasLimit } +func (self *Block) GasUsed() *big.Int { return self.header.GasUsed } + +//func (self *Block) Trie() *ptrie.Trie { return ptrie.New(self.header.Root, ethutil.Config.Db) } +//func (self *Block) State() *state.StateDB { return state.New(self.Trie()) } +func (self *Block) Root() []byte { return self.header.Root } func (self *Block) SetRoot(root []byte) { self.header.Root = root } -func (self *Block) State() *state.StateDB { return state.New(self.Trie()) } func (self *Block) Size() ethutil.StorageSize { return ethutil.StorageSize(len(ethutil.Encode(self))) } // Implement pow.Block diff --git a/core/types/derive_sha.go b/core/types/derive_sha.go index 0beb196709..0e286bd8b2 100644 --- a/core/types/derive_sha.go +++ b/core/types/derive_sha.go @@ -1,6 +1,7 @@ package types import ( + "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/ptrie" ) @@ -11,7 +12,8 @@ type DerivableList interface { } func DeriveSha(list DerivableList) []byte { - trie := ptrie.New(nil, ethutil.Config.Db) + db, _ := ethdb.NewMemDatabase() + trie := ptrie.New(nil, db) for i := 0; i < list.Len(); i++ { trie.Update(ethutil.Encode(i), list.GetRlp(i)) } diff --git a/eth/backend.go b/eth/backend.go index a6ff527480..02d3dc942f 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -81,7 +81,7 @@ type Ethereum struct { func New(config *Config) (*Ethereum, error) { // Boostrap database logger := ethlogger.New(config.DataDir, config.LogFile, config.LogLevel) - db, err := ethdb.NewLDBDatabase("database") + db, err := ethdb.NewLDBDatabase("blockchain") if err != nil { return nil, err } @@ -110,7 +110,7 @@ func New(config *Config) (*Ethereum, error) { clientId := p2p.NewSimpleClientIdentity(config.Name, config.Version, config.Identifier, keyManager.PublicKey()) saveProtocolVersion(db) - ethutil.Config.Db = db + //ethutil.Config.Db = db eth := &Ethereum{ shutdownChan: make(chan bool), @@ -123,9 +123,9 @@ func New(config *Config) (*Ethereum, error) { logger: logger, } - eth.chainManager = core.NewChainManager(eth.EventMux()) + eth.chainManager = core.NewChainManager(db, eth.EventMux()) eth.txPool = core.NewTxPool(eth.EventMux()) - eth.blockProcessor = core.NewBlockProcessor(eth.txPool, eth.chainManager, eth.EventMux()) + eth.blockProcessor = core.NewBlockProcessor(db, eth.txPool, eth.chainManager, eth.EventMux()) eth.chainManager.SetProcessor(eth.blockProcessor) eth.whisper = whisper.New() diff --git a/ethutil/config.go b/ethutil/config.go index ccc7714d01..fc8fb4e3f8 100644 --- a/ethutil/config.go +++ b/ethutil/config.go @@ -10,8 +10,6 @@ import ( // Config struct type ConfigManager struct { - Db Database - ExecPath string Debug bool Diff bool diff --git a/javascript/javascript_runtime.go b/javascript/javascript_runtime.go index af1405049f..adc9022b74 100644 --- a/javascript/javascript_runtime.go +++ b/javascript/javascript_runtime.go @@ -129,10 +129,9 @@ func (self *JSRE) initStdFuncs() { */ func (self *JSRE) dump(call otto.FunctionCall) otto.Value { - var state *state.StateDB + var block *types.Block if len(call.ArgumentList) > 0 { - var block *types.Block if call.Argument(0).IsNumber() { num, _ := call.Argument(0).ToInteger() block = self.ethereum.ChainManager().GetBlockByNumber(uint64(num)) @@ -149,12 +148,12 @@ func (self *JSRE) dump(call otto.FunctionCall) otto.Value { return otto.UndefinedValue() } - state = block.State() } else { - state = self.ethereum.ChainManager().State() + block = self.ethereum.ChainManager().CurrentBlock() } - v, _ := self.Vm.ToValue(state.Dump()) + statedb := state.New(block.Root(), self.ethereum.Db()) + v, _ := self.Vm.ToValue(statedb.Dump()) return v } diff --git a/miner/miner.go b/miner/miner.go index f80ae51c68..52dd5687d1 100644 --- a/miner/miner.go +++ b/miner/miner.go @@ -31,6 +31,7 @@ import ( "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/pow" "github.com/ethereum/go-ethereum/pow/ezp" + "github.com/ethereum/go-ethereum/state" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" @@ -178,6 +179,7 @@ func (self *Miner) mine() { blockProcessor = self.eth.BlockProcessor() chainMan = self.eth.ChainManager() block = chainMan.NewBlock(self.Coinbase) + state = state.New(block.Root(), self.eth.Db()) ) block.Header().Extra = self.Extra @@ -187,13 +189,11 @@ func (self *Miner) mine() { } parent := chainMan.GetBlock(block.ParentHash()) - coinbase := block.State().GetOrNewStateObject(block.Coinbase()) + coinbase := state.GetOrNewStateObject(block.Coinbase()) coinbase.SetGasPool(core.CalcGasLimit(parent, block)) transactions := self.finiliseTxs() - state := block.State() - // Accumulate all valid transactions and apply them to the new state // Error may be ignored. It's not important during mining receipts, txs, _, erroneous, err := blockProcessor.ApplyTransactions(coinbase, state, block, transactions, true) diff --git a/pow/ar/block.go b/pow/ar/block.go deleted file mode 100644 index 2124b53b4b..0000000000 --- a/pow/ar/block.go +++ /dev/null @@ -1,12 +0,0 @@ -package ar - -import ( - "math/big" - - "github.com/ethereum/go-ethereum/trie" -) - -type Block interface { - Trie() *trie.Trie - Diff() *big.Int -} diff --git a/pow/ar/ops.go b/pow/ar/ops.go deleted file mode 100644 index 3a099be087..0000000000 --- a/pow/ar/ops.go +++ /dev/null @@ -1,54 +0,0 @@ -package ar - -import "math/big" - -const lenops int64 = 9 - -type OpsFunc func(a, b *big.Int) *big.Int - -var ops [lenops]OpsFunc - -func init() { - ops[0] = Add - ops[1] = Mul - ops[2] = Mod - ops[3] = Xor - ops[4] = And - ops[5] = Or - ops[6] = Sub1 - ops[7] = XorSub - ops[8] = Rsh -} - -func Add(x, y *big.Int) *big.Int { - return new(big.Int).Add(x, y) -} -func Mul(x, y *big.Int) *big.Int { - return new(big.Int).Mul(x, y) -} -func Mod(x, y *big.Int) *big.Int { - return new(big.Int).Mod(x, y) -} -func Xor(x, y *big.Int) *big.Int { - return new(big.Int).Xor(x, y) -} -func And(x, y *big.Int) *big.Int { - return new(big.Int).And(x, y) -} -func Or(x, y *big.Int) *big.Int { - return new(big.Int).Or(x, y) -} -func Sub1(x, y *big.Int) *big.Int { - a := big.NewInt(-1) - a.Sub(a, x) - - return a -} -func XorSub(x, y *big.Int) *big.Int { - t := Sub1(x, nil) - - return t.Xor(t, y) -} -func Rsh(x, y *big.Int) *big.Int { - return new(big.Int).Rsh(x, uint(y.Uint64()%64)) -} diff --git a/pow/ar/pow.go b/pow/ar/pow.go deleted file mode 100644 index 8991a674ba..0000000000 --- a/pow/ar/pow.go +++ /dev/null @@ -1,122 +0,0 @@ -package ar - -import ( - "math/big" - - "github.com/ethereum/go-ethereum/ethutil" -) - -type Entry struct { - op OpsFunc - i, j *big.Int -} - -type Tape struct { - tape []Entry - block Block -} - -func NewTape(block Block) *Tape { - return &Tape{nil, block} -} - -func (self *Tape) gen(w, h int64, gen NumberGenerator) { - self.tape = nil - - for v := int64(0); v < h; v++ { - op := ops[gen.rand64(lenops).Int64()] - r := gen.rand64(100).Uint64() - - var j *big.Int - if r < 20 && v > 20 { - j = self.tape[len(self.tape)-1].i - } else { - j = gen.rand64(w) - } - - i := gen.rand64(w) - self.tape = append(self.tape, Entry{op, i, j}) - } -} - -func (self *Tape) runTape(w, h int64, gen NumberGenerator) *big.Int { - var mem []*big.Int - for i := int64(0); i < w; i++ { - mem = append(mem, gen.rand(ethutil.BigPow(2, 64))) - } - - set := func(i, j int) Entry { - entry := self.tape[i*100+j] - mem[entry.i.Uint64()] = entry.op(entry.i, entry.j) - - return entry - } - - dir := true - for i := 0; i < int(h)/100; i++ { - var entry Entry - if dir { - for j := 0; j < 100; j++ { - entry = set(i, j) - } - } else { - for j := 99; i >= 0; j-- { - entry = set(i, j) - } - } - - t := mem[entry.i.Uint64()] - if big.NewInt(2).Cmp(new(big.Int).Mod(t, big.NewInt(37))) < 0 { - dir = !dir - } - } - - return Sha3(mem) -} - -func (self *Tape) Verify(header, nonce []byte) bool { - n := ethutil.BigD(nonce) - - var w int64 = 10000 - var h int64 = 150000 - gen := Rnd(Sha3([]interface{}{header, new(big.Int).Div(n, big.NewInt(1000))})) - self.gen(w, h, gen) - - gen = Rnd(Sha3([]interface{}{header, new(big.Int).Mod(n, big.NewInt(1000))})) - hash := self.runTape(w, h, gen) - - it := self.block.Trie().Iterator() - next := it.Next(string(new(big.Int).Mod(hash, ethutil.BigPow(2, 160)).Bytes())) - - req := ethutil.BigPow(2, 256) - req.Div(req, self.block.Diff()) - return Sha3([]interface{}{hash, next}).Cmp(req) < 0 -} - -func (self *Tape) Run(header []byte) []byte { - nonce := big.NewInt(0) - var w int64 = 10000 - var h int64 = 150000 - - req := ethutil.BigPow(2, 256) - req.Div(req, self.block.Diff()) - - for { - if new(big.Int).Mod(nonce, b(1000)).Cmp(b(0)) == 0 { - gen := Rnd(Sha3([]interface{}{header, new(big.Int).Div(nonce, big.NewInt(1000))})) - self.gen(w, h, gen) - } - - gen := Rnd(Sha3([]interface{}{header, new(big.Int).Mod(nonce, big.NewInt(1000))})) - hash := self.runTape(w, h, gen) - - it := self.block.Trie().Iterator() - next := it.Next(string(new(big.Int).Mod(hash, ethutil.BigPow(2, 160)).Bytes())) - - if Sha3([]interface{}{hash, next}).Cmp(req) < 0 { - return nonce.Bytes() - } else { - nonce.Add(nonce, ethutil.Big1) - } - } -} diff --git a/pow/ar/pow_test.go b/pow/ar/pow_test.go deleted file mode 100644 index b1ebf92818..0000000000 --- a/pow/ar/pow_test.go +++ /dev/null @@ -1,47 +0,0 @@ -package ar - -import ( - "fmt" - "math/big" - "testing" - - "github.com/ethereum/go-ethereum/ethdb" - "github.com/ethereum/go-ethereum/trie" -) - -type TestBlock struct { - trie *trie.Trie -} - -func NewTestBlock() *TestBlock { - db, _ := ethdb.NewMemDatabase() - return &TestBlock{ - trie: trie.New(db, ""), - } -} - -func (self *TestBlock) Diff() *big.Int { - return b(10) -} - -func (self *TestBlock) Trie() *trie.Trie { - return self.trie -} - -func (self *TestBlock) Hash() []byte { - a := make([]byte, 32) - a[0] = 10 - a[1] = 2 - return a -} - -func TestPow(t *testing.T) { - entry := make([]byte, 32) - entry[0] = 255 - - block := NewTestBlock() - - pow := NewTape(block) - nonce := pow.Run(block.Hash()) - fmt.Println("Found nonce", nonce) -} diff --git a/pow/ar/rnd.go b/pow/ar/rnd.go deleted file mode 100644 index c62f4e0622..0000000000 --- a/pow/ar/rnd.go +++ /dev/null @@ -1,66 +0,0 @@ -package ar - -import ( - "math/big" - - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethutil" -) - -var b = big.NewInt - -type Node interface { - Big() *big.Int -} - -type ByteNode []byte - -func (self ByteNode) Big() *big.Int { - return ethutil.BigD(ethutil.Encode([]byte(self))) -} - -func Sha3(v interface{}) *big.Int { - if b, ok := v.(*big.Int); ok { - return ethutil.BigD(crypto.Sha3(b.Bytes())) - } else if b, ok := v.([]interface{}); ok { - return ethutil.BigD(crypto.Sha3(ethutil.Encode(b))) - } else if s, ok := v.([]*big.Int); ok { - v := make([]interface{}, len(s)) - for i, b := range s { - v[i] = b - } - - return ethutil.BigD(crypto.Sha3(ethutil.Encode(v))) - } - - return nil -} - -type NumberGenerator interface { - rand(r *big.Int) *big.Int - rand64(r int64) *big.Int -} - -type rnd struct { - seed *big.Int -} - -func Rnd(s *big.Int) rnd { - return rnd{s} -} - -func (self rnd) rand(r *big.Int) *big.Int { - o := b(0).Mod(self.seed, r) - - self.seed.Div(self.seed, r) - - if self.seed.Cmp(ethutil.BigPow(2, 64)) < 0 { - self.seed = Sha3(self.seed) - } - - return o -} - -func (self rnd) rand64(r int64) *big.Int { - return self.rand(b(r)) -} diff --git a/state/dump.go b/state/dump.go index 40ecff50ce..ac646480c7 100644 --- a/state/dump.go +++ b/state/dump.go @@ -28,7 +28,7 @@ func (self *StateDB) Dump() []byte { it := self.trie.Iterator() for it.Next() { - stateObject := NewStateObjectFromBytes(it.Key, it.Value) + stateObject := NewStateObjectFromBytes(it.Key, it.Value, self.db) account := Account{Balance: stateObject.balance.String(), Nonce: stateObject.Nonce, Root: ethutil.Bytes2Hex(stateObject.Root()), CodeHash: ethutil.Bytes2Hex(stateObject.codeHash)} account.Storage = make(map[string]string) diff --git a/state/state_object.go b/state/state_object.go index 420ad97570..c1c78bee02 100644 --- a/state/state_object.go +++ b/state/state_object.go @@ -28,6 +28,7 @@ func (self Storage) Copy() Storage { } type StateObject struct { + db ethutil.Database // Address of the object address []byte // Shared attributes @@ -57,28 +58,20 @@ func (self *StateObject) Reset() { self.State.Reset() } -func NewStateObject(addr []byte) *StateObject { +func NewStateObject(addr []byte, db ethutil.Database) *StateObject { // This to ensure that it has 20 bytes (and not 0 bytes), thus left or right pad doesn't matter. address := ethutil.Address(addr) - object := &StateObject{address: address, balance: new(big.Int), gasPool: new(big.Int)} - object.State = New(ptrie.New(nil, ethutil.Config.Db)) //New(trie.New(ethutil.Config.Db, "")) + object := &StateObject{db: db, address: address, balance: new(big.Int), gasPool: new(big.Int)} + object.State = New(nil, db) //New(trie.New(ethutil.Config.Db, "")) object.storage = make(Storage) object.gasPool = new(big.Int) return object } -func NewContract(address []byte, balance *big.Int, root []byte) *StateObject { - contract := NewStateObject(address) - contract.balance = balance - contract.State = New(ptrie.New(nil, ethutil.Config.Db)) //New(trie.New(ethutil.Config.Db, string(root))) - - return contract -} - -func NewStateObjectFromBytes(address, data []byte) *StateObject { - object := &StateObject{address: address} +func NewStateObjectFromBytes(address, data []byte, db ethutil.Database) *StateObject { + object := &StateObject{address: address, db: db} object.RlpDecode(data) return object @@ -242,7 +235,7 @@ func (self *StateObject) RefundGas(gas, price *big.Int) { } func (self *StateObject) Copy() *StateObject { - stateObject := NewStateObject(self.Address()) + stateObject := NewStateObject(self.Address(), self.db) stateObject.balance.Set(self.balance) stateObject.codeHash = ethutil.CopyBytes(self.codeHash) stateObject.Nonce = self.Nonce @@ -310,13 +303,13 @@ func (c *StateObject) RlpDecode(data []byte) { c.Nonce = decoder.Get(0).Uint() c.balance = decoder.Get(1).BigInt() - c.State = New(ptrie.New(decoder.Get(2).Bytes(), ethutil.Config.Db)) //New(trie.New(ethutil.Config.Db, decoder.Get(2).Interface())) + c.State = New(decoder.Get(2).Bytes(), c.db) //New(trie.New(ethutil.Config.Db, decoder.Get(2).Interface())) c.storage = make(map[string]*ethutil.Value) c.gasPool = new(big.Int) c.codeHash = decoder.Get(3).Bytes() - c.Code, _ = ethutil.Config.Db.Get(c.codeHash) + c.Code, _ = c.db.Get(c.codeHash) } // Storage change object. Used by the manifest for notifying changes to diff --git a/state/state_test.go b/state/state_test.go index 1f76eff0fb..7c54cedc0e 100644 --- a/state/state_test.go +++ b/state/state_test.go @@ -5,7 +5,6 @@ import ( "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/ethutil" - "github.com/ethereum/go-ethereum/ptrie" ) type StateSuite struct { @@ -25,10 +24,9 @@ func (s *StateSuite) TestDump(c *checker.C) { } func (s *StateSuite) SetUpTest(c *checker.C) { - db, _ := ethdb.NewMemDatabase() ethutil.ReadConfig(".ethtest", "/tmp/ethtest", "") - ethutil.Config.Db = db - s.state = New(ptrie.New(nil, db)) + db, _ := ethdb.NewMemDatabase() + s.state = New(nil, db) } func (s *StateSuite) TestSnapshot(c *checker.C) { diff --git a/state/statedb.go b/state/statedb.go index 6a11fc328f..de73147905 100644 --- a/state/statedb.go +++ b/state/statedb.go @@ -17,7 +17,7 @@ var statelogger = logger.NewLogger("STATE") // * Contracts // * Accounts type StateDB struct { - //Trie *trie.Trie + db ethutil.Database trie *ptrie.Trie stateObjects map[string]*StateObject @@ -30,8 +30,10 @@ type StateDB struct { } // Create a new state from a given trie -func New(trie *ptrie.Trie) *StateDB { - return &StateDB{trie: trie, stateObjects: make(map[string]*StateObject), manifest: NewManifest(), refund: make(map[string]*big.Int)} +//func New(trie *ptrie.Trie) *StateDB { +func New(root []byte, db ethutil.Database) *StateDB { + trie := ptrie.New(root, db) + return &StateDB{db: db, trie: trie, stateObjects: make(map[string]*StateObject), manifest: NewManifest(), refund: make(map[string]*big.Int)} } func (self *StateDB) EmptyLogs() { @@ -138,7 +140,7 @@ func (self *StateDB) UpdateStateObject(stateObject *StateObject) { addr := stateObject.Address() if len(stateObject.CodeHash()) > 0 { - ethutil.Config.Db.Put(stateObject.CodeHash(), stateObject.Code) + self.db.Put(stateObject.CodeHash(), stateObject.Code) } self.trie.Update(addr, stateObject.RlpEncode()) @@ -165,7 +167,7 @@ func (self *StateDB) GetStateObject(addr []byte) *StateObject { return nil } - stateObject = NewStateObjectFromBytes(addr, []byte(data)) + stateObject = NewStateObjectFromBytes(addr, []byte(data), self.db) self.SetStateObject(stateObject) return stateObject @@ -191,7 +193,7 @@ func (self *StateDB) NewStateObject(addr []byte) *StateObject { statelogger.Debugf("(+) %x\n", addr) - stateObject := NewStateObject(addr) + stateObject := NewStateObject(addr, self.db) self.stateObjects[string(addr)] = stateObject return stateObject @@ -212,7 +214,8 @@ func (s *StateDB) Cmp(other *StateDB) bool { func (self *StateDB) Copy() *StateDB { if self.trie != nil { - state := New(self.trie.Copy()) + state := New(nil, self.db) + state.trie = self.trie.Copy() for k, stateObject := range self.stateObjects { state.stateObjects[k] = stateObject.Copy() } @@ -305,7 +308,7 @@ func (self *StateDB) Update(gasUsed *big.Int) { // FIXME trie delete is broken if deleted { - valid, t2 := ptrie.ParanoiaCheck(self.trie, ethutil.Config.Db) + valid, t2 := ptrie.ParanoiaCheck(self.trie, self.db) if !valid { statelogger.Infof("Warn: PARANOIA: Different state root during copy %x vs %x\n", self.trie.Root(), t2.Root()) diff --git a/tests/helper/init.go b/tests/helper/init.go index 578314e20a..df98b9e422 100644 --- a/tests/helper/init.go +++ b/tests/helper/init.go @@ -16,5 +16,4 @@ func init() { logpkg.AddLogSystem(Logger) ethutil.ReadConfig(".ethtest", "/tmp/ethtest", "") - ethutil.Config.Db, _ = NewMemDatabase() } diff --git a/tests/vm/gh_test.go b/tests/vm/gh_test.go index 698b0aefc2..2aece215e8 100644 --- a/tests/vm/gh_test.go +++ b/tests/vm/gh_test.go @@ -7,6 +7,7 @@ import ( "testing" "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/state" @@ -38,8 +39,8 @@ func (self Log) Topics() [][]byte { return t } -func StateObjectFromAccount(addr string, account Account) *state.StateObject { - obj := state.NewStateObject(ethutil.Hex2Bytes(addr)) +func StateObjectFromAccount(db ethutil.Database, addr string, account Account) *state.StateObject { + obj := state.NewStateObject(ethutil.Hex2Bytes(addr), db) obj.SetBalance(ethutil.Big(account.Balance)) if ethutil.IsHex(account.Code) { @@ -84,9 +85,10 @@ func RunVmTest(p string, t *testing.T) { continue } */ - statedb := state.New(helper.NewTrie()) + db, _ := ethdb.NewMemDatabase() + statedb := state.New(nil, db) for addr, account := range test.Pre { - obj := StateObjectFromAccount(addr, account) + obj := StateObjectFromAccount(db, addr, account) statedb.SetStateObject(obj) for a, v := range account.Storage { obj.SetState(helper.FromHex(a), ethutil.NewValue(helper.FromHex(v))) diff --git a/trie/iterator.go b/trie/iterator.go index 53d099a0c3..1114715a66 100644 --- a/trie/iterator.go +++ b/trie/iterator.go @@ -1,5 +1,6 @@ package trie +/* import ( "bytes" @@ -141,3 +142,4 @@ func (self *Iterator) Next(key string) []byte { return self.Key } +*/ diff --git a/trie/trie.go b/trie/trie.go index d89c397756..c9fd18e009 100644 --- a/trie/trie.go +++ b/trie/trie.go @@ -1,5 +1,6 @@ package trie +/* import ( "bytes" "fmt" @@ -174,11 +175,9 @@ func New(db ethutil.Database, Root interface{}) *Trie { func (self *Trie) setRoot(root interface{}) { switch t := root.(type) { case string: - /* - if t == "" { - root = crypto.Sha3(ethutil.Encode("")) - } - */ + //if t == "" { + // root = crypto.Sha3(ethutil.Encode("")) + //} self.Root = []byte(t) case []byte: self.Root = root @@ -187,10 +186,6 @@ func (self *Trie) setRoot(root interface{}) { } } -/* - * Public (query) interface functions - */ - func (t *Trie) Update(key, value string) { t.mut.Lock() defer t.mut.Unlock() @@ -629,3 +624,4 @@ func (it *TrieIterator) iterateNode(key []byte, currentNode *ethutil.Value, cb E } } } +*/ diff --git a/trie/trie_test.go b/trie/trie_test.go index 207d41f30d..3abe56040f 100644 --- a/trie/trie_test.go +++ b/trie/trie_test.go @@ -1,5 +1,6 @@ package trie +/* import ( "bytes" "encoding/hex" @@ -337,59 +338,6 @@ func (s *TrieSuite) TestItems(c *checker.C) { c.Assert(s.trie.GetRoot(), checker.DeepEquals, ethutil.Hex2Bytes(exp)) } -/* -func TestRndCase(t *testing.T) { - _, trie := NewTrie() - - data := []struct{ k, v string }{ - {"0000000000000000000000000000000000000000000000000000000000000001", "a07573657264617461000000000000000000000000000000000000000000000000"}, - {"0000000000000000000000000000000000000000000000000000000000000003", "8453bb5b31"}, - {"0000000000000000000000000000000000000000000000000000000000000004", "850218711a00"}, - {"0000000000000000000000000000000000000000000000000000000000000005", "9462d7705bd0b3ecbc51a8026a25597cb28a650c79"}, - {"0000000000000000000000000000000000000000000000000000000000000010", "947e70f9460402290a3e487dae01f610a1a8218fda"}, - {"0000000000000000000000000000000000000000000000000000000000000111", "01"}, - {"0000000000000000000000000000000000000000000000000000000000000112", "a053656e6174650000000000000000000000000000000000000000000000000000"}, - {"0000000000000000000000000000000000000000000000000000000000000113", "a053656e6174650000000000000000000000000000000000000000000000000000"}, - {"53656e6174650000000000000000000000000000000000000000000000000000", "94977e3f62f5e1ed7953697430303a3cfa2b5b736e"}, - } - for _, e := range data { - trie.Update(string(ethutil.Hex2Bytes(e.k)), string(ethutil.Hex2Bytes(e.v))) - } - - fmt.Printf("root after update %x\n", trie.Root) - trie.NewIterator().Each(func(k string, v *ethutil.Value) { - fmt.Printf("%x %x\n", k, v.Bytes()) - }) - - data = []struct{ k, v string }{ - {"0000000000000000000000000000000000000000000000000000000000000112", ""}, - {"436974697a656e73000000000000000000000000000000000000000000000001", ""}, - {"436f757274000000000000000000000000000000000000000000000000000002", ""}, - {"53656e6174650000000000000000000000000000000000000000000000000000", ""}, - {"436f757274000000000000000000000000000000000000000000000000000000", ""}, - {"53656e6174650000000000000000000000000000000000000000000000000001", ""}, - {"0000000000000000000000000000000000000000000000000000000000000113", ""}, - {"436974697a656e73000000000000000000000000000000000000000000000000", ""}, - {"436974697a656e73000000000000000000000000000000000000000000000002", ""}, - {"436f757274000000000000000000000000000000000000000000000000000001", ""}, - {"0000000000000000000000000000000000000000000000000000000000000111", ""}, - {"53656e6174650000000000000000000000000000000000000000000000000002", ""}, - } - - for _, e := range data { - trie.Delete(string(ethutil.Hex2Bytes(e.k))) - } - - fmt.Printf("root after delete %x\n", trie.Root) - - trie.NewIterator().Each(func(k string, v *ethutil.Value) { - fmt.Printf("%x %x\n", k, v.Bytes()) - }) - - fmt.Printf("%x\n", trie.Get(string(ethutil.Hex2Bytes("0000000000000000000000000000000000000000000000000000000000000001")))) -} -*/ - func TestOtherSomething(t *testing.T) { _, trie := NewTrie() @@ -445,3 +393,4 @@ func BenchmarkUpdate(b *testing.B) { trie.Update(fmt.Sprintf("aaaaaaaaaaaaaaa%d", i), "value") } } +*/ diff --git a/xeth/js_types.go b/xeth/js_types.go index e7a1e95e9f..5fe5946b1c 100644 --- a/xeth/js_types.go +++ b/xeth/js_types.go @@ -39,7 +39,7 @@ func NewJSBlock(block *types.Block) *JSBlock { ptxs := make([]*JSTransaction, len(block.Transactions())) for i, tx := range block.Transactions() { - ptxs[i] = NewJSTx(tx, block.State()) + ptxs[i] = NewJSTx(tx) } txlist := ethutil.NewList(ptxs) @@ -76,7 +76,7 @@ func (self *JSBlock) GetTransaction(hash string) *JSTransaction { return nil } - return NewJSTx(tx, self.ref.State()) + return NewJSTx(tx) } type JSTransaction struct { @@ -95,7 +95,7 @@ type JSTransaction struct { Confirmations int `json:"confirmations"` } -func NewJSTx(tx *types.Transaction, state *state.StateDB) *JSTransaction { +func NewJSTx(tx *types.Transaction) *JSTransaction { hash := ethutil.Bytes2Hex(tx.Hash()) receiver := ethutil.Bytes2Hex(tx.To()) if receiver == "0000000000000000000000000000000000000000" { diff --git a/xeth/world.go b/xeth/world.go index 008a084234..25c2f3eb8b 100644 --- a/xeth/world.go +++ b/xeth/world.go @@ -36,7 +36,7 @@ func (self *World) SafeGet(addr []byte) *Object { func (self *World) safeGet(addr []byte) *state.StateObject { object := self.State().GetStateObject(addr) if object == nil { - object = state.NewStateObject(addr) + object = state.NewStateObject(addr, self.pipe.obj.Db()) } return object diff --git a/xeth/xeth.go b/xeth/xeth.go index a10ccfc8b5..34d8ffd0ae 100644 --- a/xeth/xeth.go +++ b/xeth/xeth.go @@ -81,7 +81,7 @@ func (self *XEth) Execute(addr []byte, data []byte, value, gas, price *ethutil.V func (self *XEth) ExecuteObject(object *Object, data []byte, value, gas, price *ethutil.Value) ([]byte, error) { var ( - initiator = state.NewStateObject(self.obj.KeyManager().KeyPair().Address()) + initiator = state.NewStateObject(self.obj.KeyManager().KeyPair().Address(), self.obj.Db()) block = self.chainManager.CurrentBlock() ) From 1d05027ba2637b4140f9056385214258b627761d Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Wed, 7 Jan 2015 13:17:50 +0100 Subject: [PATCH 106/132] a few fixes for the license tool --- update-license.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/update-license.go b/update-license.go index ab76e0f312..d5e21fdd3f 100644 --- a/update-license.go +++ b/update-license.go @@ -1,11 +1,10 @@ // +build none - /* This command generates GPL license headers on top of all source files. You can run it once per month, before cutting a release or just whenever you feel like it. - go run update-licenses.go + go run update-license.go The copyright in each file is assigned to any authors for which git can find commits in the file's history. It will try to follow renames @@ -199,12 +198,13 @@ func fileInfo(file string) (*info, error) { return info, err } -func writeLicenses(infos <-chan *info) error { +func writeLicenses(infos <-chan *info) { buf := new(bytes.Buffer) for info := range infos { content, err := ioutil.ReadFile(info.file) if err != nil { fmt.Printf("ERROR: couldn't read %s: %v\n", info.file, err) + continue } // construct new file content @@ -219,11 +219,10 @@ func writeLicenses(infos <-chan *info) error { if !bytes.Equal(content, buf.Bytes()) { fmt.Println("writing", info.ShortLicense(), info.file) if err := ioutil.WriteFile(info.file, buf.Bytes(), info.mode); err != nil { - return err + fmt.Printf("ERROR: couldn't write %s: %v", info.file, err) } } } - return nil } func doLines(cmd *exec.Cmd, f func(string)) error { From 982c812e81304cad835796d4fa3d67c8f08141b6 Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 7 Jan 2015 13:38:28 +0100 Subject: [PATCH 107/132] Read directly from stdin --- cmd/ethtest/main.go | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/cmd/ethtest/main.go b/cmd/ethtest/main.go index 7d1c3de01d..9e9eda4502 100644 --- a/cmd/ethtest/main.go +++ b/cmd/ethtest/main.go @@ -24,10 +24,10 @@ package main import ( "bytes" "encoding/json" + "io" "io/ioutil" "log" "os" - "strings" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/ethutil" @@ -65,10 +65,10 @@ type VmTest struct { Pre map[string]Account } -func RunVmTest(js string) (failed int) { +func RunVmTest(r io.Reader) (failed int) { tests := make(map[string]VmTest) - data, _ := ioutil.ReadAll(strings.NewReader(js)) + data, _ := ioutil.ReadAll(r) err := json.Unmarshal(data, &tests) if err != nil { log.Fatalln(err) @@ -125,9 +125,6 @@ func RunVmTest(js string) (failed int) { func main() { helper.Logger.SetLogLevel(5) - if len(os.Args) == 1 { - log.Fatalln("no json supplied") - } - os.Exit(RunVmTest(os.Args[1])) + os.Exit(RunVmTest(os.Stdin)) } From db4aaedcbdb409e17ea3de161e7b24a80ba0a58c Mon Sep 17 00:00:00 2001 From: obscuren Date: Thu, 8 Jan 2015 11:47:04 +0100 Subject: [PATCH 108/132] Moved ptrie => trie. Removed old trie --- core/types/derive_sha.go | 4 +- ptrie/iterator.go | 115 ---- ptrie/trie.go | 335 ------------ ptrie/trie_test.go | 259 ---------- state/state_object.go | 6 +- state/statedb.go | 9 +- tests/helper/trie.go | 6 +- {ptrie => trie}/cache.go | 2 +- {ptrie => trie}/fullnode.go | 2 +- {ptrie => trie}/hashnode.go | 2 +- trie/iterator.go | 154 +++--- {ptrie => trie}/iterator_test.go | 2 +- trie/main_test.go | 9 - {ptrie => trie}/node.go | 2 +- {ptrie => trie}/shortnode.go | 8 +- trie/trie.go | 863 ++++++++++--------------------- trie/trie_test.go | 521 +++++++------------ {ptrie => trie}/valuenode.go | 2 +- types/ethereum.go | 1 - 19 files changed, 558 insertions(+), 1744 deletions(-) delete mode 100644 ptrie/iterator.go delete mode 100644 ptrie/trie.go delete mode 100644 ptrie/trie_test.go rename {ptrie => trie}/cache.go (98%) rename {ptrie => trie}/fullnode.go (98%) rename {ptrie => trie}/hashnode.go (97%) rename {ptrie => trie}/iterator_test.go (97%) delete mode 100644 trie/main_test.go rename {ptrie => trie}/node.go (98%) rename {ptrie => trie}/shortnode.go (78%) rename {ptrie => trie}/valuenode.go (97%) delete mode 100644 types/ethereum.go diff --git a/core/types/derive_sha.go b/core/types/derive_sha.go index 0e286bd8b2..b2c4422103 100644 --- a/core/types/derive_sha.go +++ b/core/types/derive_sha.go @@ -3,7 +3,7 @@ package types import ( "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/ethutil" - "github.com/ethereum/go-ethereum/ptrie" + "github.com/ethereum/go-ethereum/trie" ) type DerivableList interface { @@ -13,7 +13,7 @@ type DerivableList interface { func DeriveSha(list DerivableList) []byte { db, _ := ethdb.NewMemDatabase() - trie := ptrie.New(nil, db) + trie := trie.New(nil, db) for i := 0; i < list.Len(); i++ { trie.Update(ethutil.Encode(i), list.GetRlp(i)) } diff --git a/ptrie/iterator.go b/ptrie/iterator.go deleted file mode 100644 index 787ba09c02..0000000000 --- a/ptrie/iterator.go +++ /dev/null @@ -1,115 +0,0 @@ -package ptrie - -import ( - "bytes" - - "github.com/ethereum/go-ethereum/trie" -) - -type Iterator struct { - trie *Trie - - Key []byte - Value []byte -} - -func NewIterator(trie *Trie) *Iterator { - return &Iterator{trie: trie, Key: make([]byte, 32)} -} - -func (self *Iterator) Next() bool { - self.trie.mu.Lock() - defer self.trie.mu.Unlock() - - key := trie.RemTerm(trie.CompactHexDecode(string(self.Key))) - k := self.next(self.trie.root, key) - - self.Key = []byte(trie.DecodeCompact(k)) - - return len(k) > 0 - -} - -func (self *Iterator) next(node Node, key []byte) []byte { - if node == nil { - return nil - } - - switch node := node.(type) { - case *FullNode: - if len(key) > 0 { - k := self.next(node.branch(key[0]), key[1:]) - if k != nil { - return append([]byte{key[0]}, k...) - } - } - - var r byte - if len(key) > 0 { - r = key[0] + 1 - } - - for i := r; i < 16; i++ { - k := self.key(node.branch(byte(i))) - if k != nil { - return append([]byte{i}, k...) - } - } - - case *ShortNode: - k := trie.RemTerm(node.Key()) - if vnode, ok := node.Value().(*ValueNode); ok { - if bytes.Compare([]byte(k), key) > 0 { - self.Value = vnode.Val() - return k - } - } else { - cnode := node.Value() - - var ret []byte - skey := key[len(k):] - if trie.BeginsWith(key, k) { - ret = self.next(cnode, skey) - } else if bytes.Compare(k, key[:len(k)]) > 0 { - ret = self.key(node) - } - - if ret != nil { - return append(k, ret...) - } - } - } - - return nil -} - -func (self *Iterator) key(node Node) []byte { - switch node := node.(type) { - case *ShortNode: - // Leaf node - if vnode, ok := node.Value().(*ValueNode); ok { - k := trie.RemTerm(node.Key()) - self.Value = vnode.Val() - - return k - } else { - k := trie.RemTerm(node.Key()) - return append(k, self.key(node.Value())...) - } - case *FullNode: - if node.Value() != nil { - self.Value = node.Value().(*ValueNode).Val() - - return []byte{16} - } - - for i := 0; i < 16; i++ { - k := self.key(node.branch(byte(i))) - if k != nil { - return append([]byte{byte(i)}, k...) - } - } - } - - return nil -} diff --git a/ptrie/trie.go b/ptrie/trie.go deleted file mode 100644 index 5c83b57d05..0000000000 --- a/ptrie/trie.go +++ /dev/null @@ -1,335 +0,0 @@ -package ptrie - -import ( - "bytes" - "container/list" - "fmt" - "sync" - - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethutil" - "github.com/ethereum/go-ethereum/trie" -) - -func ParanoiaCheck(t1 *Trie, backend Backend) (bool, *Trie) { - t2 := New(nil, backend) - - it := t1.Iterator() - for it.Next() { - t2.Update(it.Key, it.Value) - } - - return bytes.Equal(t2.Hash(), t1.Hash()), t2 -} - -type Trie struct { - mu sync.Mutex - root Node - roothash []byte - cache *Cache - - revisions *list.List -} - -func New(root []byte, backend Backend) *Trie { - trie := &Trie{} - trie.revisions = list.New() - trie.roothash = root - trie.cache = NewCache(backend) - - if root != nil { - value := ethutil.NewValueFromBytes(trie.cache.Get(root)) - trie.root = trie.mknode(value) - } - - return trie -} - -func (self *Trie) Iterator() *Iterator { - return NewIterator(self) -} - -func (self *Trie) Copy() *Trie { - return New(self.roothash, self.cache.backend) -} - -// Legacy support -func (self *Trie) Root() []byte { return self.Hash() } -func (self *Trie) Hash() []byte { - var hash []byte - if self.root != nil { - t := self.root.Hash() - if byts, ok := t.([]byte); ok && len(byts) > 0 { - hash = byts - } else { - hash = crypto.Sha3(ethutil.Encode(self.root.RlpData())) - } - } else { - hash = crypto.Sha3(ethutil.Encode("")) - } - - if !bytes.Equal(hash, self.roothash) { - self.revisions.PushBack(self.roothash) - self.roothash = hash - } - - return hash -} -func (self *Trie) Commit() { - self.mu.Lock() - defer self.mu.Unlock() - - // Hash first - self.Hash() - - self.cache.Flush() -} - -// Reset should only be called if the trie has been hashed -func (self *Trie) Reset() { - self.mu.Lock() - defer self.mu.Unlock() - - self.cache.Reset() - - if self.revisions.Len() > 0 { - revision := self.revisions.Remove(self.revisions.Back()).([]byte) - self.roothash = revision - } - value := ethutil.NewValueFromBytes(self.cache.Get(self.roothash)) - self.root = self.mknode(value) -} - -func (self *Trie) UpdateString(key, value string) Node { return self.Update([]byte(key), []byte(value)) } -func (self *Trie) Update(key, value []byte) Node { - self.mu.Lock() - defer self.mu.Unlock() - - k := trie.CompactHexDecode(string(key)) - - if len(value) != 0 { - self.root = self.insert(self.root, k, &ValueNode{self, value}) - } else { - self.root = self.delete(self.root, k) - } - - return self.root -} - -func (self *Trie) GetString(key string) []byte { return self.Get([]byte(key)) } -func (self *Trie) Get(key []byte) []byte { - self.mu.Lock() - defer self.mu.Unlock() - - k := trie.CompactHexDecode(string(key)) - - n := self.get(self.root, k) - if n != nil { - return n.(*ValueNode).Val() - } - - return nil -} - -func (self *Trie) DeleteString(key string) Node { return self.Delete([]byte(key)) } -func (self *Trie) Delete(key []byte) Node { - self.mu.Lock() - defer self.mu.Unlock() - - k := trie.CompactHexDecode(string(key)) - self.root = self.delete(self.root, k) - - return self.root -} - -func (self *Trie) insert(node Node, key []byte, value Node) Node { - if len(key) == 0 { - return value - } - - if node == nil { - return NewShortNode(self, key, value) - } - - switch node := node.(type) { - case *ShortNode: - k := node.Key() - cnode := node.Value() - if bytes.Equal(k, key) { - return NewShortNode(self, key, value) - } - - var n Node - matchlength := trie.MatchingNibbleLength(key, k) - if matchlength == len(k) { - n = self.insert(cnode, key[matchlength:], value) - } else { - pnode := self.insert(nil, k[matchlength+1:], cnode) - nnode := self.insert(nil, key[matchlength+1:], value) - fulln := NewFullNode(self) - fulln.set(k[matchlength], pnode) - fulln.set(key[matchlength], nnode) - n = fulln - } - if matchlength == 0 { - return n - } - - return NewShortNode(self, key[:matchlength], n) - - case *FullNode: - cpy := node.Copy().(*FullNode) - cpy.set(key[0], self.insert(node.branch(key[0]), key[1:], value)) - - return cpy - - default: - panic(fmt.Sprintf("%T: invalid node: %v", node, node)) - } -} - -func (self *Trie) get(node Node, key []byte) Node { - if len(key) == 0 { - return node - } - - if node == nil { - return nil - } - - switch node := node.(type) { - case *ShortNode: - k := node.Key() - cnode := node.Value() - - if len(key) >= len(k) && bytes.Equal(k, key[:len(k)]) { - return self.get(cnode, key[len(k):]) - } - - return nil - case *FullNode: - return self.get(node.branch(key[0]), key[1:]) - default: - panic(fmt.Sprintf("%T: invalid node: %v", node, node)) - } -} - -func (self *Trie) delete(node Node, key []byte) Node { - if len(key) == 0 && node == nil { - return nil - } - - switch node := node.(type) { - case *ShortNode: - k := node.Key() - cnode := node.Value() - if bytes.Equal(key, k) { - return nil - } else if bytes.Equal(key[:len(k)], k) { - child := self.delete(cnode, key[len(k):]) - - var n Node - switch child := child.(type) { - case *ShortNode: - nkey := append(k, child.Key()...) - n = NewShortNode(self, nkey, child.Value()) - case *FullNode: - sn := NewShortNode(self, node.Key(), child) - sn.key = node.key - n = sn - } - - return n - } else { - return node - } - - case *FullNode: - n := node.Copy().(*FullNode) - n.set(key[0], self.delete(n.branch(key[0]), key[1:])) - - pos := -1 - for i := 0; i < 17; i++ { - if n.branch(byte(i)) != nil { - if pos == -1 { - pos = i - } else { - pos = -2 - } - } - } - - var nnode Node - if pos == 16 { - nnode = NewShortNode(self, []byte{16}, n.branch(byte(pos))) - } else if pos >= 0 { - cnode := n.branch(byte(pos)) - switch cnode := cnode.(type) { - case *ShortNode: - // Stitch keys - k := append([]byte{byte(pos)}, cnode.Key()...) - nnode = NewShortNode(self, k, cnode.Value()) - case *FullNode: - nnode = NewShortNode(self, []byte{byte(pos)}, n.branch(byte(pos))) - } - } else { - nnode = n - } - - return nnode - case nil: - return nil - default: - panic(fmt.Sprintf("%T: invalid node: %v (%v)", node, node, key)) - } -} - -// casting functions and cache storing -func (self *Trie) mknode(value *ethutil.Value) Node { - l := value.Len() - switch l { - case 0: - return nil - case 2: - // A value node may consists of 2 bytes. - if value.Get(0).Len() != 0 { - return NewShortNode(self, trie.CompactDecode(string(value.Get(0).Bytes())), self.mknode(value.Get(1))) - } - case 17: - fnode := NewFullNode(self) - for i := 0; i < l; i++ { - fnode.set(byte(i), self.mknode(value.Get(i))) - } - return fnode - case 32: - return &HashNode{value.Bytes()} - } - - return &ValueNode{self, value.Bytes()} -} - -func (self *Trie) trans(node Node) Node { - switch node := node.(type) { - case *HashNode: - value := ethutil.NewValueFromBytes(self.cache.Get(node.key)) - return self.mknode(value) - default: - return node - } -} - -func (self *Trie) store(node Node) interface{} { - data := ethutil.Encode(node) - if len(data) >= 32 { - key := crypto.Sha3(data) - self.cache.Put(key, data) - - return key - } - - return node.RlpData() -} - -func (self *Trie) PrintRoot() { - fmt.Println(self.root) -} diff --git a/ptrie/trie_test.go b/ptrie/trie_test.go deleted file mode 100644 index 63a8ed36e6..0000000000 --- a/ptrie/trie_test.go +++ /dev/null @@ -1,259 +0,0 @@ -package ptrie - -import ( - "bytes" - "fmt" - "testing" - - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethutil" -) - -type Db map[string][]byte - -func (self Db) Get(k []byte) ([]byte, error) { return self[string(k)], nil } -func (self Db) Put(k, v []byte) { self[string(k)] = v } - -// Used for testing -func NewEmpty() *Trie { - return New(nil, make(Db)) -} - -func TestEmptyTrie(t *testing.T) { - trie := NewEmpty() - res := trie.Hash() - exp := crypto.Sha3(ethutil.Encode("")) - if !bytes.Equal(res, exp) { - t.Errorf("expected %x got %x", exp, res) - } -} - -func TestInsert(t *testing.T) { - trie := NewEmpty() - - trie.UpdateString("doe", "reindeer") - trie.UpdateString("dog", "puppy") - trie.UpdateString("dogglesworth", "cat") - - exp := ethutil.Hex2Bytes("8aad789dff2f538bca5d8ea56e8abe10f4c7ba3a5dea95fea4cd6e7c3a1168d3") - root := trie.Hash() - if !bytes.Equal(root, exp) { - t.Errorf("exp %x got %x", exp, root) - } - - trie = NewEmpty() - trie.UpdateString("A", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") - - exp = ethutil.Hex2Bytes("d23786fb4a010da3ce639d66d5e904a11dbc02746d1ce25029e53290cabf28ab") - root = trie.Hash() - if !bytes.Equal(root, exp) { - t.Errorf("exp %x got %x", exp, root) - } -} - -func TestGet(t *testing.T) { - trie := NewEmpty() - - trie.UpdateString("doe", "reindeer") - trie.UpdateString("dog", "puppy") - trie.UpdateString("dogglesworth", "cat") - - res := trie.GetString("dog") - if !bytes.Equal(res, []byte("puppy")) { - t.Errorf("expected puppy got %x", res) - } - - unknown := trie.GetString("unknown") - if unknown != nil { - t.Errorf("expected nil got %x", unknown) - } -} - -func TestDelete(t *testing.T) { - trie := NewEmpty() - - vals := []struct{ k, v string }{ - {"do", "verb"}, - {"ether", "wookiedoo"}, - {"horse", "stallion"}, - {"shaman", "horse"}, - {"doge", "coin"}, - {"ether", ""}, - {"dog", "puppy"}, - {"shaman", ""}, - } - for _, val := range vals { - if val.v != "" { - trie.UpdateString(val.k, val.v) - } else { - trie.DeleteString(val.k) - } - } - - hash := trie.Hash() - exp := ethutil.Hex2Bytes("5991bb8c6514148a29db676a14ac506cd2cd5775ace63c30a4fe457715e9ac84") - if !bytes.Equal(hash, exp) { - t.Errorf("expected %x got %x", exp, hash) - } -} - -func TestEmptyValues(t *testing.T) { - trie := NewEmpty() - - vals := []struct{ k, v string }{ - {"do", "verb"}, - {"ether", "wookiedoo"}, - {"horse", "stallion"}, - {"shaman", "horse"}, - {"doge", "coin"}, - {"ether", ""}, - {"dog", "puppy"}, - {"shaman", ""}, - } - for _, val := range vals { - trie.UpdateString(val.k, val.v) - } - - hash := trie.Hash() - exp := ethutil.Hex2Bytes("5991bb8c6514148a29db676a14ac506cd2cd5775ace63c30a4fe457715e9ac84") - if !bytes.Equal(hash, exp) { - t.Errorf("expected %x got %x", exp, hash) - } -} - -func TestReplication(t *testing.T) { - trie := NewEmpty() - vals := []struct{ k, v string }{ - {"do", "verb"}, - {"ether", "wookiedoo"}, - {"horse", "stallion"}, - {"shaman", "horse"}, - {"doge", "coin"}, - {"ether", ""}, - {"dog", "puppy"}, - {"shaman", ""}, - {"somethingveryoddindeedthis is", "myothernodedata"}, - } - for _, val := range vals { - trie.UpdateString(val.k, val.v) - } - trie.Commit() - - trie2 := New(trie.roothash, trie.cache.backend) - if string(trie2.GetString("horse")) != "stallion" { - t.Error("expected to have horse => stallion") - } - - hash := trie2.Hash() - exp := trie.Hash() - if !bytes.Equal(hash, exp) { - t.Errorf("root failure. expected %x got %x", exp, hash) - } - -} - -func TestReset(t *testing.T) { - trie := NewEmpty() - vals := []struct{ k, v string }{ - {"do", "verb"}, - {"ether", "wookiedoo"}, - {"horse", "stallion"}, - } - for _, val := range vals { - trie.UpdateString(val.k, val.v) - } - trie.Commit() - - before := ethutil.CopyBytes(trie.roothash) - trie.UpdateString("should", "revert") - trie.Hash() - // Should have no effect - trie.Hash() - trie.Hash() - // ### - - trie.Reset() - after := ethutil.CopyBytes(trie.roothash) - - if !bytes.Equal(before, after) { - t.Errorf("expected roots to be equal. %x - %x", before, after) - } -} - -func TestParanoia(t *testing.T) { - t.Skip() - trie := NewEmpty() - - vals := []struct{ k, v string }{ - {"do", "verb"}, - {"ether", "wookiedoo"}, - {"horse", "stallion"}, - {"shaman", "horse"}, - {"doge", "coin"}, - {"ether", ""}, - {"dog", "puppy"}, - {"shaman", ""}, - {"somethingveryoddindeedthis is", "myothernodedata"}, - } - for _, val := range vals { - trie.UpdateString(val.k, val.v) - } - trie.Commit() - - ok, t2 := ParanoiaCheck(trie, trie.cache.backend) - if !ok { - t.Errorf("trie paranoia check failed %x %x", trie.roothash, t2.roothash) - } -} - -// Not an actual test -func TestOutput(t *testing.T) { - t.Skip() - - base := "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - trie := NewEmpty() - for i := 0; i < 50; i++ { - trie.UpdateString(fmt.Sprintf("%s%d", base, i), "valueeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee") - } - fmt.Println("############################## FULL ################################") - fmt.Println(trie.root) - - trie.Commit() - fmt.Println("############################## SMALL ################################") - trie2 := New(trie.roothash, trie.cache.backend) - trie2.GetString(base + "20") - fmt.Println(trie2.root) -} - -func BenchmarkGets(b *testing.B) { - trie := NewEmpty() - vals := []struct{ k, v string }{ - {"do", "verb"}, - {"ether", "wookiedoo"}, - {"horse", "stallion"}, - {"shaman", "horse"}, - {"doge", "coin"}, - {"ether", ""}, - {"dog", "puppy"}, - {"shaman", ""}, - {"somethingveryoddindeedthis is", "myothernodedata"}, - } - for _, val := range vals { - trie.UpdateString(val.k, val.v) - } - - b.ResetTimer() - for i := 0; i < b.N; i++ { - trie.Get([]byte("horse")) - } -} - -func BenchmarkUpdate(b *testing.B) { - trie := NewEmpty() - - b.ResetTimer() - for i := 0; i < b.N; i++ { - trie.UpdateString(fmt.Sprintf("aaaaaaaaa%d", i), "value") - } - trie.Hash() -} diff --git a/state/state_object.go b/state/state_object.go index c1c78bee02..913c57a316 100644 --- a/state/state_object.go +++ b/state/state_object.go @@ -6,7 +6,7 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethutil" - "github.com/ethereum/go-ethereum/ptrie" + "github.com/ethereum/go-ethereum/trie" ) type Code []byte @@ -152,7 +152,7 @@ func (self *StateObject) Sync() { } /* - valid, t2 := ptrie.ParanoiaCheck(self.State.trie, ethutil.Config.Db) + valid, t2 := trie.ParanoiaCheck(self.State.trie, ethutil.Config.Db) if !valid { statelogger.Infof("Warn: PARANOIA: Different state storage root during copy %x vs %x\n", self.State.Root(), t2.Root()) @@ -273,7 +273,7 @@ func (c *StateObject) Init() Code { return c.InitCode } -func (self *StateObject) Trie() *ptrie.Trie { +func (self *StateObject) Trie() *trie.Trie { return self.State.trie } diff --git a/state/statedb.go b/state/statedb.go index de73147905..3176ab7555 100644 --- a/state/statedb.go +++ b/state/statedb.go @@ -6,7 +6,7 @@ import ( "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/ptrie" + "github.com/ethereum/go-ethereum/trie" ) var statelogger = logger.NewLogger("STATE") @@ -18,7 +18,7 @@ var statelogger = logger.NewLogger("STATE") // * Accounts type StateDB struct { db ethutil.Database - trie *ptrie.Trie + trie *trie.Trie stateObjects map[string]*StateObject @@ -30,9 +30,8 @@ type StateDB struct { } // Create a new state from a given trie -//func New(trie *ptrie.Trie) *StateDB { func New(root []byte, db ethutil.Database) *StateDB { - trie := ptrie.New(root, db) + trie := trie.New(root, db) return &StateDB{db: db, trie: trie, stateObjects: make(map[string]*StateObject), manifest: NewManifest(), refund: make(map[string]*big.Int)} } @@ -308,7 +307,7 @@ func (self *StateDB) Update(gasUsed *big.Int) { // FIXME trie delete is broken if deleted { - valid, t2 := ptrie.ParanoiaCheck(self.trie, self.db) + valid, t2 := trie.ParanoiaCheck(self.trie, self.db) if !valid { statelogger.Infof("Warn: PARANOIA: Different state root during copy %x vs %x\n", self.trie.Root(), t2.Root()) diff --git a/tests/helper/trie.go b/tests/helper/trie.go index 3cfb0bbe5e..9e666d333a 100644 --- a/tests/helper/trie.go +++ b/tests/helper/trie.go @@ -1,6 +1,6 @@ package helper -import "github.com/ethereum/go-ethereum/ptrie" +import "github.com/ethereum/go-ethereum/trie" type MemDatabase struct { db map[string][]byte @@ -24,8 +24,8 @@ func (db *MemDatabase) Print() {} func (db *MemDatabase) Close() {} func (db *MemDatabase) LastKnownTD() []byte { return nil } -func NewTrie() *ptrie.Trie { +func NewTrie() *trie.Trie { db, _ := NewMemDatabase() - return ptrie.New(nil, db) + return trie.New(nil, db) } diff --git a/ptrie/cache.go b/trie/cache.go similarity index 98% rename from ptrie/cache.go rename to trie/cache.go index 721dc4cf64..e03702b255 100644 --- a/ptrie/cache.go +++ b/trie/cache.go @@ -1,4 +1,4 @@ -package ptrie +package trie type Backend interface { Get([]byte) ([]byte, error) diff --git a/ptrie/fullnode.go b/trie/fullnode.go similarity index 98% rename from ptrie/fullnode.go rename to trie/fullnode.go index 4dd98049d5..ebbe7f3844 100644 --- a/ptrie/fullnode.go +++ b/trie/fullnode.go @@ -1,4 +1,4 @@ -package ptrie +package trie import "fmt" diff --git a/ptrie/hashnode.go b/trie/hashnode.go similarity index 97% rename from ptrie/hashnode.go rename to trie/hashnode.go index 4c17569d78..40ccd54c31 100644 --- a/ptrie/hashnode.go +++ b/trie/hashnode.go @@ -1,4 +1,4 @@ -package ptrie +package trie type HashNode struct { key []byte diff --git a/trie/iterator.go b/trie/iterator.go index 1114715a66..f0dae28bb0 100644 --- a/trie/iterator.go +++ b/trie/iterator.go @@ -1,124 +1,73 @@ package trie -/* -import ( - "bytes" - - "github.com/ethereum/go-ethereum/ethutil" -) - -type NodeType byte - -const ( - EmptyNode NodeType = iota - BranchNode - LeafNode - ExtNode -) - -func getType(node *ethutil.Value) NodeType { - if node.Len() == 0 { - return EmptyNode - } - - if node.Len() == 2 { - k := CompactDecode(node.Get(0).Str()) - if HasTerm(k) { - return LeafNode - } - - return ExtNode - } - - return BranchNode -} +import "bytes" type Iterator struct { - Path [][]byte trie *Trie Key []byte - Value *ethutil.Value + Value []byte } func NewIterator(trie *Trie) *Iterator { - return &Iterator{trie: trie} + return &Iterator{trie: trie, Key: make([]byte, 32)} } -func (self *Iterator) key(node *ethutil.Value, path [][]byte) []byte { - switch getType(node) { - case LeafNode: - k := RemTerm(CompactDecode(node.Get(0).Str())) +func (self *Iterator) Next() bool { + self.trie.mu.Lock() + defer self.trie.mu.Unlock() - self.Path = append(path, k) - self.Value = node.Get(1) + key := RemTerm(CompactHexDecode(string(self.Key))) + k := self.next(self.trie.root, key) - return k - case BranchNode: - if node.Get(16).Len() > 0 { - return []byte{16} - } + self.Key = []byte(DecodeCompact(k)) - for i := byte(0); i < 16; i++ { - o := self.key(self.trie.getNode(node.Get(int(i)).Raw()), append(path, []byte{i})) - if o != nil { - return append([]byte{i}, o...) - } - } - case ExtNode: - currKey := node.Get(0).Bytes() + return len(k) > 0 - return self.key(self.trie.getNode(node.Get(1).Raw()), append(path, currKey)) +} + +func (self *Iterator) next(node Node, key []byte) []byte { + if node == nil { + return nil } - return nil -} - -func (self *Iterator) next(node *ethutil.Value, key []byte, path [][]byte) []byte { - switch typ := getType(node); typ { - case EmptyNode: - return nil - case BranchNode: + switch node := node.(type) { + case *FullNode: if len(key) > 0 { - subNode := self.trie.getNode(node.Get(int(key[0])).Raw()) - - o := self.next(subNode, key[1:], append(path, key[:1])) - if o != nil { - return append([]byte{key[0]}, o...) + k := self.next(node.branch(key[0]), key[1:]) + if k != nil { + return append([]byte{key[0]}, k...) } } - var r byte = 0 + var r byte if len(key) > 0 { r = key[0] + 1 } for i := r; i < 16; i++ { - subNode := self.trie.getNode(node.Get(int(i)).Raw()) - o := self.key(subNode, append(path, []byte{i})) - if o != nil { - return append([]byte{i}, o...) + k := self.key(node.branch(byte(i))) + if k != nil { + return append([]byte{i}, k...) } } - case LeafNode, ExtNode: - k := RemTerm(CompactDecode(node.Get(0).Str())) - if typ == LeafNode { - if bytes.Compare([]byte(k), []byte(key)) > 0 { - self.Value = node.Get(1) - self.Path = append(path, k) + case *ShortNode: + k := RemTerm(node.Key()) + if vnode, ok := node.Value().(*ValueNode); ok { + if bytes.Compare([]byte(k), key) > 0 { + self.Value = vnode.Val() return k } } else { - subNode := self.trie.getNode(node.Get(1).Raw()) - subKey := key[len(k):] + cnode := node.Value() + var ret []byte + skey := key[len(k):] if BeginsWith(key, k) { - ret = self.next(subNode, subKey, append(path, k)) + ret = self.next(cnode, skey) } else if bytes.Compare(k, key[:len(k)]) > 0 { - ret = self.key(node, append(path, k)) - } else { - ret = nil + ret = self.key(node) } if ret != nil { @@ -130,16 +79,33 @@ func (self *Iterator) next(node *ethutil.Value, key []byte, path [][]byte) []byt return nil } -// Get the next in keys -func (self *Iterator) Next(key string) []byte { - self.trie.mut.Lock() - defer self.trie.mut.Unlock() +func (self *Iterator) key(node Node) []byte { + switch node := node.(type) { + case *ShortNode: + // Leaf node + if vnode, ok := node.Value().(*ValueNode); ok { + k := RemTerm(node.Key()) + self.Value = vnode.Val() - k := RemTerm(CompactHexDecode(key)) - n := self.next(self.trie.getNode(self.trie.Root), k, nil) + return k + } else { + k := RemTerm(node.Key()) + return append(k, self.key(node.Value())...) + } + case *FullNode: + if node.Value() != nil { + self.Value = node.Value().(*ValueNode).Val() - self.Key = []byte(DecodeCompact(n)) + return []byte{16} + } - return self.Key + for i := 0; i < 16; i++ { + k := self.key(node.branch(byte(i))) + if k != nil { + return append([]byte{byte(i)}, k...) + } + } + } + + return nil } -*/ diff --git a/ptrie/iterator_test.go b/trie/iterator_test.go similarity index 97% rename from ptrie/iterator_test.go rename to trie/iterator_test.go index acfc03d633..74d9e903cd 100644 --- a/ptrie/iterator_test.go +++ b/trie/iterator_test.go @@ -1,4 +1,4 @@ -package ptrie +package trie import "testing" diff --git a/trie/main_test.go b/trie/main_test.go deleted file mode 100644 index f6f64c06f7..0000000000 --- a/trie/main_test.go +++ /dev/null @@ -1,9 +0,0 @@ -package trie - -import ( - "testing" - - checker "gopkg.in/check.v1" -) - -func Test(t *testing.T) { checker.TestingT(t) } diff --git a/ptrie/node.go b/trie/node.go similarity index 98% rename from ptrie/node.go rename to trie/node.go index ab90a1a021..a1f68480f2 100644 --- a/ptrie/node.go +++ b/trie/node.go @@ -1,4 +1,4 @@ -package ptrie +package trie import "fmt" diff --git a/ptrie/shortnode.go b/trie/shortnode.go similarity index 78% rename from ptrie/shortnode.go rename to trie/shortnode.go index 73ff2914bf..f132b56d96 100644 --- a/ptrie/shortnode.go +++ b/trie/shortnode.go @@ -1,6 +1,4 @@ -package ptrie - -import "github.com/ethereum/go-ethereum/trie" +package trie type ShortNode struct { trie *Trie @@ -9,7 +7,7 @@ type ShortNode struct { } func NewShortNode(t *Trie, key []byte, value Node) *ShortNode { - return &ShortNode{t, []byte(trie.CompactEncode(key)), value} + return &ShortNode{t, []byte(CompactEncode(key)), value} } func (self *ShortNode) Value() Node { self.value = self.trie.trans(self.value) @@ -27,5 +25,5 @@ func (self *ShortNode) Hash() interface{} { } func (self *ShortNode) Key() []byte { - return trie.CompactDecode(string(self.key)) + return CompactDecode(string(self.key)) } diff --git a/trie/trie.go b/trie/trie.go index c9fd18e009..36f2af5d22 100644 --- a/trie/trie.go +++ b/trie/trie.go @@ -1,8 +1,8 @@ package trie -/* import ( "bytes" + "container/list" "fmt" "sync" @@ -10,618 +10,325 @@ import ( "github.com/ethereum/go-ethereum/ethutil" ) -func ParanoiaCheck(t1 *Trie) (bool, *Trie) { - t2 := New(ethutil.Config.Db, "") +func ParanoiaCheck(t1 *Trie, backend Backend) (bool, *Trie) { + t2 := New(nil, backend) - t1.NewIterator().Each(func(key string, v *ethutil.Value) { - t2.Update(key, v.Str()) - }) - - return bytes.Compare(t2.GetRoot(), t1.GetRoot()) == 0, t2 -} - -func (s *Cache) Len() int { - return len(s.nodes) -} - -// TODO -// A StateObject is an object that has a state root -// This is goig to be the object for the second level caching (the caching of object which have a state such as contracts) -type StateObject interface { - State() *Trie - Sync() - Undo() -} - -type Node struct { - Key []byte - Value *ethutil.Value - Dirty bool -} - -func NewNode(key []byte, val *ethutil.Value, dirty bool) *Node { - return &Node{Key: key, Value: val, Dirty: dirty} -} - -func (n *Node) Copy() *Node { - return NewNode(n.Key, n.Value, n.Dirty) -} - -type Cache struct { - nodes map[string]*Node - db ethutil.Database - IsDirty bool -} - -func NewCache(db ethutil.Database) *Cache { - return &Cache{db: db, nodes: make(map[string]*Node)} -} - -func (cache *Cache) PutValue(v interface{}, force bool) interface{} { - value := ethutil.NewValue(v) - - enc := value.Encode() - if len(enc) >= 32 || force { - sha := crypto.Sha3(enc) - - cache.nodes[string(sha)] = NewNode(sha, value, true) - cache.IsDirty = true - - return sha + it := t1.Iterator() + for it.Next() { + t2.Update(it.Key, it.Value) } - return v + return bytes.Equal(t2.Hash(), t1.Hash()), t2 } -func (cache *Cache) Put(v interface{}) interface{} { - return cache.PutValue(v, false) -} - -func (cache *Cache) Get(key []byte) *ethutil.Value { - // First check if the key is the cache - if cache.nodes[string(key)] != nil { - return cache.nodes[string(key)].Value - } - - // Get the key of the database instead and cache it - data, _ := cache.db.Get(key) - // Create the cached value - value := ethutil.NewValueFromBytes(data) - - defer func() { - if r := recover(); r != nil { - fmt.Println("RECOVER GET", cache, cache.nodes) - panic("bye") - } - }() - // Create caching node - cache.nodes[string(key)] = NewNode(key, value, true) - - return value -} - -func (cache *Cache) Delete(key []byte) { - delete(cache.nodes, string(key)) - - cache.db.Delete(key) -} - -func (cache *Cache) Commit() { - // Don't try to commit if it isn't dirty - if !cache.IsDirty { - return - } - - for key, node := range cache.nodes { - if node.Dirty { - cache.db.Put([]byte(key), node.Value.Encode()) - node.Dirty = false - } - } - cache.IsDirty = false - - // If the nodes grows beyond the 200 entries we simple empty it - // FIXME come up with something better - if len(cache.nodes) > 200 { - cache.nodes = make(map[string]*Node) - } -} - -func (cache *Cache) Undo() { - for key, node := range cache.nodes { - if node.Dirty { - delete(cache.nodes, key) - } - } - cache.IsDirty = false -} - -// A (modified) Radix Trie implementation. The Trie implements -// a caching mechanism and will used cached values if they are -// present. If a node is not present in the cache it will try to -// fetch it from the database and store the cached value. -// Please note that the data isn't persisted unless `Sync` is -// explicitly called. type Trie struct { - mut sync.RWMutex - prevRoot interface{} - Root interface{} - //db Database - cache *Cache + mu sync.Mutex + root Node + roothash []byte + cache *Cache + + revisions *list.List } -func copyRoot(root interface{}) interface{} { - var prevRootCopy interface{} - if b, ok := root.([]byte); ok { - prevRootCopy = ethutil.CopyBytes(b) - } else { - prevRootCopy = root - } +func New(root []byte, backend Backend) *Trie { + trie := &Trie{} + trie.revisions = list.New() + trie.roothash = root + trie.cache = NewCache(backend) - return prevRootCopy -} - -func New(db ethutil.Database, Root interface{}) *Trie { - // Make absolute sure the root is copied - r := copyRoot(Root) - p := copyRoot(Root) - - trie := &Trie{cache: NewCache(db), Root: r, prevRoot: p} - trie.setRoot(Root) - - return trie -} - -func (self *Trie) setRoot(root interface{}) { - switch t := root.(type) { - case string: - //if t == "" { - // root = crypto.Sha3(ethutil.Encode("")) - //} - self.Root = []byte(t) - case []byte: - self.Root = root - default: - self.Root = self.cache.PutValue(root, true) - } -} - -func (t *Trie) Update(key, value string) { - t.mut.Lock() - defer t.mut.Unlock() - - k := CompactHexDecode(key) - - var root interface{} - if value != "" { - root = t.UpdateState(t.Root, k, value) - } else { - root = t.deleteState(t.Root, k) - } - t.setRoot(root) -} - -func (t *Trie) Get(key string) string { - t.mut.Lock() - defer t.mut.Unlock() - - k := CompactHexDecode(key) - c := ethutil.NewValue(t.getState(t.Root, k)) - - return c.Str() -} - -func (t *Trie) Delete(key string) { - t.mut.Lock() - defer t.mut.Unlock() - - k := CompactHexDecode(key) - - root := t.deleteState(t.Root, k) - t.setRoot(root) -} - -func (self *Trie) GetRoot() []byte { - switch t := self.Root.(type) { - case string: - if t == "" { - return crypto.Sha3(ethutil.Encode("")) - } - return []byte(t) - case []byte: - if len(t) == 0 { - return crypto.Sha3(ethutil.Encode("")) - } - - return t - default: - panic(fmt.Sprintf("invalid root type %T (%v)", self.Root, self.Root)) - } -} - -// Simple compare function which creates a rlp value out of the evaluated objects -func (t *Trie) Cmp(trie *Trie) bool { - return ethutil.NewValue(t.Root).Cmp(ethutil.NewValue(trie.Root)) -} - -// Returns a copy of this trie -func (t *Trie) Copy() *Trie { - trie := New(t.cache.db, t.Root) - for key, node := range t.cache.nodes { - trie.cache.nodes[key] = node.Copy() + if root != nil { + value := ethutil.NewValueFromBytes(trie.cache.Get(root)) + trie.root = trie.mknode(value) } return trie } -// Save the cached value to the database. -func (t *Trie) Sync() { - t.cache.Commit() - t.prevRoot = copyRoot(t.Root) -} - -func (t *Trie) Undo() { - t.cache.Undo() - t.Root = t.prevRoot -} - -func (t *Trie) Cache() *Cache { - return t.cache -} - -func (t *Trie) getState(node interface{}, key []byte) interface{} { - n := ethutil.NewValue(node) - // Return the node if key is empty (= found) - if len(key) == 0 || n.IsNil() || n.Len() == 0 { - return node - } - - currentNode := t.getNode(node) - length := currentNode.Len() - - if length == 0 { - return "" - } else if length == 2 { - // Decode the key - k := CompactDecode(currentNode.Get(0).Str()) - v := currentNode.Get(1).Raw() - - if len(key) >= len(k) && bytes.Equal(k, key[:len(k)]) { //CompareIntSlice(k, key[:len(k)]) { - return t.getState(v, key[len(k):]) - } else { - return "" - } - } else if length == 17 { - return t.getState(currentNode.Get(int(key[0])).Raw(), key[1:]) - } - - // It shouldn't come this far - panic("unexpected return") -} - -func (t *Trie) getNode(node interface{}) *ethutil.Value { - n := ethutil.NewValue(node) - - if !n.Get(0).IsNil() { - return n - } - - str := n.Str() - if len(str) == 0 { - return n - } else if len(str) < 32 { - return ethutil.NewValueFromBytes([]byte(str)) - } - - data := t.cache.Get(n.Bytes()) - - return data -} - -func (t *Trie) UpdateState(node interface{}, key []byte, value string) interface{} { - return t.InsertState(node, key, value) -} - -func (t *Trie) Put(node interface{}) interface{} { - return t.cache.Put(node) - -} - -func EmptyStringSlice(l int) []interface{} { - slice := make([]interface{}, l) - for i := 0; i < l; i++ { - slice[i] = "" - } - return slice -} - -func (t *Trie) InsertState(node interface{}, key []byte, value interface{}) interface{} { - if len(key) == 0 { - return value - } - - // New node - n := ethutil.NewValue(node) - if node == nil || n.Len() == 0 { - newNode := []interface{}{CompactEncode(key), value} - - return t.Put(newNode) - } - - currentNode := t.getNode(node) - // Check for "special" 2 slice type node - if currentNode.Len() == 2 { - // Decode the key - - k := CompactDecode(currentNode.Get(0).Str()) - v := currentNode.Get(1).Raw() - - // Matching key pair (ie. there's already an object with this key) - if bytes.Equal(k, key) { //CompareIntSlice(k, key) { - newNode := []interface{}{CompactEncode(key), value} - return t.Put(newNode) - } - - var newHash interface{} - matchingLength := MatchingNibbleLength(key, k) - if matchingLength == len(k) { - // Insert the hash, creating a new node - newHash = t.InsertState(v, key[matchingLength:], value) - } else { - // Expand the 2 length slice to a 17 length slice - oldNode := t.InsertState("", k[matchingLength+1:], v) - newNode := t.InsertState("", key[matchingLength+1:], value) - // Create an expanded slice - scaledSlice := EmptyStringSlice(17) - // Set the copied and new node - scaledSlice[k[matchingLength]] = oldNode - scaledSlice[key[matchingLength]] = newNode - - newHash = t.Put(scaledSlice) - } - - if matchingLength == 0 { - // End of the chain, return - return newHash - } else { - newNode := []interface{}{CompactEncode(key[:matchingLength]), newHash} - return t.Put(newNode) - } - } else { - - // Copy the current node over to the new node and replace the first nibble in the key - newNode := EmptyStringSlice(17) - - for i := 0; i < 17; i++ { - cpy := currentNode.Get(i).Raw() - if cpy != nil { - newNode[i] = cpy - } - } - - newNode[key[0]] = t.InsertState(currentNode.Get(int(key[0])).Raw(), key[1:], value) - - return t.Put(newNode) - } - - panic("unexpected end") -} - -func (t *Trie) deleteState(node interface{}, key []byte) interface{} { - if len(key) == 0 { - return "" - } - - // New node - n := ethutil.NewValue(node) - //if node == nil || (n.Type() == reflect.String && (n.Str() == "" || n.Get(0).IsNil())) || n.Len() == 0 { - if node == nil || n.Len() == 0 { - //return nil - //fmt.Printf(" %x %d\n", n, len(n.Bytes())) - - return "" - } - - currentNode := t.getNode(node) - // Check for "special" 2 slice type node - if currentNode.Len() == 2 { - // Decode the key - k := CompactDecode(currentNode.Get(0).Str()) - v := currentNode.Get(1).Raw() - - // Matching key pair (ie. there's already an object with this key) - if bytes.Equal(k, key) { //CompareIntSlice(k, key) { - //fmt.Printf(" %x\n", v) - - return "" - } else if bytes.Equal(key[:len(k)], k) { //CompareIntSlice(key[:len(k)], k) { - hash := t.deleteState(v, key[len(k):]) - child := t.getNode(hash) - - var newNode []interface{} - if child.Len() == 2 { - newKey := append(k, CompactDecode(child.Get(0).Str())...) - newNode = []interface{}{CompactEncode(newKey), child.Get(1).Raw()} - } else { - newNode = []interface{}{currentNode.Get(0).Str(), hash} - } - - //fmt.Printf("%x\n", newNode) - - return t.Put(newNode) - } else { - return node - } - } else { - // Copy the current node over to the new node and replace the first nibble in the key - n := EmptyStringSlice(17) - var newNode []interface{} - - for i := 0; i < 17; i++ { - cpy := currentNode.Get(i).Raw() - if cpy != nil { - n[i] = cpy - } - } - - n[key[0]] = t.deleteState(n[key[0]], key[1:]) - amount := -1 - for i := 0; i < 17; i++ { - if n[i] != "" { - if amount == -1 { - amount = i - } else { - amount = -2 - } - } - } - if amount == 16 { - newNode = []interface{}{CompactEncode([]byte{16}), n[amount]} - } else if amount >= 0 { - child := t.getNode(n[amount]) - if child.Len() == 17 { - newNode = []interface{}{CompactEncode([]byte{byte(amount)}), n[amount]} - } else if child.Len() == 2 { - key := append([]byte{byte(amount)}, CompactDecode(child.Get(0).Str())...) - newNode = []interface{}{CompactEncode(key), child.Get(1).Str()} - } - - } else { - newNode = n - } - - //fmt.Printf("%x\n", newNode) - return t.Put(newNode) - } - - panic("unexpected return") -} - -type TrieIterator struct { - trie *Trie - key string - value string - - shas [][]byte - values []string - - lastNode []byte -} - -func (t *Trie) NewIterator() *TrieIterator { - return &TrieIterator{trie: t} -} - func (self *Trie) Iterator() *Iterator { return NewIterator(self) } -// Some time in the near future this will need refactoring :-) -// XXX Note to self, IsSlice == inline node. Str == sha3 to node -func (it *TrieIterator) workNode(currentNode *ethutil.Value) { - if currentNode.Len() == 2 { - k := CompactDecode(currentNode.Get(0).Str()) +func (self *Trie) Copy() *Trie { + return New(self.roothash, self.cache.backend) +} - if currentNode.Get(1).Str() == "" { - it.workNode(currentNode.Get(1)) +// Legacy support +func (self *Trie) Root() []byte { return self.Hash() } +func (self *Trie) Hash() []byte { + var hash []byte + if self.root != nil { + t := self.root.Hash() + if byts, ok := t.([]byte); ok && len(byts) > 0 { + hash = byts } else { - if k[len(k)-1] == 16 { - it.values = append(it.values, currentNode.Get(1).Str()) - } else { - it.shas = append(it.shas, currentNode.Get(1).Bytes()) - it.getNode(currentNode.Get(1).Bytes()) - } + hash = crypto.Sha3(ethutil.Encode(self.root.RlpData())) } } else { - for i := 0; i < currentNode.Len(); i++ { - if i == 16 && currentNode.Get(i).Len() != 0 { - it.values = append(it.values, currentNode.Get(i).Str()) - } else { - if currentNode.Get(i).Str() == "" { - it.workNode(currentNode.Get(i)) - } else { - val := currentNode.Get(i).Str() - if val != "" { - it.shas = append(it.shas, currentNode.Get(1).Bytes()) - it.getNode([]byte(val)) - } - } - } + hash = crypto.Sha3(ethutil.Encode("")) + } + + if !bytes.Equal(hash, self.roothash) { + self.revisions.PushBack(self.roothash) + self.roothash = hash + } + + return hash +} +func (self *Trie) Commit() { + self.mu.Lock() + defer self.mu.Unlock() + + // Hash first + self.Hash() + + self.cache.Flush() +} + +// Reset should only be called if the trie has been hashed +func (self *Trie) Reset() { + self.mu.Lock() + defer self.mu.Unlock() + + self.cache.Reset() + + if self.revisions.Len() > 0 { + revision := self.revisions.Remove(self.revisions.Back()).([]byte) + self.roothash = revision + } + value := ethutil.NewValueFromBytes(self.cache.Get(self.roothash)) + self.root = self.mknode(value) +} + +func (self *Trie) UpdateString(key, value string) Node { return self.Update([]byte(key), []byte(value)) } +func (self *Trie) Update(key, value []byte) Node { + self.mu.Lock() + defer self.mu.Unlock() + + k := CompactHexDecode(string(key)) + + if len(value) != 0 { + self.root = self.insert(self.root, k, &ValueNode{self, value}) + } else { + self.root = self.delete(self.root, k) + } + + return self.root +} + +func (self *Trie) GetString(key string) []byte { return self.Get([]byte(key)) } +func (self *Trie) Get(key []byte) []byte { + self.mu.Lock() + defer self.mu.Unlock() + + k := CompactHexDecode(string(key)) + + n := self.get(self.root, k) + if n != nil { + return n.(*ValueNode).Val() + } + + return nil +} + +func (self *Trie) DeleteString(key string) Node { return self.Delete([]byte(key)) } +func (self *Trie) Delete(key []byte) Node { + self.mu.Lock() + defer self.mu.Unlock() + + k := CompactHexDecode(string(key)) + self.root = self.delete(self.root, k) + + return self.root +} + +func (self *Trie) insert(node Node, key []byte, value Node) Node { + if len(key) == 0 { + return value + } + + if node == nil { + return NewShortNode(self, key, value) + } + + switch node := node.(type) { + case *ShortNode: + k := node.Key() + cnode := node.Value() + if bytes.Equal(k, key) { + return NewShortNode(self, key, value) } + + var n Node + matchlength := MatchingNibbleLength(key, k) + if matchlength == len(k) { + n = self.insert(cnode, key[matchlength:], value) + } else { + pnode := self.insert(nil, k[matchlength+1:], cnode) + nnode := self.insert(nil, key[matchlength+1:], value) + fulln := NewFullNode(self) + fulln.set(k[matchlength], pnode) + fulln.set(key[matchlength], nnode) + n = fulln + } + if matchlength == 0 { + return n + } + + return NewShortNode(self, key[:matchlength], n) + + case *FullNode: + cpy := node.Copy().(*FullNode) + cpy.set(key[0], self.insert(node.branch(key[0]), key[1:], value)) + + return cpy + + default: + panic(fmt.Sprintf("%T: invalid node: %v", node, node)) } } -func (it *TrieIterator) getNode(node []byte) { - currentNode := it.trie.cache.Get(node) - it.workNode(currentNode) -} +func (self *Trie) get(node Node, key []byte) Node { + if len(key) == 0 { + return node + } -func (it *TrieIterator) Collect() [][]byte { - if it.trie.Root == "" { + if node == nil { return nil } - it.getNode(ethutil.NewValue(it.trie.Root).Bytes()) + switch node := node.(type) { + case *ShortNode: + k := node.Key() + cnode := node.Value() - return it.shas -} - -func (it *TrieIterator) Purge() int { - shas := it.Collect() - for _, sha := range shas { - it.trie.cache.Delete(sha) - } - return len(it.values) -} - -func (it *TrieIterator) Key() string { - return "" -} - -func (it *TrieIterator) Value() string { - return "" -} - -type EachCallback func(key string, node *ethutil.Value) - -func (it *TrieIterator) Each(cb EachCallback) { - it.fetchNode(nil, ethutil.NewValue(it.trie.Root).Bytes(), cb) -} - -func (it *TrieIterator) fetchNode(key []byte, node []byte, cb EachCallback) { - it.iterateNode(key, it.trie.cache.Get(node), cb) -} - -func (it *TrieIterator) iterateNode(key []byte, currentNode *ethutil.Value, cb EachCallback) { - if currentNode.Len() == 2 { - k := CompactDecode(currentNode.Get(0).Str()) - - pk := append(key, k...) - if currentNode.Get(1).Len() != 0 && currentNode.Get(1).Str() == "" { - it.iterateNode(pk, currentNode.Get(1), cb) - } else { - if k[len(k)-1] == 16 { - cb(DecodeCompact(pk), currentNode.Get(1)) - } else { - it.fetchNode(pk, currentNode.Get(1).Bytes(), cb) - } + if len(key) >= len(k) && bytes.Equal(k, key[:len(k)]) { + return self.get(cnode, key[len(k):]) } - } else { - for i := 0; i < currentNode.Len(); i++ { - pk := append(key, byte(i)) - if i == 16 && currentNode.Get(i).Len() != 0 { - cb(DecodeCompact(pk), currentNode.Get(i)) - } else { - if currentNode.Get(i).Len() != 0 && currentNode.Get(i).Str() == "" { - it.iterateNode(pk, currentNode.Get(i), cb) + + return nil + case *FullNode: + return self.get(node.branch(key[0]), key[1:]) + default: + panic(fmt.Sprintf("%T: invalid node: %v", node, node)) + } +} + +func (self *Trie) delete(node Node, key []byte) Node { + if len(key) == 0 && node == nil { + return nil + } + + switch node := node.(type) { + case *ShortNode: + k := node.Key() + cnode := node.Value() + if bytes.Equal(key, k) { + return nil + } else if bytes.Equal(key[:len(k)], k) { + child := self.delete(cnode, key[len(k):]) + + var n Node + switch child := child.(type) { + case *ShortNode: + nkey := append(k, child.Key()...) + n = NewShortNode(self, nkey, child.Value()) + case *FullNode: + sn := NewShortNode(self, node.Key(), child) + sn.key = node.key + n = sn + } + + return n + } else { + return node + } + + case *FullNode: + n := node.Copy().(*FullNode) + n.set(key[0], self.delete(n.branch(key[0]), key[1:])) + + pos := -1 + for i := 0; i < 17; i++ { + if n.branch(byte(i)) != nil { + if pos == -1 { + pos = i } else { - val := currentNode.Get(i).Str() - if val != "" { - it.fetchNode(pk, []byte(val), cb) - } + pos = -2 } } } + + var nnode Node + if pos == 16 { + nnode = NewShortNode(self, []byte{16}, n.branch(byte(pos))) + } else if pos >= 0 { + cnode := n.branch(byte(pos)) + switch cnode := cnode.(type) { + case *ShortNode: + // Stitch keys + k := append([]byte{byte(pos)}, cnode.Key()...) + nnode = NewShortNode(self, k, cnode.Value()) + case *FullNode: + nnode = NewShortNode(self, []byte{byte(pos)}, n.branch(byte(pos))) + } + } else { + nnode = n + } + + return nnode + case nil: + return nil + default: + panic(fmt.Sprintf("%T: invalid node: %v (%v)", node, node, key)) } } -*/ + +// casting functions and cache storing +func (self *Trie) mknode(value *ethutil.Value) Node { + l := value.Len() + switch l { + case 0: + return nil + case 2: + // A value node may consists of 2 bytes. + if value.Get(0).Len() != 0 { + return NewShortNode(self, CompactDecode(string(value.Get(0).Bytes())), self.mknode(value.Get(1))) + } + case 17: + fnode := NewFullNode(self) + for i := 0; i < l; i++ { + fnode.set(byte(i), self.mknode(value.Get(i))) + } + return fnode + case 32: + return &HashNode{value.Bytes()} + } + + return &ValueNode{self, value.Bytes()} +} + +func (self *Trie) trans(node Node) Node { + switch node := node.(type) { + case *HashNode: + value := ethutil.NewValueFromBytes(self.cache.Get(node.key)) + return self.mknode(value) + default: + return node + } +} + +func (self *Trie) store(node Node) interface{} { + data := ethutil.Encode(node) + if len(data) >= 32 { + key := crypto.Sha3(data) + self.cache.Put(key, data) + + return key + } + + return node.RlpData() +} + +func (self *Trie) PrintRoot() { + fmt.Println(self.root) +} diff --git a/trie/trie_test.go b/trie/trie_test.go index 3abe56040f..ffb78d4f2b 100644 --- a/trie/trie_test.go +++ b/trie/trie_test.go @@ -1,345 +1,76 @@ package trie -/* import ( "bytes" - "encoding/hex" - "encoding/json" "fmt" - "io/ioutil" - "math/rand" - "net/http" "testing" - "time" - - checker "gopkg.in/check.v1" + "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethutil" ) -const LONG_WORD = "1234567890abcdefghijklmnopqrstuvwxxzABCEFGHIJKLMNOPQRSTUVWXYZ" +type Db map[string][]byte -type TrieSuite struct { - db *MemDatabase - trie *Trie +func (self Db) Get(k []byte) ([]byte, error) { return self[string(k)], nil } +func (self Db) Put(k, v []byte) { self[string(k)] = v } + +// Used for testing +func NewEmpty() *Trie { + return New(nil, make(Db)) } -type MemDatabase struct { - db map[string][]byte -} - -func NewMemDatabase() (*MemDatabase, error) { - db := &MemDatabase{db: make(map[string][]byte)} - return db, nil -} -func (db *MemDatabase) Put(key []byte, value []byte) { - db.db[string(key)] = value -} -func (db *MemDatabase) Get(key []byte) ([]byte, error) { - return db.db[string(key)], nil -} -func (db *MemDatabase) Delete(key []byte) error { - delete(db.db, string(key)) - return nil -} -func (db *MemDatabase) Print() {} -func (db *MemDatabase) Close() {} -func (db *MemDatabase) LastKnownTD() []byte { return nil } - -func NewTrie() (*MemDatabase, *Trie) { - db, _ := NewMemDatabase() - return db, New(db, "") -} - -func (s *TrieSuite) SetUpTest(c *checker.C) { - s.db, s.trie = NewTrie() -} - -func (s *TrieSuite) TestTrieSync(c *checker.C) { - s.trie.Update("dog", LONG_WORD) - c.Assert(s.db.db, checker.HasLen, 0, checker.Commentf("Expected no data in database")) - s.trie.Sync() - c.Assert(s.db.db, checker.HasLen, 3) -} - -func (s *TrieSuite) TestTrieDirtyTracking(c *checker.C) { - s.trie.Update("dog", LONG_WORD) - c.Assert(s.trie.cache.IsDirty, checker.Equals, true, checker.Commentf("Expected no data in database")) - - s.trie.Sync() - c.Assert(s.trie.cache.IsDirty, checker.Equals, false, checker.Commentf("Expected trie to be dirty")) - - s.trie.Update("test", LONG_WORD) - s.trie.cache.Undo() - c.Assert(s.trie.cache.IsDirty, checker.Equals, false) -} - -func (s *TrieSuite) TestTrieReset(c *checker.C) { - s.trie.Update("cat", LONG_WORD) - c.Assert(s.trie.cache.nodes, checker.HasLen, 1, checker.Commentf("Expected cached nodes")) - - s.trie.cache.Undo() - c.Assert(s.trie.cache.nodes, checker.HasLen, 0, checker.Commentf("Expected no nodes after undo")) -} - -func (s *TrieSuite) TestTrieGet(c *checker.C) { - s.trie.Update("cat", LONG_WORD) - x := s.trie.Get("cat") - c.Assert(x, checker.DeepEquals, LONG_WORD) -} - -func (s *TrieSuite) TestTrieUpdating(c *checker.C) { - s.trie.Update("cat", LONG_WORD) - s.trie.Update("cat", LONG_WORD+"1") - x := s.trie.Get("cat") - c.Assert(x, checker.DeepEquals, LONG_WORD+"1") -} - -func (s *TrieSuite) TestTrieCmp(c *checker.C) { - _, trie1 := NewTrie() - _, trie2 := NewTrie() - - trie1.Update("doge", LONG_WORD) - trie2.Update("doge", LONG_WORD) - c.Assert(trie1, checker.DeepEquals, trie2) - - trie1.Update("dog", LONG_WORD) - trie2.Update("cat", LONG_WORD) - c.Assert(trie1, checker.Not(checker.DeepEquals), trie2) -} - -func (s *TrieSuite) TestTrieDelete(c *checker.C) { - s.trie.Update("cat", LONG_WORD) - exp := s.trie.Root - s.trie.Update("dog", LONG_WORD) - s.trie.Delete("dog") - c.Assert(s.trie.Root, checker.DeepEquals, exp) - - s.trie.Update("dog", LONG_WORD) - exp = s.trie.Root - s.trie.Update("dude", LONG_WORD) - s.trie.Delete("dude") - c.Assert(s.trie.Root, checker.DeepEquals, exp) -} - -func (s *TrieSuite) TestTrieDeleteWithValue(c *checker.C) { - s.trie.Update("c", LONG_WORD) - exp := s.trie.Root - s.trie.Update("ca", LONG_WORD) - s.trie.Update("cat", LONG_WORD) - s.trie.Delete("ca") - s.trie.Delete("cat") - c.Assert(s.trie.Root, checker.DeepEquals, exp) -} - -func (s *TrieSuite) TestTriePurge(c *checker.C) { - s.trie.Update("c", LONG_WORD) - s.trie.Update("ca", LONG_WORD) - s.trie.Update("cat", LONG_WORD) - - lenBefore := len(s.trie.cache.nodes) - it := s.trie.NewIterator() - num := it.Purge() - c.Assert(num, checker.Equals, 3) - c.Assert(len(s.trie.cache.nodes), checker.Equals, lenBefore) -} - -func h(str string) string { - d, err := hex.DecodeString(str) - if err != nil { - panic(err) - } - - return string(d) -} - -func get(in string) (out string) { - if len(in) > 2 && in[:2] == "0x" { - out = h(in[2:]) - } else { - out = in - } - - return -} - -type TrieTest struct { - Name string - In map[string]string - Root string -} - -func CreateTest(name string, data []byte) (TrieTest, error) { - t := TrieTest{Name: name} - err := json.Unmarshal(data, &t) - if err != nil { - return TrieTest{}, fmt.Errorf("%v", err) - } - - return t, nil -} - -func CreateTests(uri string, cb func(TrieTest)) map[string]TrieTest { - resp, err := http.Get(uri) - if err != nil { - panic(err) - } - defer resp.Body.Close() - - data, err := ioutil.ReadAll(resp.Body) - - var objmap map[string]*json.RawMessage - err = json.Unmarshal(data, &objmap) - if err != nil { - panic(err) - } - - tests := make(map[string]TrieTest) - for name, testData := range objmap { - test, err := CreateTest(name, *testData) - if err != nil { - panic(err) - } - - if cb != nil { - cb(test) - } - tests[name] = test - } - - return tests -} - -func RandomData() [][]string { - data := [][]string{ - {"0x000000000000000000000000ec4f34c97e43fbb2816cfd95e388353c7181dab1", "0x4e616d6552656700000000000000000000000000000000000000000000000000"}, - {"0x0000000000000000000000000000000000000000000000000000000000000045", "0x22b224a1420a802ab51d326e29fa98e34c4f24ea"}, - {"0x0000000000000000000000000000000000000000000000000000000000000046", "0x67706c2076330000000000000000000000000000000000000000000000000000"}, - {"0x000000000000000000000000697c7b8c961b56f675d570498424ac8de1a918f6", "0x6f6f6f6820736f2067726561742c207265616c6c6c793f000000000000000000"}, - {"0x0000000000000000000000007ef9e639e2733cb34e4dfc576d4b23f72db776b2", "0x4655474156000000000000000000000000000000000000000000000000000000"}, - {"0x6f6f6f6820736f2067726561742c207265616c6c6c793f000000000000000000", "0x697c7b8c961b56f675d570498424ac8de1a918f6"}, - {"0x4655474156000000000000000000000000000000000000000000000000000000", "0x7ef9e639e2733cb34e4dfc576d4b23f72db776b2"}, - {"0x4e616d6552656700000000000000000000000000000000000000000000000000", "0xec4f34c97e43fbb2816cfd95e388353c7181dab1"}, - } - - var c [][]string - for len(data) != 0 { - e := rand.Intn(len(data)) - c = append(c, data[e]) - - copy(data[e:], data[e+1:]) - data[len(data)-1] = nil - data = data[:len(data)-1] - } - - return c -} - -const MaxTest = 1000 - -// This test insert data in random order and seeks to find indifferences between the different tries -func (s *TrieSuite) TestRegression(c *checker.C) { - rand.Seed(time.Now().Unix()) - - roots := make(map[string]int) - for i := 0; i < MaxTest; i++ { - _, trie := NewTrie() - data := RandomData() - - for _, test := range data { - trie.Update(test[0], test[1]) - } - trie.Delete("0x4e616d6552656700000000000000000000000000000000000000000000000000") - - roots[string(trie.Root.([]byte))] += 1 - } - - c.Assert(len(roots) <= 1, checker.Equals, true) - // if len(roots) > 1 { - // for root, num := range roots { - // t.Errorf("%x => %d\n", root, num) - // } - // } -} - -func (s *TrieSuite) TestDelete(c *checker.C) { - s.trie.Update("a", "jeffreytestlongstring") - s.trie.Update("aa", "otherstring") - s.trie.Update("aaa", "othermorestring") - s.trie.Update("aabbbbccc", "hithere") - s.trie.Update("abbcccdd", "hstanoehutnaheoustnh") - s.trie.Update("rnthaoeuabbcccdd", "hstanoehutnaheoustnh") - s.trie.Update("rneuabbcccdd", "hstanoehutnaheoustnh") - s.trie.Update("rneuabboeusntahoeucccdd", "hstanoehutnaheoustnh") - s.trie.Update("rnxabboeusntahoeucccdd", "hstanoehutnaheoustnh") - s.trie.Delete("aaboaestnuhbccc") - s.trie.Delete("a") - s.trie.Update("a", "nthaonethaosentuh") - s.trie.Update("c", "shtaosntehua") - s.trie.Delete("a") - s.trie.Update("aaaa", "testmegood") - - _, t2 := NewTrie() - s.trie.NewIterator().Each(func(key string, v *ethutil.Value) { - if key == "aaaa" { - t2.Update(key, v.Str()) - } else { - t2.Update(key, v.Str()) - } - }) - - a := ethutil.NewValue(s.trie.Root).Bytes() - b := ethutil.NewValue(t2.Root).Bytes() - - c.Assert(a, checker.DeepEquals, b) -} - -func (s *TrieSuite) TestTerminator(c *checker.C) { - key := CompactDecode("hello") - c.Assert(HasTerm(key), checker.Equals, true, checker.Commentf("Expected %v to have a terminator", key)) -} - -func (s *TrieSuite) TestIt(c *checker.C) { - s.trie.Update("cat", "cat") - s.trie.Update("doge", "doge") - s.trie.Update("wallace", "wallace") - it := s.trie.Iterator() - - inputs := []struct { - In, Out string - }{ - {"", "cat"}, - {"bobo", "cat"}, - {"c", "cat"}, - {"car", "cat"}, - {"catering", "doge"}, - {"w", "wallace"}, - {"wallace123", ""}, - } - - for _, test := range inputs { - res := string(it.Next(test.In)) - c.Assert(res, checker.Equals, test.Out) +func TestEmptyTrie(t *testing.T) { + trie := NewEmpty() + res := trie.Hash() + exp := crypto.Sha3(ethutil.Encode("")) + if !bytes.Equal(res, exp) { + t.Errorf("expected %x got %x", exp, res) } } -func (s *TrieSuite) TestBeginsWith(c *checker.C) { - a := CompactDecode("hello") - b := CompactDecode("hel") +func TestInsert(t *testing.T) { + trie := NewEmpty() - c.Assert(BeginsWith(a, b), checker.Equals, false) - c.Assert(BeginsWith(b, a), checker.Equals, true) + trie.UpdateString("doe", "reindeer") + trie.UpdateString("dog", "puppy") + trie.UpdateString("dogglesworth", "cat") + + exp := ethutil.Hex2Bytes("8aad789dff2f538bca5d8ea56e8abe10f4c7ba3a5dea95fea4cd6e7c3a1168d3") + root := trie.Hash() + if !bytes.Equal(root, exp) { + t.Errorf("exp %x got %x", exp, root) + } + + trie = NewEmpty() + trie.UpdateString("A", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") + + exp = ethutil.Hex2Bytes("d23786fb4a010da3ce639d66d5e904a11dbc02746d1ce25029e53290cabf28ab") + root = trie.Hash() + if !bytes.Equal(root, exp) { + t.Errorf("exp %x got %x", exp, root) + } } -func (s *TrieSuite) TestItems(c *checker.C) { - s.trie.Update("A", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") - exp := "d23786fb4a010da3ce639d66d5e904a11dbc02746d1ce25029e53290cabf28ab" +func TestGet(t *testing.T) { + trie := NewEmpty() - c.Assert(s.trie.GetRoot(), checker.DeepEquals, ethutil.Hex2Bytes(exp)) + trie.UpdateString("doe", "reindeer") + trie.UpdateString("dog", "puppy") + trie.UpdateString("dogglesworth", "cat") + + res := trie.GetString("dog") + if !bytes.Equal(res, []byte("puppy")) { + t.Errorf("expected puppy got %x", res) + } + + unknown := trie.GetString("unknown") + if unknown != nil { + t.Errorf("expected nil got %x", unknown) + } } -func TestOtherSomething(t *testing.T) { - _, trie := NewTrie() +func TestDelete(t *testing.T) { + trie := NewEmpty() vals := []struct{ k, v string }{ {"do", "verb"}, @@ -352,18 +83,46 @@ func TestOtherSomething(t *testing.T) { {"shaman", ""}, } for _, val := range vals { - trie.Update(val.k, val.v) + if val.v != "" { + trie.UpdateString(val.k, val.v) + } else { + trie.DeleteString(val.k) + } } + hash := trie.Hash() exp := ethutil.Hex2Bytes("5991bb8c6514148a29db676a14ac506cd2cd5775ace63c30a4fe457715e9ac84") - hash := trie.Root.([]byte) if !bytes.Equal(hash, exp) { t.Errorf("expected %x got %x", exp, hash) } } -func BenchmarkGets(b *testing.B) { - _, trie := NewTrie() +func TestEmptyValues(t *testing.T) { + trie := NewEmpty() + + vals := []struct{ k, v string }{ + {"do", "verb"}, + {"ether", "wookiedoo"}, + {"horse", "stallion"}, + {"shaman", "horse"}, + {"doge", "coin"}, + {"ether", ""}, + {"dog", "puppy"}, + {"shaman", ""}, + } + for _, val := range vals { + trie.UpdateString(val.k, val.v) + } + + hash := trie.Hash() + exp := ethutil.Hex2Bytes("5991bb8c6514148a29db676a14ac506cd2cd5775ace63c30a4fe457715e9ac84") + if !bytes.Equal(hash, exp) { + t.Errorf("expected %x got %x", exp, hash) + } +} + +func TestReplication(t *testing.T) { + trie := NewEmpty() vals := []struct{ k, v string }{ {"do", "verb"}, {"ether", "wookiedoo"}, @@ -376,21 +135,125 @@ func BenchmarkGets(b *testing.B) { {"somethingveryoddindeedthis is", "myothernodedata"}, } for _, val := range vals { - trie.Update(val.k, val.v) + trie.UpdateString(val.k, val.v) + } + trie.Commit() + + trie2 := New(trie.roothash, trie.cache.backend) + if string(trie2.GetString("horse")) != "stallion" { + t.Error("expected to have horse => stallion") + } + + hash := trie2.Hash() + exp := trie.Hash() + if !bytes.Equal(hash, exp) { + t.Errorf("root failure. expected %x got %x", exp, hash) + } + +} + +func TestReset(t *testing.T) { + trie := NewEmpty() + vals := []struct{ k, v string }{ + {"do", "verb"}, + {"ether", "wookiedoo"}, + {"horse", "stallion"}, + } + for _, val := range vals { + trie.UpdateString(val.k, val.v) + } + trie.Commit() + + before := ethutil.CopyBytes(trie.roothash) + trie.UpdateString("should", "revert") + trie.Hash() + // Should have no effect + trie.Hash() + trie.Hash() + // ### + + trie.Reset() + after := ethutil.CopyBytes(trie.roothash) + + if !bytes.Equal(before, after) { + t.Errorf("expected roots to be equal. %x - %x", before, after) + } +} + +func TestParanoia(t *testing.T) { + t.Skip() + trie := NewEmpty() + + vals := []struct{ k, v string }{ + {"do", "verb"}, + {"ether", "wookiedoo"}, + {"horse", "stallion"}, + {"shaman", "horse"}, + {"doge", "coin"}, + {"ether", ""}, + {"dog", "puppy"}, + {"shaman", ""}, + {"somethingveryoddindeedthis is", "myothernodedata"}, + } + for _, val := range vals { + trie.UpdateString(val.k, val.v) + } + trie.Commit() + + ok, t2 := ParanoiaCheck(trie, trie.cache.backend) + if !ok { + t.Errorf("trie paranoia check failed %x %x", trie.roothash, t2.roothash) + } +} + +// Not an actual test +func TestOutput(t *testing.T) { + t.Skip() + + base := "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + trie := NewEmpty() + for i := 0; i < 50; i++ { + trie.UpdateString(fmt.Sprintf("%s%d", base, i), "valueeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee") + } + fmt.Println("############################## FULL ################################") + fmt.Println(trie.root) + + trie.Commit() + fmt.Println("############################## SMALL ################################") + trie2 := New(trie.roothash, trie.cache.backend) + trie2.GetString(base + "20") + fmt.Println(trie2.root) +} + +func BenchmarkGets(b *testing.B) { + trie := NewEmpty() + vals := []struct{ k, v string }{ + {"do", "verb"}, + {"ether", "wookiedoo"}, + {"horse", "stallion"}, + {"shaman", "horse"}, + {"doge", "coin"}, + {"ether", ""}, + {"dog", "puppy"}, + {"shaman", ""}, + {"somethingveryoddindeedthis is", "myothernodedata"}, + } + for _, val := range vals { + trie.UpdateString(val.k, val.v) } b.ResetTimer() for i := 0; i < b.N; i++ { - trie.Get("horse") + trie.Get([]byte("horse")) } } func BenchmarkUpdate(b *testing.B) { - _, trie := NewTrie() + trie := NewEmpty() b.ResetTimer() for i := 0; i < b.N; i++ { - trie.Update(fmt.Sprintf("aaaaaaaaaaaaaaa%d", i), "value") + trie.UpdateString(fmt.Sprintf("aaaaaaaaa%d", i), "value") } + trie.Hash() } -*/ diff --git a/ptrie/valuenode.go b/trie/valuenode.go similarity index 97% rename from ptrie/valuenode.go rename to trie/valuenode.go index c593eb6c60..689befb2ad 100644 --- a/ptrie/valuenode.go +++ b/trie/valuenode.go @@ -1,4 +1,4 @@ -package ptrie +package trie type ValueNode struct { trie *Trie diff --git a/types/ethereum.go b/types/ethereum.go deleted file mode 100644 index ab1254f4c2..0000000000 --- a/types/ethereum.go +++ /dev/null @@ -1 +0,0 @@ -package types From b25126a277da5253e4ce175dec5b68ccdf1b9b0f Mon Sep 17 00:00:00 2001 From: obscuren Date: Thu, 8 Jan 2015 16:37:06 +0100 Subject: [PATCH 109/132] Minor fixed and additions for block proc * Path check length * Genesis include TD * Output TD on last block --- core/chain_manager.go | 4 ++-- core/genesis.go | 1 + ethutil/path.go | 2 +- ethutil/rlp.go | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/core/chain_manager.go b/core/chain_manager.go index 2d4001f0f9..5ff3b88c90 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -139,7 +139,7 @@ func (bc *ChainManager) setLastBlock() { bc.Reset() } - chainlogger.Infof("Last block (#%d) %x\n", bc.lastBlockNumber, bc.currentBlock.Hash()) + chainlogger.Infof("Last block (#%d) %x TD=%v\n", bc.lastBlockNumber, bc.currentBlock.Hash(), bc.td) } // Block creation & chain handling @@ -215,7 +215,7 @@ func (bc *ChainManager) insert(block *types.Block) { func (bc *ChainManager) write(block *types.Block) { bc.writeBlockInfo(block) - encodedBlock := ethutil.Encode(block) + encodedBlock := ethutil.Encode(block.RlpDataForStorage()) bc.db.Put(block.Hash(), encodedBlock) } diff --git a/core/genesis.go b/core/genesis.go index 1590818a8f..d9edaace23 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -25,6 +25,7 @@ func GenesisBlock(db ethutil.Database) *types.Block { genesis.Header().GasLimit = big.NewInt(1000000) genesis.Header().GasUsed = ethutil.Big0 genesis.Header().Time = 0 + genesis.Td = ethutil.Big0 genesis.SetUncles([]*types.Header{}) genesis.SetTransactions(types.Transactions{}) diff --git a/ethutil/path.go b/ethutil/path.go index f64e3849e0..e545c87315 100644 --- a/ethutil/path.go +++ b/ethutil/path.go @@ -12,7 +12,7 @@ func ExpandHomePath(p string) (path string) { path = p // Check in case of paths like "/something/~/something/" - if path[:2] == "~/" { + if len(path) > 1 && path[:2] == "~/" { usr, _ := user.Current() dir := usr.HomeDir diff --git a/ethutil/rlp.go b/ethutil/rlp.go index 1bc1a58a71..0cb0d611ce 100644 --- a/ethutil/rlp.go +++ b/ethutil/rlp.go @@ -137,7 +137,7 @@ func Encode(object interface{}) []byte { case byte: buff.Write(Encode(big.NewInt(int64(t)))) case *big.Int: - // Not sure how this is possible while we check for + // Not sure how this is possible while we check for nil if t == nil { buff.WriteByte(0xc0) } else { From ee84b202473a5b629a3a2b43154edb989629ddfc Mon Sep 17 00:00:00 2001 From: obscuren Date: Thu, 8 Jan 2015 16:38:24 +0100 Subject: [PATCH 110/132] Reworking GUI interaction. Fixed javascript inject. Closes #132 --- cmd/mist/assets/qml/browser.qml | 12 +- cmd/mist/assets/qml/main.qml | 4 +- cmd/mist/gui.go | 242 +++++++++++++++++++------------- 3 files changed, 158 insertions(+), 100 deletions(-) diff --git a/cmd/mist/assets/qml/browser.qml b/cmd/mist/assets/qml/browser.qml index abaab4f15c..4cf6b24704 100644 --- a/cmd/mist/assets/qml/browser.qml +++ b/cmd/mist/assets/qml/browser.qml @@ -59,7 +59,7 @@ Rectangle { } Component.onCompleted: { - webview.url = "http://etherian.io" + webview.url = "/Users/jeffrey/test.html" } signal messages(var messages, int id); @@ -109,7 +109,8 @@ Rectangle { leftMargin: 5 rightMargin: 5 } - text: "http://etherian.io" + //text: "http://etherian.io" + text: webview.url; id: uriNav y: parent.height / 2 - this.height / 2 @@ -151,6 +152,10 @@ Rectangle { window.open(request.url.toString()); } + function injectJs(js) { + experimental.evaluateJavaScript(js) + } + function sendMessage(data) { webview.experimental.postMessage(JSON.stringify(data)) } @@ -159,8 +164,7 @@ Rectangle { experimental.preferences.javascriptEnabled: true experimental.preferences.navigatorQtObjectEnabled: true experimental.preferences.developerExtrasEnabled: true - //experimental.userScripts: ["../ext/qt_messaging_adapter.js", "../ext/q.js", "../ext/big.js", "../ext/string.js", "../ext/html_messaging.js"] - experimental.userScripts: ["../ext/q.js", "../ext/eth.js/main.js", "../ext/eth.js/qt.js", "../ext/setup.js"] + //experimental.userScripts: ["../ext/q.js", "../ext/eth.js/main.js", "../ext/eth.js/qt.js", "../ext/setup.js"] experimental.onMessageReceived: { console.log("[onMessageReceived]: ", message.data) // TODO move to messaging.js diff --git a/cmd/mist/assets/qml/main.qml b/cmd/mist/assets/qml/main.qml index 111bef8bb4..e287e384f2 100644 --- a/cmd/mist/assets/qml/main.qml +++ b/cmd/mist/assets/qml/main.qml @@ -59,8 +59,8 @@ ApplicationWindow { mainSplit.setView(wallet.view, wallet.menuItem); - // Call the ready handler - gui.done(); + // Command setup + gui.sendCommand(0) } function addViews(view, path, options) { diff --git a/cmd/mist/gui.go b/cmd/mist/gui.go index 2e3f329b2a..083fd5d0a3 100644 --- a/cmd/mist/gui.go +++ b/cmd/mist/gui.go @@ -26,7 +26,9 @@ import ( "bytes" "encoding/json" "fmt" + "io/ioutil" "math/big" + "os" "path" "runtime" "strconv" @@ -48,15 +50,22 @@ import ( var guilogger = logger.NewLogger("GUI") +type ServEv byte + +const ( + setup ServEv = iota + update +) + type Gui struct { // The main application window win *qml.Window // QML Engine engine *qml.Engine component *qml.Common - qmlDone bool // The ethereum interface - eth *eth.Ethereum + eth *eth.Ethereum + serviceEvents chan ServEv // The public Ethereum library uiLib *UiLib @@ -86,7 +95,17 @@ func NewWindow(ethereum *eth.Ethereum, config *ethutil.ConfigManager, clientIden } xeth := xeth.NewJSXEth(ethereum) - gui := &Gui{eth: ethereum, txDb: db, xeth: xeth, logLevel: logger.LogLevel(logLevel), Session: session, open: false, clientIdentity: clientIdentity, config: config, plugins: make(map[string]plugin)} + gui := &Gui{eth: ethereum, + txDb: db, + xeth: xeth, + logLevel: logger.LogLevel(logLevel), + Session: session, + open: false, + clientIdentity: clientIdentity, + config: config, + plugins: make(map[string]plugin), + serviceEvents: make(chan ServEv, 1), + } data, _ := ethutil.ReadAllFile(path.Join(ethutil.Config.ExecPath, "plugins.json")) json.Unmarshal([]byte(data), &gui.plugins) @@ -98,6 +117,8 @@ func (gui *Gui) Start(assetPath string) { guilogger.Infoln("Starting GUI") + go gui.service() + // Register ethereum functions qml.RegisterTypes("Ethereum", 1, 0, []qml.TypeSpec{{ Init: func(p *xeth.JSBlock, obj qml.Object) { p.Number = 0; p.Hash = "" }, @@ -154,18 +175,11 @@ func (gui *Gui) showWallet(context *qml.Context) (*qml.Window, error) { return nil, err } - gui.win = gui.createWindow(component) - - gui.update() + gui.createWindow(component) return gui.win, nil } -// The done handler will be called by QML when all views have been loaded -func (gui *Gui) Done() { - gui.qmlDone = true -} - func (gui *Gui) ImportKey(filePath string) { } @@ -179,10 +193,8 @@ func (gui *Gui) showKeyImport(context *qml.Context) (*qml.Window, error) { } func (gui *Gui) createWindow(comp qml.Object) *qml.Window { - win := comp.CreateWindow(nil) - - gui.win = win - gui.uiLib.win = win + gui.win = comp.CreateWindow(nil) + gui.uiLib.win = gui.win return gui.win } @@ -335,11 +347,48 @@ func (self *Gui) getObjectByName(objectName string) qml.Object { return self.win.Root().ObjectByName(objectName) } -// Simple go routine function that updates the list of peers in the GUI -func (gui *Gui) update() { - // We have to wait for qml to be done loading all the windows. - for !gui.qmlDone { - time.Sleep(300 * time.Millisecond) +func loadJavascriptAssets(gui *Gui) (jsfiles string) { + for _, fn := range []string{"ext/q.js", "ext/eth.js/main.js", "ext/eth.js/qt.js", "ext/setup.js"} { + f, err := os.Open(gui.uiLib.AssetPath(fn)) + if err != nil { + fmt.Println(err) + continue + } + + content, err := ioutil.ReadAll(f) + if err != nil { + fmt.Println(err) + continue + } + jsfiles += string(content) + } + + return +} + +func (gui *Gui) SendCommand(cmd ServEv) { + gui.serviceEvents <- cmd +} + +func (gui *Gui) service() { + for ev := range gui.serviceEvents { + switch ev { + case setup: + go gui.setup() + case update: + go gui.update() + } + } +} + +func (gui *Gui) setup() { + for gui.win == nil { + time.Sleep(time.Millisecond * 200) + } + + for _, plugin := range gui.plugins { + guilogger.Infoln("Loading plugin ", plugin.Name) + gui.win.Root().Call("addPlugin", plugin.Path, "") } go func() { @@ -349,14 +398,21 @@ func (gui *Gui) update() { gui.setPeerInfo() }() - gui.whisper.SetView(gui.win.Root().ObjectByName("whisperView")) + // Inject javascript files each time navigation is requested. + // Unfortunately webview.experimental.userScripts injects _after_ + // the page has loaded which kind of renders it useless... + jsfiles := loadJavascriptAssets(gui) + gui.getObjectByName("webView").On("navigationRequested", func() { + gui.getObjectByName("webView").Call("injectJs", jsfiles) + }) - for _, plugin := range gui.plugins { - guilogger.Infoln("Loading plugin ", plugin.Name) + gui.whisper.SetView(gui.getObjectByName("whisperView")) - gui.win.Root().Call("addPlugin", plugin.Path, "") - } + gui.SendCommand(update) +} +// Simple go routine function that updates the list of peers in the GUI +func (gui *Gui) update() { peerUpdateTicker := time.NewTicker(5 * time.Second) generalUpdateTicker := time.NewTicker(500 * time.Millisecond) statsUpdateTicker := time.NewTicker(5 * time.Second) @@ -375,77 +431,75 @@ func (gui *Gui) update() { core.TxPostEvent{}, ) - go func() { - defer events.Unsubscribe() - for { - select { - case ev, isopen := <-events.Chan(): - if !isopen { - return - } - switch ev := ev.(type) { - case core.NewBlockEvent: - gui.processBlock(ev.Block, false) - if bytes.Compare(ev.Block.Coinbase(), gui.address()) == 0 { - gui.setWalletValue(gui.eth.ChainManager().State().GetBalance(gui.address()), nil) - } - - case core.TxPreEvent: - tx := ev.Tx - - tstate := gui.eth.ChainManager().TransState() - cstate := gui.eth.ChainManager().State() - - taccount := tstate.GetAccount(gui.address()) - caccount := cstate.GetAccount(gui.address()) - unconfirmedFunds := new(big.Int).Sub(taccount.Balance(), caccount.Balance()) - - gui.setWalletValue(taccount.Balance(), unconfirmedFunds) - gui.insertTransaction("pre", tx) - - case core.TxPostEvent: - tx := ev.Tx - object := state.GetAccount(gui.address()) - - if bytes.Compare(tx.From(), gui.address()) == 0 { - object.SubAmount(tx.Value()) - - gui.txDb.Put(tx.Hash(), tx.RlpEncode()) - } else if bytes.Compare(tx.To(), gui.address()) == 0 { - object.AddAmount(tx.Value()) - - gui.txDb.Put(tx.Hash(), tx.RlpEncode()) - } - - gui.setWalletValue(object.Balance(), nil) - state.UpdateStateObject(object) - } - - case <-peerUpdateTicker.C: - gui.setPeerInfo() - case <-generalUpdateTicker.C: - statusText := "#" + gui.eth.ChainManager().CurrentBlock().Number().String() - lastBlockLabel.Set("text", statusText) - miningLabel.Set("text", "Mining @ "+strconv.FormatInt(gui.uiLib.miner.GetPow().GetHashrate(), 10)+"Khash") - - /* - blockLength := gui.eth.BlockPool().BlocksProcessed - chainLength := gui.eth.BlockPool().ChainLength - - var ( - pct float64 = 1.0 / float64(chainLength) * float64(blockLength) - dlWidget = gui.win.Root().ObjectByName("downloadIndicator") - dlLabel = gui.win.Root().ObjectByName("downloadLabel") - ) - dlWidget.Set("value", pct) - dlLabel.Set("text", fmt.Sprintf("%d / %d", blockLength, chainLength)) - */ - - case <-statsUpdateTicker.C: - gui.setStatsPane() + defer events.Unsubscribe() + for { + select { + case ev, isopen := <-events.Chan(): + if !isopen { + return } + switch ev := ev.(type) { + case core.NewBlockEvent: + gui.processBlock(ev.Block, false) + if bytes.Compare(ev.Block.Coinbase(), gui.address()) == 0 { + gui.setWalletValue(gui.eth.ChainManager().State().GetBalance(gui.address()), nil) + } + + case core.TxPreEvent: + tx := ev.Tx + + tstate := gui.eth.ChainManager().TransState() + cstate := gui.eth.ChainManager().State() + + taccount := tstate.GetAccount(gui.address()) + caccount := cstate.GetAccount(gui.address()) + unconfirmedFunds := new(big.Int).Sub(taccount.Balance(), caccount.Balance()) + + gui.setWalletValue(taccount.Balance(), unconfirmedFunds) + gui.insertTransaction("pre", tx) + + case core.TxPostEvent: + tx := ev.Tx + object := state.GetAccount(gui.address()) + + if bytes.Compare(tx.From(), gui.address()) == 0 { + object.SubAmount(tx.Value()) + + gui.txDb.Put(tx.Hash(), tx.RlpEncode()) + } else if bytes.Compare(tx.To(), gui.address()) == 0 { + object.AddAmount(tx.Value()) + + gui.txDb.Put(tx.Hash(), tx.RlpEncode()) + } + + gui.setWalletValue(object.Balance(), nil) + state.UpdateStateObject(object) + } + + case <-peerUpdateTicker.C: + gui.setPeerInfo() + case <-generalUpdateTicker.C: + statusText := "#" + gui.eth.ChainManager().CurrentBlock().Number().String() + lastBlockLabel.Set("text", statusText) + miningLabel.Set("text", "Mining @ "+strconv.FormatInt(gui.uiLib.miner.GetPow().GetHashrate(), 10)+"Khash") + + /* + blockLength := gui.eth.BlockPool().BlocksProcessed + chainLength := gui.eth.BlockPool().ChainLength + + var ( + pct float64 = 1.0 / float64(chainLength) * float64(blockLength) + dlWidget = gui.win.Root().ObjectByName("downloadIndicator") + dlLabel = gui.win.Root().ObjectByName("downloadLabel") + ) + dlWidget.Set("value", pct) + dlLabel.Set("text", fmt.Sprintf("%d / %d", blockLength, chainLength)) + */ + + case <-statsUpdateTicker.C: + gui.setStatsPane() } - }() + } } func (gui *Gui) setStatsPane() { From e27237a03a3f0ab8dce37705701ed73de252e1f4 Mon Sep 17 00:00:00 2001 From: obscuren Date: Thu, 8 Jan 2015 16:45:51 +0100 Subject: [PATCH 111/132] Changed to use hash for comparison DeepReflect would fail on TD since TD isn't included in the original block and thus the test would fail. --- core/chain_manager_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/chain_manager_test.go b/core/chain_manager_test.go index b384c49264..5bbc2db70b 100644 --- a/core/chain_manager_test.go +++ b/core/chain_manager_test.go @@ -1,6 +1,7 @@ package core import ( + "bytes" "fmt" "os" "path" @@ -76,11 +77,11 @@ func TestChainInsertions(t *testing.T) { <-done } - if reflect.DeepEqual(chain2[len(chain2)-1], chainMan.CurrentBlock()) { + if bytes.Equal(chain2[len(chain2)-1].Hash(), chainMan.CurrentBlock().Hash()) { t.Error("chain2 is canonical and shouldn't be") } - if !reflect.DeepEqual(chain1[len(chain1)-1], chainMan.CurrentBlock()) { + if !bytes.Equal(chain1[len(chain1)-1].Hash(), chainMan.CurrentBlock().Hash()) { t.Error("chain1 isn't canonical and should be") } } From 5f958a582d1326ada1cb34b4c6578590a7c40e6c Mon Sep 17 00:00:00 2001 From: obscuren Date: Thu, 8 Jan 2015 16:48:39 +0100 Subject: [PATCH 112/132] fixed other tests to use hashes as well --- core/chain_manager_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/chain_manager_test.go b/core/chain_manager_test.go index 5bbc2db70b..725352dafa 100644 --- a/core/chain_manager_test.go +++ b/core/chain_manager_test.go @@ -5,7 +5,6 @@ import ( "fmt" "os" "path" - "reflect" "runtime" "strconv" "testing" @@ -125,7 +124,7 @@ func TestChainMultipleInsertions(t *testing.T) { <-done } - if !reflect.DeepEqual(chains[longest][len(chains[longest])-1], chainMan.CurrentBlock()) { + if !bytes.Equal(chains[longest][len(chains[longest])-1].Hash(), chainMan.CurrentBlock().Hash()) { t.Error("Invalid canonical chain") } } From 4a0ade4788b0e8d53c6b0eabaf9652643b6a073a Mon Sep 17 00:00:00 2001 From: obscuren Date: Thu, 8 Jan 2015 21:41:32 +0100 Subject: [PATCH 113/132] Fixed some whisper issues --- cmd/mist/assets/ext/eth.js/main.js | 1 + cmd/mist/assets/qml/browser.qml | 42 +++++++++++++++++------------- ui/qt/qwhisper/whisper.go | 10 ++++--- whisper/message.go | 2 ++ whisper/peer.go | 2 +- whisper/whisper.go | 2 +- 6 files changed, 36 insertions(+), 23 deletions(-) diff --git a/cmd/mist/assets/ext/eth.js/main.js b/cmd/mist/assets/ext/eth.js/main.js index 5c7ca06034..71e304a550 100644 --- a/cmd/mist/assets/ext/eth.js/main.js +++ b/cmd/mist/assets/ext/eth.js/main.js @@ -352,6 +352,7 @@ web3.provider = new ProviderManager(); web3.setProvider = function(provider) { + console.log("setprovider", provider) provider.onmessage = messageHandler; web3.provider.set(provider); web3.provider.sendQueued(); diff --git a/cmd/mist/assets/qml/browser.qml b/cmd/mist/assets/qml/browser.qml index 4cf6b24704..c2f8741bc3 100644 --- a/cmd/mist/assets/qml/browser.qml +++ b/cmd/mist/assets/qml/browser.qml @@ -59,7 +59,7 @@ Rectangle { } Component.onCompleted: { - webview.url = "/Users/jeffrey/test.html" + webview.url = "http://etherian.io" } signal messages(var messages, int id); @@ -153,7 +153,9 @@ Rectangle { } function injectJs(js) { - experimental.evaluateJavaScript(js) + //webview.experimental.navigatorQtObjectEnabled = true; + //webview.experimental.evaluateJavaScript(js) + //webview.experimental.javascriptEnabled = true; } function sendMessage(data) { @@ -164,7 +166,7 @@ Rectangle { experimental.preferences.javascriptEnabled: true experimental.preferences.navigatorQtObjectEnabled: true experimental.preferences.developerExtrasEnabled: true - //experimental.userScripts: ["../ext/q.js", "../ext/eth.js/main.js", "../ext/eth.js/qt.js", "../ext/setup.js"] + experimental.userScripts: ["../ext/q.js", "../ext/eth.js/main.js", "../ext/eth.js/qt.js", "../ext/setup.js"] experimental.onMessageReceived: { console.log("[onMessageReceived]: ", message.data) // TODO move to messaging.js @@ -344,24 +346,28 @@ Rectangle { break; case "newIdentity": - postData(data._id, shh.newIdentity()) - break + var id = shh.newIdentity() + console.log("newIdentity", id) + postData(data._id, id) + + break case "post": - require(1); - var params = data.args[0]; - var fields = ["payload", "to", "from"]; - for(var i = 0; i < fields.length; i++) { - params[fields[i]] = params[fields[i]] || ""; - } - if(typeof params.payload !== "object") { params.payload = [params.payload]; } //params.payload = params.payload.join(""); } - params.topics = params.topics || []; - params.priority = params.priority || 1000; - params.ttl = params.ttl || 100; + require(1); - console.log(JSON.stringify(params)) - shh.post(params.payload, params.to, params.from, params.topics, params.priority, params.ttl); - break; + var params = data.args[0]; + var fields = ["payload", "to", "from"]; + for(var i = 0; i < fields.length; i++) { + params[fields[i]] = params[fields[i]] || ""; + } + if(typeof params.payload !== "object") { params.payload = [params.payload]; } //params.payload = params.payload.join(""); } + params.topics = params.topics || []; + params.priority = params.priority || 1000; + params.ttl = params.ttl || 100; + + shh.post(params.payload, params.to, params.from, params.topics, params.priority, params.ttl); + + break; } } catch(e) { console.log(data.call + ": " + e) diff --git a/ui/qt/qwhisper/whisper.go b/ui/qt/qwhisper/whisper.go index 0627acd298..8a064c81cd 100644 --- a/ui/qt/qwhisper/whisper.go +++ b/ui/qt/qwhisper/whisper.go @@ -6,10 +6,13 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethutil" + "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/whisper" "gopkg.in/qml.v1" ) +var qlogger = logger.NewLogger("QSHH") + func fromHex(s string) []byte { if len(s) > 1 { return ethutil.Hex2Bytes(s[2:]) @@ -36,9 +39,10 @@ func (self *Whisper) SetView(view qml.Object) { func (self *Whisper) Post(payload []string, to, from string, topics []string, priority, ttl uint32) { var data []byte for _, d := range payload { - data = append(data, fromHex(d)...) + data = append(data, ethutil.Hex2Bytes(d)...) } + fmt.Println(payload, data, "from", from, fromHex(from), crypto.ToECDSA(fromHex(from))) msg := whisper.NewMessage(data) envelope, err := msg.Seal(time.Duration(priority*100000), whisper.Opts{ Ttl: time.Duration(ttl), @@ -47,13 +51,13 @@ func (self *Whisper) Post(payload []string, to, from string, topics []string, pr Topics: whisper.TopicsFromString(topics...), }) if err != nil { - fmt.Println(err) + qlogger.Infoln(err) // handle error return } if err := self.Whisper.Send(envelope); err != nil { - fmt.Println(err) + qlogger.Infoln(err) // handle error return } diff --git a/whisper/message.go b/whisper/message.go index db0110b4a7..5bda849ec8 100644 --- a/whisper/message.go +++ b/whisper/message.go @@ -2,6 +2,7 @@ package whisper import ( "crypto/ecdsa" + "fmt" "time" "github.com/ethereum/go-ethereum/crypto" @@ -53,6 +54,7 @@ type Opts struct { } func (self *Message) Seal(pow time.Duration, opts Opts) (*Envelope, error) { + fmt.Println(opts) if opts.From != nil { err := self.sign(opts.From) if err != nil { diff --git a/whisper/peer.go b/whisper/peer.go index d42b374b53..f82cc6e3e7 100644 --- a/whisper/peer.go +++ b/whisper/peer.go @@ -55,7 +55,7 @@ out: case <-relay.C: err := self.broadcast(self.host.envelopes()) if err != nil { - self.peer.Infoln(err) + self.peer.Infoln("broadcast err:", err) break out } diff --git a/whisper/whisper.go b/whisper/whisper.go index ffcdd7d409..3ff4bac5ac 100644 --- a/whisper/whisper.go +++ b/whisper/whisper.go @@ -229,11 +229,11 @@ func (self *Whisper) envelopes() (envelopes []*Envelope) { func (self *Whisper) postEvent(envelope *Envelope) { for _, key := range self.keys { if message, err := envelope.Open(key); err == nil || (err != nil && err == ecies.ErrInvalidPublicKey) { - // Create a custom filter? self.filters.Notify(filter.Generic{ Str1: string(crypto.FromECDSA(key)), Str2: string(crypto.FromECDSAPub(message.Recover())), Data: bytesToMap(envelope.Topics), }, message) + break } else { wlogger.Infoln(err) } From 26f066f0c7570bcca43299721c2b7a1a70186ee3 Mon Sep 17 00:00:00 2001 From: obscuren Date: Thu, 8 Jan 2015 22:18:23 +0100 Subject: [PATCH 114/132] just enable by default --- eth/backend.go | 10 +++------- whisper/whisper.go | 3 +++ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/eth/backend.go b/eth/backend.go index 02d3dc942f..ad04863092 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -134,24 +134,20 @@ func New(config *Config) (*Ethereum, error) { eth.blockPool = NewBlockPool(hasBlock, insertChain, ezp.Verify) ethProto := EthProtocol(eth.txPool, eth.chainManager, eth.blockPool) - protocols := []p2p.Protocol{ethProto} - - if config.Shh { - eth.whisper = whisper.New() - protocols = append(protocols, eth.whisper.Protocol()) - } + protocols := []p2p.Protocol{ethProto, eth.whisper.Protocol()} nat, err := p2p.ParseNAT(config.NATType, config.PMPGateway) if err != nil { return nil, err } + fmt.Println(nat) eth.net = &p2p.Server{ Identity: clientId, MaxPeers: config.MaxPeers, Protocols: protocols, Blacklist: eth.blacklist, - NAT: nat, + NAT: p2p.UPNP(), NoDial: !config.Dial, } diff --git a/whisper/whisper.go b/whisper/whisper.go index 3ff4bac5ac..71a4e841ed 100644 --- a/whisper/whisper.go +++ b/whisper/whisper.go @@ -4,6 +4,7 @@ import ( "bytes" "crypto/ecdsa" "errors" + "fmt" "sync" "time" @@ -143,6 +144,7 @@ func (self *Whisper) msgHandler(peer *p2p.Peer, ws p2p.MsgReadWriter) error { if err != nil { return err } + fmt.Println("reading message") envelope, err := NewEnvelopeFromReader(msg.Payload) if err != nil { @@ -160,6 +162,7 @@ func (self *Whisper) msgHandler(peer *p2p.Peer, ws p2p.MsgReadWriter) error { // takes care of adding envelopes to the messages pool. At this moment no sanity checks are being performed. func (self *Whisper) add(envelope *Envelope) error { + fmt.Println("adding") if !envelope.valid() { return errors.New("invalid pow provided for envelope") } From c8a4c04b36d264f538f452b4540372907216b394 Mon Sep 17 00:00:00 2001 From: obscuren Date: Thu, 8 Jan 2015 23:15:46 +0100 Subject: [PATCH 115/132] err --- whisper/whisper.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/whisper/whisper.go b/whisper/whisper.go index 71a4e841ed..3ff4bac5ac 100644 --- a/whisper/whisper.go +++ b/whisper/whisper.go @@ -4,7 +4,6 @@ import ( "bytes" "crypto/ecdsa" "errors" - "fmt" "sync" "time" @@ -144,7 +143,6 @@ func (self *Whisper) msgHandler(peer *p2p.Peer, ws p2p.MsgReadWriter) error { if err != nil { return err } - fmt.Println("reading message") envelope, err := NewEnvelopeFromReader(msg.Payload) if err != nil { @@ -162,7 +160,6 @@ func (self *Whisper) msgHandler(peer *p2p.Peer, ws p2p.MsgReadWriter) error { // takes care of adding envelopes to the messages pool. At this moment no sanity checks are being performed. func (self *Whisper) add(envelope *Envelope) error { - fmt.Println("adding") if !envelope.valid() { return errors.New("invalid pow provided for envelope") } From 3bdf28c1fef6644f17bf66a9240af5168465ad5a Mon Sep 17 00:00:00 2001 From: zelig Date: Fri, 9 Jan 2015 05:03:26 +0000 Subject: [PATCH 116/132] GetBlockHashesFromHash(hash, max) gives back max hashes starting from PARENT of hash --- core/chain_manager.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/chain_manager.go b/core/chain_manager.go index 2d4001f0f9..0b57406228 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -238,13 +238,11 @@ func (self *ChainManager) GetBlockHashesFromHash(hash []byte, max uint64) (chain // XXX Could be optimised by using a different database which only holds hashes (i.e., linked list) for i := uint64(0); i < max; i++ { + block = self.GetBlock(block.Header().ParentHash) chain = append(chain, block.Hash()) - if block.Header().Number.Cmp(ethutil.Big0) <= 0 { break } - - block = self.GetBlock(block.Header().ParentHash) } return From 69dfca2feb5c94f7a28a0b24c28181b6da4b9da3 Mon Sep 17 00:00:00 2001 From: zelig Date: Fri, 9 Jan 2015 05:04:32 +0000 Subject: [PATCH 117/132] minor changes in integration tests --- eth/test/tests/02.sh | 6 +++--- eth/test/tests/03.sh | 4 ++-- eth/test/tests/common.sh | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/eth/test/tests/02.sh b/eth/test/tests/02.sh index 5231dbd788..619217ed87 100644 --- a/eth/test/tests/02.sh +++ b/eth/test/tests/02.sh @@ -12,8 +12,8 @@ EOF peer 11 01 peer 12 02 -P13ID=$PID +P12ID=$PID test_node $NAME "" -loglevel 5 $JSFILE -sleep 0.5 -kill $P13ID +sleep 0.3 +kill $P12ID diff --git a/eth/test/tests/03.sh b/eth/test/tests/03.sh index 8c9d6565ef..d7dba737f0 100644 --- a/eth/test/tests/03.sh +++ b/eth/test/tests/03.sh @@ -1,10 +1,10 @@ #!/bin/bash -TIMEOUT=35 +TIMEOUT=12 cat >> $JSFILE < Date: Fri, 9 Jan 2015 05:06:04 +0000 Subject: [PATCH 118/132] no need to call AddBlockHashes when receiving new block --- eth/protocol.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/eth/protocol.go b/eth/protocol.go index 736bcd94bb..c9a5dea8df 100644 --- a/eth/protocol.go +++ b/eth/protocol.go @@ -211,16 +211,6 @@ func (self *ethProtocol) handle() error { // uses AddPeer followed by AddHashes, AddBlock only if peer is the best peer // (or selected as new best peer) if self.blockPool.AddPeer(request.TD, hash, self.id, self.requestBlockHashes, self.requestBlocks, self.protoErrorDisconnect) { - called := true - iter := func() ([]byte, bool) { - if called { - called = false - return hash, true - } else { - return nil, false - } - } - self.blockPool.AddBlockHashes(iter, self.id) self.blockPool.AddBlock(request.Block, self.id) } From f72cb28b0f688d99d7936900474e7d10d06ffb3a Mon Sep 17 00:00:00 2001 From: zelig Date: Fri, 9 Jan 2015 05:57:09 +0000 Subject: [PATCH 119/132] adapt unit tests to spec - AddBlockHashes ignores the first hash (just used to match getBlockHashes query) sends the rest as blocksMsg - new test TestPeerWithKnownParentBlock - new test TestChainConnectingWithParentHash - adapt all other tests to the new scheme --- eth/block_pool_test.go | 192 +++++++++++++++++++++++++++++------------ 1 file changed, 139 insertions(+), 53 deletions(-) diff --git a/eth/block_pool_test.go b/eth/block_pool_test.go index b50a314ead..94c3b43d29 100644 --- a/eth/block_pool_test.go +++ b/eth/block_pool_test.go @@ -18,7 +18,7 @@ import ( const waitTimeout = 60 // seconds -var logsys = ethlogger.NewStdLogSystem(os.Stdout, log.LstdFlags, ethlogger.LogLevel(ethlogger.DebugLevel)) +var logsys = ethlogger.NewStdLogSystem(os.Stdout, log.LstdFlags, ethlogger.LogLevel(ethlogger.DebugDetailLevel)) var ini = false @@ -336,12 +336,12 @@ func (self *peerTester) AddPeer() bool { // peer sends blockhashes if and when gets a request func (self *peerTester) AddBlockHashes(indexes ...int) { - i := 0 fmt.Printf("ready to add block hashes %v\n", indexes) self.waitBlockHashesRequests(indexes[0]) fmt.Printf("adding block hashes %v\n", indexes) hashes := self.hashPool.indexesToHashes(indexes) + i := 1 next := func() (hash []byte, ok bool) { if i < len(hashes) { hash = hashes[i] @@ -415,7 +415,7 @@ func TestAddPeer(t *testing.T) { if blockPool.peer.id != "peer0" { t.Errorf("peer0 (TD=1) not set as best") } - peer0.checkBlockHashesRequests(0) + // peer0.checkBlockHashesRequests(0) best = peer2.AddPeer() if !best { @@ -424,7 +424,7 @@ func TestAddPeer(t *testing.T) { if blockPool.peer.id != "peer2" { t.Errorf("peer2 (TD=3) not set as best") } - peer2.checkBlockHashesRequests(2) + peer2.waitBlocksRequests(2) best = peer1.AddPeer() if best { @@ -449,7 +449,7 @@ func TestAddPeer(t *testing.T) { if blockPool.peer.td.Cmp(big.NewInt(int64(4))) != 0 { t.Errorf("peer2 TD not updated") } - peer2.checkBlockHashesRequests(2, 3) + peer2.waitBlocksRequests(3) peer1.td = 3 peer1.currentBlock = 2 @@ -474,7 +474,7 @@ func TestAddPeer(t *testing.T) { if blockPool.peer.id != "peer1" { t.Errorf("existing peer1 (TD=3) should be set as best peer") } - peer1.checkBlockHashesRequests(2) + peer1.waitBlocksRequests(2) blockPool.RemovePeer("peer1") peer, best = blockPool.getPeer("peer1") @@ -485,6 +485,7 @@ func TestAddPeer(t *testing.T) { if blockPool.peer.id != "peer0" { t.Errorf("existing peer0 (TD=1) should be set as best peer") } + peer0.waitBlocksRequests(0) blockPool.RemovePeer("peer0") peer, best = blockPool.getPeer("peer0") @@ -502,7 +503,7 @@ func TestAddPeer(t *testing.T) { if blockPool.peer.id != "peer0" { t.Errorf("peer0 (TD=1) should be set as best") } - peer0.checkBlockHashesRequests(0, 0, 3) + peer0.waitBlocksRequests(3) blockPool.Stop() @@ -513,17 +514,36 @@ func TestPeerWithKnownBlock(t *testing.T) { _, blockPool, blockPoolTester := newTestBlockPool(t) blockPoolTester.refBlockChain[0] = nil blockPoolTester.blockChain[0] = nil - // hashPool, blockPool, blockPoolTester := newTestBlockPool() blockPool.Start() peer0 := blockPoolTester.newPeer("0", 1, 0) peer0.AddPeer() + blockPool.Wait(waitTimeout * time.Second) blockPool.Stop() // no request on known block peer0.checkBlockHashesRequests() } +func TestPeerWithKnownParentBlock(t *testing.T) { + logInit() + _, blockPool, blockPoolTester := newTestBlockPool(t) + blockPoolTester.initRefBlockChain(1) + blockPoolTester.blockChain[0] = nil + blockPool.Start() + + peer0 := blockPoolTester.newPeer("0", 1, 1) + peer0.AddPeer() + peer0.AddBlocks(0, 1) + + blockPool.Wait(waitTimeout * time.Second) + blockPool.Stop() + peer0.checkBlocksRequests([]int{1}) + peer0.checkBlockHashesRequests() + blockPoolTester.refBlockChain[1] = []int{} + blockPoolTester.checkBlockChain(blockPoolTester.refBlockChain) +} + func TestSimpleChain(t *testing.T) { logInit() _, blockPool, blockPoolTester := newTestBlockPool(t) @@ -534,8 +554,9 @@ func TestSimpleChain(t *testing.T) { peer1 := blockPoolTester.newPeer("peer1", 1, 2) peer1.AddPeer() + peer1.AddBlocks(1, 2) go peer1.AddBlockHashes(2, 1, 0) - peer1.AddBlocks(0, 1, 2) + peer1.AddBlocks(0, 1) blockPool.Wait(waitTimeout * time.Second) blockPool.Stop() @@ -543,6 +564,26 @@ func TestSimpleChain(t *testing.T) { blockPoolTester.checkBlockChain(blockPoolTester.refBlockChain) } +func TestChainConnectingWithParentHash(t *testing.T) { + logInit() + _, blockPool, blockPoolTester := newTestBlockPool(t) + blockPoolTester.blockChain[0] = nil + blockPoolTester.initRefBlockChain(3) + + blockPool.Start() + + peer1 := blockPoolTester.newPeer("peer1", 1, 3) + peer1.AddPeer() + go peer1.AddBlocks(2, 3) + go peer1.AddBlockHashes(3, 2, 1) + peer1.AddBlocks(0, 1, 2) + + blockPool.Wait(waitTimeout * time.Second) + blockPool.Stop() + blockPoolTester.refBlockChain[3] = []int{} + blockPoolTester.checkBlockChain(blockPoolTester.refBlockChain) +} + func TestInvalidBlock(t *testing.T) { logInit() _, blockPool, blockPoolTester := newTestBlockPool(t) @@ -554,8 +595,9 @@ func TestInvalidBlock(t *testing.T) { peer1 := blockPoolTester.newPeer("peer1", 1, 3) peer1.AddPeer() + go peer1.AddBlocks(2, 3) go peer1.AddBlockHashes(3, 2, 1, 0) - peer1.AddBlocks(0, 1, 2, 3) + peer1.AddBlocks(0, 1, 2) blockPool.Wait(waitTimeout * time.Second) blockPool.Stop() @@ -566,7 +608,7 @@ func TestInvalidBlock(t *testing.T) { t.Errorf("wrong error, got %v, expected %v", peer1.peerErrors[0], ErrInvalidBlock) } } else { - t.Errorf("expected invalid block error, got nothing") + t.Errorf("expected invalid block error, got nothing %v", peer1.peerErrors) } } @@ -579,7 +621,7 @@ func TestVerifyPoW(t *testing.T) { blockPoolTester.blockPool.verifyPoW = func(b pow.Block) bool { bb, _ := b.(*types.Block) indexes := blockPoolTester.hashPool.hashesToIndexes([][]byte{bb.Hash()}) - if indexes[0] == 1 && !first { + if indexes[0] == 2 && !first { first = true return false } else { @@ -590,15 +632,17 @@ func TestVerifyPoW(t *testing.T) { blockPool.Start() - peer1 := blockPoolTester.newPeer("peer1", 1, 2) + peer1 := blockPoolTester.newPeer("peer1", 1, 3) peer1.AddPeer() - go peer1.AddBlockHashes(2, 1, 0) + go peer1.AddBlocks(2, 3) + go peer1.AddBlockHashes(3, 2, 1, 0) peer1.AddBlocks(0, 1, 2) - peer1.AddBlocks(0, 1) - blockPool.Wait(waitTimeout * time.Second) + // blockPool.Wait(waitTimeout * time.Second) + time.Sleep(1 * time.Second) blockPool.Stop() - blockPoolTester.refBlockChain[2] = []int{} + blockPoolTester.refBlockChain[1] = []int{} + delete(blockPoolTester.refBlockChain, 2) blockPoolTester.checkBlockChain(blockPoolTester.refBlockChain) if len(peer1.peerErrors) == 1 { if peer1.peerErrors[0] != ErrInvalidPoW { @@ -620,8 +664,9 @@ func TestMultiSectionChain(t *testing.T) { peer1 := blockPoolTester.newPeer("peer1", 1, 5) peer1.AddPeer() + go peer1.AddBlocks(4, 5) go peer1.AddBlockHashes(5, 4, 3) - go peer1.AddBlocks(2, 3, 4, 5) + go peer1.AddBlocks(2, 3, 4) go peer1.AddBlockHashes(3, 2, 1, 0) peer1.AddBlocks(0, 1, 2) @@ -641,14 +686,17 @@ func TestNewBlocksOnPartialChain(t *testing.T) { peer1 := blockPoolTester.newPeer("peer1", 1, 5) peer1.AddPeer() + go peer1.AddBlocks(4, 5) // partially complete section go peer1.AddBlockHashes(5, 4, 3) - peer1.AddBlocks(2, 3) // partially complete section + peer1.AddBlocks(3, 4) // partially complete section // peer1 found new blocks peer1.td = 2 peer1.currentBlock = 7 peer1.AddPeer() + go peer1.AddBlocks(6, 7) go peer1.AddBlockHashes(7, 6, 5) - go peer1.AddBlocks(3, 4, 5, 6, 7) + go peer1.AddBlocks(2, 3) + go peer1.AddBlocks(5, 6) go peer1.AddBlockHashes(3, 2, 1, 0) // tests that hash request from known chain root is remembered peer1.AddBlocks(0, 1, 2) @@ -658,35 +706,37 @@ func TestNewBlocksOnPartialChain(t *testing.T) { blockPoolTester.checkBlockChain(blockPoolTester.refBlockChain) } -func TestPeerSwitch(t *testing.T) { +func TestPeerSwitchUp(t *testing.T) { logInit() _, blockPool, blockPoolTester := newTestBlockPool(t) blockPoolTester.blockChain[0] = nil - blockPoolTester.initRefBlockChain(6) + blockPoolTester.initRefBlockChain(7) blockPool.Start() - peer1 := blockPoolTester.newPeer("peer1", 1, 5) - peer2 := blockPoolTester.newPeer("peer2", 2, 6) + peer1 := blockPoolTester.newPeer("peer1", 1, 6) + peer2 := blockPoolTester.newPeer("peer2", 2, 7) peer2.blocksRequestsMap = peer1.blocksRequestsMap peer1.AddPeer() - go peer1.AddBlockHashes(5, 4, 3) + go peer1.AddBlocks(5, 6) + go peer1.AddBlockHashes(6, 5, 4, 3) // peer1.AddBlocks(2, 3) // section partially complete, block 3 will be preserved after peer demoted peer2.AddPeer() // peer2 is promoted as best peer, peer1 is demoted - go peer2.AddBlockHashes(6, 5) // - go peer2.AddBlocks(4, 5, 6) // tests that block request for earlier section is remembered + go peer2.AddBlocks(6, 7) + go peer2.AddBlockHashes(7, 6) // + go peer2.AddBlocks(4, 5) // tests that block request for earlier section is remembered go peer1.AddBlocks(3, 4) // tests that connecting section by demoted peer is remembered and blocks are accepted from demoted peer go peer2.AddBlockHashes(3, 2, 1, 0) // tests that known chain section is activated, hash requests from 3 is remembered peer2.AddBlocks(0, 1, 2) // final blocks linking to blockchain sent blockPool.Wait(waitTimeout * time.Second) blockPool.Stop() - blockPoolTester.refBlockChain[6] = []int{} + blockPoolTester.refBlockChain[7] = []int{} blockPoolTester.checkBlockChain(blockPoolTester.refBlockChain) } -func TestPeerDownSwitch(t *testing.T) { +func TestPeerSwitchDown(t *testing.T) { logInit() _, blockPool, blockPoolTester := newTestBlockPool(t) blockPoolTester.blockChain[0] = nil @@ -698,12 +748,39 @@ func TestPeerDownSwitch(t *testing.T) { peer2.blocksRequestsMap = peer1.blocksRequestsMap peer2.AddPeer() - go peer2.AddBlockHashes(6, 5, 4) peer2.AddBlocks(5, 6) // partially complete, section will be preserved + go peer2.AddBlockHashes(6, 5, 4) // + peer2.AddBlocks(4, 5) // blockPool.RemovePeer("peer2") // peer2 disconnects peer1.AddPeer() // inferior peer1 is promoted as best peer go peer1.AddBlockHashes(4, 3, 2, 1, 0) // - go peer1.AddBlocks(3, 4, 5) // tests that section set by demoted peer is remembered and blocks are accepted + go peer1.AddBlocks(3, 4) // tests that section set by demoted peer is remembered and blocks are accepted , this connects the chain sections together + peer1.AddBlocks(0, 1, 2, 3) + + blockPool.Wait(waitTimeout * time.Second) + blockPool.Stop() + blockPoolTester.refBlockChain[6] = []int{} + blockPoolTester.checkBlockChain(blockPoolTester.refBlockChain) +} + +func TestPeerCompleteSectionSwitchDown(t *testing.T) { + logInit() + _, blockPool, blockPoolTester := newTestBlockPool(t) + blockPoolTester.blockChain[0] = nil + blockPoolTester.initRefBlockChain(6) + blockPool.Start() + + peer1 := blockPoolTester.newPeer("peer1", 1, 4) + peer2 := blockPoolTester.newPeer("peer2", 2, 6) + peer2.blocksRequestsMap = peer1.blocksRequestsMap + + peer2.AddPeer() + peer2.AddBlocks(5, 6) // partially complete, section will be preserved + go peer2.AddBlockHashes(6, 5, 4) // + peer2.AddBlocks(3, 4, 5) // complete section + blockPool.RemovePeer("peer2") // peer2 disconnects + peer1.AddPeer() // inferior peer1 is promoted as best peer + peer1.AddBlockHashes(4, 3, 2, 1, 0) // tests that hash request are directly connecting if the head block exists peer1.AddBlocks(0, 1, 2, 3) blockPool.Wait(waitTimeout * time.Second) @@ -725,11 +802,13 @@ func TestPeerSwitchBack(t *testing.T) { peer2.blocksRequestsMap = peer1.blocksRequestsMap peer2.AddPeer() + go peer2.AddBlocks(7, 8) go peer2.AddBlockHashes(8, 7, 6) go peer2.AddBlockHashes(6, 5, 4) peer2.AddBlocks(4, 5) // section partially complete peer1.AddPeer() // peer1 is promoted as best peer - go peer1.AddBlockHashes(11, 10) // only gives useless results + go peer1.AddBlocks(10, 11) // + peer1.AddBlockHashes(11, 10) // only gives useless results blockPool.RemovePeer("peer1") // peer1 disconnects go peer2.AddBlockHashes(4, 3, 2, 1, 0) // tests that asking for hashes from 4 is remembered go peer2.AddBlocks(3, 4, 5, 6, 7, 8) // tests that section 4, 5, 6 and 7, 8 are remembered for missing blocks @@ -756,11 +835,13 @@ func TestForkSimple(t *testing.T) { peer2.blocksRequestsMap = peer1.blocksRequestsMap peer1.AddPeer() + go peer1.AddBlocks(8, 9) go peer1.AddBlockHashes(9, 8, 7, 3, 2) - peer1.AddBlocks(1, 2, 3, 7, 8, 9) + peer1.AddBlocks(1, 2, 3, 7, 8) peer2.AddPeer() // peer2 is promoted as best peer + go peer2.AddBlocks(5, 6) // go peer2.AddBlockHashes(6, 5, 4, 3, 2) // fork on 3 -> 4 (earlier child: 7) - go peer2.AddBlocks(1, 2, 3, 4, 5, 6) + go peer2.AddBlocks(1, 2, 3, 4, 5) go peer2.AddBlockHashes(2, 1, 0) peer2.AddBlocks(0, 1, 2) @@ -790,23 +871,24 @@ func TestForkSwitchBackByNewBlocks(t *testing.T) { peer2.blocksRequestsMap = peer1.blocksRequestsMap peer1.AddPeer() - go peer1.AddBlockHashes(9, 8, 7, 3, 2) - peer1.AddBlocks(8, 9) // partial section + peer1.AddBlocks(8, 9) // + go peer1.AddBlockHashes(9, 8, 7, 3, 2) // + peer1.AddBlocks(7, 8) // partial section peer2.AddPeer() // + peer2.AddBlocks(5, 6) // go peer2.AddBlockHashes(6, 5, 4, 3, 2) // peer2 forks on block 3 - peer2.AddBlocks(1, 2, 3, 4, 5, 6) // + peer2.AddBlocks(1, 2, 3, 4, 5) // // peer1 finds new blocks peer1.td = 3 peer1.currentBlock = 11 peer1.AddPeer() + go peer1.AddBlocks(10, 11) go peer1.AddBlockHashes(11, 10, 9) - peer1.AddBlocks(7, 8, 9, 10, 11) - go peer1.AddBlockHashes(7, 3) // tests that hash request from fork root is remembered - go peer1.AddBlocks(3, 7) // tests that block requests on earlier fork are remembered - // go peer1.AddBlockHashes(1, 0) // tests that hash request from root of connecting chain section (added by demoted peer) is remembered + peer1.AddBlocks(9, 10) + go peer1.AddBlocks(3, 7) // tests that block requests on earlier fork are remembered go peer1.AddBlockHashes(2, 1, 0) // tests that hash request from root of connecting chain section (added by demoted peer) is remembered - peer1.AddBlocks(0, 1, 2, 3) + peer1.AddBlocks(0, 1) blockPool.Wait(waitTimeout * time.Second) blockPool.Stop() @@ -834,16 +916,18 @@ func TestForkSwitchBackByPeerSwitchBack(t *testing.T) { peer2.blocksRequestsMap = peer1.blocksRequestsMap peer1.AddPeer() + go peer1.AddBlocks(8, 9) go peer1.AddBlockHashes(9, 8, 7, 3, 2) - peer1.AddBlocks(8, 9) - peer2.AddPeer() // + peer1.AddBlocks(7, 8) + peer2.AddPeer() + go peer2.AddBlocks(5, 6) // go peer2.AddBlockHashes(6, 5, 4, 3, 2) // peer2 forks on block 3 - peer2.AddBlocks(2, 3, 4, 5, 6) // + peer2.AddBlocks(2, 3, 4, 5) // blockPool.RemovePeer("peer2") // peer2 disconnects, peer1 is promoted again as best peer - peer1.AddBlockHashes(7, 3) // tests that hash request from fork root is remembered - go peer1.AddBlocks(3, 7, 8) // tests that block requests on earlier fork are remembered + go peer1.AddBlocks(3, 7) // tests that block requests on earlier fork are remembered and orphan section relinks to existing parent block + go peer1.AddBlocks(1, 2) // go peer1.AddBlockHashes(2, 1, 0) // - peer1.AddBlocks(0, 1, 2, 3) + peer1.AddBlocks(0, 1) blockPool.Wait(waitTimeout * time.Second) blockPool.Stop() @@ -871,17 +955,19 @@ func TestForkCompleteSectionSwitchBackByPeerSwitchBack(t *testing.T) { peer2.blocksRequestsMap = peer1.blocksRequestsMap peer1.AddPeer() + go peer1.AddBlocks(8, 9) go peer1.AddBlockHashes(9, 8, 7) - peer1.AddBlocks(3, 7, 8, 9) // make sure this section is complete + peer1.AddBlocks(3, 7, 8) // make sure this section is complete time.Sleep(1 * time.Second) go peer1.AddBlockHashes(7, 3, 2) // block 3/7 is section boundary - peer1.AddBlocks(2, 3) // partially complete sections + peer1.AddBlocks(2, 3) // partially complete sections block 2 missing peer2.AddPeer() // + go peer2.AddBlocks(5, 6) // go peer2.AddBlockHashes(6, 5, 4, 3, 2) // peer2 forks on block 3 - peer2.AddBlocks(2, 3, 4, 5, 6) // block 2 still missing. + peer2.AddBlocks(2, 3, 4, 5) // block 2 still missing. blockPool.RemovePeer("peer2") // peer2 disconnects, peer1 is promoted again as best peer - peer1.AddBlockHashes(7, 3) // tests that hash request from fork root is remembered even though section process completed - go peer1.AddBlockHashes(2, 1, 0) // + // peer1.AddBlockHashes(7, 3) // tests that hash request from fork root is remembered even though section process completed + go peer1.AddBlockHashes(2, 1, 0) // peer1.AddBlocks(0, 1, 2) blockPool.Wait(waitTimeout * time.Second) From 8ecc9509b3ac490fe8ac9d91e24e8271963ee443 Mon Sep 17 00:00:00 2001 From: zelig Date: Fri, 9 Jan 2015 06:03:32 +0000 Subject: [PATCH 120/132] add ErrInsufficientChainInfo error --- eth/error.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eth/error.go b/eth/error.go index 1d9f806380..9c4a684818 100644 --- a/eth/error.go +++ b/eth/error.go @@ -16,6 +16,7 @@ const ( ErrInvalidBlock ErrInvalidPoW ErrUnrequestedBlock + ErrInsufficientChainInfo ) var errorToString = map[int]string{ @@ -30,6 +31,7 @@ var errorToString = map[int]string{ ErrInvalidBlock: "Invalid block", ErrInvalidPoW: "Invalid PoW", ErrUnrequestedBlock: "Unrequested block", + ErrInsufficientChainInfo: "Insufficient chain info", } type protocolError struct { From 5a9952c7b47f20451feea1158286450e08b85551 Mon Sep 17 00:00:00 2001 From: zelig Date: Fri, 9 Jan 2015 06:03:45 +0000 Subject: [PATCH 121/132] major blockpool change - the spec says response to getBlockHashes(from, max) should return all hashes starting from PARENT of from. This required major changes and results in much hackier code. - Introduced a first round block request after peer introduces with current head, so that hashes can be linked to the head - peerInfo records currentBlockHash, currentBlock, parentHash and headSection - AddBlockHashes checks header section and creates the top node from the peerInfo of the best peer - AddBlock checks peerInfo and updates the block there rather than in a node - request further hashes once a section is created but then no more until the root block is found (so that we know when to stop asking) - in processSection, when root node is checked and receives a block, we need to check if the section has a parent known to blockchain or blockPool - when peers are switched, new peer launches a new requestHeadSection loop or activates its actual head section, i.e., the section for it currentBlockHash - all tests pass --- eth/block_pool.go | 467 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 350 insertions(+), 117 deletions(-) diff --git a/eth/block_pool.go b/eth/block_pool.go index 2334330e0b..b624d064a5 100644 --- a/eth/block_pool.go +++ b/eth/block_pool.go @@ -1,6 +1,7 @@ package eth import ( + "bytes" "fmt" "math" "math/big" @@ -24,8 +25,8 @@ const ( blocksRequestRepetition = 1 blockHashesRequestInterval = 500 // ms blocksRequestMaxIdleRounds = 100 - cacheTimeout = 3 // minutes - blockTimeout = 5 // minutes + blockHashesTimeout = 60 // seconds + blocksTimeout = 120 // seconds ) type poolNode struct { @@ -70,9 +71,14 @@ type BlockPool struct { type peerInfo struct { lock sync.RWMutex - td *big.Int - currentBlock []byte - id string + td *big.Int + currentBlockHash []byte + currentBlock *types.Block + currentBlockC chan *types.Block + parentHash []byte + headSection *section + headSectionC chan *section + id string requestBlockHashes func([]byte) error requestBlocks func([][]byte) error @@ -203,30 +209,39 @@ func (self *BlockPool) Wait(t time.Duration) { // AddPeer is called by the eth protocol instance running on the peer after // the status message has been received with total difficulty and current block hash // AddPeer can only be used once, RemovePeer needs to be called when the peer disconnects -func (self *BlockPool) AddPeer(td *big.Int, currentBlock []byte, peerId string, requestBlockHashes func([]byte) error, requestBlocks func([][]byte) error, peerError func(int, string, ...interface{})) bool { +func (self *BlockPool) AddPeer(td *big.Int, currentBlockHash []byte, peerId string, requestBlockHashes func([]byte) error, requestBlocks func([][]byte) error, peerError func(int, string, ...interface{})) (best bool) { self.peersLock.Lock() defer self.peersLock.Unlock() peer, ok := self.peers[peerId] if ok { - poolLogger.Debugf("Update peer %v with td %v and current block %x", peerId, td, currentBlock[:4]) - peer.td = td - peer.currentBlock = currentBlock + if bytes.Compare(peer.currentBlockHash, currentBlockHash) != 0 { + poolLogger.Debugf("Update peer %v with td %v and current block %s", peerId, td, name(currentBlockHash)) + peer.lock.Lock() + peer.td = td + peer.currentBlockHash = currentBlockHash + peer.currentBlock = nil + peer.parentHash = nil + peer.headSection = nil + peer.lock.Unlock() + } } else { peer = &peerInfo{ td: td, - currentBlock: currentBlock, + currentBlockHash: currentBlockHash, id: peerId, //peer.Identity().Pubkey() requestBlockHashes: requestBlockHashes, requestBlocks: requestBlocks, peerError: peerError, sections: make(map[string]*section), + currentBlockC: make(chan *types.Block), + headSectionC: make(chan *section), } self.peers[peerId] = peer - poolLogger.Debugf("add new peer %v with td %v and current block %x", peerId, td, currentBlock[:4]) + poolLogger.Debugf("add new peer %v with td %v and current block %x", peerId, td, currentBlockHash[:4]) } // check peer current head - if self.hasBlock(currentBlock) { + if self.hasBlock(currentBlockHash) { // peer not ahead return false } @@ -234,22 +249,135 @@ func (self *BlockPool) AddPeer(td *big.Int, currentBlock []byte, peerId string, if self.peer == peer { // new block update // peer is already active best peer, request hashes - poolLogger.Debugf("[%s] already the best peer. request hashes from %s", peerId, name(currentBlock)) - peer.requestBlockHashes(currentBlock) - return true + poolLogger.Debugf("[%s] already the best peer. Request new head section info from %s", peerId, name(currentBlockHash)) + peer.headSectionC <- nil + best = true + } else { + currentTD := ethutil.Big0 + if self.peer != nil { + currentTD = self.peer.td + } + if td.Cmp(currentTD) > 0 { + poolLogger.Debugf("peer %v promoted best peer", peerId) + self.switchPeer(self.peer, peer) + self.peer = peer + best = true + } } + return +} - currentTD := ethutil.Big0 - if self.peer != nil { - currentTD = self.peer.td - } - if td.Cmp(currentTD) > 0 { - poolLogger.Debugf("peer %v promoted best peer", peerId) - self.switchPeer(self.peer, peer) - self.peer = peer - return true - } - return false +func (self *BlockPool) requestHeadSection(peer *peerInfo) { + self.wg.Add(1) + self.procWg.Add(1) + poolLogger.Debugf("[%s] head section at [%s] requesting info", peer.id, name(peer.currentBlockHash)) + + go func() { + var idle bool + peer.lock.RLock() + quitC := peer.quitC + currentBlockHash := peer.currentBlockHash + peer.lock.RUnlock() + blockHashesRequestTimer := time.NewTimer(0) + blocksRequestTimer := time.NewTimer(0) + suicide := time.NewTimer(blockHashesTimeout * time.Second) + blockHashesRequestTimer.Stop() + defer blockHashesRequestTimer.Stop() + defer blocksRequestTimer.Stop() + + entry := self.get(currentBlockHash) + if entry != nil { + entry.node.lock.RLock() + currentBlock := entry.node.block + entry.node.lock.RUnlock() + if currentBlock != nil { + peer.lock.Lock() + peer.currentBlock = currentBlock + peer.parentHash = currentBlock.ParentHash() + poolLogger.Debugf("[%s] head block [%s] found", peer.id, name(currentBlockHash)) + peer.lock.Unlock() + blockHashesRequestTimer.Reset(0) + blocksRequestTimer.Stop() + } + } + + LOOP: + for { + + select { + case <-self.quit: + break LOOP + + case <-quitC: + poolLogger.Debugf("[%s] head section at [%s] incomplete - quit request loop", peer.id, name(currentBlockHash)) + break LOOP + + case headSection := <-peer.headSectionC: + peer.lock.Lock() + peer.headSection = headSection + if headSection == nil { + oldBlockHash := currentBlockHash + currentBlockHash = peer.currentBlockHash + poolLogger.Debugf("[%s] head section changed [%s] -> [%s]", peer.id, name(oldBlockHash), name(currentBlockHash)) + if idle { + idle = false + suicide.Reset(blockHashesTimeout * time.Second) + self.procWg.Add(1) + } + blocksRequestTimer.Reset(blocksRequestInterval * time.Millisecond) + } else { + poolLogger.DebugDetailf("[%s] head section at [%s] created", peer.id, name(currentBlockHash)) + if !idle { + idle = true + suicide.Stop() + self.procWg.Done() + } + } + peer.lock.Unlock() + blockHashesRequestTimer.Stop() + + case <-blockHashesRequestTimer.C: + poolLogger.DebugDetailf("[%s] head section at [%s] not found, requesting block hashes", peer.id, name(currentBlockHash)) + peer.requestBlockHashes(currentBlockHash) + blockHashesRequestTimer.Reset(blockHashesRequestInterval * time.Millisecond) + + case currentBlock := <-peer.currentBlockC: + peer.lock.Lock() + peer.currentBlock = currentBlock + peer.parentHash = currentBlock.ParentHash() + poolLogger.DebugDetailf("[%s] head block [%s] found", peer.id, name(currentBlockHash)) + peer.lock.Unlock() + if self.hasBlock(currentBlock.ParentHash()) { + if err := self.insertChain(types.Blocks([]*types.Block{currentBlock})); err != nil { + peer.peerError(ErrInvalidBlock, "%v", err) + } + if !idle { + idle = true + suicide.Stop() + self.procWg.Done() + } + } else { + blockHashesRequestTimer.Reset(0) + } + blocksRequestTimer.Stop() + + case <-blocksRequestTimer.C: + peer.lock.RLock() + poolLogger.DebugDetailf("[%s] head block [%s] not found, requesting", peer.id, name(currentBlockHash)) + peer.requestBlocks([][]byte{peer.currentBlockHash}) + peer.lock.RUnlock() + blocksRequestTimer.Reset(blocksRequestInterval * time.Millisecond) + + case <-suicide.C: + peer.peerError(ErrInsufficientChainInfo, "peer failed to provide block hashes or head block for block hash %x", currentBlockHash) + break LOOP + } + } + self.wg.Done() + if !idle { + self.procWg.Done() + } + }() } // RemovePeer is called by the eth protocol when the peer disconnects @@ -274,13 +402,13 @@ func (self *BlockPool) RemovePeer(peerId string) { newPeer = info } } - self.peer = newPeer - self.switchPeer(peer, newPeer) if newPeer != nil { poolLogger.Debugf("peer %v with td %v promoted to best peer", newPeer.id, newPeer.td) } else { poolLogger.Warnln("no peers") } + self.peer = newPeer + self.switchPeer(peer, newPeer) } } @@ -299,25 +427,56 @@ func (self *BlockPool) AddBlockHashes(next func() ([]byte, bool), peerId string) return } // peer is still the best - poolLogger.Debugf("adding hashes for best peer %s", peerId) var size, n int var hash []byte - var ok bool - var section, child, parent *section + var ok, headSection bool + var sec, child, parent *section var entry *poolEntry var nodes []*poolNode + bestPeer := peer + + hash, ok = next() + peer.lock.Lock() + if bytes.Compare(peer.parentHash, hash) == 0 { + if self.hasBlock(peer.currentBlockHash) { + return + } + poolLogger.Debugf("adding hashes at chain head for best peer %s starting from [%s]", peerId, name(peer.currentBlockHash)) + headSection = true + + if entry := self.get(peer.currentBlockHash); entry == nil { + node := &poolNode{ + hash: peer.currentBlockHash, + block: peer.currentBlock, + peer: peerId, + blockBy: peerId, + } + if size == 0 { + sec = newSection() + } + nodes = append(nodes, node) + size++ + n++ + } else { + child = entry.section + } + } else { + poolLogger.Debugf("adding hashes for best peer %s starting from [%s]", peerId, name(hash)) + } + quitC := peer.quitC + peer.lock.Unlock() LOOP: // iterate using next (rlp stream lazy decoder) feeding hashesC - for hash, ok = next(); ok; hash, ok = next() { + for ; ok; hash, ok = next() { n++ select { case <-self.quit: return - case <-peer.quitC: + case <-quitC: // if the peer is demoted, no more hashes taken - peer = nil + bestPeer = nil break LOOP default: } @@ -325,8 +484,8 @@ LOOP: // check if known block connecting the downloaded chain to our blockchain poolLogger.DebugDetailf("[%s] known block", name(hash)) // mark child as absolute pool root with parent known to blockchain - if section != nil { - self.connectToBlockChain(section) + if sec != nil { + self.connectToBlockChain(sec) } else { if child != nil { self.connectToBlockChain(child) @@ -340,6 +499,7 @@ LOOP: // reached a known chain in the pool if entry.node == entry.section.bottom && n == 1 { // the first block hash received is an orphan in the pool, so rejoice and continue + poolLogger.DebugDetailf("[%s] connecting child section", sectionName(entry.section)) child = entry.section continue LOOP } @@ -353,7 +513,7 @@ LOOP: peer: peerId, } if size == 0 { - section = newSection() + sec = newSection() } nodes = append(nodes, node) size++ @@ -379,10 +539,10 @@ LOOP: } if size > 0 { - self.processSection(section, nodes) - poolLogger.DebugDetailf("[%s]->[%s](%v)->[%s] new chain section", sectionName(parent), sectionName(section), size, sectionName(child)) - self.link(parent, section) - self.link(section, child) + self.processSection(sec, nodes) + poolLogger.DebugDetailf("[%s]->[%s](%v)->[%s] new chain section", sectionName(parent), sectionName(sec), size, sectionName(child)) + self.link(parent, sec) + self.link(sec, child) } else { poolLogger.DebugDetailf("[%s]->[%s] connecting known sections", sectionName(parent), sectionName(child)) self.link(parent, child) @@ -390,15 +550,31 @@ LOOP: self.chainLock.Unlock() - if parent != nil && peer != nil { + if parent != nil && bestPeer != nil { self.activateChain(parent, peer) poolLogger.Debugf("[%s] activate parent section [%s]", name(parent.top.hash), sectionName(parent)) } - if section != nil { - peer.addSection(section.top.hash, section) - section.controlC <- peer - poolLogger.Debugf("[%s] activate new section", sectionName(section)) + if sec != nil { + peer.addSection(sec.top.hash, sec) + // request next section here once, only repeat if bottom block arrives, + // otherwise no way to check if it arrived + peer.requestBlockHashes(sec.bottom.hash) + sec.controlC <- bestPeer + poolLogger.Debugf("[%s] activate new section", sectionName(sec)) + } + + if headSection { + var headSec *section + switch { + case sec != nil: + headSec = sec + case child != nil: + headSec = child + default: + headSec = parent + } + peer.headSectionC <- headSec } } @@ -426,14 +602,21 @@ func sectionName(section *section) (name string) { // only the first PoW-valid block for a hash is considered legit func (self *BlockPool) AddBlock(block *types.Block, peerId string) { hash := block.Hash() - if self.hasBlock(hash) { - poolLogger.DebugDetailf("block [%s] already known", name(hash)) - return - } + self.peersLock.Lock() + peer := self.peer + self.peersLock.Unlock() + entry := self.get(hash) + if bytes.Compare(hash, peer.currentBlockHash) == 0 { + poolLogger.Debugf("add head block [%s] for peer %s", name(hash), peerId) + peer.currentBlockC <- block + } else { + if entry == nil { + poolLogger.Warnf("unrequested block [%s] by peer %s", name(hash), peerId) + self.peerError(peerId, ErrUnrequestedBlock, "%x", hash) + } + } if entry == nil { - poolLogger.Warnf("unrequested block [%x] by peer %s", hash, peerId) - self.peerError(peerId, ErrUnrequestedBlock, "%x", hash) return } @@ -443,17 +626,21 @@ func (self *BlockPool) AddBlock(block *types.Block, peerId string) { // check if block already present if node.block != nil { - poolLogger.DebugDetailf("block [%x] already sent by %s", name(hash), node.blockBy) + poolLogger.DebugDetailf("block [%s] already sent by %s", name(hash), node.blockBy) return } - // validate block for PoW - if !self.verifyPoW(block) { - poolLogger.Warnf("invalid pow on block [%x] by peer %s", hash, peerId) - self.peerError(peerId, ErrInvalidPoW, "%x", hash) - return - } + if self.hasBlock(hash) { + poolLogger.DebugDetailf("block [%s] already known", name(hash)) + } else { + // validate block for PoW + if !self.verifyPoW(block) { + poolLogger.Warnf("invalid pow on block [%s] by peer %s", name(hash), peerId) + self.peerError(peerId, ErrInvalidPoW, "%x", hash) + return + } + } poolLogger.Debugf("added block [%s] sent by peer %s", name(hash), peerId) node.block = block node.blockBy = peerId @@ -544,23 +731,23 @@ LOOP: // - when turned off (if peer disconnects and new peer connects with alternative chain), no blockrequests are made but absolute expiry timer is ticking // - when turned back on it recursively calls itself on the root of the next chain section // - when exits, signals to -func (self *BlockPool) processSection(section *section, nodes []*poolNode) { +func (self *BlockPool) processSection(sec *section, nodes []*poolNode) { for i, node := range nodes { - entry := &poolEntry{node: node, section: section, index: i} + entry := &poolEntry{node: node, section: sec, index: i} self.set(node.hash, entry) } - section.bottom = nodes[len(nodes)-1] - section.top = nodes[0] - section.nodes = nodes - poolLogger.DebugDetailf("[%s] setup section process", sectionName(section)) + sec.bottom = nodes[len(nodes)-1] + sec.top = nodes[0] + sec.nodes = nodes + poolLogger.DebugDetailf("[%s] setup section process", sectionName(sec)) self.wg.Add(1) go func() { // absolute time after which sub-chain is killed if not complete (some blocks are missing) - suicideTimer := time.After(blockTimeout * time.Minute) + suicideTimer := time.After(blocksTimeout * time.Second) var peer, newPeer *peerInfo @@ -580,21 +767,23 @@ func (self *BlockPool) processSection(section *section, nodes []*poolNode) { var insertChain bool var quitC chan bool - var blockChainC = section.blockChainC + var blockChainC = sec.blockChainC + + var parentHash []byte LOOP: for { if insertChain { insertChain = false - rest, err := self.addSectionToBlockChain(section) + rest, err := self.addSectionToBlockChain(sec) if err != nil { - close(section.suicideC) + close(sec.suicideC) continue LOOP } if rest == 0 { blocksRequestsComplete = true - child := self.getChild(section) + child := self.getChild(sec) if child != nil { self.connectToBlockChain(child) } @@ -603,7 +792,7 @@ func (self *BlockPool) processSection(section *section, nodes []*poolNode) { if blockHashesRequestsComplete && blocksRequestsComplete { // not waiting for hashes any more - poolLogger.Debugf("[%s] section complete %v blocks retrieved (%v attempts), hash requests complete on root (%v attempts)", sectionName(section), depth, blocksRequests, blockHashesRequests) + poolLogger.Debugf("[%s] section complete %v blocks retrieved (%v attempts), hash requests complete on root (%v attempts)", sectionName(sec), depth, blocksRequests, blockHashesRequests) break LOOP } // otherwise suicide if no hashes coming @@ -611,11 +800,12 @@ func (self *BlockPool) processSection(section *section, nodes []*poolNode) { // went through all blocks in section if missing == 0 { // no missing blocks - poolLogger.DebugDetailf("[%s] got all blocks. process complete (%v total blocksRequests): missing %v/%v/%v", sectionName(section), blocksRequests, missing, lastMissing, depth) + poolLogger.DebugDetailf("[%s] got all blocks. process complete (%v total blocksRequests): missing %v/%v/%v", sectionName(sec), blocksRequests, missing, lastMissing, depth) blocksRequestsComplete = true blocksRequestTimer = nil blocksRequestTime = false } else { + poolLogger.DebugDetailf("[%s] section checked: missing %v/%v/%v", sectionName(sec), missing, lastMissing, depth) // some missing blocks blocksRequests++ if len(hashes) > 0 { @@ -630,8 +820,8 @@ func (self *BlockPool) processSection(section *section, nodes []*poolNode) { idle++ // too many idle rounds if idle >= blocksRequestMaxIdleRounds { - poolLogger.DebugDetailf("[%s] block requests had %v idle rounds (%v total attempts): missing %v/%v/%v\ngiving up...", sectionName(section), idle, blocksRequests, missing, lastMissing, depth) - close(section.suicideC) + poolLogger.DebugDetailf("[%s] block requests had %v idle rounds (%v total attempts): missing %v/%v/%v\ngiving up...", sectionName(sec), idle, blocksRequests, missing, lastMissing, depth) + close(sec.suicideC) } } else { idle = 0 @@ -653,22 +843,39 @@ func (self *BlockPool) processSection(section *section, nodes []*poolNode) { // if ready && blocksRequestTime && !blocksRequestsComplete { - poolLogger.DebugDetailf("[%s] check if new blocks arrived (attempt %v): missing %v/%v/%v", sectionName(section), blocksRequests, missing, lastMissing, depth) + poolLogger.DebugDetailf("[%s] check if new blocks arrived (attempt %v): missing %v/%v/%v", sectionName(sec), blocksRequests, missing, lastMissing, depth) blocksRequestTimer = time.After(blocksRequestInterval * time.Millisecond) blocksRequestTime = false processC = offC } if blockHashesRequestTime { - if self.getParent(section) != nil { + var parentSection = self.getParent(sec) + if parentSection == nil { + if parent := self.get(parentHash); parent != nil { + parentSection = parent.section + self.chainLock.Lock() + self.link(parentSection, sec) + self.chainLock.Unlock() + } else { + if self.hasBlock(parentHash) { + insertChain = true + blockHashesRequestTime = false + blockHashesRequestTimer = nil + blockHashesRequestsComplete = true + continue LOOP + } + } + } + if parentSection != nil { // if not root of chain, switch off - poolLogger.DebugDetailf("[%s] parent found, hash requests deactivated (after %v total attempts)\n", sectionName(section), blockHashesRequests) + poolLogger.DebugDetailf("[%s] parent found, hash requests deactivated (after %v total attempts)\n", sectionName(sec), blockHashesRequests) blockHashesRequestTimer = nil blockHashesRequestsComplete = true } else { blockHashesRequests++ - poolLogger.Debugf("[%s] hash request on root (%v total attempts)\n", sectionName(section), blockHashesRequests) - peer.requestBlockHashes(section.bottom.hash) + poolLogger.Debugf("[%s] hash request on root (%v total attempts)\n", sectionName(sec), blockHashesRequests) + peer.requestBlockHashes(sec.bottom.hash) blockHashesRequestTimer = time.After(blockHashesRequestInterval * time.Millisecond) } blockHashesRequestTime = false @@ -682,27 +889,27 @@ func (self *BlockPool) processSection(section *section, nodes []*poolNode) { // peer quit or demoted, put section in idle mode quitC = nil go func() { - section.controlC <- nil + sec.controlC <- nil }() case <-self.purgeC: suicideTimer = time.After(0) case <-suicideTimer: - close(section.suicideC) - poolLogger.Debugf("[%s] timeout. (%v total attempts): missing %v/%v/%v", sectionName(section), blocksRequests, missing, lastMissing, depth) + close(sec.suicideC) + poolLogger.Debugf("[%s] timeout. (%v total attempts): missing %v/%v/%v", sectionName(sec), blocksRequests, missing, lastMissing, depth) - case <-section.suicideC: - poolLogger.Debugf("[%s] suicide", sectionName(section)) + case <-sec.suicideC: + poolLogger.Debugf("[%s] suicide", sectionName(sec)) // first delink from child and parent under chainlock self.chainLock.Lock() - self.link(nil, section) - self.link(section, nil) + self.link(nil, sec) + self.link(sec, nil) self.chainLock.Unlock() // delete node entries from pool index under pool lock self.lock.Lock() - for _, node := range section.nodes { + for _, node := range sec.nodes { delete(self.pool, string(node.hash)) } self.lock.Unlock() @@ -710,20 +917,20 @@ func (self *BlockPool) processSection(section *section, nodes []*poolNode) { break LOOP case <-blocksRequestTimer: - poolLogger.DebugDetailf("[%s] block request time", sectionName(section)) + poolLogger.DebugDetailf("[%s] block request time", sectionName(sec)) blocksRequestTime = true case <-blockHashesRequestTimer: - poolLogger.DebugDetailf("[%s] hash request time", sectionName(section)) + poolLogger.DebugDetailf("[%s] hash request time", sectionName(sec)) blockHashesRequestTime = true - case newPeer = <-section.controlC: + case newPeer = <-sec.controlC: // active -> idle if peer != nil && newPeer == nil { self.procWg.Done() if init { - poolLogger.Debugf("[%s] idle mode (%v total attempts): missing %v/%v/%v", sectionName(section), blocksRequests, missing, lastMissing, depth) + poolLogger.Debugf("[%s] idle mode (%v total attempts): missing %v/%v/%v", sectionName(sec), blocksRequests, missing, lastMissing, depth) } blocksRequestTime = false blocksRequestTimer = nil @@ -739,11 +946,11 @@ func (self *BlockPool) processSection(section *section, nodes []*poolNode) { if peer == nil && newPeer != nil { self.procWg.Add(1) - poolLogger.Debugf("[%s] active mode", sectionName(section)) + poolLogger.Debugf("[%s] active mode", sectionName(sec)) if !blocksRequestsComplete { blocksRequestTime = true } - if !blockHashesRequestsComplete { + if !blockHashesRequestsComplete && parentHash != nil { blockHashesRequestTime = true } if !init { @@ -753,13 +960,13 @@ func (self *BlockPool) processSection(section *section, nodes []*poolNode) { missing = 0 self.wg.Add(1) self.procWg.Add(1) - depth = len(section.nodes) + depth = len(sec.nodes) lastMissing = depth // if not run at least once fully, launch iterator go func() { var node *poolNode IT: - for _, node = range section.nodes { + for _, node = range sec.nodes { select { case processC <- node: case <-self.quit: @@ -771,7 +978,7 @@ func (self *BlockPool) processSection(section *section, nodes []*poolNode) { self.procWg.Done() }() } else { - poolLogger.Debugf("[%s] restore earlier state", sectionName(section)) + poolLogger.Debugf("[%s] restore earlier state", sectionName(sec)) processC = offC } } @@ -781,7 +988,7 @@ func (self *BlockPool) processSection(section *section, nodes []*poolNode) { } peer = newPeer - case waiter := <-section.forkC: + case waiter := <-sec.forkC: // this case just blocks the process until section is split at the fork <-waiter init = false @@ -794,7 +1001,7 @@ func (self *BlockPool) processSection(section *section, nodes []*poolNode) { init = true done = true processC = make(chan *poolNode, missing) - poolLogger.DebugDetailf("[%s] section initalised: missing %v/%v/%v", sectionName(section), missing, lastMissing, depth) + poolLogger.DebugDetailf("[%s] section initalised: missing %v/%v/%v", sectionName(sec), missing, lastMissing, depth) continue LOOP } if ready { @@ -811,17 +1018,24 @@ func (self *BlockPool) processSection(section *section, nodes []*poolNode) { missing++ hashes = append(hashes, node.hash) if len(hashes) == blockBatchSize { - poolLogger.Debugf("[%s] request %v missing blocks", sectionName(section), len(hashes)) + poolLogger.Debugf("[%s] request %v missing blocks", sectionName(sec), len(hashes)) self.requestBlocks(blocksRequests, hashes) hashes = nil } missingC <- node } else { - if blockChainC == nil && i == lastMissing { - insertChain = true + if i == lastMissing { + if blockChainC == nil { + insertChain = true + } else { + if parentHash == nil { + parentHash = block.ParentHash() + poolLogger.Debugf("[%s] found root block [%s]", sectionName(sec), name(parentHash)) + blockHashesRequestTime = true + } + } } } - poolLogger.Debugf("[%s] %v/%v/%v/%v", sectionName(section), i, missing, lastMissing, depth) if i == lastMissing && init { done = true } @@ -829,23 +1043,22 @@ func (self *BlockPool) processSection(section *section, nodes []*poolNode) { case <-blockChainC: // closed blockChain channel indicates that the blockpool is reached // connected to the blockchain, insert the longest chain of blocks - poolLogger.Debugf("[%s] reached blockchain", sectionName(section)) + poolLogger.Debugf("[%s] reached blockchain", sectionName(sec)) blockChainC = nil // switch off hash requests in case they were on blockHashesRequestTime = false blockHashesRequestTimer = nil blockHashesRequestsComplete = true // section root has block - if len(section.nodes) > 0 && section.nodes[len(section.nodes)-1].block != nil { + if len(sec.nodes) > 0 && sec.nodes[len(sec.nodes)-1].block != nil { insertChain = true } continue LOOP } // select } // for - poolLogger.Debugf("[%s] section complete: %v block hashes requests - %v block requests - missing %v/%v/%v", sectionName(section), blockHashesRequests, blocksRequests, missing, lastMissing, depth) - close(section.offC) + close(sec.offC) self.wg.Done() if peer != nil { @@ -917,22 +1130,28 @@ func (self *peerInfo) addSection(hash []byte, section *section) (found *section) defer self.lock.Unlock() key := string(hash) found = self.sections[key] - poolLogger.DebugDetailf("[%s] section process %s registered", sectionName(section), self.id) + poolLogger.DebugDetailf("[%s] section process stored for %s", sectionName(section), self.id) self.sections[key] = section return } func (self *BlockPool) switchPeer(oldPeer, newPeer *peerInfo) { if newPeer != nil { - entry := self.get(newPeer.currentBlock) - if entry == nil { - poolLogger.Debugf("[%s] head block [%s] not found, requesting hashes", newPeer.id, name(newPeer.currentBlock)) - newPeer.requestBlockHashes(newPeer.currentBlock) - } else { - poolLogger.Debugf("[%s] head block [%s] found, activate chain at section [%s]", newPeer.id, name(newPeer.currentBlock), sectionName(entry.section)) - self.activateChain(entry.section, newPeer) - } + newPeer.quitC = make(chan bool) poolLogger.DebugDetailf("[%s] activate section processes", newPeer.id) + var addSections []*section + for hash, section := range newPeer.sections { + // split sections get reorganised here + if string(section.top.hash) != hash { + addSections = append(addSections, section) + if entry := self.get([]byte(hash)); entry != nil { + addSections = append(addSections, entry.section) + } + } + } + for _, section := range addSections { + newPeer.sections[string(section.top.hash)] = section + } for hash, section := range newPeer.sections { // this will block if section process is waiting for peer lock select { @@ -940,12 +1159,26 @@ func (self *BlockPool) switchPeer(oldPeer, newPeer *peerInfo) { poolLogger.DebugDetailf("[%s][%x] section process complete - remove", newPeer.id, hash[:4]) delete(newPeer.sections, hash) case section.controlC <- newPeer: - poolLogger.DebugDetailf("[%s][%x] registered peer with section", newPeer.id, hash[:4]) + poolLogger.DebugDetailf("[%s][%x] activates section [%s]", newPeer.id, hash[:4], sectionName(section)) } } - newPeer.quitC = make(chan bool) + newPeer.lock.Lock() + headSection := newPeer.headSection + currentBlockHash := newPeer.currentBlockHash + newPeer.lock.Unlock() + if headSection == nil { + poolLogger.DebugDetailf("[%s] head section for [%s] not created, requesting info", newPeer.id, name(currentBlockHash)) + self.requestHeadSection(newPeer) + } else { + if entry := self.get(currentBlockHash); entry != nil { + headSection = entry.section + } + poolLogger.DebugDetailf("[%s] activate chain at head section [%s] for current head [%s]", newPeer.id, sectionName(headSection), name(currentBlockHash)) + self.activateChain(headSection, newPeer) + } } if oldPeer != nil { + poolLogger.DebugDetailf("[%s] quit section processes", oldPeer.id) close(oldPeer.quitC) } } From 585f259b63db323c87643a235fcbb9dc46d3125f Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 9 Jan 2015 12:04:54 +0100 Subject: [PATCH 122/132] Support input from args --- cmd/ethtest/main.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmd/ethtest/main.go b/cmd/ethtest/main.go index 9e9eda4502..ac473d58c0 100644 --- a/cmd/ethtest/main.go +++ b/cmd/ethtest/main.go @@ -28,6 +28,7 @@ import ( "io/ioutil" "log" "os" + "strings" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/ethutil" @@ -126,5 +127,9 @@ func RunVmTest(r io.Reader) (failed int) { func main() { helper.Logger.SetLogLevel(5) - os.Exit(RunVmTest(os.Stdin)) + if len(os.Args) > 1 { + os.Exit(RunVmTest(strings.NewReader(os.Args[1]))) + } else { + os.Exit(RunVmTest(os.Stdin)) + } } From 012a1c25331385aceb94af2a9829a2c6811d31b7 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 9 Jan 2015 12:45:09 +0100 Subject: [PATCH 123/132] Updated ethereum.js --- cmd/mist/assets/ext/eth.js/README.md | 18 - cmd/mist/assets/ext/eth.js/httprpc.js | 70 - cmd/mist/assets/ext/eth.js/index.html | 33 - cmd/mist/assets/ext/eth.js/main.js | 433 ------ cmd/mist/assets/ext/eth.js/qt.js | 27 - cmd/mist/assets/ext/eth.js/websocket.js | 51 - cmd/mist/assets/ext/ethereum.js | 312 ----- cmd/mist/assets/ext/ethereum.js/.bowerrc | 5 + cmd/mist/assets/ext/ethereum.js/.editorconfig | 12 + .../ext/{eth.js => ethereum.js}/.gitignore | 6 +- cmd/mist/assets/ext/ethereum.js/.jshintrc | 50 + cmd/mist/assets/ext/ethereum.js/.npmignore | 9 + cmd/mist/assets/ext/ethereum.js/.travis.yml | 11 + cmd/mist/assets/ext/ethereum.js/LICENSE | 14 + cmd/mist/assets/ext/ethereum.js/README.md | 79 ++ cmd/mist/assets/ext/ethereum.js/bower.json | 51 + .../assets/ext/ethereum.js/dist/ethereum.js | 1184 +++++++++++++++++ .../ext/ethereum.js/dist/ethereum.js.map | 29 + .../ext/ethereum.js/dist/ethereum.min.js | 1 + .../ext/ethereum.js/example/balance.html | 41 + .../ext/ethereum.js/example/contract.html | 75 ++ .../ext/ethereum.js/example/node-app.js | 16 + cmd/mist/assets/ext/ethereum.js/gulpfile.js | 104 ++ cmd/mist/assets/ext/ethereum.js/index.js | 8 + cmd/mist/assets/ext/ethereum.js/lib/abi.js | 265 ++++ .../ext/ethereum.js/lib/autoprovider.js | 102 ++ .../assets/ext/ethereum.js/lib/contract.js | 65 + .../assets/ext/ethereum.js/lib/httprpc.js | 94 ++ cmd/mist/assets/ext/ethereum.js/lib/qt.js | 45 + cmd/mist/assets/ext/ethereum.js/lib/web3.js | 509 +++++++ .../assets/ext/ethereum.js/lib/websocket.js | 77 ++ cmd/mist/assets/ext/ethereum.js/package.json | 67 + cmd/mist/assets/qml/browser.qml | 8 +- cmd/mist/gui.go | 4 +- 34 files changed, 2924 insertions(+), 951 deletions(-) delete mode 100644 cmd/mist/assets/ext/eth.js/README.md delete mode 100644 cmd/mist/assets/ext/eth.js/httprpc.js delete mode 100644 cmd/mist/assets/ext/eth.js/index.html delete mode 100644 cmd/mist/assets/ext/eth.js/main.js delete mode 100644 cmd/mist/assets/ext/eth.js/qt.js delete mode 100644 cmd/mist/assets/ext/eth.js/websocket.js delete mode 100644 cmd/mist/assets/ext/ethereum.js create mode 100644 cmd/mist/assets/ext/ethereum.js/.bowerrc create mode 100644 cmd/mist/assets/ext/ethereum.js/.editorconfig rename cmd/mist/assets/ext/{eth.js => ethereum.js}/.gitignore (85%) create mode 100644 cmd/mist/assets/ext/ethereum.js/.jshintrc create mode 100644 cmd/mist/assets/ext/ethereum.js/.npmignore create mode 100644 cmd/mist/assets/ext/ethereum.js/.travis.yml create mode 100644 cmd/mist/assets/ext/ethereum.js/LICENSE create mode 100644 cmd/mist/assets/ext/ethereum.js/README.md create mode 100644 cmd/mist/assets/ext/ethereum.js/bower.json create mode 100644 cmd/mist/assets/ext/ethereum.js/dist/ethereum.js create mode 100644 cmd/mist/assets/ext/ethereum.js/dist/ethereum.js.map create mode 100644 cmd/mist/assets/ext/ethereum.js/dist/ethereum.min.js create mode 100644 cmd/mist/assets/ext/ethereum.js/example/balance.html create mode 100644 cmd/mist/assets/ext/ethereum.js/example/contract.html create mode 100644 cmd/mist/assets/ext/ethereum.js/example/node-app.js create mode 100644 cmd/mist/assets/ext/ethereum.js/gulpfile.js create mode 100644 cmd/mist/assets/ext/ethereum.js/index.js create mode 100644 cmd/mist/assets/ext/ethereum.js/lib/abi.js create mode 100644 cmd/mist/assets/ext/ethereum.js/lib/autoprovider.js create mode 100644 cmd/mist/assets/ext/ethereum.js/lib/contract.js create mode 100644 cmd/mist/assets/ext/ethereum.js/lib/httprpc.js create mode 100644 cmd/mist/assets/ext/ethereum.js/lib/qt.js create mode 100644 cmd/mist/assets/ext/ethereum.js/lib/web3.js create mode 100644 cmd/mist/assets/ext/ethereum.js/lib/websocket.js create mode 100644 cmd/mist/assets/ext/ethereum.js/package.json diff --git a/cmd/mist/assets/ext/eth.js/README.md b/cmd/mist/assets/ext/eth.js/README.md deleted file mode 100644 index 86e2969bef..0000000000 --- a/cmd/mist/assets/ext/eth.js/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# Ethereum JavaScript API - -This is the Ethereum compatible JavaScript API using `Promise`s -which implements the [Generic JSON RPC](https://github.com/ethereum/wiki/wiki/Generic-JSON-RPC) spec. - -For an example see `index.html`. - -**Please note this repo is in it's early stage.** - -If you'd like to run a WebSocket ethereum node check out -[go-ethereum](https://github.com/ethereum/go-ethereum). - -To install ethereum and spawn a node: - -``` -go get github.com/ethereum/go-ethereum/ethereum -ethereum -ws -loglevel=4 -``` diff --git a/cmd/mist/assets/ext/eth.js/httprpc.js b/cmd/mist/assets/ext/eth.js/httprpc.js deleted file mode 100644 index 085b4693d4..0000000000 --- a/cmd/mist/assets/ext/eth.js/httprpc.js +++ /dev/null @@ -1,70 +0,0 @@ -(function () { - var HttpRpcProvider = function (host) { - this.handlers = []; - this.host = host; - }; - - function formatJsonRpcObject(object) { - return { - jsonrpc: '2.0', - method: object.call, - params: object.args, - id: object._id - } - }; - - function formatJsonRpcMessage(message) { - var object = JSON.parse(message); - - return { - _id: object.id, - data: object.result - }; - }; - - HttpRpcProvider.prototype.sendRequest = function (payload, cb) { - var data = formatJsonRpcObject(payload); - - var request = new XMLHttpRequest(); - request.open("POST", this.host, true); - request.send(JSON.stringify(data)); - request.onreadystatechange = function () { - if (request.readyState === 4 && cb) { - cb(request); - } - } - }; - - HttpRpcProvider.prototype.send = function (payload) { - var self = this; - this.sendRequest(payload, function (request) { - self.handlers.forEach(function (handler) { - handler.call(self, formatJsonRpcMessage(request.responseText)); - }); - }); - }; - - HttpRpcProvider.prototype.poll = function (payload, id) { - var self = this; - this.sendRequest(payload, function (request) { - var parsed = JSON.parse(request.responseText); - if (parsed.result instanceof Array ? parsed.result.length === 0 : !parsed.result) { - return; - } - self.handlers.forEach(function (handler) { - handler.call(self, {_event: payload.call, _id: id, data: parsed.result}); - }); - }); - }; - - Object.defineProperty(HttpRpcProvider.prototype, "onmessage", { - set: function (handler) { - this.handlers.push(handler); - } - }); - - if (typeof(web3) !== "undefined" && web3.providers !== undefined) { - web3.providers.HttpRpcProvider = HttpRpcProvider; - } -})(); - diff --git a/cmd/mist/assets/ext/eth.js/index.html b/cmd/mist/assets/ext/eth.js/index.html deleted file mode 100644 index 2b3f50a141..0000000000 --- a/cmd/mist/assets/ext/eth.js/index.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - -

std::name_reg

- - -
- - - - diff --git a/cmd/mist/assets/ext/eth.js/main.js b/cmd/mist/assets/ext/eth.js/main.js deleted file mode 100644 index 71e304a550..0000000000 --- a/cmd/mist/assets/ext/eth.js/main.js +++ /dev/null @@ -1,433 +0,0 @@ -(function(window) { - function isPromise(o) { - return o instanceof Promise - } - - function flattenPromise (obj) { - if (obj instanceof Promise) { - return Promise.resolve(obj); - } - - if (obj instanceof Array) { - return new Promise(function (resolve) { - var promises = obj.map(function (o) { - return flattenPromise(o); - }); - - return Promise.all(promises).then(function (res) { - for (var i = 0; i < obj.length; i++) { - obj[i] = res[i]; - } - resolve(obj); - }); - }); - } - - if (obj instanceof Object) { - return new Promise(function (resolve) { - var keys = Object.keys(obj); - var promises = keys.map(function (key) { - return flattenPromise(obj[key]); - }); - - return Promise.all(promises).then(function (res) { - for (var i = 0; i < keys.length; i++) { - obj[keys[i]] = res[i]; - } - resolve(obj); - }); - }); - } - - return Promise.resolve(obj); - }; - - var ethMethods = function () { - var blockCall = function (args) { - return typeof args[0] === "string" ? "blockByHash" : "blockByNumber"; - }; - - var transactionCall = function (args) { - return typeof args[0] === "string" ? 'transactionByHash' : 'transactionByNumber'; - }; - - var uncleCall = function (args) { - return typeof args[0] === "string" ? 'uncleByHash' : 'uncleByNumber'; - }; - - var methods = [ - { name: 'balanceAt', call: 'balanceAt' }, - { name: 'stateAt', call: 'stateAt' }, - { name: 'countAt', call: 'countAt'}, - { name: 'codeAt', call: 'codeAt' }, - { name: 'transact', call: 'transact' }, - { name: 'call', call: 'call' }, - { name: 'block', call: blockCall }, - { name: 'transaction', call: transactionCall }, - { name: 'uncle', call: uncleCall }, - { name: 'compile', call: 'compile' } - ]; - return methods; - }; - - var ethProperties = function () { - return [ - { name: 'coinbase', getter: 'coinbase', setter: 'setCoinbase' }, - { name: 'listening', getter: 'listening', setter: 'setListening' }, - { name: 'mining', getter: 'mining', setter: 'setMining' }, - { name: 'gasPrice', getter: 'gasPrice' }, - { name: 'account', getter: 'account' }, - { name: 'accounts', getter: 'accounts' }, - { name: 'peerCount', getter: 'peerCount' }, - { name: 'defaultBlock', getter: 'defaultBlock', setter: 'setDefaultBlock' }, - { name: 'number', getter: 'number'} - ]; - }; - - var dbMethods = function () { - return [ - { name: 'put', call: 'put' }, - { name: 'get', call: 'get' }, - { name: 'putString', call: 'putString' }, - { name: 'getString', call: 'getString' } - ]; - }; - - var shhMethods = function () { - return [ - { name: 'post', call: 'post' }, - { name: 'newIdentity', call: 'newIdentity' }, - { name: 'haveIdentity', call: 'haveIdentity' }, - { name: 'newGroup', call: 'newGroup' }, - { name: 'addToGroup', call: 'addToGroup' } - ]; - }; - - var ethWatchMethods = function () { - var newFilter = function (args) { - return typeof args[0] === 'string' ? 'newFilterString' : 'newFilter'; - }; - - return [ - { name: 'newFilter', call: newFilter }, - { name: 'uninstallFilter', call: 'uninstallFilter' }, - { name: 'getMessages', call: 'getMessages' } - ]; - }; - - var shhWatchMethods = function () { - return [ - { name: 'newFilter', call: 'shhNewFilter' }, - { name: 'uninstallFilter', call: 'shhUninstallFilter' }, - { name: 'getMessage', call: 'shhGetMessages' } - ]; - }; - - var setupMethods = function (obj, methods) { - methods.forEach(function (method) { - obj[method.name] = function () { - return flattenPromise(Array.prototype.slice.call(arguments)).then(function (args) { - var call = typeof method.call === "function" ? method.call(args) : method.call; - return {call: call, args: args}; - }).then(function (request) { - return new Promise(function (resolve, reject) { - web3.provider.send(request, function (result) { - //if (result || typeof result === "boolean") { - resolve(result); - return; - //} - //reject(result); - }); - }); - }).catch(function( err) { - console.error(err); - }); - }; - }); - }; - - var setupProperties = function (obj, properties) { - properties.forEach(function (property) { - var proto = {}; - proto.get = function () { - return new Promise(function(resolve, reject) { - web3.provider.send({call: property.getter}, function(result) { - resolve(result); - }); - }); - }; - if (property.setter) { - proto.set = function (val) { - return flattenPromise([val]).then(function (args) { - return new Promise(function (resolve) { - web3.provider.send({call: property.setter, args: args}, function (result) { - resolve(result); - }); - }); - }).catch(function (err) { - console.error(err); - }); - } - } - Object.defineProperty(obj, property.name, proto); - }); - }; - - var web3 = { - _callbacks: {}, - _events: {}, - providers: {}, - toHex: function(str) { - var hex = ""; - for(var i = 0; i < str.length; i++) { - var n = str.charCodeAt(i).toString(16); - hex += n.length < 2 ? '0' + n : n; - } - - return hex; - }, - - toAscii: function(hex) { - // Find termination - var str = ""; - var i = 0, l = hex.length; - for(; i < l; i+=2) { - var code = hex.charCodeAt(i) - if(code == 0) { - break; - } - - str += String.fromCharCode(parseInt(hex.substr(i, 2), 16)); - } - - return str; - }, - - toDecimal: function (val) { - return parseInt(val, 16); - }, - - fromAscii: function(str, pad) { - pad = pad === undefined ? 32 : pad; - var hex = this.toHex(str); - while(hex.length < pad*2) - hex += "00"; - return hex - }, - - eth: { - prototype: Object(), - watch: function (params) { - return new Filter(params, ethWatch); - }, - }, - - db: { - prototype: Object() - }, - - shh: { - prototype: Object(), - watch: function (params) { - return new Filter(params, shhWatch); - } - }, - - on: function(event, id, cb) { - if(web3._events[event] === undefined) { - web3._events[event] = {}; - } - - web3._events[event][id] = cb; - return this - }, - - off: function(event, id) { - if(web3._events[event] !== undefined) { - delete web3._events[event][id]; - } - - return this - }, - - trigger: function(event, id, data) { - var callbacks = web3._events[event]; - if (!callbacks || !callbacks[id]) { - return; - } - var cb = callbacks[id]; - cb(data); - }, - }; - - var eth = web3.eth; - setupMethods(eth, ethMethods()); - setupProperties(eth, ethProperties()); - setupMethods(web3.db, dbMethods()); - setupMethods(web3.shh, shhMethods()); - - var ethWatch = { - changed: 'changed' - }; - setupMethods(ethWatch, ethWatchMethods()); - var shhWatch = { - changed: 'shhChanged' - }; - setupMethods(shhWatch, shhWatchMethods()); - - var ProviderManager = function() { - this.queued = []; - this.polls = []; - this.ready = false; - this.provider = undefined; - this.id = 1; - - var self = this; - var poll = function () { - if (self.provider && self.provider.poll) { - self.polls.forEach(function (data) { - data.data._id = self.id; - self.id++; - self.provider.poll(data.data, data.id); - }); - } - setTimeout(poll, 12000); - }; - poll(); - }; - - ProviderManager.prototype.send = function(data, cb) { - data._id = this.id; - if (cb) { - web3._callbacks[data._id] = cb; - } - - data.args = data.args || []; - this.id++; - - if(this.provider !== undefined) { - this.provider.send(data); - } else { - console.warn("provider is not set"); - this.queued.push(data); - } - }; - - ProviderManager.prototype.set = function(provider) { - if(this.provider !== undefined && this.provider.unload !== undefined) { - this.provider.unload(); - } - - this.provider = provider; - this.ready = true; - }; - - ProviderManager.prototype.sendQueued = function() { - for(var i = 0; this.queued.length; i++) { - // Resend - this.send(this.queued[i]); - } - }; - - ProviderManager.prototype.installed = function() { - return this.provider !== undefined; - }; - - ProviderManager.prototype.startPolling = function (data, pollId) { - if (!this.provider || !this.provider.poll) { - return; - } - this.polls.push({data: data, id: pollId}); - }; - - ProviderManager.prototype.stopPolling = function (pollId) { - for (var i = this.polls.length; i--;) { - var poll = this.polls[i]; - if (poll.id === pollId) { - this.polls.splice(i, 1); - } - } - }; - - web3.provider = new ProviderManager(); - - web3.setProvider = function(provider) { - console.log("setprovider", provider) - provider.onmessage = messageHandler; - web3.provider.set(provider); - web3.provider.sendQueued(); - }; - - var Filter = function(options, impl) { - this.impl = impl; - this.callbacks = []; - - var self = this; - this.promise = impl.newFilter(options); - this.promise.then(function (id) { - self.id = id; - web3.on(impl.changed, id, self.trigger.bind(self)); - web3.provider.startPolling({call: impl.changed, args: [id]}, id); - }); - }; - - Filter.prototype.arrived = function(callback) { - this.changed(callback); - } - - Filter.prototype.changed = function(callback) { - var self = this; - this.promise.then(function(id) { - self.callbacks.push(callback); - }); - }; - - Filter.prototype.trigger = function(messages) { - for(var i = 0; i < this.callbacks.length; i++) { - this.callbacks[i].call(this, messages); - } - }; - - Filter.prototype.uninstall = function() { - var self = this; - this.promise.then(function (id) { - self.impl.uninstallFilter(id); - web3.provider.stopPolling(id); - web3.off(impl.changed, id); - }); - }; - - Filter.prototype.messages = function() { - var self = this; - return this.promise.then(function (id) { - return self.impl.getMessages(id); - }); - }; - - function messageHandler(data) { - if(data._event !== undefined) { - web3.trigger(data._event, data._id, data.data); - return; - } - - if(data._id) { - var cb = web3._callbacks[data._id]; - if (cb) { - cb.call(this, data.data) - delete web3._callbacks[data._id]; - } - } - } - - /* - // Install default provider - if(!web3.provider.installed()) { - var sock = new web3.WebSocket("ws://localhost:40404/eth"); - - web3.setProvider(sock); - } - */ - - window.web3 = web3; - -})(this); diff --git a/cmd/mist/assets/ext/eth.js/qt.js b/cmd/mist/assets/ext/eth.js/qt.js deleted file mode 100644 index 644c377378..0000000000 --- a/cmd/mist/assets/ext/eth.js/qt.js +++ /dev/null @@ -1,27 +0,0 @@ -(function() { - var QtProvider = function() { - this.handlers = []; - - var self = this; - navigator.qt.onmessage = function (message) { - self.handlers.forEach(function (handler) { - handler.call(self, JSON.parse(message.data)); - }); - } - }; - - QtProvider.prototype.send = function(payload) { - navigator.qt.postMessage(JSON.stringify(payload)); - }; - - Object.defineProperty(QtProvider.prototype, "onmessage", { - set: function(handler) { - this.handlers.push(handler); - }, - }); - - if(typeof(web3) !== "undefined" && web3.providers !== undefined) { - web3.providers.QtProvider = QtProvider; - } -})(); - diff --git a/cmd/mist/assets/ext/eth.js/websocket.js b/cmd/mist/assets/ext/eth.js/websocket.js deleted file mode 100644 index 732a086f29..0000000000 --- a/cmd/mist/assets/ext/eth.js/websocket.js +++ /dev/null @@ -1,51 +0,0 @@ -(function() { - var WebSocketProvider = function(host) { - // onmessage handlers - this.handlers = []; - // queue will be filled with messages if send is invoked before the ws is ready - this.queued = []; - this.ready = false; - - this.ws = new WebSocket(host); - - var self = this; - this.ws.onmessage = function(event) { - for(var i = 0; i < self.handlers.length; i++) { - self.handlers[i].call(self, JSON.parse(event.data), event) - } - }; - - this.ws.onopen = function() { - self.ready = true; - - for(var i = 0; i < self.queued.length; i++) { - // Resend - self.send(self.queued[i]); - } - }; - }; - WebSocketProvider.prototype.send = function(payload) { - if(this.ready) { - var data = JSON.stringify(payload); - - this.ws.send(data); - } else { - this.queued.push(payload); - } - }; - - WebSocketProvider.prototype.onMessage = function(handler) { - this.handlers.push(handler); - }; - - WebSocketProvider.prototype.unload = function() { - this.ws.close(); - }; - Object.defineProperty(WebSocketProvider.prototype, "onmessage", { - set: function(provider) { this.onMessage(provider); } - }); - - if(typeof(web3) !== "undefined" && web3.providers !== undefined) { - web3.providers.WebSocketProvider = WebSocketProvider; - } -})(); diff --git a/cmd/mist/assets/ext/ethereum.js b/cmd/mist/assets/ext/ethereum.js deleted file mode 100644 index aeb79e488d..0000000000 --- a/cmd/mist/assets/ext/ethereum.js +++ /dev/null @@ -1,312 +0,0 @@ -// Copyright (c) 2013-2014, Jeffrey Wilcke. All rights reserved. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -// MA 02110-1301 USA - -// Main Ethereum library -window.eth = { - prototype: Object(), - _callbacks: {}, - _onCallbacks: {}, - - test: function() { - var t = undefined; - postData({call: "test"}) - navigator.qt.onmessage = function(d) {console.log("onmessage called"); t = d; } - for(;;) { - if(t !== undefined) { - return t - } - } - }, - - mutan: function(code, cb) { - postData({call: "mutan", args: [code]}, cb) - }, - - toHex: function(str) { - var hex = ""; - for(var i = 0; i < str.length; i++) { - var n = str.charCodeAt(i).toString(16); - hex += n.length < 2 ? '0' + n : n; - } - - return hex; - }, - - toAscii: function(hex) { - // Find termination - var str = ""; - var i = 0, l = hex.length; - for(; i < l; i+=2) { - var code = hex.charCodeAt(i) - if(code == 0) { - break; - } - - str += String.fromCharCode(parseInt(hex.substr(i, 2), 16)); - } - - return str; - }, - - fromAscii: function(str, pad) { - if(pad === undefined) { - pad = 32 - } - - var hex = this.toHex(str); - - while(hex.length < pad*2) - hex += "00"; - - return hex - }, - - - // Retrieve block - // - // Either supply a number or a string. Type is determent for the lookup method - // string - Retrieves the block by looking up the hash - // number - Retrieves the block by looking up the block number - getBlock: function(numberOrHash, cb) { - var func; - if(typeof numberOrHash == "string") { - func = "getBlockByHash"; - } else { - func = "getBlockByNumber"; - } - postData({call: func, args: [numberOrHash]}, cb); - }, - - // Create transaction - // - // Transact between two state objects - transact: function(params, cb) { - if(params === undefined) { - params = {}; - } - - if(params.endowment !== undefined) - params.value = params.endowment; - if(params.code !== undefined) - params.data = params.code; - - // Make sure everything is string - var fields = ["to", "from", "value", "gas", "gasPrice"]; - for(var i = 0; i < fields.length; i++) { - if(params[fields[i]] === undefined) { - params[fields[i]] = ""; - } - params[fields[i]] = params[fields[i]].toString(); - } - - var data; - if(typeof params.data === "object") { - data = ""; - for(var i = 0; i < params.data.length; i++) { - data += params.data[i] - } - } else { - data = params.data; - } - - postData({call: "transact", args: [params.from, params.to, params.value, params.gas, params.gasPrice, "0x"+data]}, cb); - }, - - getMessages: function(filter, cb) { - postData({call: "messages", args: [filter]}, cb); - }, - - getStorageAt: function(address, storageAddress, cb) { - postData({call: "getStorage", args: [address, storageAddress]}, cb); - }, - - getEachStorageAt: function(address, cb){ - postData({call: "getEachStorage", args: [address]}, cb); - }, - - getKey: function(cb) { - postData({call: "getKey"}, cb); - }, - - getTxCountAt: function(address, cb) { - postData({call: "getTxCountAt", args: [address]}, cb); - }, - getIsMining: function(cb){ - postData({call: "getIsMining"}, cb) - }, - getIsListening: function(cb){ - postData({call: "getIsListening"}, cb) - }, - getCoinBase: function(cb){ - postData({call: "getCoinBase"}, cb); - }, - getPeerCount: function(cb){ - postData({call: "getPeerCount"}, cb); - }, - getBalanceAt: function(address, cb) { - postData({call: "getBalance", args: [address]}, cb); - }, - getTransactionsFor: function(address, cb) { - postData({call: "getTransactionsFor", args: [address]}, cb); - }, - - getSecretToAddress: function(sec, cb) { - postData({call: "getSecretToAddress", args: [sec]}, cb); - }, - - /* - watch: function(address, storageAddrOrCb, cb) { - var ev; - if(cb === undefined) { - cb = storageAddrOrCb; - storageAddrOrCb = ""; - ev = "object:"+address; - } else { - ev = "storage:"+address+":"+storageAddrOrCb; - } - - eth.on(ev, cb) - - postData({call: "watch", args: [address, storageAddrOrCb]}); - }, - - disconnect: function(address, storageAddrOrCb, cb) { - var ev; - if(cb === undefined) { - cb = storageAddrOrCb; - storageAddrOrCb = ""; - ev = "object:"+address; - } else { - ev = "storage:"+address+":"+storageAddrOrCb; - } - - eth.off(ev, cb) - - postData({call: "disconnect", args: [address, storageAddrOrCb]}); - }, - */ - - watch: function(options) { - var filter = new Filter(options); - filter.number = newWatchNum().toString() - - postData({call: "watch", args: [options, filter.number]}) - - return filter; - }, - - set: function(props) { - postData({call: "set", args: props}); - }, - - on: function(event, cb) { - if(eth._onCallbacks[event] === undefined) { - eth._onCallbacks[event] = []; - } - - eth._onCallbacks[event].push(cb); - - return this - }, - - off: function(event, cb) { - if(eth._onCallbacks[event] !== undefined) { - var callbacks = eth._onCallbacks[event]; - for(var i = 0; i < callbacks.length; i++) { - if(callbacks[i] === cb) { - delete callbacks[i]; - } - } - } - - return this - }, - - trigger: function(event, data) { - var callbacks = eth._onCallbacks[event]; - if(callbacks !== undefined) { - for(var i = 0; i < callbacks.length; i++) { - // Figure out whether the returned data was an array - // array means multiple return arguments (multiple params) - if(data instanceof Array) { - callbacks[i].apply(this, data); - } else { - callbacks[i].call(this, data); - } - } - } - }, -} - - -var Filter = function(options) { - this.options = options; -}; -Filter.prototype.changed = function(callback) { - // Register the watched:. Qml will call the appropriate event if anything - // interesting happens in the land of Go. - eth.on("watched:"+this.number, callback) -} -Filter.prototype.getMessages = function(cb) { - return eth.getMessages(this.options, cb) -} - -var watchNum = 0; -function newWatchNum() { - return watchNum++; -} - -function postData(data, cb) { - data._seed = Math.floor(Math.random() * 1000000) - if(cb) { - eth._callbacks[data._seed] = cb; - } - - if(data.args === undefined) { - data.args = []; - } - - navigator.qt.postMessage(JSON.stringify(data)); -} - -navigator.qt.onmessage = function(ev) { - var data = JSON.parse(ev.data) - - if(data._event !== undefined) { - eth.trigger(data._event, data.data); - } else { - if(data._seed) { - var cb = eth._callbacks[data._seed]; - if(cb) { - cb.call(this, data.data) - - // Remove the "trigger" callback - delete eth._callbacks[ev._seed]; - } - } - } -} - -eth.on("chain:changed", function() { -}) - -eth.on("messages", { /* filters */}, function(messages){ -}) - -eth.on("pending:changed", function() { -}) - diff --git a/cmd/mist/assets/ext/ethereum.js/.bowerrc b/cmd/mist/assets/ext/ethereum.js/.bowerrc new file mode 100644 index 0000000000..c3a8813e8b --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/.bowerrc @@ -0,0 +1,5 @@ +{ + "directory": "example/js/", + "cwd": "./", + "analytics": false +} \ No newline at end of file diff --git a/cmd/mist/assets/ext/ethereum.js/.editorconfig b/cmd/mist/assets/ext/ethereum.js/.editorconfig new file mode 100644 index 0000000000..60a2751d33 --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +indent_style = space +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false \ No newline at end of file diff --git a/cmd/mist/assets/ext/eth.js/.gitignore b/cmd/mist/assets/ext/ethereum.js/.gitignore similarity index 85% rename from cmd/mist/assets/ext/eth.js/.gitignore rename to cmd/mist/assets/ext/ethereum.js/.gitignore index de3a847ace..399b6dc882 100644 --- a/cmd/mist/assets/ext/eth.js/.gitignore +++ b/cmd/mist/assets/ext/ethereum.js/.gitignore @@ -4,6 +4,7 @@ # or operating system, you probably want to add a global ignore instead: # git config --global core.excludesfile ~/.gitignore_global +*.swp /tmp */**/*un~ *un~ @@ -11,4 +12,7 @@ */**/.DS_Store ethereum/ethereum ethereal/ethereal - +example/js +node_modules +bower_components +npm-debug.log diff --git a/cmd/mist/assets/ext/ethereum.js/.jshintrc b/cmd/mist/assets/ext/ethereum.js/.jshintrc new file mode 100644 index 0000000000..c0ec5f89d1 --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/.jshintrc @@ -0,0 +1,50 @@ +{ + "predef": [ + "console", + "require", + "equal", + "test", + "testBoth", + "testWithDefault", + "raises", + "deepEqual", + "start", + "stop", + "ok", + "strictEqual", + "module", + "expect", + "reject", + "impl" + ], + + "esnext": true, + "proto": true, + "node" : true, + "browser" : true, + "browserify" : true, + + "boss" : true, + "curly": false, + "debug": true, + "devel": true, + "eqeqeq": true, + "evil": true, + "forin": false, + "immed": false, + "laxbreak": false, + "newcap": true, + "noarg": true, + "noempty": false, + "nonew": false, + "nomen": false, + "onevar": false, + "plusplus": false, + "regexp": false, + "undef": true, + "sub": true, + "strict": false, + "white": false, + "shadow": true, + "eqnull": true +} \ No newline at end of file diff --git a/cmd/mist/assets/ext/ethereum.js/.npmignore b/cmd/mist/assets/ext/ethereum.js/.npmignore new file mode 100644 index 0000000000..5bbffe4fd3 --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/.npmignore @@ -0,0 +1,9 @@ +example/js +node_modules +test +.gitignore +.editorconfig +.travis.yml +.npmignore +component.json +testling.html \ No newline at end of file diff --git a/cmd/mist/assets/ext/ethereum.js/.travis.yml b/cmd/mist/assets/ext/ethereum.js/.travis.yml new file mode 100644 index 0000000000..fafacbd5a1 --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/.travis.yml @@ -0,0 +1,11 @@ +language: node_js +node_js: + - "0.11" + - "0.10" +before_script: + - npm install + - npm install jshint +script: + - "jshint *.js lib" +after_script: + - npm run-script gulp diff --git a/cmd/mist/assets/ext/ethereum.js/LICENSE b/cmd/mist/assets/ext/ethereum.js/LICENSE new file mode 100644 index 0000000000..0f187b8736 --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/LICENSE @@ -0,0 +1,14 @@ +This file is part of ethereum.js. + +ethereum.js is free software: you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +ethereum.js is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with ethereum.js. If not, see . \ No newline at end of file diff --git a/cmd/mist/assets/ext/ethereum.js/README.md b/cmd/mist/assets/ext/ethereum.js/README.md new file mode 100644 index 0000000000..865b62c6b1 --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/README.md @@ -0,0 +1,79 @@ +# Ethereum JavaScript API + +This is the Ethereum compatible JavaScript API using `Promise`s +which implements the [Generic JSON RPC](https://github.com/ethereum/wiki/wiki/Generic-JSON-RPC) spec. It's available on npm as a node module and also for bower and component as an embeddable js + +[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![dependency status][dep-image]][dep-url] [![dev dependency status][dep-dev-image]][dep-dev-url] + + + +## Installation + +### Node.js + + npm install ethereum.js + +### For browser +Bower + + bower install ethereum.js + +Component + + component install ethereum/ethereum.js + +* Include `ethereum.min.js` in your html file. +* Include [es6-promise](https://github.com/jakearchibald/es6-promise) or another ES6-Shim if your browser doesn't support ECMAScript 6. + +## Usage +Require the library: + + var web3 = require('web3'); + +Set a provider (QtProvider, WebSocketProvider, HttpRpcProvider) + + var web3.setProvider(new web3.providers.WebSocketProvider('ws://localhost:40404/eth')); + +There you go, now you can use it: + +``` +web3.eth.coinbase.then(function(result){ + console.log(result); + return web3.eth.balanceAt(result); +}).then(function(balance){ + console.log(web3.toDecimal(balance)); +}).catch(function(err){ + console.log(err); +}); +``` + + +For another example see `example/index.html`. + +## Building + +* `gulp build` + + +### Testing + +**Please note this repo is in it's early stage.** + +If you'd like to run a WebSocket ethereum node check out +[go-ethereum](https://github.com/ethereum/go-ethereum). + +To install ethereum and spawn a node: + +``` +go get github.com/ethereum/go-ethereum/ethereum +ethereum -ws -loglevel=4 +``` + +[npm-image]: https://badge.fury.io/js/ethereum.js.png +[npm-url]: https://npmjs.org/package/ethereum.js +[travis-image]: https://travis-ci.org/ethereum/ethereum.js.svg +[travis-url]: https://travis-ci.org/ethereum/ethereum.js +[dep-image]: https://david-dm.org/ethereum/ethereum.js.svg +[dep-url]: https://david-dm.org/ethereum/ethereum.js +[dep-dev-image]: https://david-dm.org/ethereum/ethereum.js/dev-status.svg +[dep-dev-url]: https://david-dm.org/ethereum/ethereum.js#info=devDependencies \ No newline at end of file diff --git a/cmd/mist/assets/ext/ethereum.js/bower.json b/cmd/mist/assets/ext/ethereum.js/bower.json new file mode 100644 index 0000000000..cedae9023d --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/bower.json @@ -0,0 +1,51 @@ +{ + "name": "ethereum.js", + "namespace": "ethereum", + "version": "0.0.3", + "description": "Ethereum Compatible JavaScript API", + "main": ["./dist/ethereum.js", "./dist/ethereum.min.js"], + "dependencies": { + "es6-promise": "#master" + }, + "repository": { + "type": "git", + "url": "https://github.com/ethereum/ethereum.js.git" + }, + "homepage": "https://github.com/ethereum/ethereum.js", + "bugs": { + "url": "https://github.com/ethereum/ethereum.js/issues" + }, + "keywords": [ + "ethereum", + "javascript", + "API" + ], + "authors": [ + { + "name": "Marek Kotewicz", + "email": "marek@ethdev.com", + "homepage": "https://github.com/debris" + }, + { + "name": "Marian Oancea", + "email": "marian@ethdev.com", + "homepage": "https://github.com/cubedro" + } + ], + "license": "LGPL-3.0", + "ignore": [ + "example", + "lib", + "node_modules", + "package.json", + ".bowerrc", + ".editorconfig", + ".gitignore", + ".jshintrc", + ".npmignore", + ".travis.yml", + "gulpfile.js", + "index.js", + "**/*.txt" + ] +} \ No newline at end of file diff --git a/cmd/mist/assets/ext/ethereum.js/dist/ethereum.js b/cmd/mist/assets/ext/ethereum.js/dist/ethereum.js new file mode 100644 index 0000000000..4f4b5d3265 --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/dist/ethereum.js @@ -0,0 +1,1184 @@ +require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o. +*/ +/** @file abi.js + * @authors: + * Marek Kotewicz + * Gav Wood + * @date 2014 + */ + +// TODO: is these line is supposed to be here? +if ("build" !== 'build') {/* + var web3 = require('./web3'); // jshint ignore:line +*/} + +// TODO: make these be actually accurate instead of falling back onto JS's doubles. +var hexToDec = function (hex) { + return parseInt(hex, 16).toString(); +}; + +var decToHex = function (dec) { + return parseInt(dec).toString(16); +}; + +var findIndex = function (array, callback) { + var end = false; + var i = 0; + for (; i < array.length && !end; i++) { + end = callback(array[i]); + } + return end ? i - 1 : -1; +}; + +var findMethodIndex = function (json, methodName) { + return findIndex(json, function (method) { + return method.name === methodName; + }); +}; + +var padLeft = function (string, chars) { + return new Array(chars - string.length + 1).join("0") + string; +}; + +var calcBitPadding = function (type, expected) { + var value = type.slice(expected.length); + if (value === "") { + return 32; + } + return parseInt(value) / 8; +}; + +var calcBytePadding = function (type, expected) { + var value = type.slice(expected.length); + if (value === "") { + return 32; + } + return parseInt(value); +}; + +var calcRealPadding = function (type, expected) { + var value = type.slice(expected.length); + if (value === "") { + return 32; + } + var sizes = value.split('x'); + for (var padding = 0, i = 0; i < sizes; i++) { + padding += (sizes[i] / 8); + } + return padding; +}; + +var setupInputTypes = function () { + + var prefixedType = function (prefix, calcPadding) { + return function (type, value) { + var expected = prefix; + if (type.indexOf(expected) !== 0) { + return false; + } + + var padding = calcPadding(type, expected); + if (typeof value === "number") + value = value.toString(16); + else if (typeof value === "string") + value = web3.toHex(value); + else if (value.indexOf('0x') === 0) + value = value.substr(2); + else + value = (+value).toString(16); + return padLeft(value, padding * 2); + }; + }; + + var namedType = function (name, padding, formatter) { + return function (type, value) { + if (type !== name) { + return false; + } + + return padLeft(formatter ? formatter(value) : value, padding * 2); + }; + }; + + var formatBool = function (value) { + return value ? '0x1' : '0x0'; + }; + + return [ + prefixedType('uint', calcBitPadding), + prefixedType('int', calcBitPadding), + prefixedType('hash', calcBitPadding), + prefixedType('string', calcBytePadding), + prefixedType('real', calcRealPadding), + prefixedType('ureal', calcRealPadding), + namedType('address', 20), + namedType('bool', 1, formatBool), + ]; +}; + +var inputTypes = setupInputTypes(); + +var toAbiInput = function (json, methodName, params) { + var bytes = ""; + var index = findMethodIndex(json, methodName); + + if (index === -1) { + return; + } + + bytes = "0x" + padLeft(index.toString(16), 2); + var method = json[index]; + + for (var i = 0; i < method.inputs.length; i++) { + var found = false; + for (var j = 0; j < inputTypes.length && !found; j++) { + found = inputTypes[j](method.inputs[i].type, params[i]); + } + if (!found) { + console.error('unsupported json type: ' + method.inputs[i].type); + } + bytes += found; + } + return bytes; +}; + +var setupOutputTypes = function () { + + var prefixedType = function (prefix, calcPadding) { + return function (type) { + var expected = prefix; + if (type.indexOf(expected) !== 0) { + return -1; + } + + var padding = calcPadding(type, expected); + return padding * 2; + }; + }; + + var namedType = function (name, padding) { + return function (type) { + return name === type ? padding * 2 : -1; + }; + }; + + var formatInt = function (value) { + return value.length <= 8 ? +parseInt(value, 16) : hexToDec(value); + }; + + var formatHash = function (value) { + return "0x" + value; + }; + + var formatBool = function (value) { + return value === '1' ? true : false; + }; + + var formatString = function (value) { + return web3.toAscii(value); + }; + + return [ + { padding: prefixedType('uint', calcBitPadding), format: formatInt }, + { padding: prefixedType('int', calcBitPadding), format: formatInt }, + { padding: prefixedType('hash', calcBitPadding), format: formatHash }, + { padding: prefixedType('string', calcBytePadding), format: formatString }, + { padding: prefixedType('real', calcRealPadding), format: formatInt }, + { padding: prefixedType('ureal', calcRealPadding), format: formatInt }, + { padding: namedType('address', 20) }, + { padding: namedType('bool', 1), format: formatBool } + ]; +}; + +var outputTypes = setupOutputTypes(); + +var fromAbiOutput = function (json, methodName, output) { + var index = findMethodIndex(json, methodName); + + if (index === -1) { + return; + } + + output = output.slice(2); + + var result = []; + var method = json[index]; + for (var i = 0; i < method.outputs.length; i++) { + var padding = -1; + for (var j = 0; j < outputTypes.length && padding === -1; j++) { + padding = outputTypes[j].padding(method.outputs[i].type); + } + + if (padding === -1) { + // not found output parsing + continue; + } + var res = output.slice(0, padding); + var formatter = outputTypes[j - 1].format; + result.push(formatter ? formatter(res) : ("0x" + res)); + output = output.slice(padding); + } + + return result; +}; + +var inputParser = function (json) { + var parser = {}; + json.forEach(function (method) { + parser[method.name] = function () { + var params = Array.prototype.slice.call(arguments); + return toAbiInput(json, method.name, params); + }; + }); + + return parser; +}; + +var outputParser = function (json) { + var parser = {}; + json.forEach(function (method) { + parser[method.name] = function (output) { + return fromAbiOutput(json, method.name, output); + }; + }); + + return parser; +}; + +module.exports = { + inputParser: inputParser, + outputParser: outputParser +}; + +},{}],2:[function(require,module,exports){ +/* + This file is part of ethereum.js. + + ethereum.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ethereum.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with ethereum.js. If not, see . +*/ +/** @file autoprovider.js + * @authors: + * Marek Kotewicz + * Marian Oancea + * @date 2014 + */ + +/* + * @brief if qt object is available, uses QtProvider, + * if not tries to connect over websockets + * if it fails, it uses HttpRpcProvider + */ + +// TODO: is these line is supposed to be here? +if ("build" !== 'build') {/* + var WebSocket = require('ws'); // jshint ignore:line + var web3 = require('./web3'); // jshint ignore:line +*/} + +var AutoProvider = function (userOptions) { + if (web3.haveProvider()) { + return; + } + + // before we determine what provider we are, we have to cache request + this.sendQueue = []; + this.onmessageQueue = []; + + if (navigator.qt) { + this.provider = new web3.providers.QtProvider(); + return; + } + + userOptions = userOptions || {}; + var options = { + httprpc: userOptions.httprpc || 'http://localhost:8080', + websockets: userOptions.websockets || 'ws://localhost:40404/eth' + }; + + var self = this; + var closeWithSuccess = function (success) { + ws.close(); + if (success) { + self.provider = new web3.providers.WebSocketProvider(options.websockets); + } else { + self.provider = new web3.providers.HttpRpcProvider(options.httprpc); + self.poll = self.provider.poll.bind(self.provider); + } + self.sendQueue.forEach(function (payload) { + self.provider(payload); + }); + self.onmessageQueue.forEach(function (handler) { + self.provider.onmessage = handler; + }); + }; + + var ws = new WebSocket(options.websockets); + + ws.onopen = function() { + closeWithSuccess(true); + }; + + ws.onerror = function() { + closeWithSuccess(false); + }; +}; + +AutoProvider.prototype.send = function (payload) { + if (this.provider) { + this.provider.send(payload); + return; + } + this.sendQueue.push(payload); +}; + +Object.defineProperty(AutoProvider.prototype, 'onmessage', { + set: function (handler) { + if (this.provider) { + this.provider.onmessage = handler; + return; + } + this.onmessageQueue.push(handler); + } +}); + +module.exports = AutoProvider; + +},{}],3:[function(require,module,exports){ +/* + This file is part of ethereum.js. + + ethereum.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ethereum.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with ethereum.js. If not, see . +*/ +/** @file contract.js + * @authors: + * Marek Kotewicz + * @date 2014 + */ + +// TODO: is these line is supposed to be here? +if ("build" !== 'build') {/* + var web3 = require('./web3'); // jshint ignore:line +*/} + +var abi = require('./abi'); + +var contract = function (address, desc) { + var inputParser = abi.inputParser(desc); + var outputParser = abi.outputParser(desc); + + var contract = {}; + + desc.forEach(function (method) { + contract[method.name] = function () { + var params = Array.prototype.slice.call(arguments); + var parsed = inputParser[method.name].apply(null, params); + + var onSuccess = function (result) { + return outputParser[method.name](result); + }; + + return { + call: function (extra) { + extra = extra || {}; + extra.to = address; + extra.data = parsed; + return web3.eth.call(extra).then(onSuccess); + }, + transact: function (extra) { + extra = extra || {}; + extra.to = address; + extra.data = parsed; + return web3.eth.transact(extra).then(onSuccess); + } + }; + }; + }); + + return contract; +}; + +module.exports = contract; + +},{"./abi":1}],4:[function(require,module,exports){ +/* + This file is part of ethereum.js. + + ethereum.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ethereum.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with ethereum.js. If not, see . +*/ +/** @file httprpc.js + * @authors: + * Marek Kotewicz + * Marian Oancea + * @date 2014 + */ + +// TODO: is these line is supposed to be here? +if ("build" !== 'build') {/* + var XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest; // jshint ignore:line +*/} + +var HttpRpcProvider = function (host) { + this.handlers = []; + this.host = host; +}; + +function formatJsonRpcObject(object) { + return { + jsonrpc: '2.0', + method: object.call, + params: object.args, + id: object._id + }; +} + +function formatJsonRpcMessage(message) { + var object = JSON.parse(message); + + return { + _id: object.id, + data: object.result, + error: object.error + }; +} + +HttpRpcProvider.prototype.sendRequest = function (payload, cb) { + var data = formatJsonRpcObject(payload); + + var request = new XMLHttpRequest(); + request.open("POST", this.host, true); + request.send(JSON.stringify(data)); + request.onreadystatechange = function () { + if (request.readyState === 4 && cb) { + cb(request); + } + }; +}; + +HttpRpcProvider.prototype.send = function (payload) { + var self = this; + this.sendRequest(payload, function (request) { + self.handlers.forEach(function (handler) { + handler.call(self, formatJsonRpcMessage(request.responseText)); + }); + }); +}; + +HttpRpcProvider.prototype.poll = function (payload, id) { + var self = this; + this.sendRequest(payload, function (request) { + var parsed = JSON.parse(request.responseText); + if (parsed.error || (parsed.result instanceof Array ? parsed.result.length === 0 : !parsed.result)) { + return; + } + self.handlers.forEach(function (handler) { + handler.call(self, {_event: payload.call, _id: id, data: parsed.result}); + }); + }); +}; + +Object.defineProperty(HttpRpcProvider.prototype, "onmessage", { + set: function (handler) { + this.handlers.push(handler); + } +}); + +module.exports = HttpRpcProvider; + +},{}],5:[function(require,module,exports){ +/* + This file is part of ethereum.js. + + ethereum.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ethereum.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with ethereum.js. If not, see . +*/ +/** @file qt.js + * @authors: + * Jeffrey Wilcke + * Marek Kotewicz + * @date 2014 + */ + +var QtProvider = function() { + this.handlers = []; + + var self = this; + navigator.qt.onmessage = function (message) { + self.handlers.forEach(function (handler) { + handler.call(self, JSON.parse(message.data)); + }); + }; +}; + +QtProvider.prototype.send = function(payload) { + navigator.qt.postMessage(JSON.stringify(payload)); +}; + +Object.defineProperty(QtProvider.prototype, "onmessage", { + set: function(handler) { + this.handlers.push(handler); + } +}); + +module.exports = QtProvider; + +},{}],6:[function(require,module,exports){ +/* + This file is part of ethereum.js. + + ethereum.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ethereum.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with ethereum.js. If not, see . +*/ +/** @file main.js + * @authors: + * Jeffrey Wilcke + * Marek Kotewicz + * Marian Oancea + * Gav Wood + * @date 2014 + */ + +function flattenPromise (obj) { + if (obj instanceof Promise) { + return Promise.resolve(obj); + } + + if (obj instanceof Array) { + return new Promise(function (resolve) { + var promises = obj.map(function (o) { + return flattenPromise(o); + }); + + return Promise.all(promises).then(function (res) { + for (var i = 0; i < obj.length; i++) { + obj[i] = res[i]; + } + resolve(obj); + }); + }); + } + + if (obj instanceof Object) { + return new Promise(function (resolve) { + var keys = Object.keys(obj); + var promises = keys.map(function (key) { + return flattenPromise(obj[key]); + }); + + return Promise.all(promises).then(function (res) { + for (var i = 0; i < keys.length; i++) { + obj[keys[i]] = res[i]; + } + resolve(obj); + }); + }); + } + + return Promise.resolve(obj); +} + +var web3Methods = function () { + return [ + { name: 'sha3', call: 'web3_sha3' } + ]; +}; + +var ethMethods = function () { + var blockCall = function (args) { + return typeof args[0] === "string" ? "eth_blockByHash" : "eth_blockByNumber"; + }; + + var transactionCall = function (args) { + return typeof args[0] === "string" ? 'eth_transactionByHash' : 'eth_transactionByNumber'; + }; + + var uncleCall = function (args) { + return typeof args[0] === "string" ? 'eth_uncleByHash' : 'eth_uncleByNumber'; + }; + + var methods = [ + { name: 'balanceAt', call: 'eth_balanceAt' }, + { name: 'stateAt', call: 'eth_stateAt' }, + { name: 'storageAt', call: 'eth_storageAt' }, + { name: 'countAt', call: 'eth_countAt'}, + { name: 'codeAt', call: 'eth_codeAt' }, + { name: 'transact', call: 'eth_transact' }, + { name: 'call', call: 'eth_call' }, + { name: 'block', call: blockCall }, + { name: 'transaction', call: transactionCall }, + { name: 'uncle', call: uncleCall }, + { name: 'compilers', call: 'eth_compilers' }, + { name: 'lll', call: 'eth_lll' }, + { name: 'solidity', call: 'eth_solidity' }, + { name: 'serpent', call: 'eth_serpent' }, + { name: 'logs', call: 'eth_logs' } + ]; + return methods; +}; + +var ethProperties = function () { + return [ + { name: 'coinbase', getter: 'eth_coinbase', setter: 'eth_setCoinbase' }, + { name: 'listening', getter: 'eth_listening', setter: 'eth_setListening' }, + { name: 'mining', getter: 'eth_mining', setter: 'eth_setMining' }, + { name: 'gasPrice', getter: 'eth_gasPrice' }, + { name: 'account', getter: 'eth_account' }, + { name: 'accounts', getter: 'eth_accounts' }, + { name: 'peerCount', getter: 'eth_peerCount' }, + { name: 'defaultBlock', getter: 'eth_defaultBlock', setter: 'eth_setDefaultBlock' }, + { name: 'number', getter: 'eth_number'} + ]; +}; + +var dbMethods = function () { + return [ + { name: 'put', call: 'db_put' }, + { name: 'get', call: 'db_get' }, + { name: 'putString', call: 'db_putString' }, + { name: 'getString', call: 'db_getString' } + ]; +}; + +var shhMethods = function () { + return [ + { name: 'post', call: 'shh_post' }, + { name: 'newIdentity', call: 'shh_newIdentity' }, + { name: 'haveIdentity', call: 'shh_haveIdentity' }, + { name: 'newGroup', call: 'shh_newGroup' }, + { name: 'addToGroup', call: 'shh_addToGroup' } + ]; +}; + +var ethWatchMethods = function () { + var newFilter = function (args) { + return typeof args[0] === 'string' ? 'eth_newFilterString' : 'eth_newFilter'; + }; + + return [ + { name: 'newFilter', call: newFilter }, + { name: 'uninstallFilter', call: 'eth_uninstallFilter' }, + { name: 'getMessages', call: 'eth_filterLogs' } + ]; +}; + +var shhWatchMethods = function () { + return [ + { name: 'newFilter', call: 'shh_newFilter' }, + { name: 'uninstallFilter', call: 'shh_uninstallFilter' }, + { name: 'getMessage', call: 'shh_getMessages' } + ]; +}; + +var setupMethods = function (obj, methods) { + methods.forEach(function (method) { + obj[method.name] = function () { + return flattenPromise(Array.prototype.slice.call(arguments)).then(function (args) { + var call = typeof method.call === "function" ? method.call(args) : method.call; + return {call: call, args: args}; + }).then(function (request) { + return new Promise(function (resolve, reject) { + web3.provider.send(request, function (err, result) { + if (!err) { + resolve(result); + return; + } + reject(err); + }); + }); + }).catch(function(err) { + console.error(err); + }); + }; + }); +}; + +var setupProperties = function (obj, properties) { + properties.forEach(function (property) { + var proto = {}; + proto.get = function () { + return new Promise(function(resolve, reject) { + web3.provider.send({call: property.getter}, function(err, result) { + if (!err) { + resolve(result); + return; + } + reject(err); + }); + }); + }; + if (property.setter) { + proto.set = function (val) { + return flattenPromise([val]).then(function (args) { + return new Promise(function (resolve) { + web3.provider.send({call: property.setter, args: args}, function (err, result) { + if (!err) { + resolve(result); + return; + } + reject(err); + }); + }); + }).catch(function (err) { + console.error(err); + }); + }; + } + Object.defineProperty(obj, property.name, proto); + }); +}; + +// TODO: import from a dependency, don't duplicate. +var hexToDec = function (hex) { + return parseInt(hex, 16).toString(); +}; + +var decToHex = function (dec) { + return parseInt(dec).toString(16); +}; + + +var web3 = { + _callbacks: {}, + _events: {}, + providers: {}, + + toHex: function(str) { + var hex = ""; + for(var i = 0; i < str.length; i++) { + var n = str.charCodeAt(i).toString(16); + hex += n.length < 2 ? '0' + n : n; + } + + return hex; + }, + + toAscii: function(hex) { + // Find termination + var str = ""; + var i = 0, l = hex.length; + if (hex.substring(0, 2) === '0x') + i = 2; + for(; i < l; i+=2) { + var code = hex.charCodeAt(i); + if(code === 0) { + break; + } + + str += String.fromCharCode(parseInt(hex.substr(i, 2), 16)); + } + + return str; + }, + + fromAscii: function(str, pad) { + pad = pad === undefined ? 32 : pad; + var hex = this.toHex(str); + while(hex.length < pad*2) + hex += "00"; + return "0x" + hex; + }, + + toDecimal: function (val) { + return hexToDec(val.substring(2)); + }, + + fromDecimal: function (val) { + return "0x" + decToHex(val); + }, + + toEth: function(str) { + var val = typeof str === "string" ? str.indexOf('0x') === 0 ? parseInt(str.substr(2), 16) : parseInt(str) : str; + var unit = 0; + var units = [ 'wei', 'Kwei', 'Mwei', 'Gwei', 'szabo', 'finney', 'ether', 'grand', 'Mether', 'Gether', 'Tether', 'Pether', 'Eether', 'Zether', 'Yether', 'Nether', 'Dether', 'Vether', 'Uether' ]; + while (val > 3000 && unit < units.length - 1) + { + val /= 1000; + unit++; + } + var s = val.toString().length < val.toFixed(2).length ? val.toString() : val.toFixed(2); + var replaceFunction = function($0, $1, $2) { + return $1 + ',' + $2; + }; + + while (true) { + var o = s; + s = s.replace(/(\d)(\d\d\d[\.\,])/, replaceFunction); + if (o === s) + break; + } + return s + ' ' + units[unit]; + }, + + eth: { + prototype: Object(), // jshint ignore:line + watch: function (params) { + return new Filter(params, ethWatch); + } + }, + + db: { + prototype: Object() // jshint ignore:line + }, + + shh: { + prototype: Object(), // jshint ignore:line + watch: function (params) { + return new Filter(params, shhWatch); + } + }, + + on: function(event, id, cb) { + if(web3._events[event] === undefined) { + web3._events[event] = {}; + } + + web3._events[event][id] = cb; + return this; + }, + + off: function(event, id) { + if(web3._events[event] !== undefined) { + delete web3._events[event][id]; + } + + return this; + }, + + trigger: function(event, id, data) { + var callbacks = web3._events[event]; + if (!callbacks || !callbacks[id]) { + return; + } + var cb = callbacks[id]; + cb(data); + } +}; + +setupMethods(web3, web3Methods()); +setupMethods(web3.eth, ethMethods()); +setupProperties(web3.eth, ethProperties()); +setupMethods(web3.db, dbMethods()); +setupMethods(web3.shh, shhMethods()); + +var ethWatch = { + changed: 'eth_changed' +}; +setupMethods(ethWatch, ethWatchMethods()); +var shhWatch = { + changed: 'shh_changed' +}; +setupMethods(shhWatch, shhWatchMethods()); + +var ProviderManager = function() { + this.queued = []; + this.polls = []; + this.ready = false; + this.provider = undefined; + this.id = 1; + + var self = this; + var poll = function () { + if (self.provider && self.provider.poll) { + self.polls.forEach(function (data) { + data.data._id = self.id; + self.id++; + self.provider.poll(data.data, data.id); + }); + } + setTimeout(poll, 12000); + }; + poll(); +}; + +ProviderManager.prototype.send = function(data, cb) { + data._id = this.id; + if (cb) { + web3._callbacks[data._id] = cb; + } + + data.args = data.args || []; + this.id++; + + if(this.provider !== undefined) { + this.provider.send(data); + } else { + console.warn("provider is not set"); + this.queued.push(data); + } +}; + +ProviderManager.prototype.set = function(provider) { + if(this.provider !== undefined && this.provider.unload !== undefined) { + this.provider.unload(); + } + + this.provider = provider; + this.ready = true; +}; + +ProviderManager.prototype.sendQueued = function() { + for(var i = 0; this.queued.length; i++) { + // Resend + this.send(this.queued[i]); + } +}; + +ProviderManager.prototype.installed = function() { + return this.provider !== undefined; +}; + +ProviderManager.prototype.startPolling = function (data, pollId) { + if (!this.provider || !this.provider.poll) { + return; + } + this.polls.push({data: data, id: pollId}); +}; + +ProviderManager.prototype.stopPolling = function (pollId) { + for (var i = this.polls.length; i--;) { + var poll = this.polls[i]; + if (poll.id === pollId) { + this.polls.splice(i, 1); + } + } +}; + +web3.provider = new ProviderManager(); + +web3.setProvider = function(provider) { + provider.onmessage = messageHandler; + web3.provider.set(provider); + web3.provider.sendQueued(); +}; + +web3.haveProvider = function() { + return !!web3.provider.provider; +}; + +var Filter = function(options, impl) { + this.impl = impl; + this.callbacks = []; + + var self = this; + this.promise = impl.newFilter(options); + this.promise.then(function (id) { + self.id = id; + web3.on(impl.changed, id, self.trigger.bind(self)); + web3.provider.startPolling({call: impl.changed, args: [id]}, id); + }); +}; + +Filter.prototype.arrived = function(callback) { + this.changed(callback); +}; + +Filter.prototype.changed = function(callback) { + var self = this; + this.promise.then(function(id) { + self.callbacks.push(callback); + }); +}; + +Filter.prototype.trigger = function(messages) { + for(var i = 0; i < this.callbacks.length; i++) { + this.callbacks[i].call(this, messages); + } +}; + +Filter.prototype.uninstall = function() { + var self = this; + this.promise.then(function (id) { + self.impl.uninstallFilter(id); + web3.provider.stopPolling(id); + web3.off(impl.changed, id); + }); +}; + +Filter.prototype.messages = function() { + var self = this; + return this.promise.then(function (id) { + return self.impl.getMessages(id); + }); +}; + +Filter.prototype.logs = function () { + return this.messages(); +}; + +function messageHandler(data) { + if(data._event !== undefined) { + web3.trigger(data._event, data._id, data.data); + return; + } + + if(data._id) { + var cb = web3._callbacks[data._id]; + if (cb) { + cb.call(this, data.error, data.data); + delete web3._callbacks[data._id]; + } + } +} + +module.exports = web3; + +},{}],7:[function(require,module,exports){ +/* + This file is part of ethereum.js. + + ethereum.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ethereum.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with ethereum.js. If not, see . +*/ +/** @file websocket.js + * @authors: + * Jeffrey Wilcke + * Marek Kotewicz + * Marian Oancea + * @date 2014 + */ + +// TODO: is these line is supposed to be here? +if ("build" !== 'build') {/* + var WebSocket = require('ws'); // jshint ignore:line +*/} + +var WebSocketProvider = function(host) { + // onmessage handlers + this.handlers = []; + // queue will be filled with messages if send is invoked before the ws is ready + this.queued = []; + this.ready = false; + + this.ws = new WebSocket(host); + + var self = this; + this.ws.onmessage = function(event) { + for(var i = 0; i < self.handlers.length; i++) { + self.handlers[i].call(self, JSON.parse(event.data), event); + } + }; + + this.ws.onopen = function() { + self.ready = true; + + for(var i = 0; i < self.queued.length; i++) { + // Resend + self.send(self.queued[i]); + } + }; +}; + +WebSocketProvider.prototype.send = function(payload) { + if(this.ready) { + var data = JSON.stringify(payload); + + this.ws.send(data); + } else { + this.queued.push(payload); + } +}; + +WebSocketProvider.prototype.onMessage = function(handler) { + this.handlers.push(handler); +}; + +WebSocketProvider.prototype.unload = function() { + this.ws.close(); +}; +Object.defineProperty(WebSocketProvider.prototype, "onmessage", { + set: function(provider) { this.onMessage(provider); } +}); + +module.exports = WebSocketProvider; + +},{}],"web3":[function(require,module,exports){ +var web3 = require('./lib/web3'); +web3.providers.WebSocketProvider = require('./lib/websocket'); +web3.providers.HttpRpcProvider = require('./lib/httprpc'); +web3.providers.QtProvider = require('./lib/qt'); +web3.providers.AutoProvider = require('./lib/autoprovider'); +web3.contract = require('./lib/contract'); + +module.exports = web3; + +},{"./lib/autoprovider":2,"./lib/contract":3,"./lib/httprpc":4,"./lib/qt":5,"./lib/web3":6,"./lib/websocket":7}]},{},["web3"]) + + +//# sourceMappingURL=ethereum.js.map \ No newline at end of file diff --git a/cmd/mist/assets/ext/ethereum.js/dist/ethereum.js.map b/cmd/mist/assets/ext/ethereum.js/dist/ethereum.js.map new file mode 100644 index 0000000000..9886b70ce0 --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/dist/ethereum.js.map @@ -0,0 +1,29 @@ +{ + "version": 3, + "sources": [ + "node_modules/browserify/node_modules/browser-pack/_prelude.js", + "lib/abi.js", + "lib/autoprovider.js", + "lib/contract.js", + "lib/httprpc.js", + "lib/qt.js", + "lib/web3.js", + "lib/websocket.js", + "index.js" + ], + "names": [], + "mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5fA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA", + "file": "generated.js", + "sourceRoot": "", + "sourcesContent": [ + "(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o.\n*/\n/** @file abi.js\n * @authors:\n * Marek Kotewicz \n * Gav Wood \n * @date 2014\n */\n\n// TODO: is these line is supposed to be here? \nif (\"build\" !== 'build') {/*\n var web3 = require('./web3'); // jshint ignore:line\n*/}\n\n// TODO: make these be actually accurate instead of falling back onto JS's doubles.\nvar hexToDec = function (hex) {\n return parseInt(hex, 16).toString();\n};\n\nvar decToHex = function (dec) {\n return parseInt(dec).toString(16);\n};\n\nvar findIndex = function (array, callback) {\n var end = false;\n var i = 0;\n for (; i < array.length && !end; i++) {\n end = callback(array[i]);\n }\n return end ? i - 1 : -1;\n};\n\nvar findMethodIndex = function (json, methodName) {\n return findIndex(json, function (method) {\n return method.name === methodName;\n });\n};\n\nvar padLeft = function (string, chars) {\n return new Array(chars - string.length + 1).join(\"0\") + string;\n};\n\nvar calcBitPadding = function (type, expected) {\n var value = type.slice(expected.length);\n if (value === \"\") {\n return 32;\n }\n return parseInt(value) / 8;\n};\n\nvar calcBytePadding = function (type, expected) {\n var value = type.slice(expected.length);\n if (value === \"\") {\n return 32;\n }\n return parseInt(value);\n};\n\nvar calcRealPadding = function (type, expected) {\n var value = type.slice(expected.length);\n if (value === \"\") {\n return 32;\n }\n var sizes = value.split('x');\n for (var padding = 0, i = 0; i < sizes; i++) {\n padding += (sizes[i] / 8);\n }\n return padding;\n};\n\nvar setupInputTypes = function () {\n \n var prefixedType = function (prefix, calcPadding) {\n return function (type, value) {\n var expected = prefix;\n if (type.indexOf(expected) !== 0) {\n return false;\n }\n\n var padding = calcPadding(type, expected);\n if (typeof value === \"number\")\n value = value.toString(16);\n else if (typeof value === \"string\")\n value = web3.toHex(value); \n else if (value.indexOf('0x') === 0)\n value = value.substr(2);\n else\n value = (+value).toString(16);\n return padLeft(value, padding * 2);\n };\n };\n\n var namedType = function (name, padding, formatter) {\n return function (type, value) {\n if (type !== name) {\n return false;\n }\n\n return padLeft(formatter ? formatter(value) : value, padding * 2);\n };\n };\n\n var formatBool = function (value) {\n return value ? '0x1' : '0x0';\n };\n\n return [\n prefixedType('uint', calcBitPadding),\n prefixedType('int', calcBitPadding),\n prefixedType('hash', calcBitPadding),\n prefixedType('string', calcBytePadding),\n prefixedType('real', calcRealPadding),\n prefixedType('ureal', calcRealPadding),\n namedType('address', 20),\n namedType('bool', 1, formatBool),\n ];\n};\n\nvar inputTypes = setupInputTypes();\n\nvar toAbiInput = function (json, methodName, params) {\n var bytes = \"\";\n var index = findMethodIndex(json, methodName);\n\n if (index === -1) {\n return;\n }\n\n bytes = \"0x\" + padLeft(index.toString(16), 2);\n var method = json[index];\n\n for (var i = 0; i < method.inputs.length; i++) {\n var found = false;\n for (var j = 0; j < inputTypes.length && !found; j++) {\n found = inputTypes[j](method.inputs[i].type, params[i]);\n }\n if (!found) {\n console.error('unsupported json type: ' + method.inputs[i].type);\n }\n bytes += found;\n }\n return bytes;\n};\n\nvar setupOutputTypes = function () {\n\n var prefixedType = function (prefix, calcPadding) {\n return function (type) {\n var expected = prefix;\n if (type.indexOf(expected) !== 0) {\n return -1;\n }\n\n var padding = calcPadding(type, expected);\n return padding * 2;\n };\n };\n\n var namedType = function (name, padding) {\n return function (type) {\n return name === type ? padding * 2 : -1;\n };\n };\n\n var formatInt = function (value) {\n return value.length <= 8 ? +parseInt(value, 16) : hexToDec(value);\n };\n\n var formatHash = function (value) {\n return \"0x\" + value;\n };\n\n var formatBool = function (value) {\n return value === '1' ? true : false;\n };\n\n var formatString = function (value) {\n return web3.toAscii(value);\n };\n\n return [\n { padding: prefixedType('uint', calcBitPadding), format: formatInt },\n { padding: prefixedType('int', calcBitPadding), format: formatInt },\n { padding: prefixedType('hash', calcBitPadding), format: formatHash },\n { padding: prefixedType('string', calcBytePadding), format: formatString },\n { padding: prefixedType('real', calcRealPadding), format: formatInt },\n { padding: prefixedType('ureal', calcRealPadding), format: formatInt },\n { padding: namedType('address', 20) },\n { padding: namedType('bool', 1), format: formatBool }\n ];\n};\n\nvar outputTypes = setupOutputTypes();\n\nvar fromAbiOutput = function (json, methodName, output) {\n var index = findMethodIndex(json, methodName);\n\n if (index === -1) {\n return;\n }\n\n output = output.slice(2);\n\n var result = [];\n var method = json[index];\n for (var i = 0; i < method.outputs.length; i++) {\n var padding = -1;\n for (var j = 0; j < outputTypes.length && padding === -1; j++) {\n padding = outputTypes[j].padding(method.outputs[i].type);\n }\n\n if (padding === -1) {\n // not found output parsing\n continue;\n }\n var res = output.slice(0, padding);\n var formatter = outputTypes[j - 1].format;\n result.push(formatter ? formatter(res) : (\"0x\" + res));\n output = output.slice(padding);\n }\n\n return result;\n};\n\nvar inputParser = function (json) {\n var parser = {};\n json.forEach(function (method) {\n parser[method.name] = function () {\n var params = Array.prototype.slice.call(arguments);\n return toAbiInput(json, method.name, params);\n };\n });\n\n return parser;\n};\n\nvar outputParser = function (json) {\n var parser = {};\n json.forEach(function (method) {\n parser[method.name] = function (output) {\n return fromAbiOutput(json, method.name, output);\n };\n });\n\n return parser;\n};\n\nmodule.exports = {\n inputParser: inputParser,\n outputParser: outputParser\n};\n", + "/*\n This file is part of ethereum.js.\n\n ethereum.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n ethereum.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with ethereum.js. If not, see .\n*/\n/** @file autoprovider.js\n * @authors:\n * Marek Kotewicz \n * Marian Oancea \n * @date 2014\n */\n\n/*\n * @brief if qt object is available, uses QtProvider,\n * if not tries to connect over websockets\n * if it fails, it uses HttpRpcProvider\n */\n\n// TODO: is these line is supposed to be here? \nif (\"build\" !== 'build') {/*\n var WebSocket = require('ws'); // jshint ignore:line\n var web3 = require('./web3'); // jshint ignore:line\n*/}\n\nvar AutoProvider = function (userOptions) {\n if (web3.haveProvider()) {\n return;\n }\n\n // before we determine what provider we are, we have to cache request\n this.sendQueue = [];\n this.onmessageQueue = [];\n\n if (navigator.qt) {\n this.provider = new web3.providers.QtProvider();\n return;\n }\n\n userOptions = userOptions || {};\n var options = {\n httprpc: userOptions.httprpc || 'http://localhost:8080',\n websockets: userOptions.websockets || 'ws://localhost:40404/eth'\n };\n\n var self = this;\n var closeWithSuccess = function (success) {\n ws.close();\n if (success) {\n self.provider = new web3.providers.WebSocketProvider(options.websockets);\n } else {\n self.provider = new web3.providers.HttpRpcProvider(options.httprpc);\n self.poll = self.provider.poll.bind(self.provider);\n }\n self.sendQueue.forEach(function (payload) {\n self.provider(payload);\n });\n self.onmessageQueue.forEach(function (handler) {\n self.provider.onmessage = handler;\n });\n };\n\n var ws = new WebSocket(options.websockets);\n\n ws.onopen = function() {\n closeWithSuccess(true);\n };\n\n ws.onerror = function() {\n closeWithSuccess(false);\n };\n};\n\nAutoProvider.prototype.send = function (payload) {\n if (this.provider) {\n this.provider.send(payload);\n return;\n }\n this.sendQueue.push(payload);\n};\n\nObject.defineProperty(AutoProvider.prototype, 'onmessage', {\n set: function (handler) {\n if (this.provider) {\n this.provider.onmessage = handler;\n return;\n }\n this.onmessageQueue.push(handler);\n }\n});\n\nmodule.exports = AutoProvider;\n", + "/*\n This file is part of ethereum.js.\n\n ethereum.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n ethereum.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with ethereum.js. If not, see .\n*/\n/** @file contract.js\n * @authors:\n * Marek Kotewicz \n * @date 2014\n */\n\n// TODO: is these line is supposed to be here? \nif (\"build\" !== 'build') {/*\n var web3 = require('./web3'); // jshint ignore:line\n*/}\n\nvar abi = require('./abi');\n\nvar contract = function (address, desc) {\n var inputParser = abi.inputParser(desc);\n var outputParser = abi.outputParser(desc);\n\n var contract = {};\n\n desc.forEach(function (method) {\n contract[method.name] = function () {\n var params = Array.prototype.slice.call(arguments);\n var parsed = inputParser[method.name].apply(null, params);\n\n var onSuccess = function (result) {\n return outputParser[method.name](result);\n };\n\n return {\n call: function (extra) {\n extra = extra || {};\n extra.to = address;\n extra.data = parsed;\n return web3.eth.call(extra).then(onSuccess);\n },\n transact: function (extra) {\n extra = extra || {};\n extra.to = address;\n extra.data = parsed;\n return web3.eth.transact(extra).then(onSuccess);\n }\n };\n };\n });\n\n return contract;\n};\n\nmodule.exports = contract;\n", + "/*\n This file is part of ethereum.js.\n\n ethereum.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n ethereum.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with ethereum.js. If not, see .\n*/\n/** @file httprpc.js\n * @authors:\n * Marek Kotewicz \n * Marian Oancea \n * @date 2014\n */\n\n// TODO: is these line is supposed to be here? \nif (\"build\" !== 'build') {/*\n var XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest; // jshint ignore:line\n*/}\n\nvar HttpRpcProvider = function (host) {\n this.handlers = [];\n this.host = host;\n};\n\nfunction formatJsonRpcObject(object) {\n return {\n jsonrpc: '2.0',\n method: object.call,\n params: object.args,\n id: object._id\n };\n}\n\nfunction formatJsonRpcMessage(message) {\n var object = JSON.parse(message);\n\n return {\n _id: object.id,\n data: object.result,\n error: object.error\n };\n}\n\nHttpRpcProvider.prototype.sendRequest = function (payload, cb) {\n var data = formatJsonRpcObject(payload);\n\n var request = new XMLHttpRequest();\n request.open(\"POST\", this.host, true);\n request.send(JSON.stringify(data));\n request.onreadystatechange = function () {\n if (request.readyState === 4 && cb) {\n cb(request);\n }\n };\n};\n\nHttpRpcProvider.prototype.send = function (payload) {\n var self = this;\n this.sendRequest(payload, function (request) {\n self.handlers.forEach(function (handler) {\n handler.call(self, formatJsonRpcMessage(request.responseText));\n });\n });\n};\n\nHttpRpcProvider.prototype.poll = function (payload, id) {\n var self = this;\n this.sendRequest(payload, function (request) {\n var parsed = JSON.parse(request.responseText);\n if (parsed.error || (parsed.result instanceof Array ? parsed.result.length === 0 : !parsed.result)) {\n return;\n }\n self.handlers.forEach(function (handler) {\n handler.call(self, {_event: payload.call, _id: id, data: parsed.result});\n });\n });\n};\n\nObject.defineProperty(HttpRpcProvider.prototype, \"onmessage\", {\n set: function (handler) {\n this.handlers.push(handler);\n }\n});\n\nmodule.exports = HttpRpcProvider;\n", + "/*\n This file is part of ethereum.js.\n\n ethereum.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n ethereum.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with ethereum.js. If not, see .\n*/\n/** @file qt.js\n * @authors:\n * Jeffrey Wilcke \n * Marek Kotewicz \n * @date 2014\n */\n\nvar QtProvider = function() {\n this.handlers = [];\n\n var self = this;\n navigator.qt.onmessage = function (message) {\n self.handlers.forEach(function (handler) {\n handler.call(self, JSON.parse(message.data));\n });\n };\n};\n\nQtProvider.prototype.send = function(payload) {\n navigator.qt.postMessage(JSON.stringify(payload));\n};\n\nObject.defineProperty(QtProvider.prototype, \"onmessage\", {\n set: function(handler) {\n this.handlers.push(handler);\n }\n});\n\nmodule.exports = QtProvider;\n", + "/*\n This file is part of ethereum.js.\n\n ethereum.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n ethereum.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with ethereum.js. If not, see .\n*/\n/** @file main.js\n * @authors:\n * Jeffrey Wilcke \n * Marek Kotewicz \n * Marian Oancea \n * Gav Wood \n * @date 2014\n */\n\nfunction flattenPromise (obj) {\n if (obj instanceof Promise) {\n return Promise.resolve(obj);\n }\n\n if (obj instanceof Array) {\n return new Promise(function (resolve) {\n var promises = obj.map(function (o) {\n return flattenPromise(o);\n });\n\n return Promise.all(promises).then(function (res) {\n for (var i = 0; i < obj.length; i++) {\n obj[i] = res[i];\n }\n resolve(obj);\n });\n });\n }\n\n if (obj instanceof Object) {\n return new Promise(function (resolve) {\n var keys = Object.keys(obj);\n var promises = keys.map(function (key) {\n return flattenPromise(obj[key]);\n });\n\n return Promise.all(promises).then(function (res) {\n for (var i = 0; i < keys.length; i++) {\n obj[keys[i]] = res[i];\n }\n resolve(obj);\n });\n });\n }\n\n return Promise.resolve(obj);\n}\n\nvar web3Methods = function () {\n return [\n { name: 'sha3', call: 'web3_sha3' }\n ];\n};\n\nvar ethMethods = function () {\n var blockCall = function (args) {\n return typeof args[0] === \"string\" ? \"eth_blockByHash\" : \"eth_blockByNumber\";\n };\n\n var transactionCall = function (args) {\n return typeof args[0] === \"string\" ? 'eth_transactionByHash' : 'eth_transactionByNumber';\n };\n\n var uncleCall = function (args) {\n return typeof args[0] === \"string\" ? 'eth_uncleByHash' : 'eth_uncleByNumber';\n };\n\n var methods = [\n { name: 'balanceAt', call: 'eth_balanceAt' },\n { name: 'stateAt', call: 'eth_stateAt' },\n { name: 'storageAt', call: 'eth_storageAt' },\n { name: 'countAt', call: 'eth_countAt'},\n { name: 'codeAt', call: 'eth_codeAt' },\n { name: 'transact', call: 'eth_transact' },\n { name: 'call', call: 'eth_call' },\n { name: 'block', call: blockCall },\n { name: 'transaction', call: transactionCall },\n { name: 'uncle', call: uncleCall },\n { name: 'compilers', call: 'eth_compilers' },\n { name: 'lll', call: 'eth_lll' },\n { name: 'solidity', call: 'eth_solidity' },\n { name: 'serpent', call: 'eth_serpent' },\n { name: 'logs', call: 'eth_logs' }\n ];\n return methods;\n};\n\nvar ethProperties = function () {\n return [\n { name: 'coinbase', getter: 'eth_coinbase', setter: 'eth_setCoinbase' },\n { name: 'listening', getter: 'eth_listening', setter: 'eth_setListening' },\n { name: 'mining', getter: 'eth_mining', setter: 'eth_setMining' },\n { name: 'gasPrice', getter: 'eth_gasPrice' },\n { name: 'account', getter: 'eth_account' },\n { name: 'accounts', getter: 'eth_accounts' },\n { name: 'peerCount', getter: 'eth_peerCount' },\n { name: 'defaultBlock', getter: 'eth_defaultBlock', setter: 'eth_setDefaultBlock' },\n { name: 'number', getter: 'eth_number'}\n ];\n};\n\nvar dbMethods = function () {\n return [\n { name: 'put', call: 'db_put' },\n { name: 'get', call: 'db_get' },\n { name: 'putString', call: 'db_putString' },\n { name: 'getString', call: 'db_getString' }\n ];\n};\n\nvar shhMethods = function () {\n return [\n { name: 'post', call: 'shh_post' },\n { name: 'newIdentity', call: 'shh_newIdentity' },\n { name: 'haveIdentity', call: 'shh_haveIdentity' },\n { name: 'newGroup', call: 'shh_newGroup' },\n { name: 'addToGroup', call: 'shh_addToGroup' }\n ];\n};\n\nvar ethWatchMethods = function () {\n var newFilter = function (args) {\n return typeof args[0] === 'string' ? 'eth_newFilterString' : 'eth_newFilter';\n };\n\n return [\n { name: 'newFilter', call: newFilter },\n { name: 'uninstallFilter', call: 'eth_uninstallFilter' },\n { name: 'getMessages', call: 'eth_filterLogs' }\n ];\n};\n\nvar shhWatchMethods = function () {\n return [\n { name: 'newFilter', call: 'shh_newFilter' },\n { name: 'uninstallFilter', call: 'shh_uninstallFilter' },\n { name: 'getMessage', call: 'shh_getMessages' }\n ];\n};\n\nvar setupMethods = function (obj, methods) {\n methods.forEach(function (method) {\n obj[method.name] = function () {\n return flattenPromise(Array.prototype.slice.call(arguments)).then(function (args) {\n var call = typeof method.call === \"function\" ? method.call(args) : method.call;\n return {call: call, args: args};\n }).then(function (request) {\n return new Promise(function (resolve, reject) {\n web3.provider.send(request, function (err, result) {\n if (!err) {\n resolve(result);\n return;\n }\n reject(err);\n });\n });\n }).catch(function(err) {\n console.error(err);\n });\n };\n });\n};\n\nvar setupProperties = function (obj, properties) {\n properties.forEach(function (property) {\n var proto = {};\n proto.get = function () {\n return new Promise(function(resolve, reject) {\n web3.provider.send({call: property.getter}, function(err, result) {\n if (!err) {\n resolve(result);\n return;\n }\n reject(err);\n });\n });\n };\n if (property.setter) {\n proto.set = function (val) {\n return flattenPromise([val]).then(function (args) {\n return new Promise(function (resolve) {\n web3.provider.send({call: property.setter, args: args}, function (err, result) {\n if (!err) {\n resolve(result);\n return;\n }\n reject(err);\n });\n });\n }).catch(function (err) {\n console.error(err);\n });\n };\n }\n Object.defineProperty(obj, property.name, proto);\n });\n};\n\n// TODO: import from a dependency, don't duplicate.\nvar hexToDec = function (hex) {\n return parseInt(hex, 16).toString();\n};\n\nvar decToHex = function (dec) {\n return parseInt(dec).toString(16);\n};\n\n\nvar web3 = {\n _callbacks: {},\n _events: {},\n providers: {},\n\n toHex: function(str) {\n var hex = \"\";\n for(var i = 0; i < str.length; i++) {\n var n = str.charCodeAt(i).toString(16);\n hex += n.length < 2 ? '0' + n : n;\n }\n\n return hex;\n },\n\n toAscii: function(hex) {\n // Find termination\n var str = \"\";\n var i = 0, l = hex.length;\n if (hex.substring(0, 2) === '0x')\n i = 2;\n for(; i < l; i+=2) {\n var code = hex.charCodeAt(i);\n if(code === 0) {\n break;\n }\n\n str += String.fromCharCode(parseInt(hex.substr(i, 2), 16));\n }\n\n return str;\n },\n\n fromAscii: function(str, pad) {\n pad = pad === undefined ? 32 : pad;\n var hex = this.toHex(str);\n while(hex.length < pad*2)\n hex += \"00\";\n return \"0x\" + hex;\n },\n\n toDecimal: function (val) {\n return hexToDec(val.substring(2));\n },\n\n fromDecimal: function (val) {\n return \"0x\" + decToHex(val);\n },\n\n toEth: function(str) {\n var val = typeof str === \"string\" ? str.indexOf('0x') === 0 ? parseInt(str.substr(2), 16) : parseInt(str) : str;\n var unit = 0;\n var units = [ 'wei', 'Kwei', 'Mwei', 'Gwei', 'szabo', 'finney', 'ether', 'grand', 'Mether', 'Gether', 'Tether', 'Pether', 'Eether', 'Zether', 'Yether', 'Nether', 'Dether', 'Vether', 'Uether' ];\n while (val > 3000 && unit < units.length - 1)\n {\n val /= 1000;\n unit++;\n }\n var s = val.toString().length < val.toFixed(2).length ? val.toString() : val.toFixed(2);\n var replaceFunction = function($0, $1, $2) {\n return $1 + ',' + $2;\n };\n\n while (true) {\n var o = s;\n s = s.replace(/(\\d)(\\d\\d\\d[\\.\\,])/, replaceFunction);\n if (o === s)\n break;\n }\n return s + ' ' + units[unit];\n },\n\n eth: {\n prototype: Object(), // jshint ignore:line\n watch: function (params) {\n return new Filter(params, ethWatch);\n }\n },\n\n db: {\n prototype: Object() // jshint ignore:line\n },\n\n shh: {\n prototype: Object(), // jshint ignore:line\n watch: function (params) {\n return new Filter(params, shhWatch);\n }\n },\n\n on: function(event, id, cb) {\n if(web3._events[event] === undefined) {\n web3._events[event] = {};\n }\n\n web3._events[event][id] = cb;\n return this;\n },\n\n off: function(event, id) {\n if(web3._events[event] !== undefined) {\n delete web3._events[event][id];\n }\n\n return this;\n },\n\n trigger: function(event, id, data) {\n var callbacks = web3._events[event];\n if (!callbacks || !callbacks[id]) {\n return;\n }\n var cb = callbacks[id];\n cb(data);\n }\n};\n\nsetupMethods(web3, web3Methods());\nsetupMethods(web3.eth, ethMethods());\nsetupProperties(web3.eth, ethProperties());\nsetupMethods(web3.db, dbMethods());\nsetupMethods(web3.shh, shhMethods());\n\nvar ethWatch = {\n changed: 'eth_changed'\n};\nsetupMethods(ethWatch, ethWatchMethods());\nvar shhWatch = {\n changed: 'shh_changed'\n};\nsetupMethods(shhWatch, shhWatchMethods());\n\nvar ProviderManager = function() {\n this.queued = [];\n this.polls = [];\n this.ready = false;\n this.provider = undefined;\n this.id = 1;\n\n var self = this;\n var poll = function () {\n if (self.provider && self.provider.poll) {\n self.polls.forEach(function (data) {\n data.data._id = self.id;\n self.id++;\n self.provider.poll(data.data, data.id);\n });\n }\n setTimeout(poll, 12000);\n };\n poll();\n};\n\nProviderManager.prototype.send = function(data, cb) {\n data._id = this.id;\n if (cb) {\n web3._callbacks[data._id] = cb;\n }\n\n data.args = data.args || [];\n this.id++;\n\n if(this.provider !== undefined) {\n this.provider.send(data);\n } else {\n console.warn(\"provider is not set\");\n this.queued.push(data);\n }\n};\n\nProviderManager.prototype.set = function(provider) {\n if(this.provider !== undefined && this.provider.unload !== undefined) {\n this.provider.unload();\n }\n\n this.provider = provider;\n this.ready = true;\n};\n\nProviderManager.prototype.sendQueued = function() {\n for(var i = 0; this.queued.length; i++) {\n // Resend\n this.send(this.queued[i]);\n }\n};\n\nProviderManager.prototype.installed = function() {\n return this.provider !== undefined;\n};\n\nProviderManager.prototype.startPolling = function (data, pollId) {\n if (!this.provider || !this.provider.poll) {\n return;\n }\n this.polls.push({data: data, id: pollId});\n};\n\nProviderManager.prototype.stopPolling = function (pollId) {\n for (var i = this.polls.length; i--;) {\n var poll = this.polls[i];\n if (poll.id === pollId) {\n this.polls.splice(i, 1);\n }\n }\n};\n\nweb3.provider = new ProviderManager();\n\nweb3.setProvider = function(provider) {\n provider.onmessage = messageHandler;\n web3.provider.set(provider);\n web3.provider.sendQueued();\n};\n\nweb3.haveProvider = function() {\n return !!web3.provider.provider;\n};\n\nvar Filter = function(options, impl) {\n this.impl = impl;\n this.callbacks = [];\n\n var self = this;\n this.promise = impl.newFilter(options);\n this.promise.then(function (id) {\n self.id = id;\n web3.on(impl.changed, id, self.trigger.bind(self));\n web3.provider.startPolling({call: impl.changed, args: [id]}, id);\n });\n};\n\nFilter.prototype.arrived = function(callback) {\n this.changed(callback);\n};\n\nFilter.prototype.changed = function(callback) {\n var self = this;\n this.promise.then(function(id) {\n self.callbacks.push(callback);\n });\n};\n\nFilter.prototype.trigger = function(messages) {\n for(var i = 0; i < this.callbacks.length; i++) {\n this.callbacks[i].call(this, messages);\n }\n};\n\nFilter.prototype.uninstall = function() {\n var self = this;\n this.promise.then(function (id) {\n self.impl.uninstallFilter(id);\n web3.provider.stopPolling(id);\n web3.off(impl.changed, id);\n });\n};\n\nFilter.prototype.messages = function() {\n var self = this;\n return this.promise.then(function (id) {\n return self.impl.getMessages(id);\n });\n};\n\nFilter.prototype.logs = function () {\n return this.messages();\n};\n\nfunction messageHandler(data) {\n if(data._event !== undefined) {\n web3.trigger(data._event, data._id, data.data);\n return;\n }\n\n if(data._id) {\n var cb = web3._callbacks[data._id];\n if (cb) {\n cb.call(this, data.error, data.data);\n delete web3._callbacks[data._id];\n }\n }\n}\n\nmodule.exports = web3;\n", + "/*\n This file is part of ethereum.js.\n\n ethereum.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n ethereum.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with ethereum.js. If not, see .\n*/\n/** @file websocket.js\n * @authors:\n * Jeffrey Wilcke \n * Marek Kotewicz \n * Marian Oancea \n * @date 2014\n */\n\n// TODO: is these line is supposed to be here? \nif (\"build\" !== 'build') {/*\n var WebSocket = require('ws'); // jshint ignore:line\n*/}\n\nvar WebSocketProvider = function(host) {\n // onmessage handlers\n this.handlers = [];\n // queue will be filled with messages if send is invoked before the ws is ready\n this.queued = [];\n this.ready = false;\n\n this.ws = new WebSocket(host);\n\n var self = this;\n this.ws.onmessage = function(event) {\n for(var i = 0; i < self.handlers.length; i++) {\n self.handlers[i].call(self, JSON.parse(event.data), event);\n }\n };\n\n this.ws.onopen = function() {\n self.ready = true;\n\n for(var i = 0; i < self.queued.length; i++) {\n // Resend\n self.send(self.queued[i]);\n }\n };\n};\n\nWebSocketProvider.prototype.send = function(payload) {\n if(this.ready) {\n var data = JSON.stringify(payload);\n\n this.ws.send(data);\n } else {\n this.queued.push(payload);\n }\n};\n\nWebSocketProvider.prototype.onMessage = function(handler) {\n this.handlers.push(handler);\n};\n\nWebSocketProvider.prototype.unload = function() {\n this.ws.close();\n};\nObject.defineProperty(WebSocketProvider.prototype, \"onmessage\", {\n set: function(provider) { this.onMessage(provider); }\n});\n\nmodule.exports = WebSocketProvider;\n", + "var web3 = require('./lib/web3');\nweb3.providers.WebSocketProvider = require('./lib/websocket');\nweb3.providers.HttpRpcProvider = require('./lib/httprpc');\nweb3.providers.QtProvider = require('./lib/qt');\nweb3.providers.AutoProvider = require('./lib/autoprovider');\nweb3.contract = require('./lib/contract');\n\nmodule.exports = web3;\n" + ] +} \ No newline at end of file diff --git a/cmd/mist/assets/ext/ethereum.js/dist/ethereum.min.js b/cmd/mist/assets/ext/ethereum.js/dist/ethereum.min.js new file mode 100644 index 0000000000..0ae9610fca --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/dist/ethereum.min.js @@ -0,0 +1 @@ +require=function t(e,n,r){function o(a,s){if(!n[a]){if(!e[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[a]={exports:{}};e[a][0].call(l.exports,function(t){var n=e[a][1][t];return o(n?n:t)},l,l.exports,t,e,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;ai;i++)o+=r[i]/8;return o},c=function(){var t=function(t,e){return function(n,r){var o=t;if(0!==n.indexOf(o))return!1;var a=e(n,o);return r="number"==typeof r?r.toString(16):"string"==typeof r?web3.toHex(r):0===r.indexOf("0x")?r.substr(2):(+r).toString(16),i(r,2*a)}},e=function(t,e,n){return function(r,o){return r!==t?!1:i(n?n(o):o,2*e)}},n=function(t){return t?"0x1":"0x0"};return[t("uint",a),t("int",a),t("hash",a),t("string",s),t("real",u),t("ureal",u),e("address",20),e("bool",1,n)]},l=c(),h=function(t,e,n){var r="",a=o(t,e);if(-1!==a){r="0x"+i(a.toString(16),2);for(var s=t[a],u=0;un;n+=2){var o=t.charCodeAt(n);if(0===o)break;e+=String.fromCharCode(parseInt(t.substr(n,2),16))}return e},fromAscii:function(t,e){e=void 0===e?32:e;for(var n=this.toHex(t);n.length<2*e;)n+="00";return"0x"+n},toDecimal:function(t){return p(t.substring(2))},fromDecimal:function(t){return"0x"+d(t)},toEth:function(t){for(var e="string"==typeof t?0===t.indexOf("0x")?parseInt(t.substr(2),16):parseInt(t):t,n=0,r=["wei","Kwei","Mwei","Gwei","szabo","finney","ether","grand","Mether","Gether","Tether","Pether","Eether","Zether","Yether","Nether","Dether","Vether","Uether"];e>3e3&&n + + + + + + + + +

coinbase balance

+ +
+
+
+
+ + + diff --git a/cmd/mist/assets/ext/ethereum.js/example/contract.html b/cmd/mist/assets/ext/ethereum.js/example/contract.html new file mode 100644 index 0000000000..403d8c9d19 --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/example/contract.html @@ -0,0 +1,75 @@ + + + + + + + + + +

contract

+
+
+ +
+ +
+ + + diff --git a/cmd/mist/assets/ext/ethereum.js/example/node-app.js b/cmd/mist/assets/ext/ethereum.js/example/node-app.js new file mode 100644 index 0000000000..f63fa9115f --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/example/node-app.js @@ -0,0 +1,16 @@ +#!/usr/bin/env node + +require('es6-promise').polyfill(); + +var web3 = require("../index.js"); + +web3.setProvider(new web3.providers.HttpRpcProvider('http://localhost:8080')); + +web3.eth.coinbase.then(function(result){ + console.log(result); + return web3.eth.balanceAt(result); +}).then(function(balance){ + console.log(web3.toDecimal(balance)); +}).catch(function(err){ + console.log(err); +}); \ No newline at end of file diff --git a/cmd/mist/assets/ext/ethereum.js/gulpfile.js b/cmd/mist/assets/ext/ethereum.js/gulpfile.js new file mode 100644 index 0000000000..b17e50c39d --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/gulpfile.js @@ -0,0 +1,104 @@ +#!/usr/bin/env node + +'use strict'; + +var path = require('path'); + +var del = require('del'); +var gulp = require('gulp'); +var browserify = require('browserify'); +var jshint = require('gulp-jshint'); +var uglify = require('gulp-uglify'); +var rename = require('gulp-rename'); +var envify = require('envify/custom'); +var unreach = require('unreachable-branch-transform'); +var source = require('vinyl-source-stream'); +var exorcist = require('exorcist'); +var bower = require('bower'); + +var DEST = './dist/'; + +var build = function(src, dst, ugly) { + var result = browserify({ + debug: true, + insert_global_vars: false, + detectGlobals: false, + bundleExternal: false + }) + .require('./' + src + '.js', {expose: 'web3'}) + .add('./' + src + '.js') + .transform('envify', { + NODE_ENV: 'build' + }) + .transform('unreachable-branch-transform'); + + if (ugly) { + result = result.transform('uglifyify', { + mangle: false, + compress: { + dead_code: false, + conditionals: true, + unused: false, + hoist_funs: true, + hoist_vars: true, + negate_iife: false + }, + beautify: true, + warnings: true + }); + } + + return result.bundle() + .pipe(exorcist(path.join( DEST, dst + '.js.map'))) + .pipe(source(dst + '.js')) + .pipe(gulp.dest( DEST )); +}; + +var uglifyFile = function(file) { + return gulp.src( DEST + file + '.js') + .pipe(uglify()) + .pipe(rename(file + '.min.js')) + .pipe(gulp.dest( DEST )); +}; + +gulp.task('bower', function(cb){ + bower.commands.install().on('end', function (installed){ + console.log(installed); + cb(); + }); +}); + +gulp.task('clean', ['lint'], function(cb) { + del([ DEST ], cb); +}); + +gulp.task('lint', function(){ + return gulp.src(['./*.js', './lib/*.js']) + .pipe(jshint()) + .pipe(jshint.reporter('default')); +}); + +gulp.task('build', ['clean'], function () { + return build('index', 'ethereum', true); +}); + +gulp.task('buildDev', ['clean'], function () { + return build('index', 'ethereum', false); +}); + +gulp.task('uglify', ['build'], function(){ + return uglifyFile('ethereum'); +}); + +gulp.task('uglify', ['buildDev'], function(){ + return uglifyFile('ethereum'); +}); + +gulp.task('watch', function() { + gulp.watch(['./lib/*.js'], ['lint', 'prepare', 'build']); +}); + +gulp.task('release', ['bower', 'lint', 'build', 'uglify']); +gulp.task('dev', ['bower', 'lint', 'buildDev', 'uglify']); +gulp.task('default', ['dev']); + diff --git a/cmd/mist/assets/ext/ethereum.js/index.js b/cmd/mist/assets/ext/ethereum.js/index.js new file mode 100644 index 0000000000..99ce66fadb --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/index.js @@ -0,0 +1,8 @@ +var web3 = require('./lib/web3'); +web3.providers.WebSocketProvider = require('./lib/websocket'); +web3.providers.HttpRpcProvider = require('./lib/httprpc'); +web3.providers.QtProvider = require('./lib/qt'); +web3.providers.AutoProvider = require('./lib/autoprovider'); +web3.contract = require('./lib/contract'); + +module.exports = web3; diff --git a/cmd/mist/assets/ext/ethereum.js/lib/abi.js b/cmd/mist/assets/ext/ethereum.js/lib/abi.js new file mode 100644 index 0000000000..5a4d645158 --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/lib/abi.js @@ -0,0 +1,265 @@ +/* + This file is part of ethereum.js. + + ethereum.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ethereum.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with ethereum.js. If not, see . +*/ +/** @file abi.js + * @authors: + * Marek Kotewicz + * Gav Wood + * @date 2014 + */ + +// TODO: is these line is supposed to be here? +if (process.env.NODE_ENV !== 'build') { + var web3 = require('./web3'); // jshint ignore:line +} + +// TODO: make these be actually accurate instead of falling back onto JS's doubles. +var hexToDec = function (hex) { + return parseInt(hex, 16).toString(); +}; + +var decToHex = function (dec) { + return parseInt(dec).toString(16); +}; + +var findIndex = function (array, callback) { + var end = false; + var i = 0; + for (; i < array.length && !end; i++) { + end = callback(array[i]); + } + return end ? i - 1 : -1; +}; + +var findMethodIndex = function (json, methodName) { + return findIndex(json, function (method) { + return method.name === methodName; + }); +}; + +var padLeft = function (string, chars) { + return new Array(chars - string.length + 1).join("0") + string; +}; + +var calcBitPadding = function (type, expected) { + var value = type.slice(expected.length); + if (value === "") { + return 32; + } + return parseInt(value) / 8; +}; + +var calcBytePadding = function (type, expected) { + var value = type.slice(expected.length); + if (value === "") { + return 32; + } + return parseInt(value); +}; + +var calcRealPadding = function (type, expected) { + var value = type.slice(expected.length); + if (value === "") { + return 32; + } + var sizes = value.split('x'); + for (var padding = 0, i = 0; i < sizes; i++) { + padding += (sizes[i] / 8); + } + return padding; +}; + +var setupInputTypes = function () { + + var prefixedType = function (prefix, calcPadding) { + return function (type, value) { + var expected = prefix; + if (type.indexOf(expected) !== 0) { + return false; + } + + var padding = calcPadding(type, expected); + if (typeof value === "number") + value = value.toString(16); + else if (typeof value === "string") + value = web3.toHex(value); + else if (value.indexOf('0x') === 0) + value = value.substr(2); + else + value = (+value).toString(16); + return padLeft(value, padding * 2); + }; + }; + + var namedType = function (name, padding, formatter) { + return function (type, value) { + if (type !== name) { + return false; + } + + return padLeft(formatter ? formatter(value) : value, padding * 2); + }; + }; + + var formatBool = function (value) { + return value ? '0x1' : '0x0'; + }; + + return [ + prefixedType('uint', calcBitPadding), + prefixedType('int', calcBitPadding), + prefixedType('hash', calcBitPadding), + prefixedType('string', calcBytePadding), + prefixedType('real', calcRealPadding), + prefixedType('ureal', calcRealPadding), + namedType('address', 20), + namedType('bool', 1, formatBool), + ]; +}; + +var inputTypes = setupInputTypes(); + +var toAbiInput = function (json, methodName, params) { + var bytes = ""; + var index = findMethodIndex(json, methodName); + + if (index === -1) { + return; + } + + bytes = "0x" + padLeft(index.toString(16), 2); + var method = json[index]; + + for (var i = 0; i < method.inputs.length; i++) { + var found = false; + for (var j = 0; j < inputTypes.length && !found; j++) { + found = inputTypes[j](method.inputs[i].type, params[i]); + } + if (!found) { + console.error('unsupported json type: ' + method.inputs[i].type); + } + bytes += found; + } + return bytes; +}; + +var setupOutputTypes = function () { + + var prefixedType = function (prefix, calcPadding) { + return function (type) { + var expected = prefix; + if (type.indexOf(expected) !== 0) { + return -1; + } + + var padding = calcPadding(type, expected); + return padding * 2; + }; + }; + + var namedType = function (name, padding) { + return function (type) { + return name === type ? padding * 2 : -1; + }; + }; + + var formatInt = function (value) { + return value.length <= 8 ? +parseInt(value, 16) : hexToDec(value); + }; + + var formatHash = function (value) { + return "0x" + value; + }; + + var formatBool = function (value) { + return value === '1' ? true : false; + }; + + var formatString = function (value) { + return web3.toAscii(value); + }; + + return [ + { padding: prefixedType('uint', calcBitPadding), format: formatInt }, + { padding: prefixedType('int', calcBitPadding), format: formatInt }, + { padding: prefixedType('hash', calcBitPadding), format: formatHash }, + { padding: prefixedType('string', calcBytePadding), format: formatString }, + { padding: prefixedType('real', calcRealPadding), format: formatInt }, + { padding: prefixedType('ureal', calcRealPadding), format: formatInt }, + { padding: namedType('address', 20) }, + { padding: namedType('bool', 1), format: formatBool } + ]; +}; + +var outputTypes = setupOutputTypes(); + +var fromAbiOutput = function (json, methodName, output) { + var index = findMethodIndex(json, methodName); + + if (index === -1) { + return; + } + + output = output.slice(2); + + var result = []; + var method = json[index]; + for (var i = 0; i < method.outputs.length; i++) { + var padding = -1; + for (var j = 0; j < outputTypes.length && padding === -1; j++) { + padding = outputTypes[j].padding(method.outputs[i].type); + } + + if (padding === -1) { + // not found output parsing + continue; + } + var res = output.slice(0, padding); + var formatter = outputTypes[j - 1].format; + result.push(formatter ? formatter(res) : ("0x" + res)); + output = output.slice(padding); + } + + return result; +}; + +var inputParser = function (json) { + var parser = {}; + json.forEach(function (method) { + parser[method.name] = function () { + var params = Array.prototype.slice.call(arguments); + return toAbiInput(json, method.name, params); + }; + }); + + return parser; +}; + +var outputParser = function (json) { + var parser = {}; + json.forEach(function (method) { + parser[method.name] = function (output) { + return fromAbiOutput(json, method.name, output); + }; + }); + + return parser; +}; + +module.exports = { + inputParser: inputParser, + outputParser: outputParser +}; diff --git a/cmd/mist/assets/ext/ethereum.js/lib/autoprovider.js b/cmd/mist/assets/ext/ethereum.js/lib/autoprovider.js new file mode 100644 index 0000000000..1138736740 --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/lib/autoprovider.js @@ -0,0 +1,102 @@ +/* + This file is part of ethereum.js. + + ethereum.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ethereum.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with ethereum.js. If not, see . +*/ +/** @file autoprovider.js + * @authors: + * Marek Kotewicz + * Marian Oancea + * @date 2014 + */ + +/* + * @brief if qt object is available, uses QtProvider, + * if not tries to connect over websockets + * if it fails, it uses HttpRpcProvider + */ + +// TODO: is these line is supposed to be here? +if (process.env.NODE_ENV !== 'build') { + var WebSocket = require('ws'); // jshint ignore:line + var web3 = require('./web3'); // jshint ignore:line +} + +var AutoProvider = function (userOptions) { + if (web3.haveProvider()) { + return; + } + + // before we determine what provider we are, we have to cache request + this.sendQueue = []; + this.onmessageQueue = []; + + if (navigator.qt) { + this.provider = new web3.providers.QtProvider(); + return; + } + + userOptions = userOptions || {}; + var options = { + httprpc: userOptions.httprpc || 'http://localhost:8080', + websockets: userOptions.websockets || 'ws://localhost:40404/eth' + }; + + var self = this; + var closeWithSuccess = function (success) { + ws.close(); + if (success) { + self.provider = new web3.providers.WebSocketProvider(options.websockets); + } else { + self.provider = new web3.providers.HttpRpcProvider(options.httprpc); + self.poll = self.provider.poll.bind(self.provider); + } + self.sendQueue.forEach(function (payload) { + self.provider(payload); + }); + self.onmessageQueue.forEach(function (handler) { + self.provider.onmessage = handler; + }); + }; + + var ws = new WebSocket(options.websockets); + + ws.onopen = function() { + closeWithSuccess(true); + }; + + ws.onerror = function() { + closeWithSuccess(false); + }; +}; + +AutoProvider.prototype.send = function (payload) { + if (this.provider) { + this.provider.send(payload); + return; + } + this.sendQueue.push(payload); +}; + +Object.defineProperty(AutoProvider.prototype, 'onmessage', { + set: function (handler) { + if (this.provider) { + this.provider.onmessage = handler; + return; + } + this.onmessageQueue.push(handler); + } +}); + +module.exports = AutoProvider; diff --git a/cmd/mist/assets/ext/ethereum.js/lib/contract.js b/cmd/mist/assets/ext/ethereum.js/lib/contract.js new file mode 100644 index 0000000000..b103390034 --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/lib/contract.js @@ -0,0 +1,65 @@ +/* + This file is part of ethereum.js. + + ethereum.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ethereum.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with ethereum.js. If not, see . +*/ +/** @file contract.js + * @authors: + * Marek Kotewicz + * @date 2014 + */ + +// TODO: is these line is supposed to be here? +if (process.env.NODE_ENV !== 'build') { + var web3 = require('./web3'); // jshint ignore:line +} + +var abi = require('./abi'); + +var contract = function (address, desc) { + var inputParser = abi.inputParser(desc); + var outputParser = abi.outputParser(desc); + + var contract = {}; + + desc.forEach(function (method) { + contract[method.name] = function () { + var params = Array.prototype.slice.call(arguments); + var parsed = inputParser[method.name].apply(null, params); + + var onSuccess = function (result) { + return outputParser[method.name](result); + }; + + return { + call: function (extra) { + extra = extra || {}; + extra.to = address; + extra.data = parsed; + return web3.eth.call(extra).then(onSuccess); + }, + transact: function (extra) { + extra = extra || {}; + extra.to = address; + extra.data = parsed; + return web3.eth.transact(extra).then(onSuccess); + } + }; + }; + }); + + return contract; +}; + +module.exports = contract; diff --git a/cmd/mist/assets/ext/ethereum.js/lib/httprpc.js b/cmd/mist/assets/ext/ethereum.js/lib/httprpc.js new file mode 100644 index 0000000000..d315201f1c --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/lib/httprpc.js @@ -0,0 +1,94 @@ +/* + This file is part of ethereum.js. + + ethereum.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ethereum.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with ethereum.js. If not, see . +*/ +/** @file httprpc.js + * @authors: + * Marek Kotewicz + * Marian Oancea + * @date 2014 + */ + +// TODO: is these line is supposed to be here? +if (process.env.NODE_ENV !== 'build') { + var XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest; // jshint ignore:line +} + +var HttpRpcProvider = function (host) { + this.handlers = []; + this.host = host; +}; + +function formatJsonRpcObject(object) { + return { + jsonrpc: '2.0', + method: object.call, + params: object.args, + id: object._id + }; +} + +function formatJsonRpcMessage(message) { + var object = JSON.parse(message); + + return { + _id: object.id, + data: object.result, + error: object.error + }; +} + +HttpRpcProvider.prototype.sendRequest = function (payload, cb) { + var data = formatJsonRpcObject(payload); + + var request = new XMLHttpRequest(); + request.open("POST", this.host, true); + request.send(JSON.stringify(data)); + request.onreadystatechange = function () { + if (request.readyState === 4 && cb) { + cb(request); + } + }; +}; + +HttpRpcProvider.prototype.send = function (payload) { + var self = this; + this.sendRequest(payload, function (request) { + self.handlers.forEach(function (handler) { + handler.call(self, formatJsonRpcMessage(request.responseText)); + }); + }); +}; + +HttpRpcProvider.prototype.poll = function (payload, id) { + var self = this; + this.sendRequest(payload, function (request) { + var parsed = JSON.parse(request.responseText); + if (parsed.error || (parsed.result instanceof Array ? parsed.result.length === 0 : !parsed.result)) { + return; + } + self.handlers.forEach(function (handler) { + handler.call(self, {_event: payload.call, _id: id, data: parsed.result}); + }); + }); +}; + +Object.defineProperty(HttpRpcProvider.prototype, "onmessage", { + set: function (handler) { + this.handlers.push(handler); + } +}); + +module.exports = HttpRpcProvider; diff --git a/cmd/mist/assets/ext/ethereum.js/lib/qt.js b/cmd/mist/assets/ext/ethereum.js/lib/qt.js new file mode 100644 index 0000000000..f022395476 --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/lib/qt.js @@ -0,0 +1,45 @@ +/* + This file is part of ethereum.js. + + ethereum.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ethereum.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with ethereum.js. If not, see . +*/ +/** @file qt.js + * @authors: + * Jeffrey Wilcke + * Marek Kotewicz + * @date 2014 + */ + +var QtProvider = function() { + this.handlers = []; + + var self = this; + navigator.qt.onmessage = function (message) { + self.handlers.forEach(function (handler) { + handler.call(self, JSON.parse(message.data)); + }); + }; +}; + +QtProvider.prototype.send = function(payload) { + navigator.qt.postMessage(JSON.stringify(payload)); +}; + +Object.defineProperty(QtProvider.prototype, "onmessage", { + set: function(handler) { + this.handlers.push(handler); + } +}); + +module.exports = QtProvider; diff --git a/cmd/mist/assets/ext/ethereum.js/lib/web3.js b/cmd/mist/assets/ext/ethereum.js/lib/web3.js new file mode 100644 index 0000000000..8f5f55b406 --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/lib/web3.js @@ -0,0 +1,509 @@ +/* + This file is part of ethereum.js. + + ethereum.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ethereum.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with ethereum.js. If not, see . +*/ +/** @file main.js + * @authors: + * Jeffrey Wilcke + * Marek Kotewicz + * Marian Oancea + * Gav Wood + * @date 2014 + */ + +function flattenPromise (obj) { + if (obj instanceof Promise) { + return Promise.resolve(obj); + } + + if (obj instanceof Array) { + return new Promise(function (resolve) { + var promises = obj.map(function (o) { + return flattenPromise(o); + }); + + return Promise.all(promises).then(function (res) { + for (var i = 0; i < obj.length; i++) { + obj[i] = res[i]; + } + resolve(obj); + }); + }); + } + + if (obj instanceof Object) { + return new Promise(function (resolve) { + var keys = Object.keys(obj); + var promises = keys.map(function (key) { + return flattenPromise(obj[key]); + }); + + return Promise.all(promises).then(function (res) { + for (var i = 0; i < keys.length; i++) { + obj[keys[i]] = res[i]; + } + resolve(obj); + }); + }); + } + + return Promise.resolve(obj); +} + +var web3Methods = function () { + return [ + { name: 'sha3', call: 'web3_sha3' } + ]; +}; + +var ethMethods = function () { + var blockCall = function (args) { + return typeof args[0] === "string" ? "eth_blockByHash" : "eth_blockByNumber"; + }; + + var transactionCall = function (args) { + return typeof args[0] === "string" ? 'eth_transactionByHash' : 'eth_transactionByNumber'; + }; + + var uncleCall = function (args) { + return typeof args[0] === "string" ? 'eth_uncleByHash' : 'eth_uncleByNumber'; + }; + + var methods = [ + { name: 'balanceAt', call: 'eth_balanceAt' }, + { name: 'stateAt', call: 'eth_stateAt' }, + { name: 'storageAt', call: 'eth_storageAt' }, + { name: 'countAt', call: 'eth_countAt'}, + { name: 'codeAt', call: 'eth_codeAt' }, + { name: 'transact', call: 'eth_transact' }, + { name: 'call', call: 'eth_call' }, + { name: 'block', call: blockCall }, + { name: 'transaction', call: transactionCall }, + { name: 'uncle', call: uncleCall }, + { name: 'compilers', call: 'eth_compilers' }, + { name: 'lll', call: 'eth_lll' }, + { name: 'solidity', call: 'eth_solidity' }, + { name: 'serpent', call: 'eth_serpent' }, + { name: 'logs', call: 'eth_logs' } + ]; + return methods; +}; + +var ethProperties = function () { + return [ + { name: 'coinbase', getter: 'eth_coinbase', setter: 'eth_setCoinbase' }, + { name: 'listening', getter: 'eth_listening', setter: 'eth_setListening' }, + { name: 'mining', getter: 'eth_mining', setter: 'eth_setMining' }, + { name: 'gasPrice', getter: 'eth_gasPrice' }, + { name: 'account', getter: 'eth_account' }, + { name: 'accounts', getter: 'eth_accounts' }, + { name: 'peerCount', getter: 'eth_peerCount' }, + { name: 'defaultBlock', getter: 'eth_defaultBlock', setter: 'eth_setDefaultBlock' }, + { name: 'number', getter: 'eth_number'} + ]; +}; + +var dbMethods = function () { + return [ + { name: 'put', call: 'db_put' }, + { name: 'get', call: 'db_get' }, + { name: 'putString', call: 'db_putString' }, + { name: 'getString', call: 'db_getString' } + ]; +}; + +var shhMethods = function () { + return [ + { name: 'post', call: 'shh_post' }, + { name: 'newIdentity', call: 'shh_newIdentity' }, + { name: 'haveIdentity', call: 'shh_haveIdentity' }, + { name: 'newGroup', call: 'shh_newGroup' }, + { name: 'addToGroup', call: 'shh_addToGroup' } + ]; +}; + +var ethWatchMethods = function () { + var newFilter = function (args) { + return typeof args[0] === 'string' ? 'eth_newFilterString' : 'eth_newFilter'; + }; + + return [ + { name: 'newFilter', call: newFilter }, + { name: 'uninstallFilter', call: 'eth_uninstallFilter' }, + { name: 'getMessages', call: 'eth_filterLogs' } + ]; +}; + +var shhWatchMethods = function () { + return [ + { name: 'newFilter', call: 'shh_newFilter' }, + { name: 'uninstallFilter', call: 'shh_uninstallFilter' }, + { name: 'getMessage', call: 'shh_getMessages' } + ]; +}; + +var setupMethods = function (obj, methods) { + methods.forEach(function (method) { + obj[method.name] = function () { + return flattenPromise(Array.prototype.slice.call(arguments)).then(function (args) { + var call = typeof method.call === "function" ? method.call(args) : method.call; + return {call: call, args: args}; + }).then(function (request) { + return new Promise(function (resolve, reject) { + web3.provider.send(request, function (err, result) { + if (!err) { + resolve(result); + return; + } + reject(err); + }); + }); + }).catch(function(err) { + console.error(err); + }); + }; + }); +}; + +var setupProperties = function (obj, properties) { + properties.forEach(function (property) { + var proto = {}; + proto.get = function () { + return new Promise(function(resolve, reject) { + web3.provider.send({call: property.getter}, function(err, result) { + if (!err) { + resolve(result); + return; + } + reject(err); + }); + }); + }; + if (property.setter) { + proto.set = function (val) { + return flattenPromise([val]).then(function (args) { + return new Promise(function (resolve) { + web3.provider.send({call: property.setter, args: args}, function (err, result) { + if (!err) { + resolve(result); + return; + } + reject(err); + }); + }); + }).catch(function (err) { + console.error(err); + }); + }; + } + Object.defineProperty(obj, property.name, proto); + }); +}; + +// TODO: import from a dependency, don't duplicate. +var hexToDec = function (hex) { + return parseInt(hex, 16).toString(); +}; + +var decToHex = function (dec) { + return parseInt(dec).toString(16); +}; + + +var web3 = { + _callbacks: {}, + _events: {}, + providers: {}, + + toHex: function(str) { + var hex = ""; + for(var i = 0; i < str.length; i++) { + var n = str.charCodeAt(i).toString(16); + hex += n.length < 2 ? '0' + n : n; + } + + return hex; + }, + + toAscii: function(hex) { + // Find termination + var str = ""; + var i = 0, l = hex.length; + if (hex.substring(0, 2) === '0x') + i = 2; + for(; i < l; i+=2) { + var code = hex.charCodeAt(i); + if(code === 0) { + break; + } + + str += String.fromCharCode(parseInt(hex.substr(i, 2), 16)); + } + + return str; + }, + + fromAscii: function(str, pad) { + pad = pad === undefined ? 32 : pad; + var hex = this.toHex(str); + while(hex.length < pad*2) + hex += "00"; + return "0x" + hex; + }, + + toDecimal: function (val) { + return hexToDec(val.substring(2)); + }, + + fromDecimal: function (val) { + return "0x" + decToHex(val); + }, + + toEth: function(str) { + var val = typeof str === "string" ? str.indexOf('0x') === 0 ? parseInt(str.substr(2), 16) : parseInt(str) : str; + var unit = 0; + var units = [ 'wei', 'Kwei', 'Mwei', 'Gwei', 'szabo', 'finney', 'ether', 'grand', 'Mether', 'Gether', 'Tether', 'Pether', 'Eether', 'Zether', 'Yether', 'Nether', 'Dether', 'Vether', 'Uether' ]; + while (val > 3000 && unit < units.length - 1) + { + val /= 1000; + unit++; + } + var s = val.toString().length < val.toFixed(2).length ? val.toString() : val.toFixed(2); + var replaceFunction = function($0, $1, $2) { + return $1 + ',' + $2; + }; + + while (true) { + var o = s; + s = s.replace(/(\d)(\d\d\d[\.\,])/, replaceFunction); + if (o === s) + break; + } + return s + ' ' + units[unit]; + }, + + eth: { + prototype: Object(), // jshint ignore:line + watch: function (params) { + return new Filter(params, ethWatch); + } + }, + + db: { + prototype: Object() // jshint ignore:line + }, + + shh: { + prototype: Object(), // jshint ignore:line + watch: function (params) { + return new Filter(params, shhWatch); + } + }, + + on: function(event, id, cb) { + if(web3._events[event] === undefined) { + web3._events[event] = {}; + } + + web3._events[event][id] = cb; + return this; + }, + + off: function(event, id) { + if(web3._events[event] !== undefined) { + delete web3._events[event][id]; + } + + return this; + }, + + trigger: function(event, id, data) { + var callbacks = web3._events[event]; + if (!callbacks || !callbacks[id]) { + return; + } + var cb = callbacks[id]; + cb(data); + } +}; + +setupMethods(web3, web3Methods()); +setupMethods(web3.eth, ethMethods()); +setupProperties(web3.eth, ethProperties()); +setupMethods(web3.db, dbMethods()); +setupMethods(web3.shh, shhMethods()); + +var ethWatch = { + changed: 'eth_changed' +}; +setupMethods(ethWatch, ethWatchMethods()); +var shhWatch = { + changed: 'shh_changed' +}; +setupMethods(shhWatch, shhWatchMethods()); + +var ProviderManager = function() { + this.queued = []; + this.polls = []; + this.ready = false; + this.provider = undefined; + this.id = 1; + + var self = this; + var poll = function () { + if (self.provider && self.provider.poll) { + self.polls.forEach(function (data) { + data.data._id = self.id; + self.id++; + self.provider.poll(data.data, data.id); + }); + } + setTimeout(poll, 12000); + }; + poll(); +}; + +ProviderManager.prototype.send = function(data, cb) { + data._id = this.id; + if (cb) { + web3._callbacks[data._id] = cb; + } + + data.args = data.args || []; + this.id++; + + if(this.provider !== undefined) { + this.provider.send(data); + } else { + console.warn("provider is not set"); + this.queued.push(data); + } +}; + +ProviderManager.prototype.set = function(provider) { + if(this.provider !== undefined && this.provider.unload !== undefined) { + this.provider.unload(); + } + + this.provider = provider; + this.ready = true; +}; + +ProviderManager.prototype.sendQueued = function() { + for(var i = 0; this.queued.length; i++) { + // Resend + this.send(this.queued[i]); + } +}; + +ProviderManager.prototype.installed = function() { + return this.provider !== undefined; +}; + +ProviderManager.prototype.startPolling = function (data, pollId) { + if (!this.provider || !this.provider.poll) { + return; + } + this.polls.push({data: data, id: pollId}); +}; + +ProviderManager.prototype.stopPolling = function (pollId) { + for (var i = this.polls.length; i--;) { + var poll = this.polls[i]; + if (poll.id === pollId) { + this.polls.splice(i, 1); + } + } +}; + +web3.provider = new ProviderManager(); + +web3.setProvider = function(provider) { + provider.onmessage = messageHandler; + web3.provider.set(provider); + web3.provider.sendQueued(); +}; + +web3.haveProvider = function() { + return !!web3.provider.provider; +}; + +var Filter = function(options, impl) { + this.impl = impl; + this.callbacks = []; + + var self = this; + this.promise = impl.newFilter(options); + this.promise.then(function (id) { + self.id = id; + web3.on(impl.changed, id, self.trigger.bind(self)); + web3.provider.startPolling({call: impl.changed, args: [id]}, id); + }); +}; + +Filter.prototype.arrived = function(callback) { + this.changed(callback); +}; + +Filter.prototype.changed = function(callback) { + var self = this; + this.promise.then(function(id) { + self.callbacks.push(callback); + }); +}; + +Filter.prototype.trigger = function(messages) { + for(var i = 0; i < this.callbacks.length; i++) { + this.callbacks[i].call(this, messages); + } +}; + +Filter.prototype.uninstall = function() { + var self = this; + this.promise.then(function (id) { + self.impl.uninstallFilter(id); + web3.provider.stopPolling(id); + web3.off(impl.changed, id); + }); +}; + +Filter.prototype.messages = function() { + var self = this; + return this.promise.then(function (id) { + return self.impl.getMessages(id); + }); +}; + +Filter.prototype.logs = function () { + return this.messages(); +}; + +function messageHandler(data) { + if(data._event !== undefined) { + web3.trigger(data._event, data._id, data.data); + return; + } + + if(data._id) { + var cb = web3._callbacks[data._id]; + if (cb) { + cb.call(this, data.error, data.data); + delete web3._callbacks[data._id]; + } + } +} + +if (typeof(module) !== "undefined") + module.exports = web3; diff --git a/cmd/mist/assets/ext/ethereum.js/lib/websocket.js b/cmd/mist/assets/ext/ethereum.js/lib/websocket.js new file mode 100644 index 0000000000..ddb44aed5d --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/lib/websocket.js @@ -0,0 +1,77 @@ +/* + This file is part of ethereum.js. + + ethereum.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ethereum.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with ethereum.js. If not, see . +*/ +/** @file websocket.js + * @authors: + * Jeffrey Wilcke + * Marek Kotewicz + * Marian Oancea + * @date 2014 + */ + +// TODO: is these line is supposed to be here? +if (process.env.NODE_ENV !== 'build') { + var WebSocket = require('ws'); // jshint ignore:line +} + +var WebSocketProvider = function(host) { + // onmessage handlers + this.handlers = []; + // queue will be filled with messages if send is invoked before the ws is ready + this.queued = []; + this.ready = false; + + this.ws = new WebSocket(host); + + var self = this; + this.ws.onmessage = function(event) { + for(var i = 0; i < self.handlers.length; i++) { + self.handlers[i].call(self, JSON.parse(event.data), event); + } + }; + + this.ws.onopen = function() { + self.ready = true; + + for(var i = 0; i < self.queued.length; i++) { + // Resend + self.send(self.queued[i]); + } + }; +}; + +WebSocketProvider.prototype.send = function(payload) { + if(this.ready) { + var data = JSON.stringify(payload); + + this.ws.send(data); + } else { + this.queued.push(payload); + } +}; + +WebSocketProvider.prototype.onMessage = function(handler) { + this.handlers.push(handler); +}; + +WebSocketProvider.prototype.unload = function() { + this.ws.close(); +}; +Object.defineProperty(WebSocketProvider.prototype, "onmessage", { + set: function(provider) { this.onMessage(provider); } +}); + +module.exports = WebSocketProvider; diff --git a/cmd/mist/assets/ext/ethereum.js/package.json b/cmd/mist/assets/ext/ethereum.js/package.json new file mode 100644 index 0000000000..8f5ba22555 --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/package.json @@ -0,0 +1,67 @@ +{ + "name": "ethereum.js", + "namespace": "ethereum", + "version": "0.0.6", + "description": "Ethereum Compatible JavaScript API", + "main": "./index.js", + "directories": { + "lib": "./lib" + }, + "dependencies": { + "es6-promise": "*", + "ws": "*", + "xmlhttprequest": "*" + }, + "devDependencies": { + "bower": ">=1.3.0", + "browserify": ">=6.0", + "del": ">=0.1.1", + "envify": "^3.0.0", + "exorcist": "^0.1.6", + "gulp": ">=3.4.0", + "gulp-jshint": ">=1.5.0", + "gulp-rename": ">=1.2.0", + "gulp-uglify": ">=1.0.0", + "jshint": ">=2.5.0", + "uglifyify": "^2.6.0", + "unreachable-branch-transform": "^0.1.0", + "vinyl-source-stream": "^1.0.0" + }, + "scripts": { + "build": "gulp", + "watch": "gulp watch", + "lint": "gulp lint" + }, + "repository": { + "type": "git", + "url": "https://github.com/ethereum/ethereum.js.git" + }, + "homepage": "https://github.com/ethereum/ethereum.js", + "bugs": { + "url": "https://github.com/ethereum/ethereum.js/issues" + }, + "keywords": [ + "ethereum", + "javascript", + "API" + ], + "author": "ethdev.com", + "authors": [ + { + "name": "Jeffery Wilcke", + "email": "jeff@ethdev.com", + "url": "https://github.com/obscuren" + }, + { + "name": "Marek Kotewicz", + "email": "marek@ethdev.com", + "url": "https://github.com/debris" + }, + { + "name": "Marian Oancea", + "email": "marian@ethdev.com", + "url": "https://github.com/cubedro" + } + ], + "license": "LGPL-3.0" +} diff --git a/cmd/mist/assets/qml/browser.qml b/cmd/mist/assets/qml/browser.qml index c2f8741bc3..589f20dc6b 100644 --- a/cmd/mist/assets/qml/browser.qml +++ b/cmd/mist/assets/qml/browser.qml @@ -153,9 +153,9 @@ Rectangle { } function injectJs(js) { - //webview.experimental.navigatorQtObjectEnabled = true; - //webview.experimental.evaluateJavaScript(js) - //webview.experimental.javascriptEnabled = true; + webview.experimental.navigatorQtObjectEnabled = true; + webview.experimental.evaluateJavaScript(js) + webview.experimental.javascriptEnabled = true; } function sendMessage(data) { @@ -166,7 +166,7 @@ Rectangle { experimental.preferences.javascriptEnabled: true experimental.preferences.navigatorQtObjectEnabled: true experimental.preferences.developerExtrasEnabled: true - experimental.userScripts: ["../ext/q.js", "../ext/eth.js/main.js", "../ext/eth.js/qt.js", "../ext/setup.js"] + experimental.userScripts: ["../ext/q.js", "../ext/ethereum.js/lib/web3.js", "../ext/ethereum.js/lib/qt.js", "../ext/setup.js"] experimental.onMessageReceived: { console.log("[onMessageReceived]: ", message.data) // TODO move to messaging.js diff --git a/cmd/mist/gui.go b/cmd/mist/gui.go index 083fd5d0a3..fd2ad5a117 100644 --- a/cmd/mist/gui.go +++ b/cmd/mist/gui.go @@ -401,9 +401,9 @@ func (gui *Gui) setup() { // Inject javascript files each time navigation is requested. // Unfortunately webview.experimental.userScripts injects _after_ // the page has loaded which kind of renders it useless... - jsfiles := loadJavascriptAssets(gui) + //jsfiles := loadJavascriptAssets(gui) gui.getObjectByName("webView").On("navigationRequested", func() { - gui.getObjectByName("webView").Call("injectJs", jsfiles) + //gui.getObjectByName("webView").Call("injectJs", jsfiles) }) gui.whisper.SetView(gui.getObjectByName("whisperView")) From aee82d3196711f0dc46a625e31dc3a642e4e889b Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 9 Jan 2015 13:00:37 +0100 Subject: [PATCH 124/132] removed --- cmd/mist/assets/ext/ethereum.js/.bowerrc | 5 - cmd/mist/assets/ext/ethereum.js/.editorconfig | 12 - cmd/mist/assets/ext/ethereum.js/.gitignore | 18 - cmd/mist/assets/ext/ethereum.js/.jshintrc | 50 - cmd/mist/assets/ext/ethereum.js/.npmignore | 9 - cmd/mist/assets/ext/ethereum.js/.travis.yml | 11 - cmd/mist/assets/ext/ethereum.js/LICENSE | 14 - cmd/mist/assets/ext/ethereum.js/README.md | 79 -- cmd/mist/assets/ext/ethereum.js/bower.json | 51 - .../assets/ext/ethereum.js/dist/ethereum.js | 1184 ----------------- .../ext/ethereum.js/dist/ethereum.js.map | 29 - .../ext/ethereum.js/dist/ethereum.min.js | 1 - .../ext/ethereum.js/example/balance.html | 41 - .../ext/ethereum.js/example/contract.html | 75 -- .../ext/ethereum.js/example/node-app.js | 16 - cmd/mist/assets/ext/ethereum.js/gulpfile.js | 104 -- cmd/mist/assets/ext/ethereum.js/index.js | 8 - cmd/mist/assets/ext/ethereum.js/lib/abi.js | 265 ---- .../ext/ethereum.js/lib/autoprovider.js | 102 -- .../assets/ext/ethereum.js/lib/contract.js | 65 - .../assets/ext/ethereum.js/lib/httprpc.js | 94 -- cmd/mist/assets/ext/ethereum.js/lib/qt.js | 45 - cmd/mist/assets/ext/ethereum.js/lib/web3.js | 509 ------- .../assets/ext/ethereum.js/lib/websocket.js | 77 -- cmd/mist/assets/ext/ethereum.js/package.json | 67 - 25 files changed, 2931 deletions(-) delete mode 100644 cmd/mist/assets/ext/ethereum.js/.bowerrc delete mode 100644 cmd/mist/assets/ext/ethereum.js/.editorconfig delete mode 100644 cmd/mist/assets/ext/ethereum.js/.gitignore delete mode 100644 cmd/mist/assets/ext/ethereum.js/.jshintrc delete mode 100644 cmd/mist/assets/ext/ethereum.js/.npmignore delete mode 100644 cmd/mist/assets/ext/ethereum.js/.travis.yml delete mode 100644 cmd/mist/assets/ext/ethereum.js/LICENSE delete mode 100644 cmd/mist/assets/ext/ethereum.js/README.md delete mode 100644 cmd/mist/assets/ext/ethereum.js/bower.json delete mode 100644 cmd/mist/assets/ext/ethereum.js/dist/ethereum.js delete mode 100644 cmd/mist/assets/ext/ethereum.js/dist/ethereum.js.map delete mode 100644 cmd/mist/assets/ext/ethereum.js/dist/ethereum.min.js delete mode 100644 cmd/mist/assets/ext/ethereum.js/example/balance.html delete mode 100644 cmd/mist/assets/ext/ethereum.js/example/contract.html delete mode 100644 cmd/mist/assets/ext/ethereum.js/example/node-app.js delete mode 100644 cmd/mist/assets/ext/ethereum.js/gulpfile.js delete mode 100644 cmd/mist/assets/ext/ethereum.js/index.js delete mode 100644 cmd/mist/assets/ext/ethereum.js/lib/abi.js delete mode 100644 cmd/mist/assets/ext/ethereum.js/lib/autoprovider.js delete mode 100644 cmd/mist/assets/ext/ethereum.js/lib/contract.js delete mode 100644 cmd/mist/assets/ext/ethereum.js/lib/httprpc.js delete mode 100644 cmd/mist/assets/ext/ethereum.js/lib/qt.js delete mode 100644 cmd/mist/assets/ext/ethereum.js/lib/web3.js delete mode 100644 cmd/mist/assets/ext/ethereum.js/lib/websocket.js delete mode 100644 cmd/mist/assets/ext/ethereum.js/package.json diff --git a/cmd/mist/assets/ext/ethereum.js/.bowerrc b/cmd/mist/assets/ext/ethereum.js/.bowerrc deleted file mode 100644 index c3a8813e8b..0000000000 --- a/cmd/mist/assets/ext/ethereum.js/.bowerrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "directory": "example/js/", - "cwd": "./", - "analytics": false -} \ No newline at end of file diff --git a/cmd/mist/assets/ext/ethereum.js/.editorconfig b/cmd/mist/assets/ext/ethereum.js/.editorconfig deleted file mode 100644 index 60a2751d33..0000000000 --- a/cmd/mist/assets/ext/ethereum.js/.editorconfig +++ /dev/null @@ -1,12 +0,0 @@ -root = true - -[*] -indent_style = space -indent_size = 4 -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -[*.md] -trim_trailing_whitespace = false \ No newline at end of file diff --git a/cmd/mist/assets/ext/ethereum.js/.gitignore b/cmd/mist/assets/ext/ethereum.js/.gitignore deleted file mode 100644 index 399b6dc882..0000000000 --- a/cmd/mist/assets/ext/ethereum.js/.gitignore +++ /dev/null @@ -1,18 +0,0 @@ -# See http://help.github.com/ignore-files/ for more about ignoring files. -# -# If you find yourself ignoring temporary files generated by your text editor -# or operating system, you probably want to add a global ignore instead: -# git config --global core.excludesfile ~/.gitignore_global - -*.swp -/tmp -*/**/*un~ -*un~ -.DS_Store -*/**/.DS_Store -ethereum/ethereum -ethereal/ethereal -example/js -node_modules -bower_components -npm-debug.log diff --git a/cmd/mist/assets/ext/ethereum.js/.jshintrc b/cmd/mist/assets/ext/ethereum.js/.jshintrc deleted file mode 100644 index c0ec5f89d1..0000000000 --- a/cmd/mist/assets/ext/ethereum.js/.jshintrc +++ /dev/null @@ -1,50 +0,0 @@ -{ - "predef": [ - "console", - "require", - "equal", - "test", - "testBoth", - "testWithDefault", - "raises", - "deepEqual", - "start", - "stop", - "ok", - "strictEqual", - "module", - "expect", - "reject", - "impl" - ], - - "esnext": true, - "proto": true, - "node" : true, - "browser" : true, - "browserify" : true, - - "boss" : true, - "curly": false, - "debug": true, - "devel": true, - "eqeqeq": true, - "evil": true, - "forin": false, - "immed": false, - "laxbreak": false, - "newcap": true, - "noarg": true, - "noempty": false, - "nonew": false, - "nomen": false, - "onevar": false, - "plusplus": false, - "regexp": false, - "undef": true, - "sub": true, - "strict": false, - "white": false, - "shadow": true, - "eqnull": true -} \ No newline at end of file diff --git a/cmd/mist/assets/ext/ethereum.js/.npmignore b/cmd/mist/assets/ext/ethereum.js/.npmignore deleted file mode 100644 index 5bbffe4fd3..0000000000 --- a/cmd/mist/assets/ext/ethereum.js/.npmignore +++ /dev/null @@ -1,9 +0,0 @@ -example/js -node_modules -test -.gitignore -.editorconfig -.travis.yml -.npmignore -component.json -testling.html \ No newline at end of file diff --git a/cmd/mist/assets/ext/ethereum.js/.travis.yml b/cmd/mist/assets/ext/ethereum.js/.travis.yml deleted file mode 100644 index fafacbd5a1..0000000000 --- a/cmd/mist/assets/ext/ethereum.js/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: node_js -node_js: - - "0.11" - - "0.10" -before_script: - - npm install - - npm install jshint -script: - - "jshint *.js lib" -after_script: - - npm run-script gulp diff --git a/cmd/mist/assets/ext/ethereum.js/LICENSE b/cmd/mist/assets/ext/ethereum.js/LICENSE deleted file mode 100644 index 0f187b8736..0000000000 --- a/cmd/mist/assets/ext/ethereum.js/LICENSE +++ /dev/null @@ -1,14 +0,0 @@ -This file is part of ethereum.js. - -ethereum.js is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -ethereum.js is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with ethereum.js. If not, see . \ No newline at end of file diff --git a/cmd/mist/assets/ext/ethereum.js/README.md b/cmd/mist/assets/ext/ethereum.js/README.md deleted file mode 100644 index 865b62c6b1..0000000000 --- a/cmd/mist/assets/ext/ethereum.js/README.md +++ /dev/null @@ -1,79 +0,0 @@ -# Ethereum JavaScript API - -This is the Ethereum compatible JavaScript API using `Promise`s -which implements the [Generic JSON RPC](https://github.com/ethereum/wiki/wiki/Generic-JSON-RPC) spec. It's available on npm as a node module and also for bower and component as an embeddable js - -[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![dependency status][dep-image]][dep-url] [![dev dependency status][dep-dev-image]][dep-dev-url] - - - -## Installation - -### Node.js - - npm install ethereum.js - -### For browser -Bower - - bower install ethereum.js - -Component - - component install ethereum/ethereum.js - -* Include `ethereum.min.js` in your html file. -* Include [es6-promise](https://github.com/jakearchibald/es6-promise) or another ES6-Shim if your browser doesn't support ECMAScript 6. - -## Usage -Require the library: - - var web3 = require('web3'); - -Set a provider (QtProvider, WebSocketProvider, HttpRpcProvider) - - var web3.setProvider(new web3.providers.WebSocketProvider('ws://localhost:40404/eth')); - -There you go, now you can use it: - -``` -web3.eth.coinbase.then(function(result){ - console.log(result); - return web3.eth.balanceAt(result); -}).then(function(balance){ - console.log(web3.toDecimal(balance)); -}).catch(function(err){ - console.log(err); -}); -``` - - -For another example see `example/index.html`. - -## Building - -* `gulp build` - - -### Testing - -**Please note this repo is in it's early stage.** - -If you'd like to run a WebSocket ethereum node check out -[go-ethereum](https://github.com/ethereum/go-ethereum). - -To install ethereum and spawn a node: - -``` -go get github.com/ethereum/go-ethereum/ethereum -ethereum -ws -loglevel=4 -``` - -[npm-image]: https://badge.fury.io/js/ethereum.js.png -[npm-url]: https://npmjs.org/package/ethereum.js -[travis-image]: https://travis-ci.org/ethereum/ethereum.js.svg -[travis-url]: https://travis-ci.org/ethereum/ethereum.js -[dep-image]: https://david-dm.org/ethereum/ethereum.js.svg -[dep-url]: https://david-dm.org/ethereum/ethereum.js -[dep-dev-image]: https://david-dm.org/ethereum/ethereum.js/dev-status.svg -[dep-dev-url]: https://david-dm.org/ethereum/ethereum.js#info=devDependencies \ No newline at end of file diff --git a/cmd/mist/assets/ext/ethereum.js/bower.json b/cmd/mist/assets/ext/ethereum.js/bower.json deleted file mode 100644 index cedae9023d..0000000000 --- a/cmd/mist/assets/ext/ethereum.js/bower.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "ethereum.js", - "namespace": "ethereum", - "version": "0.0.3", - "description": "Ethereum Compatible JavaScript API", - "main": ["./dist/ethereum.js", "./dist/ethereum.min.js"], - "dependencies": { - "es6-promise": "#master" - }, - "repository": { - "type": "git", - "url": "https://github.com/ethereum/ethereum.js.git" - }, - "homepage": "https://github.com/ethereum/ethereum.js", - "bugs": { - "url": "https://github.com/ethereum/ethereum.js/issues" - }, - "keywords": [ - "ethereum", - "javascript", - "API" - ], - "authors": [ - { - "name": "Marek Kotewicz", - "email": "marek@ethdev.com", - "homepage": "https://github.com/debris" - }, - { - "name": "Marian Oancea", - "email": "marian@ethdev.com", - "homepage": "https://github.com/cubedro" - } - ], - "license": "LGPL-3.0", - "ignore": [ - "example", - "lib", - "node_modules", - "package.json", - ".bowerrc", - ".editorconfig", - ".gitignore", - ".jshintrc", - ".npmignore", - ".travis.yml", - "gulpfile.js", - "index.js", - "**/*.txt" - ] -} \ No newline at end of file diff --git a/cmd/mist/assets/ext/ethereum.js/dist/ethereum.js b/cmd/mist/assets/ext/ethereum.js/dist/ethereum.js deleted file mode 100644 index 4f4b5d3265..0000000000 --- a/cmd/mist/assets/ext/ethereum.js/dist/ethereum.js +++ /dev/null @@ -1,1184 +0,0 @@ -require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o. -*/ -/** @file abi.js - * @authors: - * Marek Kotewicz - * Gav Wood - * @date 2014 - */ - -// TODO: is these line is supposed to be here? -if ("build" !== 'build') {/* - var web3 = require('./web3'); // jshint ignore:line -*/} - -// TODO: make these be actually accurate instead of falling back onto JS's doubles. -var hexToDec = function (hex) { - return parseInt(hex, 16).toString(); -}; - -var decToHex = function (dec) { - return parseInt(dec).toString(16); -}; - -var findIndex = function (array, callback) { - var end = false; - var i = 0; - for (; i < array.length && !end; i++) { - end = callback(array[i]); - } - return end ? i - 1 : -1; -}; - -var findMethodIndex = function (json, methodName) { - return findIndex(json, function (method) { - return method.name === methodName; - }); -}; - -var padLeft = function (string, chars) { - return new Array(chars - string.length + 1).join("0") + string; -}; - -var calcBitPadding = function (type, expected) { - var value = type.slice(expected.length); - if (value === "") { - return 32; - } - return parseInt(value) / 8; -}; - -var calcBytePadding = function (type, expected) { - var value = type.slice(expected.length); - if (value === "") { - return 32; - } - return parseInt(value); -}; - -var calcRealPadding = function (type, expected) { - var value = type.slice(expected.length); - if (value === "") { - return 32; - } - var sizes = value.split('x'); - for (var padding = 0, i = 0; i < sizes; i++) { - padding += (sizes[i] / 8); - } - return padding; -}; - -var setupInputTypes = function () { - - var prefixedType = function (prefix, calcPadding) { - return function (type, value) { - var expected = prefix; - if (type.indexOf(expected) !== 0) { - return false; - } - - var padding = calcPadding(type, expected); - if (typeof value === "number") - value = value.toString(16); - else if (typeof value === "string") - value = web3.toHex(value); - else if (value.indexOf('0x') === 0) - value = value.substr(2); - else - value = (+value).toString(16); - return padLeft(value, padding * 2); - }; - }; - - var namedType = function (name, padding, formatter) { - return function (type, value) { - if (type !== name) { - return false; - } - - return padLeft(formatter ? formatter(value) : value, padding * 2); - }; - }; - - var formatBool = function (value) { - return value ? '0x1' : '0x0'; - }; - - return [ - prefixedType('uint', calcBitPadding), - prefixedType('int', calcBitPadding), - prefixedType('hash', calcBitPadding), - prefixedType('string', calcBytePadding), - prefixedType('real', calcRealPadding), - prefixedType('ureal', calcRealPadding), - namedType('address', 20), - namedType('bool', 1, formatBool), - ]; -}; - -var inputTypes = setupInputTypes(); - -var toAbiInput = function (json, methodName, params) { - var bytes = ""; - var index = findMethodIndex(json, methodName); - - if (index === -1) { - return; - } - - bytes = "0x" + padLeft(index.toString(16), 2); - var method = json[index]; - - for (var i = 0; i < method.inputs.length; i++) { - var found = false; - for (var j = 0; j < inputTypes.length && !found; j++) { - found = inputTypes[j](method.inputs[i].type, params[i]); - } - if (!found) { - console.error('unsupported json type: ' + method.inputs[i].type); - } - bytes += found; - } - return bytes; -}; - -var setupOutputTypes = function () { - - var prefixedType = function (prefix, calcPadding) { - return function (type) { - var expected = prefix; - if (type.indexOf(expected) !== 0) { - return -1; - } - - var padding = calcPadding(type, expected); - return padding * 2; - }; - }; - - var namedType = function (name, padding) { - return function (type) { - return name === type ? padding * 2 : -1; - }; - }; - - var formatInt = function (value) { - return value.length <= 8 ? +parseInt(value, 16) : hexToDec(value); - }; - - var formatHash = function (value) { - return "0x" + value; - }; - - var formatBool = function (value) { - return value === '1' ? true : false; - }; - - var formatString = function (value) { - return web3.toAscii(value); - }; - - return [ - { padding: prefixedType('uint', calcBitPadding), format: formatInt }, - { padding: prefixedType('int', calcBitPadding), format: formatInt }, - { padding: prefixedType('hash', calcBitPadding), format: formatHash }, - { padding: prefixedType('string', calcBytePadding), format: formatString }, - { padding: prefixedType('real', calcRealPadding), format: formatInt }, - { padding: prefixedType('ureal', calcRealPadding), format: formatInt }, - { padding: namedType('address', 20) }, - { padding: namedType('bool', 1), format: formatBool } - ]; -}; - -var outputTypes = setupOutputTypes(); - -var fromAbiOutput = function (json, methodName, output) { - var index = findMethodIndex(json, methodName); - - if (index === -1) { - return; - } - - output = output.slice(2); - - var result = []; - var method = json[index]; - for (var i = 0; i < method.outputs.length; i++) { - var padding = -1; - for (var j = 0; j < outputTypes.length && padding === -1; j++) { - padding = outputTypes[j].padding(method.outputs[i].type); - } - - if (padding === -1) { - // not found output parsing - continue; - } - var res = output.slice(0, padding); - var formatter = outputTypes[j - 1].format; - result.push(formatter ? formatter(res) : ("0x" + res)); - output = output.slice(padding); - } - - return result; -}; - -var inputParser = function (json) { - var parser = {}; - json.forEach(function (method) { - parser[method.name] = function () { - var params = Array.prototype.slice.call(arguments); - return toAbiInput(json, method.name, params); - }; - }); - - return parser; -}; - -var outputParser = function (json) { - var parser = {}; - json.forEach(function (method) { - parser[method.name] = function (output) { - return fromAbiOutput(json, method.name, output); - }; - }); - - return parser; -}; - -module.exports = { - inputParser: inputParser, - outputParser: outputParser -}; - -},{}],2:[function(require,module,exports){ -/* - This file is part of ethereum.js. - - ethereum.js is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - ethereum.js is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . -*/ -/** @file autoprovider.js - * @authors: - * Marek Kotewicz - * Marian Oancea - * @date 2014 - */ - -/* - * @brief if qt object is available, uses QtProvider, - * if not tries to connect over websockets - * if it fails, it uses HttpRpcProvider - */ - -// TODO: is these line is supposed to be here? -if ("build" !== 'build') {/* - var WebSocket = require('ws'); // jshint ignore:line - var web3 = require('./web3'); // jshint ignore:line -*/} - -var AutoProvider = function (userOptions) { - if (web3.haveProvider()) { - return; - } - - // before we determine what provider we are, we have to cache request - this.sendQueue = []; - this.onmessageQueue = []; - - if (navigator.qt) { - this.provider = new web3.providers.QtProvider(); - return; - } - - userOptions = userOptions || {}; - var options = { - httprpc: userOptions.httprpc || 'http://localhost:8080', - websockets: userOptions.websockets || 'ws://localhost:40404/eth' - }; - - var self = this; - var closeWithSuccess = function (success) { - ws.close(); - if (success) { - self.provider = new web3.providers.WebSocketProvider(options.websockets); - } else { - self.provider = new web3.providers.HttpRpcProvider(options.httprpc); - self.poll = self.provider.poll.bind(self.provider); - } - self.sendQueue.forEach(function (payload) { - self.provider(payload); - }); - self.onmessageQueue.forEach(function (handler) { - self.provider.onmessage = handler; - }); - }; - - var ws = new WebSocket(options.websockets); - - ws.onopen = function() { - closeWithSuccess(true); - }; - - ws.onerror = function() { - closeWithSuccess(false); - }; -}; - -AutoProvider.prototype.send = function (payload) { - if (this.provider) { - this.provider.send(payload); - return; - } - this.sendQueue.push(payload); -}; - -Object.defineProperty(AutoProvider.prototype, 'onmessage', { - set: function (handler) { - if (this.provider) { - this.provider.onmessage = handler; - return; - } - this.onmessageQueue.push(handler); - } -}); - -module.exports = AutoProvider; - -},{}],3:[function(require,module,exports){ -/* - This file is part of ethereum.js. - - ethereum.js is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - ethereum.js is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . -*/ -/** @file contract.js - * @authors: - * Marek Kotewicz - * @date 2014 - */ - -// TODO: is these line is supposed to be here? -if ("build" !== 'build') {/* - var web3 = require('./web3'); // jshint ignore:line -*/} - -var abi = require('./abi'); - -var contract = function (address, desc) { - var inputParser = abi.inputParser(desc); - var outputParser = abi.outputParser(desc); - - var contract = {}; - - desc.forEach(function (method) { - contract[method.name] = function () { - var params = Array.prototype.slice.call(arguments); - var parsed = inputParser[method.name].apply(null, params); - - var onSuccess = function (result) { - return outputParser[method.name](result); - }; - - return { - call: function (extra) { - extra = extra || {}; - extra.to = address; - extra.data = parsed; - return web3.eth.call(extra).then(onSuccess); - }, - transact: function (extra) { - extra = extra || {}; - extra.to = address; - extra.data = parsed; - return web3.eth.transact(extra).then(onSuccess); - } - }; - }; - }); - - return contract; -}; - -module.exports = contract; - -},{"./abi":1}],4:[function(require,module,exports){ -/* - This file is part of ethereum.js. - - ethereum.js is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - ethereum.js is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . -*/ -/** @file httprpc.js - * @authors: - * Marek Kotewicz - * Marian Oancea - * @date 2014 - */ - -// TODO: is these line is supposed to be here? -if ("build" !== 'build') {/* - var XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest; // jshint ignore:line -*/} - -var HttpRpcProvider = function (host) { - this.handlers = []; - this.host = host; -}; - -function formatJsonRpcObject(object) { - return { - jsonrpc: '2.0', - method: object.call, - params: object.args, - id: object._id - }; -} - -function formatJsonRpcMessage(message) { - var object = JSON.parse(message); - - return { - _id: object.id, - data: object.result, - error: object.error - }; -} - -HttpRpcProvider.prototype.sendRequest = function (payload, cb) { - var data = formatJsonRpcObject(payload); - - var request = new XMLHttpRequest(); - request.open("POST", this.host, true); - request.send(JSON.stringify(data)); - request.onreadystatechange = function () { - if (request.readyState === 4 && cb) { - cb(request); - } - }; -}; - -HttpRpcProvider.prototype.send = function (payload) { - var self = this; - this.sendRequest(payload, function (request) { - self.handlers.forEach(function (handler) { - handler.call(self, formatJsonRpcMessage(request.responseText)); - }); - }); -}; - -HttpRpcProvider.prototype.poll = function (payload, id) { - var self = this; - this.sendRequest(payload, function (request) { - var parsed = JSON.parse(request.responseText); - if (parsed.error || (parsed.result instanceof Array ? parsed.result.length === 0 : !parsed.result)) { - return; - } - self.handlers.forEach(function (handler) { - handler.call(self, {_event: payload.call, _id: id, data: parsed.result}); - }); - }); -}; - -Object.defineProperty(HttpRpcProvider.prototype, "onmessage", { - set: function (handler) { - this.handlers.push(handler); - } -}); - -module.exports = HttpRpcProvider; - -},{}],5:[function(require,module,exports){ -/* - This file is part of ethereum.js. - - ethereum.js is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - ethereum.js is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . -*/ -/** @file qt.js - * @authors: - * Jeffrey Wilcke - * Marek Kotewicz - * @date 2014 - */ - -var QtProvider = function() { - this.handlers = []; - - var self = this; - navigator.qt.onmessage = function (message) { - self.handlers.forEach(function (handler) { - handler.call(self, JSON.parse(message.data)); - }); - }; -}; - -QtProvider.prototype.send = function(payload) { - navigator.qt.postMessage(JSON.stringify(payload)); -}; - -Object.defineProperty(QtProvider.prototype, "onmessage", { - set: function(handler) { - this.handlers.push(handler); - } -}); - -module.exports = QtProvider; - -},{}],6:[function(require,module,exports){ -/* - This file is part of ethereum.js. - - ethereum.js is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - ethereum.js is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . -*/ -/** @file main.js - * @authors: - * Jeffrey Wilcke - * Marek Kotewicz - * Marian Oancea - * Gav Wood - * @date 2014 - */ - -function flattenPromise (obj) { - if (obj instanceof Promise) { - return Promise.resolve(obj); - } - - if (obj instanceof Array) { - return new Promise(function (resolve) { - var promises = obj.map(function (o) { - return flattenPromise(o); - }); - - return Promise.all(promises).then(function (res) { - for (var i = 0; i < obj.length; i++) { - obj[i] = res[i]; - } - resolve(obj); - }); - }); - } - - if (obj instanceof Object) { - return new Promise(function (resolve) { - var keys = Object.keys(obj); - var promises = keys.map(function (key) { - return flattenPromise(obj[key]); - }); - - return Promise.all(promises).then(function (res) { - for (var i = 0; i < keys.length; i++) { - obj[keys[i]] = res[i]; - } - resolve(obj); - }); - }); - } - - return Promise.resolve(obj); -} - -var web3Methods = function () { - return [ - { name: 'sha3', call: 'web3_sha3' } - ]; -}; - -var ethMethods = function () { - var blockCall = function (args) { - return typeof args[0] === "string" ? "eth_blockByHash" : "eth_blockByNumber"; - }; - - var transactionCall = function (args) { - return typeof args[0] === "string" ? 'eth_transactionByHash' : 'eth_transactionByNumber'; - }; - - var uncleCall = function (args) { - return typeof args[0] === "string" ? 'eth_uncleByHash' : 'eth_uncleByNumber'; - }; - - var methods = [ - { name: 'balanceAt', call: 'eth_balanceAt' }, - { name: 'stateAt', call: 'eth_stateAt' }, - { name: 'storageAt', call: 'eth_storageAt' }, - { name: 'countAt', call: 'eth_countAt'}, - { name: 'codeAt', call: 'eth_codeAt' }, - { name: 'transact', call: 'eth_transact' }, - { name: 'call', call: 'eth_call' }, - { name: 'block', call: blockCall }, - { name: 'transaction', call: transactionCall }, - { name: 'uncle', call: uncleCall }, - { name: 'compilers', call: 'eth_compilers' }, - { name: 'lll', call: 'eth_lll' }, - { name: 'solidity', call: 'eth_solidity' }, - { name: 'serpent', call: 'eth_serpent' }, - { name: 'logs', call: 'eth_logs' } - ]; - return methods; -}; - -var ethProperties = function () { - return [ - { name: 'coinbase', getter: 'eth_coinbase', setter: 'eth_setCoinbase' }, - { name: 'listening', getter: 'eth_listening', setter: 'eth_setListening' }, - { name: 'mining', getter: 'eth_mining', setter: 'eth_setMining' }, - { name: 'gasPrice', getter: 'eth_gasPrice' }, - { name: 'account', getter: 'eth_account' }, - { name: 'accounts', getter: 'eth_accounts' }, - { name: 'peerCount', getter: 'eth_peerCount' }, - { name: 'defaultBlock', getter: 'eth_defaultBlock', setter: 'eth_setDefaultBlock' }, - { name: 'number', getter: 'eth_number'} - ]; -}; - -var dbMethods = function () { - return [ - { name: 'put', call: 'db_put' }, - { name: 'get', call: 'db_get' }, - { name: 'putString', call: 'db_putString' }, - { name: 'getString', call: 'db_getString' } - ]; -}; - -var shhMethods = function () { - return [ - { name: 'post', call: 'shh_post' }, - { name: 'newIdentity', call: 'shh_newIdentity' }, - { name: 'haveIdentity', call: 'shh_haveIdentity' }, - { name: 'newGroup', call: 'shh_newGroup' }, - { name: 'addToGroup', call: 'shh_addToGroup' } - ]; -}; - -var ethWatchMethods = function () { - var newFilter = function (args) { - return typeof args[0] === 'string' ? 'eth_newFilterString' : 'eth_newFilter'; - }; - - return [ - { name: 'newFilter', call: newFilter }, - { name: 'uninstallFilter', call: 'eth_uninstallFilter' }, - { name: 'getMessages', call: 'eth_filterLogs' } - ]; -}; - -var shhWatchMethods = function () { - return [ - { name: 'newFilter', call: 'shh_newFilter' }, - { name: 'uninstallFilter', call: 'shh_uninstallFilter' }, - { name: 'getMessage', call: 'shh_getMessages' } - ]; -}; - -var setupMethods = function (obj, methods) { - methods.forEach(function (method) { - obj[method.name] = function () { - return flattenPromise(Array.prototype.slice.call(arguments)).then(function (args) { - var call = typeof method.call === "function" ? method.call(args) : method.call; - return {call: call, args: args}; - }).then(function (request) { - return new Promise(function (resolve, reject) { - web3.provider.send(request, function (err, result) { - if (!err) { - resolve(result); - return; - } - reject(err); - }); - }); - }).catch(function(err) { - console.error(err); - }); - }; - }); -}; - -var setupProperties = function (obj, properties) { - properties.forEach(function (property) { - var proto = {}; - proto.get = function () { - return new Promise(function(resolve, reject) { - web3.provider.send({call: property.getter}, function(err, result) { - if (!err) { - resolve(result); - return; - } - reject(err); - }); - }); - }; - if (property.setter) { - proto.set = function (val) { - return flattenPromise([val]).then(function (args) { - return new Promise(function (resolve) { - web3.provider.send({call: property.setter, args: args}, function (err, result) { - if (!err) { - resolve(result); - return; - } - reject(err); - }); - }); - }).catch(function (err) { - console.error(err); - }); - }; - } - Object.defineProperty(obj, property.name, proto); - }); -}; - -// TODO: import from a dependency, don't duplicate. -var hexToDec = function (hex) { - return parseInt(hex, 16).toString(); -}; - -var decToHex = function (dec) { - return parseInt(dec).toString(16); -}; - - -var web3 = { - _callbacks: {}, - _events: {}, - providers: {}, - - toHex: function(str) { - var hex = ""; - for(var i = 0; i < str.length; i++) { - var n = str.charCodeAt(i).toString(16); - hex += n.length < 2 ? '0' + n : n; - } - - return hex; - }, - - toAscii: function(hex) { - // Find termination - var str = ""; - var i = 0, l = hex.length; - if (hex.substring(0, 2) === '0x') - i = 2; - for(; i < l; i+=2) { - var code = hex.charCodeAt(i); - if(code === 0) { - break; - } - - str += String.fromCharCode(parseInt(hex.substr(i, 2), 16)); - } - - return str; - }, - - fromAscii: function(str, pad) { - pad = pad === undefined ? 32 : pad; - var hex = this.toHex(str); - while(hex.length < pad*2) - hex += "00"; - return "0x" + hex; - }, - - toDecimal: function (val) { - return hexToDec(val.substring(2)); - }, - - fromDecimal: function (val) { - return "0x" + decToHex(val); - }, - - toEth: function(str) { - var val = typeof str === "string" ? str.indexOf('0x') === 0 ? parseInt(str.substr(2), 16) : parseInt(str) : str; - var unit = 0; - var units = [ 'wei', 'Kwei', 'Mwei', 'Gwei', 'szabo', 'finney', 'ether', 'grand', 'Mether', 'Gether', 'Tether', 'Pether', 'Eether', 'Zether', 'Yether', 'Nether', 'Dether', 'Vether', 'Uether' ]; - while (val > 3000 && unit < units.length - 1) - { - val /= 1000; - unit++; - } - var s = val.toString().length < val.toFixed(2).length ? val.toString() : val.toFixed(2); - var replaceFunction = function($0, $1, $2) { - return $1 + ',' + $2; - }; - - while (true) { - var o = s; - s = s.replace(/(\d)(\d\d\d[\.\,])/, replaceFunction); - if (o === s) - break; - } - return s + ' ' + units[unit]; - }, - - eth: { - prototype: Object(), // jshint ignore:line - watch: function (params) { - return new Filter(params, ethWatch); - } - }, - - db: { - prototype: Object() // jshint ignore:line - }, - - shh: { - prototype: Object(), // jshint ignore:line - watch: function (params) { - return new Filter(params, shhWatch); - } - }, - - on: function(event, id, cb) { - if(web3._events[event] === undefined) { - web3._events[event] = {}; - } - - web3._events[event][id] = cb; - return this; - }, - - off: function(event, id) { - if(web3._events[event] !== undefined) { - delete web3._events[event][id]; - } - - return this; - }, - - trigger: function(event, id, data) { - var callbacks = web3._events[event]; - if (!callbacks || !callbacks[id]) { - return; - } - var cb = callbacks[id]; - cb(data); - } -}; - -setupMethods(web3, web3Methods()); -setupMethods(web3.eth, ethMethods()); -setupProperties(web3.eth, ethProperties()); -setupMethods(web3.db, dbMethods()); -setupMethods(web3.shh, shhMethods()); - -var ethWatch = { - changed: 'eth_changed' -}; -setupMethods(ethWatch, ethWatchMethods()); -var shhWatch = { - changed: 'shh_changed' -}; -setupMethods(shhWatch, shhWatchMethods()); - -var ProviderManager = function() { - this.queued = []; - this.polls = []; - this.ready = false; - this.provider = undefined; - this.id = 1; - - var self = this; - var poll = function () { - if (self.provider && self.provider.poll) { - self.polls.forEach(function (data) { - data.data._id = self.id; - self.id++; - self.provider.poll(data.data, data.id); - }); - } - setTimeout(poll, 12000); - }; - poll(); -}; - -ProviderManager.prototype.send = function(data, cb) { - data._id = this.id; - if (cb) { - web3._callbacks[data._id] = cb; - } - - data.args = data.args || []; - this.id++; - - if(this.provider !== undefined) { - this.provider.send(data); - } else { - console.warn("provider is not set"); - this.queued.push(data); - } -}; - -ProviderManager.prototype.set = function(provider) { - if(this.provider !== undefined && this.provider.unload !== undefined) { - this.provider.unload(); - } - - this.provider = provider; - this.ready = true; -}; - -ProviderManager.prototype.sendQueued = function() { - for(var i = 0; this.queued.length; i++) { - // Resend - this.send(this.queued[i]); - } -}; - -ProviderManager.prototype.installed = function() { - return this.provider !== undefined; -}; - -ProviderManager.prototype.startPolling = function (data, pollId) { - if (!this.provider || !this.provider.poll) { - return; - } - this.polls.push({data: data, id: pollId}); -}; - -ProviderManager.prototype.stopPolling = function (pollId) { - for (var i = this.polls.length; i--;) { - var poll = this.polls[i]; - if (poll.id === pollId) { - this.polls.splice(i, 1); - } - } -}; - -web3.provider = new ProviderManager(); - -web3.setProvider = function(provider) { - provider.onmessage = messageHandler; - web3.provider.set(provider); - web3.provider.sendQueued(); -}; - -web3.haveProvider = function() { - return !!web3.provider.provider; -}; - -var Filter = function(options, impl) { - this.impl = impl; - this.callbacks = []; - - var self = this; - this.promise = impl.newFilter(options); - this.promise.then(function (id) { - self.id = id; - web3.on(impl.changed, id, self.trigger.bind(self)); - web3.provider.startPolling({call: impl.changed, args: [id]}, id); - }); -}; - -Filter.prototype.arrived = function(callback) { - this.changed(callback); -}; - -Filter.prototype.changed = function(callback) { - var self = this; - this.promise.then(function(id) { - self.callbacks.push(callback); - }); -}; - -Filter.prototype.trigger = function(messages) { - for(var i = 0; i < this.callbacks.length; i++) { - this.callbacks[i].call(this, messages); - } -}; - -Filter.prototype.uninstall = function() { - var self = this; - this.promise.then(function (id) { - self.impl.uninstallFilter(id); - web3.provider.stopPolling(id); - web3.off(impl.changed, id); - }); -}; - -Filter.prototype.messages = function() { - var self = this; - return this.promise.then(function (id) { - return self.impl.getMessages(id); - }); -}; - -Filter.prototype.logs = function () { - return this.messages(); -}; - -function messageHandler(data) { - if(data._event !== undefined) { - web3.trigger(data._event, data._id, data.data); - return; - } - - if(data._id) { - var cb = web3._callbacks[data._id]; - if (cb) { - cb.call(this, data.error, data.data); - delete web3._callbacks[data._id]; - } - } -} - -module.exports = web3; - -},{}],7:[function(require,module,exports){ -/* - This file is part of ethereum.js. - - ethereum.js is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - ethereum.js is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . -*/ -/** @file websocket.js - * @authors: - * Jeffrey Wilcke - * Marek Kotewicz - * Marian Oancea - * @date 2014 - */ - -// TODO: is these line is supposed to be here? -if ("build" !== 'build') {/* - var WebSocket = require('ws'); // jshint ignore:line -*/} - -var WebSocketProvider = function(host) { - // onmessage handlers - this.handlers = []; - // queue will be filled with messages if send is invoked before the ws is ready - this.queued = []; - this.ready = false; - - this.ws = new WebSocket(host); - - var self = this; - this.ws.onmessage = function(event) { - for(var i = 0; i < self.handlers.length; i++) { - self.handlers[i].call(self, JSON.parse(event.data), event); - } - }; - - this.ws.onopen = function() { - self.ready = true; - - for(var i = 0; i < self.queued.length; i++) { - // Resend - self.send(self.queued[i]); - } - }; -}; - -WebSocketProvider.prototype.send = function(payload) { - if(this.ready) { - var data = JSON.stringify(payload); - - this.ws.send(data); - } else { - this.queued.push(payload); - } -}; - -WebSocketProvider.prototype.onMessage = function(handler) { - this.handlers.push(handler); -}; - -WebSocketProvider.prototype.unload = function() { - this.ws.close(); -}; -Object.defineProperty(WebSocketProvider.prototype, "onmessage", { - set: function(provider) { this.onMessage(provider); } -}); - -module.exports = WebSocketProvider; - -},{}],"web3":[function(require,module,exports){ -var web3 = require('./lib/web3'); -web3.providers.WebSocketProvider = require('./lib/websocket'); -web3.providers.HttpRpcProvider = require('./lib/httprpc'); -web3.providers.QtProvider = require('./lib/qt'); -web3.providers.AutoProvider = require('./lib/autoprovider'); -web3.contract = require('./lib/contract'); - -module.exports = web3; - -},{"./lib/autoprovider":2,"./lib/contract":3,"./lib/httprpc":4,"./lib/qt":5,"./lib/web3":6,"./lib/websocket":7}]},{},["web3"]) - - -//# sourceMappingURL=ethereum.js.map \ No newline at end of file diff --git a/cmd/mist/assets/ext/ethereum.js/dist/ethereum.js.map b/cmd/mist/assets/ext/ethereum.js/dist/ethereum.js.map deleted file mode 100644 index 9886b70ce0..0000000000 --- a/cmd/mist/assets/ext/ethereum.js/dist/ethereum.js.map +++ /dev/null @@ -1,29 +0,0 @@ -{ - "version": 3, - "sources": [ - "node_modules/browserify/node_modules/browser-pack/_prelude.js", - "lib/abi.js", - "lib/autoprovider.js", - "lib/contract.js", - "lib/httprpc.js", - "lib/qt.js", - "lib/web3.js", - "lib/websocket.js", - "index.js" - ], - "names": [], - "mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5fA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA", - "file": "generated.js", - "sourceRoot": "", - "sourcesContent": [ - "(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o.\n*/\n/** @file abi.js\n * @authors:\n * Marek Kotewicz \n * Gav Wood \n * @date 2014\n */\n\n// TODO: is these line is supposed to be here? \nif (\"build\" !== 'build') {/*\n var web3 = require('./web3'); // jshint ignore:line\n*/}\n\n// TODO: make these be actually accurate instead of falling back onto JS's doubles.\nvar hexToDec = function (hex) {\n return parseInt(hex, 16).toString();\n};\n\nvar decToHex = function (dec) {\n return parseInt(dec).toString(16);\n};\n\nvar findIndex = function (array, callback) {\n var end = false;\n var i = 0;\n for (; i < array.length && !end; i++) {\n end = callback(array[i]);\n }\n return end ? i - 1 : -1;\n};\n\nvar findMethodIndex = function (json, methodName) {\n return findIndex(json, function (method) {\n return method.name === methodName;\n });\n};\n\nvar padLeft = function (string, chars) {\n return new Array(chars - string.length + 1).join(\"0\") + string;\n};\n\nvar calcBitPadding = function (type, expected) {\n var value = type.slice(expected.length);\n if (value === \"\") {\n return 32;\n }\n return parseInt(value) / 8;\n};\n\nvar calcBytePadding = function (type, expected) {\n var value = type.slice(expected.length);\n if (value === \"\") {\n return 32;\n }\n return parseInt(value);\n};\n\nvar calcRealPadding = function (type, expected) {\n var value = type.slice(expected.length);\n if (value === \"\") {\n return 32;\n }\n var sizes = value.split('x');\n for (var padding = 0, i = 0; i < sizes; i++) {\n padding += (sizes[i] / 8);\n }\n return padding;\n};\n\nvar setupInputTypes = function () {\n \n var prefixedType = function (prefix, calcPadding) {\n return function (type, value) {\n var expected = prefix;\n if (type.indexOf(expected) !== 0) {\n return false;\n }\n\n var padding = calcPadding(type, expected);\n if (typeof value === \"number\")\n value = value.toString(16);\n else if (typeof value === \"string\")\n value = web3.toHex(value); \n else if (value.indexOf('0x') === 0)\n value = value.substr(2);\n else\n value = (+value).toString(16);\n return padLeft(value, padding * 2);\n };\n };\n\n var namedType = function (name, padding, formatter) {\n return function (type, value) {\n if (type !== name) {\n return false;\n }\n\n return padLeft(formatter ? formatter(value) : value, padding * 2);\n };\n };\n\n var formatBool = function (value) {\n return value ? '0x1' : '0x0';\n };\n\n return [\n prefixedType('uint', calcBitPadding),\n prefixedType('int', calcBitPadding),\n prefixedType('hash', calcBitPadding),\n prefixedType('string', calcBytePadding),\n prefixedType('real', calcRealPadding),\n prefixedType('ureal', calcRealPadding),\n namedType('address', 20),\n namedType('bool', 1, formatBool),\n ];\n};\n\nvar inputTypes = setupInputTypes();\n\nvar toAbiInput = function (json, methodName, params) {\n var bytes = \"\";\n var index = findMethodIndex(json, methodName);\n\n if (index === -1) {\n return;\n }\n\n bytes = \"0x\" + padLeft(index.toString(16), 2);\n var method = json[index];\n\n for (var i = 0; i < method.inputs.length; i++) {\n var found = false;\n for (var j = 0; j < inputTypes.length && !found; j++) {\n found = inputTypes[j](method.inputs[i].type, params[i]);\n }\n if (!found) {\n console.error('unsupported json type: ' + method.inputs[i].type);\n }\n bytes += found;\n }\n return bytes;\n};\n\nvar setupOutputTypes = function () {\n\n var prefixedType = function (prefix, calcPadding) {\n return function (type) {\n var expected = prefix;\n if (type.indexOf(expected) !== 0) {\n return -1;\n }\n\n var padding = calcPadding(type, expected);\n return padding * 2;\n };\n };\n\n var namedType = function (name, padding) {\n return function (type) {\n return name === type ? padding * 2 : -1;\n };\n };\n\n var formatInt = function (value) {\n return value.length <= 8 ? +parseInt(value, 16) : hexToDec(value);\n };\n\n var formatHash = function (value) {\n return \"0x\" + value;\n };\n\n var formatBool = function (value) {\n return value === '1' ? true : false;\n };\n\n var formatString = function (value) {\n return web3.toAscii(value);\n };\n\n return [\n { padding: prefixedType('uint', calcBitPadding), format: formatInt },\n { padding: prefixedType('int', calcBitPadding), format: formatInt },\n { padding: prefixedType('hash', calcBitPadding), format: formatHash },\n { padding: prefixedType('string', calcBytePadding), format: formatString },\n { padding: prefixedType('real', calcRealPadding), format: formatInt },\n { padding: prefixedType('ureal', calcRealPadding), format: formatInt },\n { padding: namedType('address', 20) },\n { padding: namedType('bool', 1), format: formatBool }\n ];\n};\n\nvar outputTypes = setupOutputTypes();\n\nvar fromAbiOutput = function (json, methodName, output) {\n var index = findMethodIndex(json, methodName);\n\n if (index === -1) {\n return;\n }\n\n output = output.slice(2);\n\n var result = [];\n var method = json[index];\n for (var i = 0; i < method.outputs.length; i++) {\n var padding = -1;\n for (var j = 0; j < outputTypes.length && padding === -1; j++) {\n padding = outputTypes[j].padding(method.outputs[i].type);\n }\n\n if (padding === -1) {\n // not found output parsing\n continue;\n }\n var res = output.slice(0, padding);\n var formatter = outputTypes[j - 1].format;\n result.push(formatter ? formatter(res) : (\"0x\" + res));\n output = output.slice(padding);\n }\n\n return result;\n};\n\nvar inputParser = function (json) {\n var parser = {};\n json.forEach(function (method) {\n parser[method.name] = function () {\n var params = Array.prototype.slice.call(arguments);\n return toAbiInput(json, method.name, params);\n };\n });\n\n return parser;\n};\n\nvar outputParser = function (json) {\n var parser = {};\n json.forEach(function (method) {\n parser[method.name] = function (output) {\n return fromAbiOutput(json, method.name, output);\n };\n });\n\n return parser;\n};\n\nmodule.exports = {\n inputParser: inputParser,\n outputParser: outputParser\n};\n", - "/*\n This file is part of ethereum.js.\n\n ethereum.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n ethereum.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with ethereum.js. If not, see .\n*/\n/** @file autoprovider.js\n * @authors:\n * Marek Kotewicz \n * Marian Oancea \n * @date 2014\n */\n\n/*\n * @brief if qt object is available, uses QtProvider,\n * if not tries to connect over websockets\n * if it fails, it uses HttpRpcProvider\n */\n\n// TODO: is these line is supposed to be here? \nif (\"build\" !== 'build') {/*\n var WebSocket = require('ws'); // jshint ignore:line\n var web3 = require('./web3'); // jshint ignore:line\n*/}\n\nvar AutoProvider = function (userOptions) {\n if (web3.haveProvider()) {\n return;\n }\n\n // before we determine what provider we are, we have to cache request\n this.sendQueue = [];\n this.onmessageQueue = [];\n\n if (navigator.qt) {\n this.provider = new web3.providers.QtProvider();\n return;\n }\n\n userOptions = userOptions || {};\n var options = {\n httprpc: userOptions.httprpc || 'http://localhost:8080',\n websockets: userOptions.websockets || 'ws://localhost:40404/eth'\n };\n\n var self = this;\n var closeWithSuccess = function (success) {\n ws.close();\n if (success) {\n self.provider = new web3.providers.WebSocketProvider(options.websockets);\n } else {\n self.provider = new web3.providers.HttpRpcProvider(options.httprpc);\n self.poll = self.provider.poll.bind(self.provider);\n }\n self.sendQueue.forEach(function (payload) {\n self.provider(payload);\n });\n self.onmessageQueue.forEach(function (handler) {\n self.provider.onmessage = handler;\n });\n };\n\n var ws = new WebSocket(options.websockets);\n\n ws.onopen = function() {\n closeWithSuccess(true);\n };\n\n ws.onerror = function() {\n closeWithSuccess(false);\n };\n};\n\nAutoProvider.prototype.send = function (payload) {\n if (this.provider) {\n this.provider.send(payload);\n return;\n }\n this.sendQueue.push(payload);\n};\n\nObject.defineProperty(AutoProvider.prototype, 'onmessage', {\n set: function (handler) {\n if (this.provider) {\n this.provider.onmessage = handler;\n return;\n }\n this.onmessageQueue.push(handler);\n }\n});\n\nmodule.exports = AutoProvider;\n", - "/*\n This file is part of ethereum.js.\n\n ethereum.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n ethereum.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with ethereum.js. If not, see .\n*/\n/** @file contract.js\n * @authors:\n * Marek Kotewicz \n * @date 2014\n */\n\n// TODO: is these line is supposed to be here? \nif (\"build\" !== 'build') {/*\n var web3 = require('./web3'); // jshint ignore:line\n*/}\n\nvar abi = require('./abi');\n\nvar contract = function (address, desc) {\n var inputParser = abi.inputParser(desc);\n var outputParser = abi.outputParser(desc);\n\n var contract = {};\n\n desc.forEach(function (method) {\n contract[method.name] = function () {\n var params = Array.prototype.slice.call(arguments);\n var parsed = inputParser[method.name].apply(null, params);\n\n var onSuccess = function (result) {\n return outputParser[method.name](result);\n };\n\n return {\n call: function (extra) {\n extra = extra || {};\n extra.to = address;\n extra.data = parsed;\n return web3.eth.call(extra).then(onSuccess);\n },\n transact: function (extra) {\n extra = extra || {};\n extra.to = address;\n extra.data = parsed;\n return web3.eth.transact(extra).then(onSuccess);\n }\n };\n };\n });\n\n return contract;\n};\n\nmodule.exports = contract;\n", - "/*\n This file is part of ethereum.js.\n\n ethereum.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n ethereum.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with ethereum.js. If not, see .\n*/\n/** @file httprpc.js\n * @authors:\n * Marek Kotewicz \n * Marian Oancea \n * @date 2014\n */\n\n// TODO: is these line is supposed to be here? \nif (\"build\" !== 'build') {/*\n var XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest; // jshint ignore:line\n*/}\n\nvar HttpRpcProvider = function (host) {\n this.handlers = [];\n this.host = host;\n};\n\nfunction formatJsonRpcObject(object) {\n return {\n jsonrpc: '2.0',\n method: object.call,\n params: object.args,\n id: object._id\n };\n}\n\nfunction formatJsonRpcMessage(message) {\n var object = JSON.parse(message);\n\n return {\n _id: object.id,\n data: object.result,\n error: object.error\n };\n}\n\nHttpRpcProvider.prototype.sendRequest = function (payload, cb) {\n var data = formatJsonRpcObject(payload);\n\n var request = new XMLHttpRequest();\n request.open(\"POST\", this.host, true);\n request.send(JSON.stringify(data));\n request.onreadystatechange = function () {\n if (request.readyState === 4 && cb) {\n cb(request);\n }\n };\n};\n\nHttpRpcProvider.prototype.send = function (payload) {\n var self = this;\n this.sendRequest(payload, function (request) {\n self.handlers.forEach(function (handler) {\n handler.call(self, formatJsonRpcMessage(request.responseText));\n });\n });\n};\n\nHttpRpcProvider.prototype.poll = function (payload, id) {\n var self = this;\n this.sendRequest(payload, function (request) {\n var parsed = JSON.parse(request.responseText);\n if (parsed.error || (parsed.result instanceof Array ? parsed.result.length === 0 : !parsed.result)) {\n return;\n }\n self.handlers.forEach(function (handler) {\n handler.call(self, {_event: payload.call, _id: id, data: parsed.result});\n });\n });\n};\n\nObject.defineProperty(HttpRpcProvider.prototype, \"onmessage\", {\n set: function (handler) {\n this.handlers.push(handler);\n }\n});\n\nmodule.exports = HttpRpcProvider;\n", - "/*\n This file is part of ethereum.js.\n\n ethereum.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n ethereum.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with ethereum.js. If not, see .\n*/\n/** @file qt.js\n * @authors:\n * Jeffrey Wilcke \n * Marek Kotewicz \n * @date 2014\n */\n\nvar QtProvider = function() {\n this.handlers = [];\n\n var self = this;\n navigator.qt.onmessage = function (message) {\n self.handlers.forEach(function (handler) {\n handler.call(self, JSON.parse(message.data));\n });\n };\n};\n\nQtProvider.prototype.send = function(payload) {\n navigator.qt.postMessage(JSON.stringify(payload));\n};\n\nObject.defineProperty(QtProvider.prototype, \"onmessage\", {\n set: function(handler) {\n this.handlers.push(handler);\n }\n});\n\nmodule.exports = QtProvider;\n", - "/*\n This file is part of ethereum.js.\n\n ethereum.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n ethereum.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with ethereum.js. If not, see .\n*/\n/** @file main.js\n * @authors:\n * Jeffrey Wilcke \n * Marek Kotewicz \n * Marian Oancea \n * Gav Wood \n * @date 2014\n */\n\nfunction flattenPromise (obj) {\n if (obj instanceof Promise) {\n return Promise.resolve(obj);\n }\n\n if (obj instanceof Array) {\n return new Promise(function (resolve) {\n var promises = obj.map(function (o) {\n return flattenPromise(o);\n });\n\n return Promise.all(promises).then(function (res) {\n for (var i = 0; i < obj.length; i++) {\n obj[i] = res[i];\n }\n resolve(obj);\n });\n });\n }\n\n if (obj instanceof Object) {\n return new Promise(function (resolve) {\n var keys = Object.keys(obj);\n var promises = keys.map(function (key) {\n return flattenPromise(obj[key]);\n });\n\n return Promise.all(promises).then(function (res) {\n for (var i = 0; i < keys.length; i++) {\n obj[keys[i]] = res[i];\n }\n resolve(obj);\n });\n });\n }\n\n return Promise.resolve(obj);\n}\n\nvar web3Methods = function () {\n return [\n { name: 'sha3', call: 'web3_sha3' }\n ];\n};\n\nvar ethMethods = function () {\n var blockCall = function (args) {\n return typeof args[0] === \"string\" ? \"eth_blockByHash\" : \"eth_blockByNumber\";\n };\n\n var transactionCall = function (args) {\n return typeof args[0] === \"string\" ? 'eth_transactionByHash' : 'eth_transactionByNumber';\n };\n\n var uncleCall = function (args) {\n return typeof args[0] === \"string\" ? 'eth_uncleByHash' : 'eth_uncleByNumber';\n };\n\n var methods = [\n { name: 'balanceAt', call: 'eth_balanceAt' },\n { name: 'stateAt', call: 'eth_stateAt' },\n { name: 'storageAt', call: 'eth_storageAt' },\n { name: 'countAt', call: 'eth_countAt'},\n { name: 'codeAt', call: 'eth_codeAt' },\n { name: 'transact', call: 'eth_transact' },\n { name: 'call', call: 'eth_call' },\n { name: 'block', call: blockCall },\n { name: 'transaction', call: transactionCall },\n { name: 'uncle', call: uncleCall },\n { name: 'compilers', call: 'eth_compilers' },\n { name: 'lll', call: 'eth_lll' },\n { name: 'solidity', call: 'eth_solidity' },\n { name: 'serpent', call: 'eth_serpent' },\n { name: 'logs', call: 'eth_logs' }\n ];\n return methods;\n};\n\nvar ethProperties = function () {\n return [\n { name: 'coinbase', getter: 'eth_coinbase', setter: 'eth_setCoinbase' },\n { name: 'listening', getter: 'eth_listening', setter: 'eth_setListening' },\n { name: 'mining', getter: 'eth_mining', setter: 'eth_setMining' },\n { name: 'gasPrice', getter: 'eth_gasPrice' },\n { name: 'account', getter: 'eth_account' },\n { name: 'accounts', getter: 'eth_accounts' },\n { name: 'peerCount', getter: 'eth_peerCount' },\n { name: 'defaultBlock', getter: 'eth_defaultBlock', setter: 'eth_setDefaultBlock' },\n { name: 'number', getter: 'eth_number'}\n ];\n};\n\nvar dbMethods = function () {\n return [\n { name: 'put', call: 'db_put' },\n { name: 'get', call: 'db_get' },\n { name: 'putString', call: 'db_putString' },\n { name: 'getString', call: 'db_getString' }\n ];\n};\n\nvar shhMethods = function () {\n return [\n { name: 'post', call: 'shh_post' },\n { name: 'newIdentity', call: 'shh_newIdentity' },\n { name: 'haveIdentity', call: 'shh_haveIdentity' },\n { name: 'newGroup', call: 'shh_newGroup' },\n { name: 'addToGroup', call: 'shh_addToGroup' }\n ];\n};\n\nvar ethWatchMethods = function () {\n var newFilter = function (args) {\n return typeof args[0] === 'string' ? 'eth_newFilterString' : 'eth_newFilter';\n };\n\n return [\n { name: 'newFilter', call: newFilter },\n { name: 'uninstallFilter', call: 'eth_uninstallFilter' },\n { name: 'getMessages', call: 'eth_filterLogs' }\n ];\n};\n\nvar shhWatchMethods = function () {\n return [\n { name: 'newFilter', call: 'shh_newFilter' },\n { name: 'uninstallFilter', call: 'shh_uninstallFilter' },\n { name: 'getMessage', call: 'shh_getMessages' }\n ];\n};\n\nvar setupMethods = function (obj, methods) {\n methods.forEach(function (method) {\n obj[method.name] = function () {\n return flattenPromise(Array.prototype.slice.call(arguments)).then(function (args) {\n var call = typeof method.call === \"function\" ? method.call(args) : method.call;\n return {call: call, args: args};\n }).then(function (request) {\n return new Promise(function (resolve, reject) {\n web3.provider.send(request, function (err, result) {\n if (!err) {\n resolve(result);\n return;\n }\n reject(err);\n });\n });\n }).catch(function(err) {\n console.error(err);\n });\n };\n });\n};\n\nvar setupProperties = function (obj, properties) {\n properties.forEach(function (property) {\n var proto = {};\n proto.get = function () {\n return new Promise(function(resolve, reject) {\n web3.provider.send({call: property.getter}, function(err, result) {\n if (!err) {\n resolve(result);\n return;\n }\n reject(err);\n });\n });\n };\n if (property.setter) {\n proto.set = function (val) {\n return flattenPromise([val]).then(function (args) {\n return new Promise(function (resolve) {\n web3.provider.send({call: property.setter, args: args}, function (err, result) {\n if (!err) {\n resolve(result);\n return;\n }\n reject(err);\n });\n });\n }).catch(function (err) {\n console.error(err);\n });\n };\n }\n Object.defineProperty(obj, property.name, proto);\n });\n};\n\n// TODO: import from a dependency, don't duplicate.\nvar hexToDec = function (hex) {\n return parseInt(hex, 16).toString();\n};\n\nvar decToHex = function (dec) {\n return parseInt(dec).toString(16);\n};\n\n\nvar web3 = {\n _callbacks: {},\n _events: {},\n providers: {},\n\n toHex: function(str) {\n var hex = \"\";\n for(var i = 0; i < str.length; i++) {\n var n = str.charCodeAt(i).toString(16);\n hex += n.length < 2 ? '0' + n : n;\n }\n\n return hex;\n },\n\n toAscii: function(hex) {\n // Find termination\n var str = \"\";\n var i = 0, l = hex.length;\n if (hex.substring(0, 2) === '0x')\n i = 2;\n for(; i < l; i+=2) {\n var code = hex.charCodeAt(i);\n if(code === 0) {\n break;\n }\n\n str += String.fromCharCode(parseInt(hex.substr(i, 2), 16));\n }\n\n return str;\n },\n\n fromAscii: function(str, pad) {\n pad = pad === undefined ? 32 : pad;\n var hex = this.toHex(str);\n while(hex.length < pad*2)\n hex += \"00\";\n return \"0x\" + hex;\n },\n\n toDecimal: function (val) {\n return hexToDec(val.substring(2));\n },\n\n fromDecimal: function (val) {\n return \"0x\" + decToHex(val);\n },\n\n toEth: function(str) {\n var val = typeof str === \"string\" ? str.indexOf('0x') === 0 ? parseInt(str.substr(2), 16) : parseInt(str) : str;\n var unit = 0;\n var units = [ 'wei', 'Kwei', 'Mwei', 'Gwei', 'szabo', 'finney', 'ether', 'grand', 'Mether', 'Gether', 'Tether', 'Pether', 'Eether', 'Zether', 'Yether', 'Nether', 'Dether', 'Vether', 'Uether' ];\n while (val > 3000 && unit < units.length - 1)\n {\n val /= 1000;\n unit++;\n }\n var s = val.toString().length < val.toFixed(2).length ? val.toString() : val.toFixed(2);\n var replaceFunction = function($0, $1, $2) {\n return $1 + ',' + $2;\n };\n\n while (true) {\n var o = s;\n s = s.replace(/(\\d)(\\d\\d\\d[\\.\\,])/, replaceFunction);\n if (o === s)\n break;\n }\n return s + ' ' + units[unit];\n },\n\n eth: {\n prototype: Object(), // jshint ignore:line\n watch: function (params) {\n return new Filter(params, ethWatch);\n }\n },\n\n db: {\n prototype: Object() // jshint ignore:line\n },\n\n shh: {\n prototype: Object(), // jshint ignore:line\n watch: function (params) {\n return new Filter(params, shhWatch);\n }\n },\n\n on: function(event, id, cb) {\n if(web3._events[event] === undefined) {\n web3._events[event] = {};\n }\n\n web3._events[event][id] = cb;\n return this;\n },\n\n off: function(event, id) {\n if(web3._events[event] !== undefined) {\n delete web3._events[event][id];\n }\n\n return this;\n },\n\n trigger: function(event, id, data) {\n var callbacks = web3._events[event];\n if (!callbacks || !callbacks[id]) {\n return;\n }\n var cb = callbacks[id];\n cb(data);\n }\n};\n\nsetupMethods(web3, web3Methods());\nsetupMethods(web3.eth, ethMethods());\nsetupProperties(web3.eth, ethProperties());\nsetupMethods(web3.db, dbMethods());\nsetupMethods(web3.shh, shhMethods());\n\nvar ethWatch = {\n changed: 'eth_changed'\n};\nsetupMethods(ethWatch, ethWatchMethods());\nvar shhWatch = {\n changed: 'shh_changed'\n};\nsetupMethods(shhWatch, shhWatchMethods());\n\nvar ProviderManager = function() {\n this.queued = [];\n this.polls = [];\n this.ready = false;\n this.provider = undefined;\n this.id = 1;\n\n var self = this;\n var poll = function () {\n if (self.provider && self.provider.poll) {\n self.polls.forEach(function (data) {\n data.data._id = self.id;\n self.id++;\n self.provider.poll(data.data, data.id);\n });\n }\n setTimeout(poll, 12000);\n };\n poll();\n};\n\nProviderManager.prototype.send = function(data, cb) {\n data._id = this.id;\n if (cb) {\n web3._callbacks[data._id] = cb;\n }\n\n data.args = data.args || [];\n this.id++;\n\n if(this.provider !== undefined) {\n this.provider.send(data);\n } else {\n console.warn(\"provider is not set\");\n this.queued.push(data);\n }\n};\n\nProviderManager.prototype.set = function(provider) {\n if(this.provider !== undefined && this.provider.unload !== undefined) {\n this.provider.unload();\n }\n\n this.provider = provider;\n this.ready = true;\n};\n\nProviderManager.prototype.sendQueued = function() {\n for(var i = 0; this.queued.length; i++) {\n // Resend\n this.send(this.queued[i]);\n }\n};\n\nProviderManager.prototype.installed = function() {\n return this.provider !== undefined;\n};\n\nProviderManager.prototype.startPolling = function (data, pollId) {\n if (!this.provider || !this.provider.poll) {\n return;\n }\n this.polls.push({data: data, id: pollId});\n};\n\nProviderManager.prototype.stopPolling = function (pollId) {\n for (var i = this.polls.length; i--;) {\n var poll = this.polls[i];\n if (poll.id === pollId) {\n this.polls.splice(i, 1);\n }\n }\n};\n\nweb3.provider = new ProviderManager();\n\nweb3.setProvider = function(provider) {\n provider.onmessage = messageHandler;\n web3.provider.set(provider);\n web3.provider.sendQueued();\n};\n\nweb3.haveProvider = function() {\n return !!web3.provider.provider;\n};\n\nvar Filter = function(options, impl) {\n this.impl = impl;\n this.callbacks = [];\n\n var self = this;\n this.promise = impl.newFilter(options);\n this.promise.then(function (id) {\n self.id = id;\n web3.on(impl.changed, id, self.trigger.bind(self));\n web3.provider.startPolling({call: impl.changed, args: [id]}, id);\n });\n};\n\nFilter.prototype.arrived = function(callback) {\n this.changed(callback);\n};\n\nFilter.prototype.changed = function(callback) {\n var self = this;\n this.promise.then(function(id) {\n self.callbacks.push(callback);\n });\n};\n\nFilter.prototype.trigger = function(messages) {\n for(var i = 0; i < this.callbacks.length; i++) {\n this.callbacks[i].call(this, messages);\n }\n};\n\nFilter.prototype.uninstall = function() {\n var self = this;\n this.promise.then(function (id) {\n self.impl.uninstallFilter(id);\n web3.provider.stopPolling(id);\n web3.off(impl.changed, id);\n });\n};\n\nFilter.prototype.messages = function() {\n var self = this;\n return this.promise.then(function (id) {\n return self.impl.getMessages(id);\n });\n};\n\nFilter.prototype.logs = function () {\n return this.messages();\n};\n\nfunction messageHandler(data) {\n if(data._event !== undefined) {\n web3.trigger(data._event, data._id, data.data);\n return;\n }\n\n if(data._id) {\n var cb = web3._callbacks[data._id];\n if (cb) {\n cb.call(this, data.error, data.data);\n delete web3._callbacks[data._id];\n }\n }\n}\n\nmodule.exports = web3;\n", - "/*\n This file is part of ethereum.js.\n\n ethereum.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n ethereum.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with ethereum.js. If not, see .\n*/\n/** @file websocket.js\n * @authors:\n * Jeffrey Wilcke \n * Marek Kotewicz \n * Marian Oancea \n * @date 2014\n */\n\n// TODO: is these line is supposed to be here? \nif (\"build\" !== 'build') {/*\n var WebSocket = require('ws'); // jshint ignore:line\n*/}\n\nvar WebSocketProvider = function(host) {\n // onmessage handlers\n this.handlers = [];\n // queue will be filled with messages if send is invoked before the ws is ready\n this.queued = [];\n this.ready = false;\n\n this.ws = new WebSocket(host);\n\n var self = this;\n this.ws.onmessage = function(event) {\n for(var i = 0; i < self.handlers.length; i++) {\n self.handlers[i].call(self, JSON.parse(event.data), event);\n }\n };\n\n this.ws.onopen = function() {\n self.ready = true;\n\n for(var i = 0; i < self.queued.length; i++) {\n // Resend\n self.send(self.queued[i]);\n }\n };\n};\n\nWebSocketProvider.prototype.send = function(payload) {\n if(this.ready) {\n var data = JSON.stringify(payload);\n\n this.ws.send(data);\n } else {\n this.queued.push(payload);\n }\n};\n\nWebSocketProvider.prototype.onMessage = function(handler) {\n this.handlers.push(handler);\n};\n\nWebSocketProvider.prototype.unload = function() {\n this.ws.close();\n};\nObject.defineProperty(WebSocketProvider.prototype, \"onmessage\", {\n set: function(provider) { this.onMessage(provider); }\n});\n\nmodule.exports = WebSocketProvider;\n", - "var web3 = require('./lib/web3');\nweb3.providers.WebSocketProvider = require('./lib/websocket');\nweb3.providers.HttpRpcProvider = require('./lib/httprpc');\nweb3.providers.QtProvider = require('./lib/qt');\nweb3.providers.AutoProvider = require('./lib/autoprovider');\nweb3.contract = require('./lib/contract');\n\nmodule.exports = web3;\n" - ] -} \ No newline at end of file diff --git a/cmd/mist/assets/ext/ethereum.js/dist/ethereum.min.js b/cmd/mist/assets/ext/ethereum.js/dist/ethereum.min.js deleted file mode 100644 index 0ae9610fca..0000000000 --- a/cmd/mist/assets/ext/ethereum.js/dist/ethereum.min.js +++ /dev/null @@ -1 +0,0 @@ -require=function t(e,n,r){function o(a,s){if(!n[a]){if(!e[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[a]={exports:{}};e[a][0].call(l.exports,function(t){var n=e[a][1][t];return o(n?n:t)},l,l.exports,t,e,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;ai;i++)o+=r[i]/8;return o},c=function(){var t=function(t,e){return function(n,r){var o=t;if(0!==n.indexOf(o))return!1;var a=e(n,o);return r="number"==typeof r?r.toString(16):"string"==typeof r?web3.toHex(r):0===r.indexOf("0x")?r.substr(2):(+r).toString(16),i(r,2*a)}},e=function(t,e,n){return function(r,o){return r!==t?!1:i(n?n(o):o,2*e)}},n=function(t){return t?"0x1":"0x0"};return[t("uint",a),t("int",a),t("hash",a),t("string",s),t("real",u),t("ureal",u),e("address",20),e("bool",1,n)]},l=c(),h=function(t,e,n){var r="",a=o(t,e);if(-1!==a){r="0x"+i(a.toString(16),2);for(var s=t[a],u=0;un;n+=2){var o=t.charCodeAt(n);if(0===o)break;e+=String.fromCharCode(parseInt(t.substr(n,2),16))}return e},fromAscii:function(t,e){e=void 0===e?32:e;for(var n=this.toHex(t);n.length<2*e;)n+="00";return"0x"+n},toDecimal:function(t){return p(t.substring(2))},fromDecimal:function(t){return"0x"+d(t)},toEth:function(t){for(var e="string"==typeof t?0===t.indexOf("0x")?parseInt(t.substr(2),16):parseInt(t):t,n=0,r=["wei","Kwei","Mwei","Gwei","szabo","finney","ether","grand","Mether","Gether","Tether","Pether","Eether","Zether","Yether","Nether","Dether","Vether","Uether"];e>3e3&&n - - - - - - - - -

coinbase balance

- -
-
-
-
- - - diff --git a/cmd/mist/assets/ext/ethereum.js/example/contract.html b/cmd/mist/assets/ext/ethereum.js/example/contract.html deleted file mode 100644 index 403d8c9d19..0000000000 --- a/cmd/mist/assets/ext/ethereum.js/example/contract.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - -

contract

-
-
- -
- -
- - - diff --git a/cmd/mist/assets/ext/ethereum.js/example/node-app.js b/cmd/mist/assets/ext/ethereum.js/example/node-app.js deleted file mode 100644 index f63fa9115f..0000000000 --- a/cmd/mist/assets/ext/ethereum.js/example/node-app.js +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env node - -require('es6-promise').polyfill(); - -var web3 = require("../index.js"); - -web3.setProvider(new web3.providers.HttpRpcProvider('http://localhost:8080')); - -web3.eth.coinbase.then(function(result){ - console.log(result); - return web3.eth.balanceAt(result); -}).then(function(balance){ - console.log(web3.toDecimal(balance)); -}).catch(function(err){ - console.log(err); -}); \ No newline at end of file diff --git a/cmd/mist/assets/ext/ethereum.js/gulpfile.js b/cmd/mist/assets/ext/ethereum.js/gulpfile.js deleted file mode 100644 index b17e50c39d..0000000000 --- a/cmd/mist/assets/ext/ethereum.js/gulpfile.js +++ /dev/null @@ -1,104 +0,0 @@ -#!/usr/bin/env node - -'use strict'; - -var path = require('path'); - -var del = require('del'); -var gulp = require('gulp'); -var browserify = require('browserify'); -var jshint = require('gulp-jshint'); -var uglify = require('gulp-uglify'); -var rename = require('gulp-rename'); -var envify = require('envify/custom'); -var unreach = require('unreachable-branch-transform'); -var source = require('vinyl-source-stream'); -var exorcist = require('exorcist'); -var bower = require('bower'); - -var DEST = './dist/'; - -var build = function(src, dst, ugly) { - var result = browserify({ - debug: true, - insert_global_vars: false, - detectGlobals: false, - bundleExternal: false - }) - .require('./' + src + '.js', {expose: 'web3'}) - .add('./' + src + '.js') - .transform('envify', { - NODE_ENV: 'build' - }) - .transform('unreachable-branch-transform'); - - if (ugly) { - result = result.transform('uglifyify', { - mangle: false, - compress: { - dead_code: false, - conditionals: true, - unused: false, - hoist_funs: true, - hoist_vars: true, - negate_iife: false - }, - beautify: true, - warnings: true - }); - } - - return result.bundle() - .pipe(exorcist(path.join( DEST, dst + '.js.map'))) - .pipe(source(dst + '.js')) - .pipe(gulp.dest( DEST )); -}; - -var uglifyFile = function(file) { - return gulp.src( DEST + file + '.js') - .pipe(uglify()) - .pipe(rename(file + '.min.js')) - .pipe(gulp.dest( DEST )); -}; - -gulp.task('bower', function(cb){ - bower.commands.install().on('end', function (installed){ - console.log(installed); - cb(); - }); -}); - -gulp.task('clean', ['lint'], function(cb) { - del([ DEST ], cb); -}); - -gulp.task('lint', function(){ - return gulp.src(['./*.js', './lib/*.js']) - .pipe(jshint()) - .pipe(jshint.reporter('default')); -}); - -gulp.task('build', ['clean'], function () { - return build('index', 'ethereum', true); -}); - -gulp.task('buildDev', ['clean'], function () { - return build('index', 'ethereum', false); -}); - -gulp.task('uglify', ['build'], function(){ - return uglifyFile('ethereum'); -}); - -gulp.task('uglify', ['buildDev'], function(){ - return uglifyFile('ethereum'); -}); - -gulp.task('watch', function() { - gulp.watch(['./lib/*.js'], ['lint', 'prepare', 'build']); -}); - -gulp.task('release', ['bower', 'lint', 'build', 'uglify']); -gulp.task('dev', ['bower', 'lint', 'buildDev', 'uglify']); -gulp.task('default', ['dev']); - diff --git a/cmd/mist/assets/ext/ethereum.js/index.js b/cmd/mist/assets/ext/ethereum.js/index.js deleted file mode 100644 index 99ce66fadb..0000000000 --- a/cmd/mist/assets/ext/ethereum.js/index.js +++ /dev/null @@ -1,8 +0,0 @@ -var web3 = require('./lib/web3'); -web3.providers.WebSocketProvider = require('./lib/websocket'); -web3.providers.HttpRpcProvider = require('./lib/httprpc'); -web3.providers.QtProvider = require('./lib/qt'); -web3.providers.AutoProvider = require('./lib/autoprovider'); -web3.contract = require('./lib/contract'); - -module.exports = web3; diff --git a/cmd/mist/assets/ext/ethereum.js/lib/abi.js b/cmd/mist/assets/ext/ethereum.js/lib/abi.js deleted file mode 100644 index 5a4d645158..0000000000 --- a/cmd/mist/assets/ext/ethereum.js/lib/abi.js +++ /dev/null @@ -1,265 +0,0 @@ -/* - This file is part of ethereum.js. - - ethereum.js is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - ethereum.js is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . -*/ -/** @file abi.js - * @authors: - * Marek Kotewicz - * Gav Wood - * @date 2014 - */ - -// TODO: is these line is supposed to be here? -if (process.env.NODE_ENV !== 'build') { - var web3 = require('./web3'); // jshint ignore:line -} - -// TODO: make these be actually accurate instead of falling back onto JS's doubles. -var hexToDec = function (hex) { - return parseInt(hex, 16).toString(); -}; - -var decToHex = function (dec) { - return parseInt(dec).toString(16); -}; - -var findIndex = function (array, callback) { - var end = false; - var i = 0; - for (; i < array.length && !end; i++) { - end = callback(array[i]); - } - return end ? i - 1 : -1; -}; - -var findMethodIndex = function (json, methodName) { - return findIndex(json, function (method) { - return method.name === methodName; - }); -}; - -var padLeft = function (string, chars) { - return new Array(chars - string.length + 1).join("0") + string; -}; - -var calcBitPadding = function (type, expected) { - var value = type.slice(expected.length); - if (value === "") { - return 32; - } - return parseInt(value) / 8; -}; - -var calcBytePadding = function (type, expected) { - var value = type.slice(expected.length); - if (value === "") { - return 32; - } - return parseInt(value); -}; - -var calcRealPadding = function (type, expected) { - var value = type.slice(expected.length); - if (value === "") { - return 32; - } - var sizes = value.split('x'); - for (var padding = 0, i = 0; i < sizes; i++) { - padding += (sizes[i] / 8); - } - return padding; -}; - -var setupInputTypes = function () { - - var prefixedType = function (prefix, calcPadding) { - return function (type, value) { - var expected = prefix; - if (type.indexOf(expected) !== 0) { - return false; - } - - var padding = calcPadding(type, expected); - if (typeof value === "number") - value = value.toString(16); - else if (typeof value === "string") - value = web3.toHex(value); - else if (value.indexOf('0x') === 0) - value = value.substr(2); - else - value = (+value).toString(16); - return padLeft(value, padding * 2); - }; - }; - - var namedType = function (name, padding, formatter) { - return function (type, value) { - if (type !== name) { - return false; - } - - return padLeft(formatter ? formatter(value) : value, padding * 2); - }; - }; - - var formatBool = function (value) { - return value ? '0x1' : '0x0'; - }; - - return [ - prefixedType('uint', calcBitPadding), - prefixedType('int', calcBitPadding), - prefixedType('hash', calcBitPadding), - prefixedType('string', calcBytePadding), - prefixedType('real', calcRealPadding), - prefixedType('ureal', calcRealPadding), - namedType('address', 20), - namedType('bool', 1, formatBool), - ]; -}; - -var inputTypes = setupInputTypes(); - -var toAbiInput = function (json, methodName, params) { - var bytes = ""; - var index = findMethodIndex(json, methodName); - - if (index === -1) { - return; - } - - bytes = "0x" + padLeft(index.toString(16), 2); - var method = json[index]; - - for (var i = 0; i < method.inputs.length; i++) { - var found = false; - for (var j = 0; j < inputTypes.length && !found; j++) { - found = inputTypes[j](method.inputs[i].type, params[i]); - } - if (!found) { - console.error('unsupported json type: ' + method.inputs[i].type); - } - bytes += found; - } - return bytes; -}; - -var setupOutputTypes = function () { - - var prefixedType = function (prefix, calcPadding) { - return function (type) { - var expected = prefix; - if (type.indexOf(expected) !== 0) { - return -1; - } - - var padding = calcPadding(type, expected); - return padding * 2; - }; - }; - - var namedType = function (name, padding) { - return function (type) { - return name === type ? padding * 2 : -1; - }; - }; - - var formatInt = function (value) { - return value.length <= 8 ? +parseInt(value, 16) : hexToDec(value); - }; - - var formatHash = function (value) { - return "0x" + value; - }; - - var formatBool = function (value) { - return value === '1' ? true : false; - }; - - var formatString = function (value) { - return web3.toAscii(value); - }; - - return [ - { padding: prefixedType('uint', calcBitPadding), format: formatInt }, - { padding: prefixedType('int', calcBitPadding), format: formatInt }, - { padding: prefixedType('hash', calcBitPadding), format: formatHash }, - { padding: prefixedType('string', calcBytePadding), format: formatString }, - { padding: prefixedType('real', calcRealPadding), format: formatInt }, - { padding: prefixedType('ureal', calcRealPadding), format: formatInt }, - { padding: namedType('address', 20) }, - { padding: namedType('bool', 1), format: formatBool } - ]; -}; - -var outputTypes = setupOutputTypes(); - -var fromAbiOutput = function (json, methodName, output) { - var index = findMethodIndex(json, methodName); - - if (index === -1) { - return; - } - - output = output.slice(2); - - var result = []; - var method = json[index]; - for (var i = 0; i < method.outputs.length; i++) { - var padding = -1; - for (var j = 0; j < outputTypes.length && padding === -1; j++) { - padding = outputTypes[j].padding(method.outputs[i].type); - } - - if (padding === -1) { - // not found output parsing - continue; - } - var res = output.slice(0, padding); - var formatter = outputTypes[j - 1].format; - result.push(formatter ? formatter(res) : ("0x" + res)); - output = output.slice(padding); - } - - return result; -}; - -var inputParser = function (json) { - var parser = {}; - json.forEach(function (method) { - parser[method.name] = function () { - var params = Array.prototype.slice.call(arguments); - return toAbiInput(json, method.name, params); - }; - }); - - return parser; -}; - -var outputParser = function (json) { - var parser = {}; - json.forEach(function (method) { - parser[method.name] = function (output) { - return fromAbiOutput(json, method.name, output); - }; - }); - - return parser; -}; - -module.exports = { - inputParser: inputParser, - outputParser: outputParser -}; diff --git a/cmd/mist/assets/ext/ethereum.js/lib/autoprovider.js b/cmd/mist/assets/ext/ethereum.js/lib/autoprovider.js deleted file mode 100644 index 1138736740..0000000000 --- a/cmd/mist/assets/ext/ethereum.js/lib/autoprovider.js +++ /dev/null @@ -1,102 +0,0 @@ -/* - This file is part of ethereum.js. - - ethereum.js is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - ethereum.js is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . -*/ -/** @file autoprovider.js - * @authors: - * Marek Kotewicz - * Marian Oancea - * @date 2014 - */ - -/* - * @brief if qt object is available, uses QtProvider, - * if not tries to connect over websockets - * if it fails, it uses HttpRpcProvider - */ - -// TODO: is these line is supposed to be here? -if (process.env.NODE_ENV !== 'build') { - var WebSocket = require('ws'); // jshint ignore:line - var web3 = require('./web3'); // jshint ignore:line -} - -var AutoProvider = function (userOptions) { - if (web3.haveProvider()) { - return; - } - - // before we determine what provider we are, we have to cache request - this.sendQueue = []; - this.onmessageQueue = []; - - if (navigator.qt) { - this.provider = new web3.providers.QtProvider(); - return; - } - - userOptions = userOptions || {}; - var options = { - httprpc: userOptions.httprpc || 'http://localhost:8080', - websockets: userOptions.websockets || 'ws://localhost:40404/eth' - }; - - var self = this; - var closeWithSuccess = function (success) { - ws.close(); - if (success) { - self.provider = new web3.providers.WebSocketProvider(options.websockets); - } else { - self.provider = new web3.providers.HttpRpcProvider(options.httprpc); - self.poll = self.provider.poll.bind(self.provider); - } - self.sendQueue.forEach(function (payload) { - self.provider(payload); - }); - self.onmessageQueue.forEach(function (handler) { - self.provider.onmessage = handler; - }); - }; - - var ws = new WebSocket(options.websockets); - - ws.onopen = function() { - closeWithSuccess(true); - }; - - ws.onerror = function() { - closeWithSuccess(false); - }; -}; - -AutoProvider.prototype.send = function (payload) { - if (this.provider) { - this.provider.send(payload); - return; - } - this.sendQueue.push(payload); -}; - -Object.defineProperty(AutoProvider.prototype, 'onmessage', { - set: function (handler) { - if (this.provider) { - this.provider.onmessage = handler; - return; - } - this.onmessageQueue.push(handler); - } -}); - -module.exports = AutoProvider; diff --git a/cmd/mist/assets/ext/ethereum.js/lib/contract.js b/cmd/mist/assets/ext/ethereum.js/lib/contract.js deleted file mode 100644 index b103390034..0000000000 --- a/cmd/mist/assets/ext/ethereum.js/lib/contract.js +++ /dev/null @@ -1,65 +0,0 @@ -/* - This file is part of ethereum.js. - - ethereum.js is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - ethereum.js is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . -*/ -/** @file contract.js - * @authors: - * Marek Kotewicz - * @date 2014 - */ - -// TODO: is these line is supposed to be here? -if (process.env.NODE_ENV !== 'build') { - var web3 = require('./web3'); // jshint ignore:line -} - -var abi = require('./abi'); - -var contract = function (address, desc) { - var inputParser = abi.inputParser(desc); - var outputParser = abi.outputParser(desc); - - var contract = {}; - - desc.forEach(function (method) { - contract[method.name] = function () { - var params = Array.prototype.slice.call(arguments); - var parsed = inputParser[method.name].apply(null, params); - - var onSuccess = function (result) { - return outputParser[method.name](result); - }; - - return { - call: function (extra) { - extra = extra || {}; - extra.to = address; - extra.data = parsed; - return web3.eth.call(extra).then(onSuccess); - }, - transact: function (extra) { - extra = extra || {}; - extra.to = address; - extra.data = parsed; - return web3.eth.transact(extra).then(onSuccess); - } - }; - }; - }); - - return contract; -}; - -module.exports = contract; diff --git a/cmd/mist/assets/ext/ethereum.js/lib/httprpc.js b/cmd/mist/assets/ext/ethereum.js/lib/httprpc.js deleted file mode 100644 index d315201f1c..0000000000 --- a/cmd/mist/assets/ext/ethereum.js/lib/httprpc.js +++ /dev/null @@ -1,94 +0,0 @@ -/* - This file is part of ethereum.js. - - ethereum.js is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - ethereum.js is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . -*/ -/** @file httprpc.js - * @authors: - * Marek Kotewicz - * Marian Oancea - * @date 2014 - */ - -// TODO: is these line is supposed to be here? -if (process.env.NODE_ENV !== 'build') { - var XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest; // jshint ignore:line -} - -var HttpRpcProvider = function (host) { - this.handlers = []; - this.host = host; -}; - -function formatJsonRpcObject(object) { - return { - jsonrpc: '2.0', - method: object.call, - params: object.args, - id: object._id - }; -} - -function formatJsonRpcMessage(message) { - var object = JSON.parse(message); - - return { - _id: object.id, - data: object.result, - error: object.error - }; -} - -HttpRpcProvider.prototype.sendRequest = function (payload, cb) { - var data = formatJsonRpcObject(payload); - - var request = new XMLHttpRequest(); - request.open("POST", this.host, true); - request.send(JSON.stringify(data)); - request.onreadystatechange = function () { - if (request.readyState === 4 && cb) { - cb(request); - } - }; -}; - -HttpRpcProvider.prototype.send = function (payload) { - var self = this; - this.sendRequest(payload, function (request) { - self.handlers.forEach(function (handler) { - handler.call(self, formatJsonRpcMessage(request.responseText)); - }); - }); -}; - -HttpRpcProvider.prototype.poll = function (payload, id) { - var self = this; - this.sendRequest(payload, function (request) { - var parsed = JSON.parse(request.responseText); - if (parsed.error || (parsed.result instanceof Array ? parsed.result.length === 0 : !parsed.result)) { - return; - } - self.handlers.forEach(function (handler) { - handler.call(self, {_event: payload.call, _id: id, data: parsed.result}); - }); - }); -}; - -Object.defineProperty(HttpRpcProvider.prototype, "onmessage", { - set: function (handler) { - this.handlers.push(handler); - } -}); - -module.exports = HttpRpcProvider; diff --git a/cmd/mist/assets/ext/ethereum.js/lib/qt.js b/cmd/mist/assets/ext/ethereum.js/lib/qt.js deleted file mode 100644 index f022395476..0000000000 --- a/cmd/mist/assets/ext/ethereum.js/lib/qt.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - This file is part of ethereum.js. - - ethereum.js is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - ethereum.js is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . -*/ -/** @file qt.js - * @authors: - * Jeffrey Wilcke - * Marek Kotewicz - * @date 2014 - */ - -var QtProvider = function() { - this.handlers = []; - - var self = this; - navigator.qt.onmessage = function (message) { - self.handlers.forEach(function (handler) { - handler.call(self, JSON.parse(message.data)); - }); - }; -}; - -QtProvider.prototype.send = function(payload) { - navigator.qt.postMessage(JSON.stringify(payload)); -}; - -Object.defineProperty(QtProvider.prototype, "onmessage", { - set: function(handler) { - this.handlers.push(handler); - } -}); - -module.exports = QtProvider; diff --git a/cmd/mist/assets/ext/ethereum.js/lib/web3.js b/cmd/mist/assets/ext/ethereum.js/lib/web3.js deleted file mode 100644 index 8f5f55b406..0000000000 --- a/cmd/mist/assets/ext/ethereum.js/lib/web3.js +++ /dev/null @@ -1,509 +0,0 @@ -/* - This file is part of ethereum.js. - - ethereum.js is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - ethereum.js is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . -*/ -/** @file main.js - * @authors: - * Jeffrey Wilcke - * Marek Kotewicz - * Marian Oancea - * Gav Wood - * @date 2014 - */ - -function flattenPromise (obj) { - if (obj instanceof Promise) { - return Promise.resolve(obj); - } - - if (obj instanceof Array) { - return new Promise(function (resolve) { - var promises = obj.map(function (o) { - return flattenPromise(o); - }); - - return Promise.all(promises).then(function (res) { - for (var i = 0; i < obj.length; i++) { - obj[i] = res[i]; - } - resolve(obj); - }); - }); - } - - if (obj instanceof Object) { - return new Promise(function (resolve) { - var keys = Object.keys(obj); - var promises = keys.map(function (key) { - return flattenPromise(obj[key]); - }); - - return Promise.all(promises).then(function (res) { - for (var i = 0; i < keys.length; i++) { - obj[keys[i]] = res[i]; - } - resolve(obj); - }); - }); - } - - return Promise.resolve(obj); -} - -var web3Methods = function () { - return [ - { name: 'sha3', call: 'web3_sha3' } - ]; -}; - -var ethMethods = function () { - var blockCall = function (args) { - return typeof args[0] === "string" ? "eth_blockByHash" : "eth_blockByNumber"; - }; - - var transactionCall = function (args) { - return typeof args[0] === "string" ? 'eth_transactionByHash' : 'eth_transactionByNumber'; - }; - - var uncleCall = function (args) { - return typeof args[0] === "string" ? 'eth_uncleByHash' : 'eth_uncleByNumber'; - }; - - var methods = [ - { name: 'balanceAt', call: 'eth_balanceAt' }, - { name: 'stateAt', call: 'eth_stateAt' }, - { name: 'storageAt', call: 'eth_storageAt' }, - { name: 'countAt', call: 'eth_countAt'}, - { name: 'codeAt', call: 'eth_codeAt' }, - { name: 'transact', call: 'eth_transact' }, - { name: 'call', call: 'eth_call' }, - { name: 'block', call: blockCall }, - { name: 'transaction', call: transactionCall }, - { name: 'uncle', call: uncleCall }, - { name: 'compilers', call: 'eth_compilers' }, - { name: 'lll', call: 'eth_lll' }, - { name: 'solidity', call: 'eth_solidity' }, - { name: 'serpent', call: 'eth_serpent' }, - { name: 'logs', call: 'eth_logs' } - ]; - return methods; -}; - -var ethProperties = function () { - return [ - { name: 'coinbase', getter: 'eth_coinbase', setter: 'eth_setCoinbase' }, - { name: 'listening', getter: 'eth_listening', setter: 'eth_setListening' }, - { name: 'mining', getter: 'eth_mining', setter: 'eth_setMining' }, - { name: 'gasPrice', getter: 'eth_gasPrice' }, - { name: 'account', getter: 'eth_account' }, - { name: 'accounts', getter: 'eth_accounts' }, - { name: 'peerCount', getter: 'eth_peerCount' }, - { name: 'defaultBlock', getter: 'eth_defaultBlock', setter: 'eth_setDefaultBlock' }, - { name: 'number', getter: 'eth_number'} - ]; -}; - -var dbMethods = function () { - return [ - { name: 'put', call: 'db_put' }, - { name: 'get', call: 'db_get' }, - { name: 'putString', call: 'db_putString' }, - { name: 'getString', call: 'db_getString' } - ]; -}; - -var shhMethods = function () { - return [ - { name: 'post', call: 'shh_post' }, - { name: 'newIdentity', call: 'shh_newIdentity' }, - { name: 'haveIdentity', call: 'shh_haveIdentity' }, - { name: 'newGroup', call: 'shh_newGroup' }, - { name: 'addToGroup', call: 'shh_addToGroup' } - ]; -}; - -var ethWatchMethods = function () { - var newFilter = function (args) { - return typeof args[0] === 'string' ? 'eth_newFilterString' : 'eth_newFilter'; - }; - - return [ - { name: 'newFilter', call: newFilter }, - { name: 'uninstallFilter', call: 'eth_uninstallFilter' }, - { name: 'getMessages', call: 'eth_filterLogs' } - ]; -}; - -var shhWatchMethods = function () { - return [ - { name: 'newFilter', call: 'shh_newFilter' }, - { name: 'uninstallFilter', call: 'shh_uninstallFilter' }, - { name: 'getMessage', call: 'shh_getMessages' } - ]; -}; - -var setupMethods = function (obj, methods) { - methods.forEach(function (method) { - obj[method.name] = function () { - return flattenPromise(Array.prototype.slice.call(arguments)).then(function (args) { - var call = typeof method.call === "function" ? method.call(args) : method.call; - return {call: call, args: args}; - }).then(function (request) { - return new Promise(function (resolve, reject) { - web3.provider.send(request, function (err, result) { - if (!err) { - resolve(result); - return; - } - reject(err); - }); - }); - }).catch(function(err) { - console.error(err); - }); - }; - }); -}; - -var setupProperties = function (obj, properties) { - properties.forEach(function (property) { - var proto = {}; - proto.get = function () { - return new Promise(function(resolve, reject) { - web3.provider.send({call: property.getter}, function(err, result) { - if (!err) { - resolve(result); - return; - } - reject(err); - }); - }); - }; - if (property.setter) { - proto.set = function (val) { - return flattenPromise([val]).then(function (args) { - return new Promise(function (resolve) { - web3.provider.send({call: property.setter, args: args}, function (err, result) { - if (!err) { - resolve(result); - return; - } - reject(err); - }); - }); - }).catch(function (err) { - console.error(err); - }); - }; - } - Object.defineProperty(obj, property.name, proto); - }); -}; - -// TODO: import from a dependency, don't duplicate. -var hexToDec = function (hex) { - return parseInt(hex, 16).toString(); -}; - -var decToHex = function (dec) { - return parseInt(dec).toString(16); -}; - - -var web3 = { - _callbacks: {}, - _events: {}, - providers: {}, - - toHex: function(str) { - var hex = ""; - for(var i = 0; i < str.length; i++) { - var n = str.charCodeAt(i).toString(16); - hex += n.length < 2 ? '0' + n : n; - } - - return hex; - }, - - toAscii: function(hex) { - // Find termination - var str = ""; - var i = 0, l = hex.length; - if (hex.substring(0, 2) === '0x') - i = 2; - for(; i < l; i+=2) { - var code = hex.charCodeAt(i); - if(code === 0) { - break; - } - - str += String.fromCharCode(parseInt(hex.substr(i, 2), 16)); - } - - return str; - }, - - fromAscii: function(str, pad) { - pad = pad === undefined ? 32 : pad; - var hex = this.toHex(str); - while(hex.length < pad*2) - hex += "00"; - return "0x" + hex; - }, - - toDecimal: function (val) { - return hexToDec(val.substring(2)); - }, - - fromDecimal: function (val) { - return "0x" + decToHex(val); - }, - - toEth: function(str) { - var val = typeof str === "string" ? str.indexOf('0x') === 0 ? parseInt(str.substr(2), 16) : parseInt(str) : str; - var unit = 0; - var units = [ 'wei', 'Kwei', 'Mwei', 'Gwei', 'szabo', 'finney', 'ether', 'grand', 'Mether', 'Gether', 'Tether', 'Pether', 'Eether', 'Zether', 'Yether', 'Nether', 'Dether', 'Vether', 'Uether' ]; - while (val > 3000 && unit < units.length - 1) - { - val /= 1000; - unit++; - } - var s = val.toString().length < val.toFixed(2).length ? val.toString() : val.toFixed(2); - var replaceFunction = function($0, $1, $2) { - return $1 + ',' + $2; - }; - - while (true) { - var o = s; - s = s.replace(/(\d)(\d\d\d[\.\,])/, replaceFunction); - if (o === s) - break; - } - return s + ' ' + units[unit]; - }, - - eth: { - prototype: Object(), // jshint ignore:line - watch: function (params) { - return new Filter(params, ethWatch); - } - }, - - db: { - prototype: Object() // jshint ignore:line - }, - - shh: { - prototype: Object(), // jshint ignore:line - watch: function (params) { - return new Filter(params, shhWatch); - } - }, - - on: function(event, id, cb) { - if(web3._events[event] === undefined) { - web3._events[event] = {}; - } - - web3._events[event][id] = cb; - return this; - }, - - off: function(event, id) { - if(web3._events[event] !== undefined) { - delete web3._events[event][id]; - } - - return this; - }, - - trigger: function(event, id, data) { - var callbacks = web3._events[event]; - if (!callbacks || !callbacks[id]) { - return; - } - var cb = callbacks[id]; - cb(data); - } -}; - -setupMethods(web3, web3Methods()); -setupMethods(web3.eth, ethMethods()); -setupProperties(web3.eth, ethProperties()); -setupMethods(web3.db, dbMethods()); -setupMethods(web3.shh, shhMethods()); - -var ethWatch = { - changed: 'eth_changed' -}; -setupMethods(ethWatch, ethWatchMethods()); -var shhWatch = { - changed: 'shh_changed' -}; -setupMethods(shhWatch, shhWatchMethods()); - -var ProviderManager = function() { - this.queued = []; - this.polls = []; - this.ready = false; - this.provider = undefined; - this.id = 1; - - var self = this; - var poll = function () { - if (self.provider && self.provider.poll) { - self.polls.forEach(function (data) { - data.data._id = self.id; - self.id++; - self.provider.poll(data.data, data.id); - }); - } - setTimeout(poll, 12000); - }; - poll(); -}; - -ProviderManager.prototype.send = function(data, cb) { - data._id = this.id; - if (cb) { - web3._callbacks[data._id] = cb; - } - - data.args = data.args || []; - this.id++; - - if(this.provider !== undefined) { - this.provider.send(data); - } else { - console.warn("provider is not set"); - this.queued.push(data); - } -}; - -ProviderManager.prototype.set = function(provider) { - if(this.provider !== undefined && this.provider.unload !== undefined) { - this.provider.unload(); - } - - this.provider = provider; - this.ready = true; -}; - -ProviderManager.prototype.sendQueued = function() { - for(var i = 0; this.queued.length; i++) { - // Resend - this.send(this.queued[i]); - } -}; - -ProviderManager.prototype.installed = function() { - return this.provider !== undefined; -}; - -ProviderManager.prototype.startPolling = function (data, pollId) { - if (!this.provider || !this.provider.poll) { - return; - } - this.polls.push({data: data, id: pollId}); -}; - -ProviderManager.prototype.stopPolling = function (pollId) { - for (var i = this.polls.length; i--;) { - var poll = this.polls[i]; - if (poll.id === pollId) { - this.polls.splice(i, 1); - } - } -}; - -web3.provider = new ProviderManager(); - -web3.setProvider = function(provider) { - provider.onmessage = messageHandler; - web3.provider.set(provider); - web3.provider.sendQueued(); -}; - -web3.haveProvider = function() { - return !!web3.provider.provider; -}; - -var Filter = function(options, impl) { - this.impl = impl; - this.callbacks = []; - - var self = this; - this.promise = impl.newFilter(options); - this.promise.then(function (id) { - self.id = id; - web3.on(impl.changed, id, self.trigger.bind(self)); - web3.provider.startPolling({call: impl.changed, args: [id]}, id); - }); -}; - -Filter.prototype.arrived = function(callback) { - this.changed(callback); -}; - -Filter.prototype.changed = function(callback) { - var self = this; - this.promise.then(function(id) { - self.callbacks.push(callback); - }); -}; - -Filter.prototype.trigger = function(messages) { - for(var i = 0; i < this.callbacks.length; i++) { - this.callbacks[i].call(this, messages); - } -}; - -Filter.prototype.uninstall = function() { - var self = this; - this.promise.then(function (id) { - self.impl.uninstallFilter(id); - web3.provider.stopPolling(id); - web3.off(impl.changed, id); - }); -}; - -Filter.prototype.messages = function() { - var self = this; - return this.promise.then(function (id) { - return self.impl.getMessages(id); - }); -}; - -Filter.prototype.logs = function () { - return this.messages(); -}; - -function messageHandler(data) { - if(data._event !== undefined) { - web3.trigger(data._event, data._id, data.data); - return; - } - - if(data._id) { - var cb = web3._callbacks[data._id]; - if (cb) { - cb.call(this, data.error, data.data); - delete web3._callbacks[data._id]; - } - } -} - -if (typeof(module) !== "undefined") - module.exports = web3; diff --git a/cmd/mist/assets/ext/ethereum.js/lib/websocket.js b/cmd/mist/assets/ext/ethereum.js/lib/websocket.js deleted file mode 100644 index ddb44aed5d..0000000000 --- a/cmd/mist/assets/ext/ethereum.js/lib/websocket.js +++ /dev/null @@ -1,77 +0,0 @@ -/* - This file is part of ethereum.js. - - ethereum.js is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - ethereum.js is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with ethereum.js. If not, see . -*/ -/** @file websocket.js - * @authors: - * Jeffrey Wilcke - * Marek Kotewicz - * Marian Oancea - * @date 2014 - */ - -// TODO: is these line is supposed to be here? -if (process.env.NODE_ENV !== 'build') { - var WebSocket = require('ws'); // jshint ignore:line -} - -var WebSocketProvider = function(host) { - // onmessage handlers - this.handlers = []; - // queue will be filled with messages if send is invoked before the ws is ready - this.queued = []; - this.ready = false; - - this.ws = new WebSocket(host); - - var self = this; - this.ws.onmessage = function(event) { - for(var i = 0; i < self.handlers.length; i++) { - self.handlers[i].call(self, JSON.parse(event.data), event); - } - }; - - this.ws.onopen = function() { - self.ready = true; - - for(var i = 0; i < self.queued.length; i++) { - // Resend - self.send(self.queued[i]); - } - }; -}; - -WebSocketProvider.prototype.send = function(payload) { - if(this.ready) { - var data = JSON.stringify(payload); - - this.ws.send(data); - } else { - this.queued.push(payload); - } -}; - -WebSocketProvider.prototype.onMessage = function(handler) { - this.handlers.push(handler); -}; - -WebSocketProvider.prototype.unload = function() { - this.ws.close(); -}; -Object.defineProperty(WebSocketProvider.prototype, "onmessage", { - set: function(provider) { this.onMessage(provider); } -}); - -module.exports = WebSocketProvider; diff --git a/cmd/mist/assets/ext/ethereum.js/package.json b/cmd/mist/assets/ext/ethereum.js/package.json deleted file mode 100644 index 8f5ba22555..0000000000 --- a/cmd/mist/assets/ext/ethereum.js/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "name": "ethereum.js", - "namespace": "ethereum", - "version": "0.0.6", - "description": "Ethereum Compatible JavaScript API", - "main": "./index.js", - "directories": { - "lib": "./lib" - }, - "dependencies": { - "es6-promise": "*", - "ws": "*", - "xmlhttprequest": "*" - }, - "devDependencies": { - "bower": ">=1.3.0", - "browserify": ">=6.0", - "del": ">=0.1.1", - "envify": "^3.0.0", - "exorcist": "^0.1.6", - "gulp": ">=3.4.0", - "gulp-jshint": ">=1.5.0", - "gulp-rename": ">=1.2.0", - "gulp-uglify": ">=1.0.0", - "jshint": ">=2.5.0", - "uglifyify": "^2.6.0", - "unreachable-branch-transform": "^0.1.0", - "vinyl-source-stream": "^1.0.0" - }, - "scripts": { - "build": "gulp", - "watch": "gulp watch", - "lint": "gulp lint" - }, - "repository": { - "type": "git", - "url": "https://github.com/ethereum/ethereum.js.git" - }, - "homepage": "https://github.com/ethereum/ethereum.js", - "bugs": { - "url": "https://github.com/ethereum/ethereum.js/issues" - }, - "keywords": [ - "ethereum", - "javascript", - "API" - ], - "author": "ethdev.com", - "authors": [ - { - "name": "Jeffery Wilcke", - "email": "jeff@ethdev.com", - "url": "https://github.com/obscuren" - }, - { - "name": "Marek Kotewicz", - "email": "marek@ethdev.com", - "url": "https://github.com/debris" - }, - { - "name": "Marian Oancea", - "email": "marian@ethdev.com", - "url": "https://github.com/cubedro" - } - ], - "license": "LGPL-3.0" -} From 18d8bf4b9cf5ac405aaefd5c949a4ccd26847a02 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 9 Jan 2015 13:01:21 +0100 Subject: [PATCH 125/132] updated ethereum.js --- cmd/mist/assets/ext/ethereum.js/.bowerrc | 5 + cmd/mist/assets/ext/ethereum.js/.editorconfig | 12 + cmd/mist/assets/ext/ethereum.js/.gitignore | 18 + cmd/mist/assets/ext/ethereum.js/.jshintrc | 50 + cmd/mist/assets/ext/ethereum.js/.npmignore | 9 + cmd/mist/assets/ext/ethereum.js/.travis.yml | 11 + cmd/mist/assets/ext/ethereum.js/LICENSE | 14 + cmd/mist/assets/ext/ethereum.js/README.md | 79 ++ cmd/mist/assets/ext/ethereum.js/bower.json | 51 + .../assets/ext/ethereum.js/dist/ethereum.js | 1184 +++++++++++++++++ .../ext/ethereum.js/dist/ethereum.js.map | 29 + .../ext/ethereum.js/dist/ethereum.min.js | 1 + .../ext/ethereum.js/example/balance.html | 41 + .../ext/ethereum.js/example/contract.html | 75 ++ .../ext/ethereum.js/example/node-app.js | 16 + cmd/mist/assets/ext/ethereum.js/gulpfile.js | 104 ++ cmd/mist/assets/ext/ethereum.js/index.js | 8 + cmd/mist/assets/ext/ethereum.js/lib/abi.js | 267 ++++ .../ext/ethereum.js/lib/autoprovider.js | 103 ++ .../assets/ext/ethereum.js/lib/contract.js | 66 + .../assets/ext/ethereum.js/lib/httprpc.js | 95 ++ cmd/mist/assets/ext/ethereum.js/lib/qt.js | 46 + cmd/mist/assets/ext/ethereum.js/lib/web3.js | 509 +++++++ .../assets/ext/ethereum.js/lib/websocket.js | 78 ++ cmd/mist/assets/ext/ethereum.js/package.json | 67 + 25 files changed, 2938 insertions(+) create mode 100644 cmd/mist/assets/ext/ethereum.js/.bowerrc create mode 100644 cmd/mist/assets/ext/ethereum.js/.editorconfig create mode 100644 cmd/mist/assets/ext/ethereum.js/.gitignore create mode 100644 cmd/mist/assets/ext/ethereum.js/.jshintrc create mode 100644 cmd/mist/assets/ext/ethereum.js/.npmignore create mode 100644 cmd/mist/assets/ext/ethereum.js/.travis.yml create mode 100644 cmd/mist/assets/ext/ethereum.js/LICENSE create mode 100644 cmd/mist/assets/ext/ethereum.js/README.md create mode 100644 cmd/mist/assets/ext/ethereum.js/bower.json create mode 100644 cmd/mist/assets/ext/ethereum.js/dist/ethereum.js create mode 100644 cmd/mist/assets/ext/ethereum.js/dist/ethereum.js.map create mode 100644 cmd/mist/assets/ext/ethereum.js/dist/ethereum.min.js create mode 100644 cmd/mist/assets/ext/ethereum.js/example/balance.html create mode 100644 cmd/mist/assets/ext/ethereum.js/example/contract.html create mode 100644 cmd/mist/assets/ext/ethereum.js/example/node-app.js create mode 100644 cmd/mist/assets/ext/ethereum.js/gulpfile.js create mode 100644 cmd/mist/assets/ext/ethereum.js/index.js create mode 100644 cmd/mist/assets/ext/ethereum.js/lib/abi.js create mode 100644 cmd/mist/assets/ext/ethereum.js/lib/autoprovider.js create mode 100644 cmd/mist/assets/ext/ethereum.js/lib/contract.js create mode 100644 cmd/mist/assets/ext/ethereum.js/lib/httprpc.js create mode 100644 cmd/mist/assets/ext/ethereum.js/lib/qt.js create mode 100644 cmd/mist/assets/ext/ethereum.js/lib/web3.js create mode 100644 cmd/mist/assets/ext/ethereum.js/lib/websocket.js create mode 100644 cmd/mist/assets/ext/ethereum.js/package.json diff --git a/cmd/mist/assets/ext/ethereum.js/.bowerrc b/cmd/mist/assets/ext/ethereum.js/.bowerrc new file mode 100644 index 0000000000..c3a8813e8b --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/.bowerrc @@ -0,0 +1,5 @@ +{ + "directory": "example/js/", + "cwd": "./", + "analytics": false +} \ No newline at end of file diff --git a/cmd/mist/assets/ext/ethereum.js/.editorconfig b/cmd/mist/assets/ext/ethereum.js/.editorconfig new file mode 100644 index 0000000000..60a2751d33 --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +indent_style = space +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false \ No newline at end of file diff --git a/cmd/mist/assets/ext/ethereum.js/.gitignore b/cmd/mist/assets/ext/ethereum.js/.gitignore new file mode 100644 index 0000000000..399b6dc882 --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/.gitignore @@ -0,0 +1,18 @@ +# See http://help.github.com/ignore-files/ for more about ignoring files. +# +# If you find yourself ignoring temporary files generated by your text editor +# or operating system, you probably want to add a global ignore instead: +# git config --global core.excludesfile ~/.gitignore_global + +*.swp +/tmp +*/**/*un~ +*un~ +.DS_Store +*/**/.DS_Store +ethereum/ethereum +ethereal/ethereal +example/js +node_modules +bower_components +npm-debug.log diff --git a/cmd/mist/assets/ext/ethereum.js/.jshintrc b/cmd/mist/assets/ext/ethereum.js/.jshintrc new file mode 100644 index 0000000000..c0ec5f89d1 --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/.jshintrc @@ -0,0 +1,50 @@ +{ + "predef": [ + "console", + "require", + "equal", + "test", + "testBoth", + "testWithDefault", + "raises", + "deepEqual", + "start", + "stop", + "ok", + "strictEqual", + "module", + "expect", + "reject", + "impl" + ], + + "esnext": true, + "proto": true, + "node" : true, + "browser" : true, + "browserify" : true, + + "boss" : true, + "curly": false, + "debug": true, + "devel": true, + "eqeqeq": true, + "evil": true, + "forin": false, + "immed": false, + "laxbreak": false, + "newcap": true, + "noarg": true, + "noempty": false, + "nonew": false, + "nomen": false, + "onevar": false, + "plusplus": false, + "regexp": false, + "undef": true, + "sub": true, + "strict": false, + "white": false, + "shadow": true, + "eqnull": true +} \ No newline at end of file diff --git a/cmd/mist/assets/ext/ethereum.js/.npmignore b/cmd/mist/assets/ext/ethereum.js/.npmignore new file mode 100644 index 0000000000..5bbffe4fd3 --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/.npmignore @@ -0,0 +1,9 @@ +example/js +node_modules +test +.gitignore +.editorconfig +.travis.yml +.npmignore +component.json +testling.html \ No newline at end of file diff --git a/cmd/mist/assets/ext/ethereum.js/.travis.yml b/cmd/mist/assets/ext/ethereum.js/.travis.yml new file mode 100644 index 0000000000..fafacbd5a1 --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/.travis.yml @@ -0,0 +1,11 @@ +language: node_js +node_js: + - "0.11" + - "0.10" +before_script: + - npm install + - npm install jshint +script: + - "jshint *.js lib" +after_script: + - npm run-script gulp diff --git a/cmd/mist/assets/ext/ethereum.js/LICENSE b/cmd/mist/assets/ext/ethereum.js/LICENSE new file mode 100644 index 0000000000..0f187b8736 --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/LICENSE @@ -0,0 +1,14 @@ +This file is part of ethereum.js. + +ethereum.js is free software: you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +ethereum.js is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with ethereum.js. If not, see . \ No newline at end of file diff --git a/cmd/mist/assets/ext/ethereum.js/README.md b/cmd/mist/assets/ext/ethereum.js/README.md new file mode 100644 index 0000000000..865b62c6b1 --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/README.md @@ -0,0 +1,79 @@ +# Ethereum JavaScript API + +This is the Ethereum compatible JavaScript API using `Promise`s +which implements the [Generic JSON RPC](https://github.com/ethereum/wiki/wiki/Generic-JSON-RPC) spec. It's available on npm as a node module and also for bower and component as an embeddable js + +[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![dependency status][dep-image]][dep-url] [![dev dependency status][dep-dev-image]][dep-dev-url] + + + +## Installation + +### Node.js + + npm install ethereum.js + +### For browser +Bower + + bower install ethereum.js + +Component + + component install ethereum/ethereum.js + +* Include `ethereum.min.js` in your html file. +* Include [es6-promise](https://github.com/jakearchibald/es6-promise) or another ES6-Shim if your browser doesn't support ECMAScript 6. + +## Usage +Require the library: + + var web3 = require('web3'); + +Set a provider (QtProvider, WebSocketProvider, HttpRpcProvider) + + var web3.setProvider(new web3.providers.WebSocketProvider('ws://localhost:40404/eth')); + +There you go, now you can use it: + +``` +web3.eth.coinbase.then(function(result){ + console.log(result); + return web3.eth.balanceAt(result); +}).then(function(balance){ + console.log(web3.toDecimal(balance)); +}).catch(function(err){ + console.log(err); +}); +``` + + +For another example see `example/index.html`. + +## Building + +* `gulp build` + + +### Testing + +**Please note this repo is in it's early stage.** + +If you'd like to run a WebSocket ethereum node check out +[go-ethereum](https://github.com/ethereum/go-ethereum). + +To install ethereum and spawn a node: + +``` +go get github.com/ethereum/go-ethereum/ethereum +ethereum -ws -loglevel=4 +``` + +[npm-image]: https://badge.fury.io/js/ethereum.js.png +[npm-url]: https://npmjs.org/package/ethereum.js +[travis-image]: https://travis-ci.org/ethereum/ethereum.js.svg +[travis-url]: https://travis-ci.org/ethereum/ethereum.js +[dep-image]: https://david-dm.org/ethereum/ethereum.js.svg +[dep-url]: https://david-dm.org/ethereum/ethereum.js +[dep-dev-image]: https://david-dm.org/ethereum/ethereum.js/dev-status.svg +[dep-dev-url]: https://david-dm.org/ethereum/ethereum.js#info=devDependencies \ No newline at end of file diff --git a/cmd/mist/assets/ext/ethereum.js/bower.json b/cmd/mist/assets/ext/ethereum.js/bower.json new file mode 100644 index 0000000000..cedae9023d --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/bower.json @@ -0,0 +1,51 @@ +{ + "name": "ethereum.js", + "namespace": "ethereum", + "version": "0.0.3", + "description": "Ethereum Compatible JavaScript API", + "main": ["./dist/ethereum.js", "./dist/ethereum.min.js"], + "dependencies": { + "es6-promise": "#master" + }, + "repository": { + "type": "git", + "url": "https://github.com/ethereum/ethereum.js.git" + }, + "homepage": "https://github.com/ethereum/ethereum.js", + "bugs": { + "url": "https://github.com/ethereum/ethereum.js/issues" + }, + "keywords": [ + "ethereum", + "javascript", + "API" + ], + "authors": [ + { + "name": "Marek Kotewicz", + "email": "marek@ethdev.com", + "homepage": "https://github.com/debris" + }, + { + "name": "Marian Oancea", + "email": "marian@ethdev.com", + "homepage": "https://github.com/cubedro" + } + ], + "license": "LGPL-3.0", + "ignore": [ + "example", + "lib", + "node_modules", + "package.json", + ".bowerrc", + ".editorconfig", + ".gitignore", + ".jshintrc", + ".npmignore", + ".travis.yml", + "gulpfile.js", + "index.js", + "**/*.txt" + ] +} \ No newline at end of file diff --git a/cmd/mist/assets/ext/ethereum.js/dist/ethereum.js b/cmd/mist/assets/ext/ethereum.js/dist/ethereum.js new file mode 100644 index 0000000000..4f4b5d3265 --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/dist/ethereum.js @@ -0,0 +1,1184 @@ +require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o. +*/ +/** @file abi.js + * @authors: + * Marek Kotewicz + * Gav Wood + * @date 2014 + */ + +// TODO: is these line is supposed to be here? +if ("build" !== 'build') {/* + var web3 = require('./web3'); // jshint ignore:line +*/} + +// TODO: make these be actually accurate instead of falling back onto JS's doubles. +var hexToDec = function (hex) { + return parseInt(hex, 16).toString(); +}; + +var decToHex = function (dec) { + return parseInt(dec).toString(16); +}; + +var findIndex = function (array, callback) { + var end = false; + var i = 0; + for (; i < array.length && !end; i++) { + end = callback(array[i]); + } + return end ? i - 1 : -1; +}; + +var findMethodIndex = function (json, methodName) { + return findIndex(json, function (method) { + return method.name === methodName; + }); +}; + +var padLeft = function (string, chars) { + return new Array(chars - string.length + 1).join("0") + string; +}; + +var calcBitPadding = function (type, expected) { + var value = type.slice(expected.length); + if (value === "") { + return 32; + } + return parseInt(value) / 8; +}; + +var calcBytePadding = function (type, expected) { + var value = type.slice(expected.length); + if (value === "") { + return 32; + } + return parseInt(value); +}; + +var calcRealPadding = function (type, expected) { + var value = type.slice(expected.length); + if (value === "") { + return 32; + } + var sizes = value.split('x'); + for (var padding = 0, i = 0; i < sizes; i++) { + padding += (sizes[i] / 8); + } + return padding; +}; + +var setupInputTypes = function () { + + var prefixedType = function (prefix, calcPadding) { + return function (type, value) { + var expected = prefix; + if (type.indexOf(expected) !== 0) { + return false; + } + + var padding = calcPadding(type, expected); + if (typeof value === "number") + value = value.toString(16); + else if (typeof value === "string") + value = web3.toHex(value); + else if (value.indexOf('0x') === 0) + value = value.substr(2); + else + value = (+value).toString(16); + return padLeft(value, padding * 2); + }; + }; + + var namedType = function (name, padding, formatter) { + return function (type, value) { + if (type !== name) { + return false; + } + + return padLeft(formatter ? formatter(value) : value, padding * 2); + }; + }; + + var formatBool = function (value) { + return value ? '0x1' : '0x0'; + }; + + return [ + prefixedType('uint', calcBitPadding), + prefixedType('int', calcBitPadding), + prefixedType('hash', calcBitPadding), + prefixedType('string', calcBytePadding), + prefixedType('real', calcRealPadding), + prefixedType('ureal', calcRealPadding), + namedType('address', 20), + namedType('bool', 1, formatBool), + ]; +}; + +var inputTypes = setupInputTypes(); + +var toAbiInput = function (json, methodName, params) { + var bytes = ""; + var index = findMethodIndex(json, methodName); + + if (index === -1) { + return; + } + + bytes = "0x" + padLeft(index.toString(16), 2); + var method = json[index]; + + for (var i = 0; i < method.inputs.length; i++) { + var found = false; + for (var j = 0; j < inputTypes.length && !found; j++) { + found = inputTypes[j](method.inputs[i].type, params[i]); + } + if (!found) { + console.error('unsupported json type: ' + method.inputs[i].type); + } + bytes += found; + } + return bytes; +}; + +var setupOutputTypes = function () { + + var prefixedType = function (prefix, calcPadding) { + return function (type) { + var expected = prefix; + if (type.indexOf(expected) !== 0) { + return -1; + } + + var padding = calcPadding(type, expected); + return padding * 2; + }; + }; + + var namedType = function (name, padding) { + return function (type) { + return name === type ? padding * 2 : -1; + }; + }; + + var formatInt = function (value) { + return value.length <= 8 ? +parseInt(value, 16) : hexToDec(value); + }; + + var formatHash = function (value) { + return "0x" + value; + }; + + var formatBool = function (value) { + return value === '1' ? true : false; + }; + + var formatString = function (value) { + return web3.toAscii(value); + }; + + return [ + { padding: prefixedType('uint', calcBitPadding), format: formatInt }, + { padding: prefixedType('int', calcBitPadding), format: formatInt }, + { padding: prefixedType('hash', calcBitPadding), format: formatHash }, + { padding: prefixedType('string', calcBytePadding), format: formatString }, + { padding: prefixedType('real', calcRealPadding), format: formatInt }, + { padding: prefixedType('ureal', calcRealPadding), format: formatInt }, + { padding: namedType('address', 20) }, + { padding: namedType('bool', 1), format: formatBool } + ]; +}; + +var outputTypes = setupOutputTypes(); + +var fromAbiOutput = function (json, methodName, output) { + var index = findMethodIndex(json, methodName); + + if (index === -1) { + return; + } + + output = output.slice(2); + + var result = []; + var method = json[index]; + for (var i = 0; i < method.outputs.length; i++) { + var padding = -1; + for (var j = 0; j < outputTypes.length && padding === -1; j++) { + padding = outputTypes[j].padding(method.outputs[i].type); + } + + if (padding === -1) { + // not found output parsing + continue; + } + var res = output.slice(0, padding); + var formatter = outputTypes[j - 1].format; + result.push(formatter ? formatter(res) : ("0x" + res)); + output = output.slice(padding); + } + + return result; +}; + +var inputParser = function (json) { + var parser = {}; + json.forEach(function (method) { + parser[method.name] = function () { + var params = Array.prototype.slice.call(arguments); + return toAbiInput(json, method.name, params); + }; + }); + + return parser; +}; + +var outputParser = function (json) { + var parser = {}; + json.forEach(function (method) { + parser[method.name] = function (output) { + return fromAbiOutput(json, method.name, output); + }; + }); + + return parser; +}; + +module.exports = { + inputParser: inputParser, + outputParser: outputParser +}; + +},{}],2:[function(require,module,exports){ +/* + This file is part of ethereum.js. + + ethereum.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ethereum.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with ethereum.js. If not, see . +*/ +/** @file autoprovider.js + * @authors: + * Marek Kotewicz + * Marian Oancea + * @date 2014 + */ + +/* + * @brief if qt object is available, uses QtProvider, + * if not tries to connect over websockets + * if it fails, it uses HttpRpcProvider + */ + +// TODO: is these line is supposed to be here? +if ("build" !== 'build') {/* + var WebSocket = require('ws'); // jshint ignore:line + var web3 = require('./web3'); // jshint ignore:line +*/} + +var AutoProvider = function (userOptions) { + if (web3.haveProvider()) { + return; + } + + // before we determine what provider we are, we have to cache request + this.sendQueue = []; + this.onmessageQueue = []; + + if (navigator.qt) { + this.provider = new web3.providers.QtProvider(); + return; + } + + userOptions = userOptions || {}; + var options = { + httprpc: userOptions.httprpc || 'http://localhost:8080', + websockets: userOptions.websockets || 'ws://localhost:40404/eth' + }; + + var self = this; + var closeWithSuccess = function (success) { + ws.close(); + if (success) { + self.provider = new web3.providers.WebSocketProvider(options.websockets); + } else { + self.provider = new web3.providers.HttpRpcProvider(options.httprpc); + self.poll = self.provider.poll.bind(self.provider); + } + self.sendQueue.forEach(function (payload) { + self.provider(payload); + }); + self.onmessageQueue.forEach(function (handler) { + self.provider.onmessage = handler; + }); + }; + + var ws = new WebSocket(options.websockets); + + ws.onopen = function() { + closeWithSuccess(true); + }; + + ws.onerror = function() { + closeWithSuccess(false); + }; +}; + +AutoProvider.prototype.send = function (payload) { + if (this.provider) { + this.provider.send(payload); + return; + } + this.sendQueue.push(payload); +}; + +Object.defineProperty(AutoProvider.prototype, 'onmessage', { + set: function (handler) { + if (this.provider) { + this.provider.onmessage = handler; + return; + } + this.onmessageQueue.push(handler); + } +}); + +module.exports = AutoProvider; + +},{}],3:[function(require,module,exports){ +/* + This file is part of ethereum.js. + + ethereum.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ethereum.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with ethereum.js. If not, see . +*/ +/** @file contract.js + * @authors: + * Marek Kotewicz + * @date 2014 + */ + +// TODO: is these line is supposed to be here? +if ("build" !== 'build') {/* + var web3 = require('./web3'); // jshint ignore:line +*/} + +var abi = require('./abi'); + +var contract = function (address, desc) { + var inputParser = abi.inputParser(desc); + var outputParser = abi.outputParser(desc); + + var contract = {}; + + desc.forEach(function (method) { + contract[method.name] = function () { + var params = Array.prototype.slice.call(arguments); + var parsed = inputParser[method.name].apply(null, params); + + var onSuccess = function (result) { + return outputParser[method.name](result); + }; + + return { + call: function (extra) { + extra = extra || {}; + extra.to = address; + extra.data = parsed; + return web3.eth.call(extra).then(onSuccess); + }, + transact: function (extra) { + extra = extra || {}; + extra.to = address; + extra.data = parsed; + return web3.eth.transact(extra).then(onSuccess); + } + }; + }; + }); + + return contract; +}; + +module.exports = contract; + +},{"./abi":1}],4:[function(require,module,exports){ +/* + This file is part of ethereum.js. + + ethereum.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ethereum.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with ethereum.js. If not, see . +*/ +/** @file httprpc.js + * @authors: + * Marek Kotewicz + * Marian Oancea + * @date 2014 + */ + +// TODO: is these line is supposed to be here? +if ("build" !== 'build') {/* + var XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest; // jshint ignore:line +*/} + +var HttpRpcProvider = function (host) { + this.handlers = []; + this.host = host; +}; + +function formatJsonRpcObject(object) { + return { + jsonrpc: '2.0', + method: object.call, + params: object.args, + id: object._id + }; +} + +function formatJsonRpcMessage(message) { + var object = JSON.parse(message); + + return { + _id: object.id, + data: object.result, + error: object.error + }; +} + +HttpRpcProvider.prototype.sendRequest = function (payload, cb) { + var data = formatJsonRpcObject(payload); + + var request = new XMLHttpRequest(); + request.open("POST", this.host, true); + request.send(JSON.stringify(data)); + request.onreadystatechange = function () { + if (request.readyState === 4 && cb) { + cb(request); + } + }; +}; + +HttpRpcProvider.prototype.send = function (payload) { + var self = this; + this.sendRequest(payload, function (request) { + self.handlers.forEach(function (handler) { + handler.call(self, formatJsonRpcMessage(request.responseText)); + }); + }); +}; + +HttpRpcProvider.prototype.poll = function (payload, id) { + var self = this; + this.sendRequest(payload, function (request) { + var parsed = JSON.parse(request.responseText); + if (parsed.error || (parsed.result instanceof Array ? parsed.result.length === 0 : !parsed.result)) { + return; + } + self.handlers.forEach(function (handler) { + handler.call(self, {_event: payload.call, _id: id, data: parsed.result}); + }); + }); +}; + +Object.defineProperty(HttpRpcProvider.prototype, "onmessage", { + set: function (handler) { + this.handlers.push(handler); + } +}); + +module.exports = HttpRpcProvider; + +},{}],5:[function(require,module,exports){ +/* + This file is part of ethereum.js. + + ethereum.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ethereum.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with ethereum.js. If not, see . +*/ +/** @file qt.js + * @authors: + * Jeffrey Wilcke + * Marek Kotewicz + * @date 2014 + */ + +var QtProvider = function() { + this.handlers = []; + + var self = this; + navigator.qt.onmessage = function (message) { + self.handlers.forEach(function (handler) { + handler.call(self, JSON.parse(message.data)); + }); + }; +}; + +QtProvider.prototype.send = function(payload) { + navigator.qt.postMessage(JSON.stringify(payload)); +}; + +Object.defineProperty(QtProvider.prototype, "onmessage", { + set: function(handler) { + this.handlers.push(handler); + } +}); + +module.exports = QtProvider; + +},{}],6:[function(require,module,exports){ +/* + This file is part of ethereum.js. + + ethereum.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ethereum.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with ethereum.js. If not, see . +*/ +/** @file main.js + * @authors: + * Jeffrey Wilcke + * Marek Kotewicz + * Marian Oancea + * Gav Wood + * @date 2014 + */ + +function flattenPromise (obj) { + if (obj instanceof Promise) { + return Promise.resolve(obj); + } + + if (obj instanceof Array) { + return new Promise(function (resolve) { + var promises = obj.map(function (o) { + return flattenPromise(o); + }); + + return Promise.all(promises).then(function (res) { + for (var i = 0; i < obj.length; i++) { + obj[i] = res[i]; + } + resolve(obj); + }); + }); + } + + if (obj instanceof Object) { + return new Promise(function (resolve) { + var keys = Object.keys(obj); + var promises = keys.map(function (key) { + return flattenPromise(obj[key]); + }); + + return Promise.all(promises).then(function (res) { + for (var i = 0; i < keys.length; i++) { + obj[keys[i]] = res[i]; + } + resolve(obj); + }); + }); + } + + return Promise.resolve(obj); +} + +var web3Methods = function () { + return [ + { name: 'sha3', call: 'web3_sha3' } + ]; +}; + +var ethMethods = function () { + var blockCall = function (args) { + return typeof args[0] === "string" ? "eth_blockByHash" : "eth_blockByNumber"; + }; + + var transactionCall = function (args) { + return typeof args[0] === "string" ? 'eth_transactionByHash' : 'eth_transactionByNumber'; + }; + + var uncleCall = function (args) { + return typeof args[0] === "string" ? 'eth_uncleByHash' : 'eth_uncleByNumber'; + }; + + var methods = [ + { name: 'balanceAt', call: 'eth_balanceAt' }, + { name: 'stateAt', call: 'eth_stateAt' }, + { name: 'storageAt', call: 'eth_storageAt' }, + { name: 'countAt', call: 'eth_countAt'}, + { name: 'codeAt', call: 'eth_codeAt' }, + { name: 'transact', call: 'eth_transact' }, + { name: 'call', call: 'eth_call' }, + { name: 'block', call: blockCall }, + { name: 'transaction', call: transactionCall }, + { name: 'uncle', call: uncleCall }, + { name: 'compilers', call: 'eth_compilers' }, + { name: 'lll', call: 'eth_lll' }, + { name: 'solidity', call: 'eth_solidity' }, + { name: 'serpent', call: 'eth_serpent' }, + { name: 'logs', call: 'eth_logs' } + ]; + return methods; +}; + +var ethProperties = function () { + return [ + { name: 'coinbase', getter: 'eth_coinbase', setter: 'eth_setCoinbase' }, + { name: 'listening', getter: 'eth_listening', setter: 'eth_setListening' }, + { name: 'mining', getter: 'eth_mining', setter: 'eth_setMining' }, + { name: 'gasPrice', getter: 'eth_gasPrice' }, + { name: 'account', getter: 'eth_account' }, + { name: 'accounts', getter: 'eth_accounts' }, + { name: 'peerCount', getter: 'eth_peerCount' }, + { name: 'defaultBlock', getter: 'eth_defaultBlock', setter: 'eth_setDefaultBlock' }, + { name: 'number', getter: 'eth_number'} + ]; +}; + +var dbMethods = function () { + return [ + { name: 'put', call: 'db_put' }, + { name: 'get', call: 'db_get' }, + { name: 'putString', call: 'db_putString' }, + { name: 'getString', call: 'db_getString' } + ]; +}; + +var shhMethods = function () { + return [ + { name: 'post', call: 'shh_post' }, + { name: 'newIdentity', call: 'shh_newIdentity' }, + { name: 'haveIdentity', call: 'shh_haveIdentity' }, + { name: 'newGroup', call: 'shh_newGroup' }, + { name: 'addToGroup', call: 'shh_addToGroup' } + ]; +}; + +var ethWatchMethods = function () { + var newFilter = function (args) { + return typeof args[0] === 'string' ? 'eth_newFilterString' : 'eth_newFilter'; + }; + + return [ + { name: 'newFilter', call: newFilter }, + { name: 'uninstallFilter', call: 'eth_uninstallFilter' }, + { name: 'getMessages', call: 'eth_filterLogs' } + ]; +}; + +var shhWatchMethods = function () { + return [ + { name: 'newFilter', call: 'shh_newFilter' }, + { name: 'uninstallFilter', call: 'shh_uninstallFilter' }, + { name: 'getMessage', call: 'shh_getMessages' } + ]; +}; + +var setupMethods = function (obj, methods) { + methods.forEach(function (method) { + obj[method.name] = function () { + return flattenPromise(Array.prototype.slice.call(arguments)).then(function (args) { + var call = typeof method.call === "function" ? method.call(args) : method.call; + return {call: call, args: args}; + }).then(function (request) { + return new Promise(function (resolve, reject) { + web3.provider.send(request, function (err, result) { + if (!err) { + resolve(result); + return; + } + reject(err); + }); + }); + }).catch(function(err) { + console.error(err); + }); + }; + }); +}; + +var setupProperties = function (obj, properties) { + properties.forEach(function (property) { + var proto = {}; + proto.get = function () { + return new Promise(function(resolve, reject) { + web3.provider.send({call: property.getter}, function(err, result) { + if (!err) { + resolve(result); + return; + } + reject(err); + }); + }); + }; + if (property.setter) { + proto.set = function (val) { + return flattenPromise([val]).then(function (args) { + return new Promise(function (resolve) { + web3.provider.send({call: property.setter, args: args}, function (err, result) { + if (!err) { + resolve(result); + return; + } + reject(err); + }); + }); + }).catch(function (err) { + console.error(err); + }); + }; + } + Object.defineProperty(obj, property.name, proto); + }); +}; + +// TODO: import from a dependency, don't duplicate. +var hexToDec = function (hex) { + return parseInt(hex, 16).toString(); +}; + +var decToHex = function (dec) { + return parseInt(dec).toString(16); +}; + + +var web3 = { + _callbacks: {}, + _events: {}, + providers: {}, + + toHex: function(str) { + var hex = ""; + for(var i = 0; i < str.length; i++) { + var n = str.charCodeAt(i).toString(16); + hex += n.length < 2 ? '0' + n : n; + } + + return hex; + }, + + toAscii: function(hex) { + // Find termination + var str = ""; + var i = 0, l = hex.length; + if (hex.substring(0, 2) === '0x') + i = 2; + for(; i < l; i+=2) { + var code = hex.charCodeAt(i); + if(code === 0) { + break; + } + + str += String.fromCharCode(parseInt(hex.substr(i, 2), 16)); + } + + return str; + }, + + fromAscii: function(str, pad) { + pad = pad === undefined ? 32 : pad; + var hex = this.toHex(str); + while(hex.length < pad*2) + hex += "00"; + return "0x" + hex; + }, + + toDecimal: function (val) { + return hexToDec(val.substring(2)); + }, + + fromDecimal: function (val) { + return "0x" + decToHex(val); + }, + + toEth: function(str) { + var val = typeof str === "string" ? str.indexOf('0x') === 0 ? parseInt(str.substr(2), 16) : parseInt(str) : str; + var unit = 0; + var units = [ 'wei', 'Kwei', 'Mwei', 'Gwei', 'szabo', 'finney', 'ether', 'grand', 'Mether', 'Gether', 'Tether', 'Pether', 'Eether', 'Zether', 'Yether', 'Nether', 'Dether', 'Vether', 'Uether' ]; + while (val > 3000 && unit < units.length - 1) + { + val /= 1000; + unit++; + } + var s = val.toString().length < val.toFixed(2).length ? val.toString() : val.toFixed(2); + var replaceFunction = function($0, $1, $2) { + return $1 + ',' + $2; + }; + + while (true) { + var o = s; + s = s.replace(/(\d)(\d\d\d[\.\,])/, replaceFunction); + if (o === s) + break; + } + return s + ' ' + units[unit]; + }, + + eth: { + prototype: Object(), // jshint ignore:line + watch: function (params) { + return new Filter(params, ethWatch); + } + }, + + db: { + prototype: Object() // jshint ignore:line + }, + + shh: { + prototype: Object(), // jshint ignore:line + watch: function (params) { + return new Filter(params, shhWatch); + } + }, + + on: function(event, id, cb) { + if(web3._events[event] === undefined) { + web3._events[event] = {}; + } + + web3._events[event][id] = cb; + return this; + }, + + off: function(event, id) { + if(web3._events[event] !== undefined) { + delete web3._events[event][id]; + } + + return this; + }, + + trigger: function(event, id, data) { + var callbacks = web3._events[event]; + if (!callbacks || !callbacks[id]) { + return; + } + var cb = callbacks[id]; + cb(data); + } +}; + +setupMethods(web3, web3Methods()); +setupMethods(web3.eth, ethMethods()); +setupProperties(web3.eth, ethProperties()); +setupMethods(web3.db, dbMethods()); +setupMethods(web3.shh, shhMethods()); + +var ethWatch = { + changed: 'eth_changed' +}; +setupMethods(ethWatch, ethWatchMethods()); +var shhWatch = { + changed: 'shh_changed' +}; +setupMethods(shhWatch, shhWatchMethods()); + +var ProviderManager = function() { + this.queued = []; + this.polls = []; + this.ready = false; + this.provider = undefined; + this.id = 1; + + var self = this; + var poll = function () { + if (self.provider && self.provider.poll) { + self.polls.forEach(function (data) { + data.data._id = self.id; + self.id++; + self.provider.poll(data.data, data.id); + }); + } + setTimeout(poll, 12000); + }; + poll(); +}; + +ProviderManager.prototype.send = function(data, cb) { + data._id = this.id; + if (cb) { + web3._callbacks[data._id] = cb; + } + + data.args = data.args || []; + this.id++; + + if(this.provider !== undefined) { + this.provider.send(data); + } else { + console.warn("provider is not set"); + this.queued.push(data); + } +}; + +ProviderManager.prototype.set = function(provider) { + if(this.provider !== undefined && this.provider.unload !== undefined) { + this.provider.unload(); + } + + this.provider = provider; + this.ready = true; +}; + +ProviderManager.prototype.sendQueued = function() { + for(var i = 0; this.queued.length; i++) { + // Resend + this.send(this.queued[i]); + } +}; + +ProviderManager.prototype.installed = function() { + return this.provider !== undefined; +}; + +ProviderManager.prototype.startPolling = function (data, pollId) { + if (!this.provider || !this.provider.poll) { + return; + } + this.polls.push({data: data, id: pollId}); +}; + +ProviderManager.prototype.stopPolling = function (pollId) { + for (var i = this.polls.length; i--;) { + var poll = this.polls[i]; + if (poll.id === pollId) { + this.polls.splice(i, 1); + } + } +}; + +web3.provider = new ProviderManager(); + +web3.setProvider = function(provider) { + provider.onmessage = messageHandler; + web3.provider.set(provider); + web3.provider.sendQueued(); +}; + +web3.haveProvider = function() { + return !!web3.provider.provider; +}; + +var Filter = function(options, impl) { + this.impl = impl; + this.callbacks = []; + + var self = this; + this.promise = impl.newFilter(options); + this.promise.then(function (id) { + self.id = id; + web3.on(impl.changed, id, self.trigger.bind(self)); + web3.provider.startPolling({call: impl.changed, args: [id]}, id); + }); +}; + +Filter.prototype.arrived = function(callback) { + this.changed(callback); +}; + +Filter.prototype.changed = function(callback) { + var self = this; + this.promise.then(function(id) { + self.callbacks.push(callback); + }); +}; + +Filter.prototype.trigger = function(messages) { + for(var i = 0; i < this.callbacks.length; i++) { + this.callbacks[i].call(this, messages); + } +}; + +Filter.prototype.uninstall = function() { + var self = this; + this.promise.then(function (id) { + self.impl.uninstallFilter(id); + web3.provider.stopPolling(id); + web3.off(impl.changed, id); + }); +}; + +Filter.prototype.messages = function() { + var self = this; + return this.promise.then(function (id) { + return self.impl.getMessages(id); + }); +}; + +Filter.prototype.logs = function () { + return this.messages(); +}; + +function messageHandler(data) { + if(data._event !== undefined) { + web3.trigger(data._event, data._id, data.data); + return; + } + + if(data._id) { + var cb = web3._callbacks[data._id]; + if (cb) { + cb.call(this, data.error, data.data); + delete web3._callbacks[data._id]; + } + } +} + +module.exports = web3; + +},{}],7:[function(require,module,exports){ +/* + This file is part of ethereum.js. + + ethereum.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ethereum.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with ethereum.js. If not, see . +*/ +/** @file websocket.js + * @authors: + * Jeffrey Wilcke + * Marek Kotewicz + * Marian Oancea + * @date 2014 + */ + +// TODO: is these line is supposed to be here? +if ("build" !== 'build') {/* + var WebSocket = require('ws'); // jshint ignore:line +*/} + +var WebSocketProvider = function(host) { + // onmessage handlers + this.handlers = []; + // queue will be filled with messages if send is invoked before the ws is ready + this.queued = []; + this.ready = false; + + this.ws = new WebSocket(host); + + var self = this; + this.ws.onmessage = function(event) { + for(var i = 0; i < self.handlers.length; i++) { + self.handlers[i].call(self, JSON.parse(event.data), event); + } + }; + + this.ws.onopen = function() { + self.ready = true; + + for(var i = 0; i < self.queued.length; i++) { + // Resend + self.send(self.queued[i]); + } + }; +}; + +WebSocketProvider.prototype.send = function(payload) { + if(this.ready) { + var data = JSON.stringify(payload); + + this.ws.send(data); + } else { + this.queued.push(payload); + } +}; + +WebSocketProvider.prototype.onMessage = function(handler) { + this.handlers.push(handler); +}; + +WebSocketProvider.prototype.unload = function() { + this.ws.close(); +}; +Object.defineProperty(WebSocketProvider.prototype, "onmessage", { + set: function(provider) { this.onMessage(provider); } +}); + +module.exports = WebSocketProvider; + +},{}],"web3":[function(require,module,exports){ +var web3 = require('./lib/web3'); +web3.providers.WebSocketProvider = require('./lib/websocket'); +web3.providers.HttpRpcProvider = require('./lib/httprpc'); +web3.providers.QtProvider = require('./lib/qt'); +web3.providers.AutoProvider = require('./lib/autoprovider'); +web3.contract = require('./lib/contract'); + +module.exports = web3; + +},{"./lib/autoprovider":2,"./lib/contract":3,"./lib/httprpc":4,"./lib/qt":5,"./lib/web3":6,"./lib/websocket":7}]},{},["web3"]) + + +//# sourceMappingURL=ethereum.js.map \ No newline at end of file diff --git a/cmd/mist/assets/ext/ethereum.js/dist/ethereum.js.map b/cmd/mist/assets/ext/ethereum.js/dist/ethereum.js.map new file mode 100644 index 0000000000..9886b70ce0 --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/dist/ethereum.js.map @@ -0,0 +1,29 @@ +{ + "version": 3, + "sources": [ + "node_modules/browserify/node_modules/browser-pack/_prelude.js", + "lib/abi.js", + "lib/autoprovider.js", + "lib/contract.js", + "lib/httprpc.js", + "lib/qt.js", + "lib/web3.js", + "lib/websocket.js", + "index.js" + ], + "names": [], + "mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5fA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA", + "file": "generated.js", + "sourceRoot": "", + "sourcesContent": [ + "(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o.\n*/\n/** @file abi.js\n * @authors:\n * Marek Kotewicz \n * Gav Wood \n * @date 2014\n */\n\n// TODO: is these line is supposed to be here? \nif (\"build\" !== 'build') {/*\n var web3 = require('./web3'); // jshint ignore:line\n*/}\n\n// TODO: make these be actually accurate instead of falling back onto JS's doubles.\nvar hexToDec = function (hex) {\n return parseInt(hex, 16).toString();\n};\n\nvar decToHex = function (dec) {\n return parseInt(dec).toString(16);\n};\n\nvar findIndex = function (array, callback) {\n var end = false;\n var i = 0;\n for (; i < array.length && !end; i++) {\n end = callback(array[i]);\n }\n return end ? i - 1 : -1;\n};\n\nvar findMethodIndex = function (json, methodName) {\n return findIndex(json, function (method) {\n return method.name === methodName;\n });\n};\n\nvar padLeft = function (string, chars) {\n return new Array(chars - string.length + 1).join(\"0\") + string;\n};\n\nvar calcBitPadding = function (type, expected) {\n var value = type.slice(expected.length);\n if (value === \"\") {\n return 32;\n }\n return parseInt(value) / 8;\n};\n\nvar calcBytePadding = function (type, expected) {\n var value = type.slice(expected.length);\n if (value === \"\") {\n return 32;\n }\n return parseInt(value);\n};\n\nvar calcRealPadding = function (type, expected) {\n var value = type.slice(expected.length);\n if (value === \"\") {\n return 32;\n }\n var sizes = value.split('x');\n for (var padding = 0, i = 0; i < sizes; i++) {\n padding += (sizes[i] / 8);\n }\n return padding;\n};\n\nvar setupInputTypes = function () {\n \n var prefixedType = function (prefix, calcPadding) {\n return function (type, value) {\n var expected = prefix;\n if (type.indexOf(expected) !== 0) {\n return false;\n }\n\n var padding = calcPadding(type, expected);\n if (typeof value === \"number\")\n value = value.toString(16);\n else if (typeof value === \"string\")\n value = web3.toHex(value); \n else if (value.indexOf('0x') === 0)\n value = value.substr(2);\n else\n value = (+value).toString(16);\n return padLeft(value, padding * 2);\n };\n };\n\n var namedType = function (name, padding, formatter) {\n return function (type, value) {\n if (type !== name) {\n return false;\n }\n\n return padLeft(formatter ? formatter(value) : value, padding * 2);\n };\n };\n\n var formatBool = function (value) {\n return value ? '0x1' : '0x0';\n };\n\n return [\n prefixedType('uint', calcBitPadding),\n prefixedType('int', calcBitPadding),\n prefixedType('hash', calcBitPadding),\n prefixedType('string', calcBytePadding),\n prefixedType('real', calcRealPadding),\n prefixedType('ureal', calcRealPadding),\n namedType('address', 20),\n namedType('bool', 1, formatBool),\n ];\n};\n\nvar inputTypes = setupInputTypes();\n\nvar toAbiInput = function (json, methodName, params) {\n var bytes = \"\";\n var index = findMethodIndex(json, methodName);\n\n if (index === -1) {\n return;\n }\n\n bytes = \"0x\" + padLeft(index.toString(16), 2);\n var method = json[index];\n\n for (var i = 0; i < method.inputs.length; i++) {\n var found = false;\n for (var j = 0; j < inputTypes.length && !found; j++) {\n found = inputTypes[j](method.inputs[i].type, params[i]);\n }\n if (!found) {\n console.error('unsupported json type: ' + method.inputs[i].type);\n }\n bytes += found;\n }\n return bytes;\n};\n\nvar setupOutputTypes = function () {\n\n var prefixedType = function (prefix, calcPadding) {\n return function (type) {\n var expected = prefix;\n if (type.indexOf(expected) !== 0) {\n return -1;\n }\n\n var padding = calcPadding(type, expected);\n return padding * 2;\n };\n };\n\n var namedType = function (name, padding) {\n return function (type) {\n return name === type ? padding * 2 : -1;\n };\n };\n\n var formatInt = function (value) {\n return value.length <= 8 ? +parseInt(value, 16) : hexToDec(value);\n };\n\n var formatHash = function (value) {\n return \"0x\" + value;\n };\n\n var formatBool = function (value) {\n return value === '1' ? true : false;\n };\n\n var formatString = function (value) {\n return web3.toAscii(value);\n };\n\n return [\n { padding: prefixedType('uint', calcBitPadding), format: formatInt },\n { padding: prefixedType('int', calcBitPadding), format: formatInt },\n { padding: prefixedType('hash', calcBitPadding), format: formatHash },\n { padding: prefixedType('string', calcBytePadding), format: formatString },\n { padding: prefixedType('real', calcRealPadding), format: formatInt },\n { padding: prefixedType('ureal', calcRealPadding), format: formatInt },\n { padding: namedType('address', 20) },\n { padding: namedType('bool', 1), format: formatBool }\n ];\n};\n\nvar outputTypes = setupOutputTypes();\n\nvar fromAbiOutput = function (json, methodName, output) {\n var index = findMethodIndex(json, methodName);\n\n if (index === -1) {\n return;\n }\n\n output = output.slice(2);\n\n var result = [];\n var method = json[index];\n for (var i = 0; i < method.outputs.length; i++) {\n var padding = -1;\n for (var j = 0; j < outputTypes.length && padding === -1; j++) {\n padding = outputTypes[j].padding(method.outputs[i].type);\n }\n\n if (padding === -1) {\n // not found output parsing\n continue;\n }\n var res = output.slice(0, padding);\n var formatter = outputTypes[j - 1].format;\n result.push(formatter ? formatter(res) : (\"0x\" + res));\n output = output.slice(padding);\n }\n\n return result;\n};\n\nvar inputParser = function (json) {\n var parser = {};\n json.forEach(function (method) {\n parser[method.name] = function () {\n var params = Array.prototype.slice.call(arguments);\n return toAbiInput(json, method.name, params);\n };\n });\n\n return parser;\n};\n\nvar outputParser = function (json) {\n var parser = {};\n json.forEach(function (method) {\n parser[method.name] = function (output) {\n return fromAbiOutput(json, method.name, output);\n };\n });\n\n return parser;\n};\n\nmodule.exports = {\n inputParser: inputParser,\n outputParser: outputParser\n};\n", + "/*\n This file is part of ethereum.js.\n\n ethereum.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n ethereum.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with ethereum.js. If not, see .\n*/\n/** @file autoprovider.js\n * @authors:\n * Marek Kotewicz \n * Marian Oancea \n * @date 2014\n */\n\n/*\n * @brief if qt object is available, uses QtProvider,\n * if not tries to connect over websockets\n * if it fails, it uses HttpRpcProvider\n */\n\n// TODO: is these line is supposed to be here? \nif (\"build\" !== 'build') {/*\n var WebSocket = require('ws'); // jshint ignore:line\n var web3 = require('./web3'); // jshint ignore:line\n*/}\n\nvar AutoProvider = function (userOptions) {\n if (web3.haveProvider()) {\n return;\n }\n\n // before we determine what provider we are, we have to cache request\n this.sendQueue = [];\n this.onmessageQueue = [];\n\n if (navigator.qt) {\n this.provider = new web3.providers.QtProvider();\n return;\n }\n\n userOptions = userOptions || {};\n var options = {\n httprpc: userOptions.httprpc || 'http://localhost:8080',\n websockets: userOptions.websockets || 'ws://localhost:40404/eth'\n };\n\n var self = this;\n var closeWithSuccess = function (success) {\n ws.close();\n if (success) {\n self.provider = new web3.providers.WebSocketProvider(options.websockets);\n } else {\n self.provider = new web3.providers.HttpRpcProvider(options.httprpc);\n self.poll = self.provider.poll.bind(self.provider);\n }\n self.sendQueue.forEach(function (payload) {\n self.provider(payload);\n });\n self.onmessageQueue.forEach(function (handler) {\n self.provider.onmessage = handler;\n });\n };\n\n var ws = new WebSocket(options.websockets);\n\n ws.onopen = function() {\n closeWithSuccess(true);\n };\n\n ws.onerror = function() {\n closeWithSuccess(false);\n };\n};\n\nAutoProvider.prototype.send = function (payload) {\n if (this.provider) {\n this.provider.send(payload);\n return;\n }\n this.sendQueue.push(payload);\n};\n\nObject.defineProperty(AutoProvider.prototype, 'onmessage', {\n set: function (handler) {\n if (this.provider) {\n this.provider.onmessage = handler;\n return;\n }\n this.onmessageQueue.push(handler);\n }\n});\n\nmodule.exports = AutoProvider;\n", + "/*\n This file is part of ethereum.js.\n\n ethereum.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n ethereum.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with ethereum.js. If not, see .\n*/\n/** @file contract.js\n * @authors:\n * Marek Kotewicz \n * @date 2014\n */\n\n// TODO: is these line is supposed to be here? \nif (\"build\" !== 'build') {/*\n var web3 = require('./web3'); // jshint ignore:line\n*/}\n\nvar abi = require('./abi');\n\nvar contract = function (address, desc) {\n var inputParser = abi.inputParser(desc);\n var outputParser = abi.outputParser(desc);\n\n var contract = {};\n\n desc.forEach(function (method) {\n contract[method.name] = function () {\n var params = Array.prototype.slice.call(arguments);\n var parsed = inputParser[method.name].apply(null, params);\n\n var onSuccess = function (result) {\n return outputParser[method.name](result);\n };\n\n return {\n call: function (extra) {\n extra = extra || {};\n extra.to = address;\n extra.data = parsed;\n return web3.eth.call(extra).then(onSuccess);\n },\n transact: function (extra) {\n extra = extra || {};\n extra.to = address;\n extra.data = parsed;\n return web3.eth.transact(extra).then(onSuccess);\n }\n };\n };\n });\n\n return contract;\n};\n\nmodule.exports = contract;\n", + "/*\n This file is part of ethereum.js.\n\n ethereum.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n ethereum.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with ethereum.js. If not, see .\n*/\n/** @file httprpc.js\n * @authors:\n * Marek Kotewicz \n * Marian Oancea \n * @date 2014\n */\n\n// TODO: is these line is supposed to be here? \nif (\"build\" !== 'build') {/*\n var XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest; // jshint ignore:line\n*/}\n\nvar HttpRpcProvider = function (host) {\n this.handlers = [];\n this.host = host;\n};\n\nfunction formatJsonRpcObject(object) {\n return {\n jsonrpc: '2.0',\n method: object.call,\n params: object.args,\n id: object._id\n };\n}\n\nfunction formatJsonRpcMessage(message) {\n var object = JSON.parse(message);\n\n return {\n _id: object.id,\n data: object.result,\n error: object.error\n };\n}\n\nHttpRpcProvider.prototype.sendRequest = function (payload, cb) {\n var data = formatJsonRpcObject(payload);\n\n var request = new XMLHttpRequest();\n request.open(\"POST\", this.host, true);\n request.send(JSON.stringify(data));\n request.onreadystatechange = function () {\n if (request.readyState === 4 && cb) {\n cb(request);\n }\n };\n};\n\nHttpRpcProvider.prototype.send = function (payload) {\n var self = this;\n this.sendRequest(payload, function (request) {\n self.handlers.forEach(function (handler) {\n handler.call(self, formatJsonRpcMessage(request.responseText));\n });\n });\n};\n\nHttpRpcProvider.prototype.poll = function (payload, id) {\n var self = this;\n this.sendRequest(payload, function (request) {\n var parsed = JSON.parse(request.responseText);\n if (parsed.error || (parsed.result instanceof Array ? parsed.result.length === 0 : !parsed.result)) {\n return;\n }\n self.handlers.forEach(function (handler) {\n handler.call(self, {_event: payload.call, _id: id, data: parsed.result});\n });\n });\n};\n\nObject.defineProperty(HttpRpcProvider.prototype, \"onmessage\", {\n set: function (handler) {\n this.handlers.push(handler);\n }\n});\n\nmodule.exports = HttpRpcProvider;\n", + "/*\n This file is part of ethereum.js.\n\n ethereum.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n ethereum.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with ethereum.js. If not, see .\n*/\n/** @file qt.js\n * @authors:\n * Jeffrey Wilcke \n * Marek Kotewicz \n * @date 2014\n */\n\nvar QtProvider = function() {\n this.handlers = [];\n\n var self = this;\n navigator.qt.onmessage = function (message) {\n self.handlers.forEach(function (handler) {\n handler.call(self, JSON.parse(message.data));\n });\n };\n};\n\nQtProvider.prototype.send = function(payload) {\n navigator.qt.postMessage(JSON.stringify(payload));\n};\n\nObject.defineProperty(QtProvider.prototype, \"onmessage\", {\n set: function(handler) {\n this.handlers.push(handler);\n }\n});\n\nmodule.exports = QtProvider;\n", + "/*\n This file is part of ethereum.js.\n\n ethereum.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n ethereum.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with ethereum.js. If not, see .\n*/\n/** @file main.js\n * @authors:\n * Jeffrey Wilcke \n * Marek Kotewicz \n * Marian Oancea \n * Gav Wood \n * @date 2014\n */\n\nfunction flattenPromise (obj) {\n if (obj instanceof Promise) {\n return Promise.resolve(obj);\n }\n\n if (obj instanceof Array) {\n return new Promise(function (resolve) {\n var promises = obj.map(function (o) {\n return flattenPromise(o);\n });\n\n return Promise.all(promises).then(function (res) {\n for (var i = 0; i < obj.length; i++) {\n obj[i] = res[i];\n }\n resolve(obj);\n });\n });\n }\n\n if (obj instanceof Object) {\n return new Promise(function (resolve) {\n var keys = Object.keys(obj);\n var promises = keys.map(function (key) {\n return flattenPromise(obj[key]);\n });\n\n return Promise.all(promises).then(function (res) {\n for (var i = 0; i < keys.length; i++) {\n obj[keys[i]] = res[i];\n }\n resolve(obj);\n });\n });\n }\n\n return Promise.resolve(obj);\n}\n\nvar web3Methods = function () {\n return [\n { name: 'sha3', call: 'web3_sha3' }\n ];\n};\n\nvar ethMethods = function () {\n var blockCall = function (args) {\n return typeof args[0] === \"string\" ? \"eth_blockByHash\" : \"eth_blockByNumber\";\n };\n\n var transactionCall = function (args) {\n return typeof args[0] === \"string\" ? 'eth_transactionByHash' : 'eth_transactionByNumber';\n };\n\n var uncleCall = function (args) {\n return typeof args[0] === \"string\" ? 'eth_uncleByHash' : 'eth_uncleByNumber';\n };\n\n var methods = [\n { name: 'balanceAt', call: 'eth_balanceAt' },\n { name: 'stateAt', call: 'eth_stateAt' },\n { name: 'storageAt', call: 'eth_storageAt' },\n { name: 'countAt', call: 'eth_countAt'},\n { name: 'codeAt', call: 'eth_codeAt' },\n { name: 'transact', call: 'eth_transact' },\n { name: 'call', call: 'eth_call' },\n { name: 'block', call: blockCall },\n { name: 'transaction', call: transactionCall },\n { name: 'uncle', call: uncleCall },\n { name: 'compilers', call: 'eth_compilers' },\n { name: 'lll', call: 'eth_lll' },\n { name: 'solidity', call: 'eth_solidity' },\n { name: 'serpent', call: 'eth_serpent' },\n { name: 'logs', call: 'eth_logs' }\n ];\n return methods;\n};\n\nvar ethProperties = function () {\n return [\n { name: 'coinbase', getter: 'eth_coinbase', setter: 'eth_setCoinbase' },\n { name: 'listening', getter: 'eth_listening', setter: 'eth_setListening' },\n { name: 'mining', getter: 'eth_mining', setter: 'eth_setMining' },\n { name: 'gasPrice', getter: 'eth_gasPrice' },\n { name: 'account', getter: 'eth_account' },\n { name: 'accounts', getter: 'eth_accounts' },\n { name: 'peerCount', getter: 'eth_peerCount' },\n { name: 'defaultBlock', getter: 'eth_defaultBlock', setter: 'eth_setDefaultBlock' },\n { name: 'number', getter: 'eth_number'}\n ];\n};\n\nvar dbMethods = function () {\n return [\n { name: 'put', call: 'db_put' },\n { name: 'get', call: 'db_get' },\n { name: 'putString', call: 'db_putString' },\n { name: 'getString', call: 'db_getString' }\n ];\n};\n\nvar shhMethods = function () {\n return [\n { name: 'post', call: 'shh_post' },\n { name: 'newIdentity', call: 'shh_newIdentity' },\n { name: 'haveIdentity', call: 'shh_haveIdentity' },\n { name: 'newGroup', call: 'shh_newGroup' },\n { name: 'addToGroup', call: 'shh_addToGroup' }\n ];\n};\n\nvar ethWatchMethods = function () {\n var newFilter = function (args) {\n return typeof args[0] === 'string' ? 'eth_newFilterString' : 'eth_newFilter';\n };\n\n return [\n { name: 'newFilter', call: newFilter },\n { name: 'uninstallFilter', call: 'eth_uninstallFilter' },\n { name: 'getMessages', call: 'eth_filterLogs' }\n ];\n};\n\nvar shhWatchMethods = function () {\n return [\n { name: 'newFilter', call: 'shh_newFilter' },\n { name: 'uninstallFilter', call: 'shh_uninstallFilter' },\n { name: 'getMessage', call: 'shh_getMessages' }\n ];\n};\n\nvar setupMethods = function (obj, methods) {\n methods.forEach(function (method) {\n obj[method.name] = function () {\n return flattenPromise(Array.prototype.slice.call(arguments)).then(function (args) {\n var call = typeof method.call === \"function\" ? method.call(args) : method.call;\n return {call: call, args: args};\n }).then(function (request) {\n return new Promise(function (resolve, reject) {\n web3.provider.send(request, function (err, result) {\n if (!err) {\n resolve(result);\n return;\n }\n reject(err);\n });\n });\n }).catch(function(err) {\n console.error(err);\n });\n };\n });\n};\n\nvar setupProperties = function (obj, properties) {\n properties.forEach(function (property) {\n var proto = {};\n proto.get = function () {\n return new Promise(function(resolve, reject) {\n web3.provider.send({call: property.getter}, function(err, result) {\n if (!err) {\n resolve(result);\n return;\n }\n reject(err);\n });\n });\n };\n if (property.setter) {\n proto.set = function (val) {\n return flattenPromise([val]).then(function (args) {\n return new Promise(function (resolve) {\n web3.provider.send({call: property.setter, args: args}, function (err, result) {\n if (!err) {\n resolve(result);\n return;\n }\n reject(err);\n });\n });\n }).catch(function (err) {\n console.error(err);\n });\n };\n }\n Object.defineProperty(obj, property.name, proto);\n });\n};\n\n// TODO: import from a dependency, don't duplicate.\nvar hexToDec = function (hex) {\n return parseInt(hex, 16).toString();\n};\n\nvar decToHex = function (dec) {\n return parseInt(dec).toString(16);\n};\n\n\nvar web3 = {\n _callbacks: {},\n _events: {},\n providers: {},\n\n toHex: function(str) {\n var hex = \"\";\n for(var i = 0; i < str.length; i++) {\n var n = str.charCodeAt(i).toString(16);\n hex += n.length < 2 ? '0' + n : n;\n }\n\n return hex;\n },\n\n toAscii: function(hex) {\n // Find termination\n var str = \"\";\n var i = 0, l = hex.length;\n if (hex.substring(0, 2) === '0x')\n i = 2;\n for(; i < l; i+=2) {\n var code = hex.charCodeAt(i);\n if(code === 0) {\n break;\n }\n\n str += String.fromCharCode(parseInt(hex.substr(i, 2), 16));\n }\n\n return str;\n },\n\n fromAscii: function(str, pad) {\n pad = pad === undefined ? 32 : pad;\n var hex = this.toHex(str);\n while(hex.length < pad*2)\n hex += \"00\";\n return \"0x\" + hex;\n },\n\n toDecimal: function (val) {\n return hexToDec(val.substring(2));\n },\n\n fromDecimal: function (val) {\n return \"0x\" + decToHex(val);\n },\n\n toEth: function(str) {\n var val = typeof str === \"string\" ? str.indexOf('0x') === 0 ? parseInt(str.substr(2), 16) : parseInt(str) : str;\n var unit = 0;\n var units = [ 'wei', 'Kwei', 'Mwei', 'Gwei', 'szabo', 'finney', 'ether', 'grand', 'Mether', 'Gether', 'Tether', 'Pether', 'Eether', 'Zether', 'Yether', 'Nether', 'Dether', 'Vether', 'Uether' ];\n while (val > 3000 && unit < units.length - 1)\n {\n val /= 1000;\n unit++;\n }\n var s = val.toString().length < val.toFixed(2).length ? val.toString() : val.toFixed(2);\n var replaceFunction = function($0, $1, $2) {\n return $1 + ',' + $2;\n };\n\n while (true) {\n var o = s;\n s = s.replace(/(\\d)(\\d\\d\\d[\\.\\,])/, replaceFunction);\n if (o === s)\n break;\n }\n return s + ' ' + units[unit];\n },\n\n eth: {\n prototype: Object(), // jshint ignore:line\n watch: function (params) {\n return new Filter(params, ethWatch);\n }\n },\n\n db: {\n prototype: Object() // jshint ignore:line\n },\n\n shh: {\n prototype: Object(), // jshint ignore:line\n watch: function (params) {\n return new Filter(params, shhWatch);\n }\n },\n\n on: function(event, id, cb) {\n if(web3._events[event] === undefined) {\n web3._events[event] = {};\n }\n\n web3._events[event][id] = cb;\n return this;\n },\n\n off: function(event, id) {\n if(web3._events[event] !== undefined) {\n delete web3._events[event][id];\n }\n\n return this;\n },\n\n trigger: function(event, id, data) {\n var callbacks = web3._events[event];\n if (!callbacks || !callbacks[id]) {\n return;\n }\n var cb = callbacks[id];\n cb(data);\n }\n};\n\nsetupMethods(web3, web3Methods());\nsetupMethods(web3.eth, ethMethods());\nsetupProperties(web3.eth, ethProperties());\nsetupMethods(web3.db, dbMethods());\nsetupMethods(web3.shh, shhMethods());\n\nvar ethWatch = {\n changed: 'eth_changed'\n};\nsetupMethods(ethWatch, ethWatchMethods());\nvar shhWatch = {\n changed: 'shh_changed'\n};\nsetupMethods(shhWatch, shhWatchMethods());\n\nvar ProviderManager = function() {\n this.queued = [];\n this.polls = [];\n this.ready = false;\n this.provider = undefined;\n this.id = 1;\n\n var self = this;\n var poll = function () {\n if (self.provider && self.provider.poll) {\n self.polls.forEach(function (data) {\n data.data._id = self.id;\n self.id++;\n self.provider.poll(data.data, data.id);\n });\n }\n setTimeout(poll, 12000);\n };\n poll();\n};\n\nProviderManager.prototype.send = function(data, cb) {\n data._id = this.id;\n if (cb) {\n web3._callbacks[data._id] = cb;\n }\n\n data.args = data.args || [];\n this.id++;\n\n if(this.provider !== undefined) {\n this.provider.send(data);\n } else {\n console.warn(\"provider is not set\");\n this.queued.push(data);\n }\n};\n\nProviderManager.prototype.set = function(provider) {\n if(this.provider !== undefined && this.provider.unload !== undefined) {\n this.provider.unload();\n }\n\n this.provider = provider;\n this.ready = true;\n};\n\nProviderManager.prototype.sendQueued = function() {\n for(var i = 0; this.queued.length; i++) {\n // Resend\n this.send(this.queued[i]);\n }\n};\n\nProviderManager.prototype.installed = function() {\n return this.provider !== undefined;\n};\n\nProviderManager.prototype.startPolling = function (data, pollId) {\n if (!this.provider || !this.provider.poll) {\n return;\n }\n this.polls.push({data: data, id: pollId});\n};\n\nProviderManager.prototype.stopPolling = function (pollId) {\n for (var i = this.polls.length; i--;) {\n var poll = this.polls[i];\n if (poll.id === pollId) {\n this.polls.splice(i, 1);\n }\n }\n};\n\nweb3.provider = new ProviderManager();\n\nweb3.setProvider = function(provider) {\n provider.onmessage = messageHandler;\n web3.provider.set(provider);\n web3.provider.sendQueued();\n};\n\nweb3.haveProvider = function() {\n return !!web3.provider.provider;\n};\n\nvar Filter = function(options, impl) {\n this.impl = impl;\n this.callbacks = [];\n\n var self = this;\n this.promise = impl.newFilter(options);\n this.promise.then(function (id) {\n self.id = id;\n web3.on(impl.changed, id, self.trigger.bind(self));\n web3.provider.startPolling({call: impl.changed, args: [id]}, id);\n });\n};\n\nFilter.prototype.arrived = function(callback) {\n this.changed(callback);\n};\n\nFilter.prototype.changed = function(callback) {\n var self = this;\n this.promise.then(function(id) {\n self.callbacks.push(callback);\n });\n};\n\nFilter.prototype.trigger = function(messages) {\n for(var i = 0; i < this.callbacks.length; i++) {\n this.callbacks[i].call(this, messages);\n }\n};\n\nFilter.prototype.uninstall = function() {\n var self = this;\n this.promise.then(function (id) {\n self.impl.uninstallFilter(id);\n web3.provider.stopPolling(id);\n web3.off(impl.changed, id);\n });\n};\n\nFilter.prototype.messages = function() {\n var self = this;\n return this.promise.then(function (id) {\n return self.impl.getMessages(id);\n });\n};\n\nFilter.prototype.logs = function () {\n return this.messages();\n};\n\nfunction messageHandler(data) {\n if(data._event !== undefined) {\n web3.trigger(data._event, data._id, data.data);\n return;\n }\n\n if(data._id) {\n var cb = web3._callbacks[data._id];\n if (cb) {\n cb.call(this, data.error, data.data);\n delete web3._callbacks[data._id];\n }\n }\n}\n\nmodule.exports = web3;\n", + "/*\n This file is part of ethereum.js.\n\n ethereum.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n ethereum.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with ethereum.js. If not, see .\n*/\n/** @file websocket.js\n * @authors:\n * Jeffrey Wilcke \n * Marek Kotewicz \n * Marian Oancea \n * @date 2014\n */\n\n// TODO: is these line is supposed to be here? \nif (\"build\" !== 'build') {/*\n var WebSocket = require('ws'); // jshint ignore:line\n*/}\n\nvar WebSocketProvider = function(host) {\n // onmessage handlers\n this.handlers = [];\n // queue will be filled with messages if send is invoked before the ws is ready\n this.queued = [];\n this.ready = false;\n\n this.ws = new WebSocket(host);\n\n var self = this;\n this.ws.onmessage = function(event) {\n for(var i = 0; i < self.handlers.length; i++) {\n self.handlers[i].call(self, JSON.parse(event.data), event);\n }\n };\n\n this.ws.onopen = function() {\n self.ready = true;\n\n for(var i = 0; i < self.queued.length; i++) {\n // Resend\n self.send(self.queued[i]);\n }\n };\n};\n\nWebSocketProvider.prototype.send = function(payload) {\n if(this.ready) {\n var data = JSON.stringify(payload);\n\n this.ws.send(data);\n } else {\n this.queued.push(payload);\n }\n};\n\nWebSocketProvider.prototype.onMessage = function(handler) {\n this.handlers.push(handler);\n};\n\nWebSocketProvider.prototype.unload = function() {\n this.ws.close();\n};\nObject.defineProperty(WebSocketProvider.prototype, \"onmessage\", {\n set: function(provider) { this.onMessage(provider); }\n});\n\nmodule.exports = WebSocketProvider;\n", + "var web3 = require('./lib/web3');\nweb3.providers.WebSocketProvider = require('./lib/websocket');\nweb3.providers.HttpRpcProvider = require('./lib/httprpc');\nweb3.providers.QtProvider = require('./lib/qt');\nweb3.providers.AutoProvider = require('./lib/autoprovider');\nweb3.contract = require('./lib/contract');\n\nmodule.exports = web3;\n" + ] +} \ No newline at end of file diff --git a/cmd/mist/assets/ext/ethereum.js/dist/ethereum.min.js b/cmd/mist/assets/ext/ethereum.js/dist/ethereum.min.js new file mode 100644 index 0000000000..0ae9610fca --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/dist/ethereum.min.js @@ -0,0 +1 @@ +require=function t(e,n,r){function o(a,s){if(!n[a]){if(!e[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[a]={exports:{}};e[a][0].call(l.exports,function(t){var n=e[a][1][t];return o(n?n:t)},l,l.exports,t,e,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;ai;i++)o+=r[i]/8;return o},c=function(){var t=function(t,e){return function(n,r){var o=t;if(0!==n.indexOf(o))return!1;var a=e(n,o);return r="number"==typeof r?r.toString(16):"string"==typeof r?web3.toHex(r):0===r.indexOf("0x")?r.substr(2):(+r).toString(16),i(r,2*a)}},e=function(t,e,n){return function(r,o){return r!==t?!1:i(n?n(o):o,2*e)}},n=function(t){return t?"0x1":"0x0"};return[t("uint",a),t("int",a),t("hash",a),t("string",s),t("real",u),t("ureal",u),e("address",20),e("bool",1,n)]},l=c(),h=function(t,e,n){var r="",a=o(t,e);if(-1!==a){r="0x"+i(a.toString(16),2);for(var s=t[a],u=0;un;n+=2){var o=t.charCodeAt(n);if(0===o)break;e+=String.fromCharCode(parseInt(t.substr(n,2),16))}return e},fromAscii:function(t,e){e=void 0===e?32:e;for(var n=this.toHex(t);n.length<2*e;)n+="00";return"0x"+n},toDecimal:function(t){return p(t.substring(2))},fromDecimal:function(t){return"0x"+d(t)},toEth:function(t){for(var e="string"==typeof t?0===t.indexOf("0x")?parseInt(t.substr(2),16):parseInt(t):t,n=0,r=["wei","Kwei","Mwei","Gwei","szabo","finney","ether","grand","Mether","Gether","Tether","Pether","Eether","Zether","Yether","Nether","Dether","Vether","Uether"];e>3e3&&n + + + + + + + + +

coinbase balance

+ +
+
+
+
+ + + diff --git a/cmd/mist/assets/ext/ethereum.js/example/contract.html b/cmd/mist/assets/ext/ethereum.js/example/contract.html new file mode 100644 index 0000000000..403d8c9d19 --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/example/contract.html @@ -0,0 +1,75 @@ + + + + + + + + + +

contract

+
+
+ +
+ +
+ + + diff --git a/cmd/mist/assets/ext/ethereum.js/example/node-app.js b/cmd/mist/assets/ext/ethereum.js/example/node-app.js new file mode 100644 index 0000000000..f63fa9115f --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/example/node-app.js @@ -0,0 +1,16 @@ +#!/usr/bin/env node + +require('es6-promise').polyfill(); + +var web3 = require("../index.js"); + +web3.setProvider(new web3.providers.HttpRpcProvider('http://localhost:8080')); + +web3.eth.coinbase.then(function(result){ + console.log(result); + return web3.eth.balanceAt(result); +}).then(function(balance){ + console.log(web3.toDecimal(balance)); +}).catch(function(err){ + console.log(err); +}); \ No newline at end of file diff --git a/cmd/mist/assets/ext/ethereum.js/gulpfile.js b/cmd/mist/assets/ext/ethereum.js/gulpfile.js new file mode 100644 index 0000000000..b17e50c39d --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/gulpfile.js @@ -0,0 +1,104 @@ +#!/usr/bin/env node + +'use strict'; + +var path = require('path'); + +var del = require('del'); +var gulp = require('gulp'); +var browserify = require('browserify'); +var jshint = require('gulp-jshint'); +var uglify = require('gulp-uglify'); +var rename = require('gulp-rename'); +var envify = require('envify/custom'); +var unreach = require('unreachable-branch-transform'); +var source = require('vinyl-source-stream'); +var exorcist = require('exorcist'); +var bower = require('bower'); + +var DEST = './dist/'; + +var build = function(src, dst, ugly) { + var result = browserify({ + debug: true, + insert_global_vars: false, + detectGlobals: false, + bundleExternal: false + }) + .require('./' + src + '.js', {expose: 'web3'}) + .add('./' + src + '.js') + .transform('envify', { + NODE_ENV: 'build' + }) + .transform('unreachable-branch-transform'); + + if (ugly) { + result = result.transform('uglifyify', { + mangle: false, + compress: { + dead_code: false, + conditionals: true, + unused: false, + hoist_funs: true, + hoist_vars: true, + negate_iife: false + }, + beautify: true, + warnings: true + }); + } + + return result.bundle() + .pipe(exorcist(path.join( DEST, dst + '.js.map'))) + .pipe(source(dst + '.js')) + .pipe(gulp.dest( DEST )); +}; + +var uglifyFile = function(file) { + return gulp.src( DEST + file + '.js') + .pipe(uglify()) + .pipe(rename(file + '.min.js')) + .pipe(gulp.dest( DEST )); +}; + +gulp.task('bower', function(cb){ + bower.commands.install().on('end', function (installed){ + console.log(installed); + cb(); + }); +}); + +gulp.task('clean', ['lint'], function(cb) { + del([ DEST ], cb); +}); + +gulp.task('lint', function(){ + return gulp.src(['./*.js', './lib/*.js']) + .pipe(jshint()) + .pipe(jshint.reporter('default')); +}); + +gulp.task('build', ['clean'], function () { + return build('index', 'ethereum', true); +}); + +gulp.task('buildDev', ['clean'], function () { + return build('index', 'ethereum', false); +}); + +gulp.task('uglify', ['build'], function(){ + return uglifyFile('ethereum'); +}); + +gulp.task('uglify', ['buildDev'], function(){ + return uglifyFile('ethereum'); +}); + +gulp.task('watch', function() { + gulp.watch(['./lib/*.js'], ['lint', 'prepare', 'build']); +}); + +gulp.task('release', ['bower', 'lint', 'build', 'uglify']); +gulp.task('dev', ['bower', 'lint', 'buildDev', 'uglify']); +gulp.task('default', ['dev']); + diff --git a/cmd/mist/assets/ext/ethereum.js/index.js b/cmd/mist/assets/ext/ethereum.js/index.js new file mode 100644 index 0000000000..99ce66fadb --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/index.js @@ -0,0 +1,8 @@ +var web3 = require('./lib/web3'); +web3.providers.WebSocketProvider = require('./lib/websocket'); +web3.providers.HttpRpcProvider = require('./lib/httprpc'); +web3.providers.QtProvider = require('./lib/qt'); +web3.providers.AutoProvider = require('./lib/autoprovider'); +web3.contract = require('./lib/contract'); + +module.exports = web3; diff --git a/cmd/mist/assets/ext/ethereum.js/lib/abi.js b/cmd/mist/assets/ext/ethereum.js/lib/abi.js new file mode 100644 index 0000000000..1912fff32d --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/lib/abi.js @@ -0,0 +1,267 @@ +/* + This file is part of ethereum.js. + + ethereum.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ethereum.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with ethereum.js. If not, see . +*/ +/** @file abi.js + * @authors: + * Marek Kotewicz + * Gav Wood + * @date 2014 + */ + +// TODO: is these line is supposed to be here? +if (process.env.NODE_ENV !== 'build') { + var web3 = require('./web3'); // jshint ignore:line +} + +// TODO: make these be actually accurate instead of falling back onto JS's doubles. +var hexToDec = function (hex) { + return parseInt(hex, 16).toString(); +}; + +var decToHex = function (dec) { + return parseInt(dec).toString(16); +}; + +var findIndex = function (array, callback) { + var end = false; + var i = 0; + for (; i < array.length && !end; i++) { + end = callback(array[i]); + } + return end ? i - 1 : -1; +}; + +var findMethodIndex = function (json, methodName) { + return findIndex(json, function (method) { + return method.name === methodName; + }); +}; + +var padLeft = function (string, chars) { + return new Array(chars - string.length + 1).join("0") + string; +}; + +var calcBitPadding = function (type, expected) { + var value = type.slice(expected.length); + if (value === "") { + return 32; + } + return parseInt(value) / 8; +}; + +var calcBytePadding = function (type, expected) { + var value = type.slice(expected.length); + if (value === "") { + return 32; + } + return parseInt(value); +}; + +var calcRealPadding = function (type, expected) { + var value = type.slice(expected.length); + if (value === "") { + return 32; + } + var sizes = value.split('x'); + for (var padding = 0, i = 0; i < sizes; i++) { + padding += (sizes[i] / 8); + } + return padding; +}; + +var setupInputTypes = function () { + + var prefixedType = function (prefix, calcPadding) { + return function (type, value) { + var expected = prefix; + if (type.indexOf(expected) !== 0) { + return false; + } + + var padding = calcPadding(type, expected); + if (typeof value === "number") + value = value.toString(16); + else if (typeof value === "string") + value = web3.toHex(value); + else if (value.indexOf('0x') === 0) + value = value.substr(2); + else + value = (+value).toString(16); + return padLeft(value, padding * 2); + }; + }; + + var namedType = function (name, padding, formatter) { + return function (type, value) { + if (type !== name) { + return false; + } + + return padLeft(formatter ? formatter(value) : value, padding * 2); + }; + }; + + var formatBool = function (value) { + return value ? '0x1' : '0x0'; + }; + + return [ + prefixedType('uint', calcBitPadding), + prefixedType('int', calcBitPadding), + prefixedType('hash', calcBitPadding), + prefixedType('string', calcBytePadding), + prefixedType('real', calcRealPadding), + prefixedType('ureal', calcRealPadding), + namedType('address', 20), + namedType('bool', 1, formatBool), + ]; +}; + +var inputTypes = setupInputTypes(); + +var toAbiInput = function (json, methodName, params) { + var bytes = ""; + var index = findMethodIndex(json, methodName); + + if (index === -1) { + return; + } + + bytes = "0x" + padLeft(index.toString(16), 2); + var method = json[index]; + + for (var i = 0; i < method.inputs.length; i++) { + var found = false; + for (var j = 0; j < inputTypes.length && !found; j++) { + found = inputTypes[j](method.inputs[i].type, params[i]); + } + if (!found) { + console.error('unsupported json type: ' + method.inputs[i].type); + } + bytes += found; + } + return bytes; +}; + +var setupOutputTypes = function () { + + var prefixedType = function (prefix, calcPadding) { + return function (type) { + var expected = prefix; + if (type.indexOf(expected) !== 0) { + return -1; + } + + var padding = calcPadding(type, expected); + return padding * 2; + }; + }; + + var namedType = function (name, padding) { + return function (type) { + return name === type ? padding * 2 : -1; + }; + }; + + var formatInt = function (value) { + return value.length <= 8 ? +parseInt(value, 16) : hexToDec(value); + }; + + var formatHash = function (value) { + return "0x" + value; + }; + + var formatBool = function (value) { + return value === '1' ? true : false; + }; + + var formatString = function (value) { + return web3.toAscii(value); + }; + + return [ + { padding: prefixedType('uint', calcBitPadding), format: formatInt }, + { padding: prefixedType('int', calcBitPadding), format: formatInt }, + { padding: prefixedType('hash', calcBitPadding), format: formatHash }, + { padding: prefixedType('string', calcBytePadding), format: formatString }, + { padding: prefixedType('real', calcRealPadding), format: formatInt }, + { padding: prefixedType('ureal', calcRealPadding), format: formatInt }, + { padding: namedType('address', 20) }, + { padding: namedType('bool', 1), format: formatBool } + ]; +}; + +var outputTypes = setupOutputTypes(); + +var fromAbiOutput = function (json, methodName, output) { + var index = findMethodIndex(json, methodName); + + if (index === -1) { + return; + } + + output = output.slice(2); + + var result = []; + var method = json[index]; + for (var i = 0; i < method.outputs.length; i++) { + var padding = -1; + for (var j = 0; j < outputTypes.length && padding === -1; j++) { + padding = outputTypes[j].padding(method.outputs[i].type); + } + + if (padding === -1) { + // not found output parsing + continue; + } + var res = output.slice(0, padding); + var formatter = outputTypes[j - 1].format; + result.push(formatter ? formatter(res) : ("0x" + res)); + output = output.slice(padding); + } + + return result; +}; + +var inputParser = function (json) { + var parser = {}; + json.forEach(function (method) { + parser[method.name] = function () { + var params = Array.prototype.slice.call(arguments); + return toAbiInput(json, method.name, params); + }; + }); + + return parser; +}; + +var outputParser = function (json) { + var parser = {}; + json.forEach(function (method) { + parser[method.name] = function (output) { + return fromAbiOutput(json, method.name, output); + }; + }); + + return parser; +}; + +if (typeof(module) !== "undefined") { + module.exports = { + inputParser: inputParser, + outputParser: outputParser + }; +} diff --git a/cmd/mist/assets/ext/ethereum.js/lib/autoprovider.js b/cmd/mist/assets/ext/ethereum.js/lib/autoprovider.js new file mode 100644 index 0000000000..3cb83d4a0c --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/lib/autoprovider.js @@ -0,0 +1,103 @@ +/* + This file is part of ethereum.js. + + ethereum.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ethereum.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with ethereum.js. If not, see . +*/ +/** @file autoprovider.js + * @authors: + * Marek Kotewicz + * Marian Oancea + * @date 2014 + */ + +/* + * @brief if qt object is available, uses QtProvider, + * if not tries to connect over websockets + * if it fails, it uses HttpRpcProvider + */ + +// TODO: is these line is supposed to be here? +if (process.env.NODE_ENV !== 'build') { + var WebSocket = require('ws'); // jshint ignore:line + var web3 = require('./web3'); // jshint ignore:line +} + +var AutoProvider = function (userOptions) { + if (web3.haveProvider()) { + return; + } + + // before we determine what provider we are, we have to cache request + this.sendQueue = []; + this.onmessageQueue = []; + + if (navigator.qt) { + this.provider = new web3.providers.QtProvider(); + return; + } + + userOptions = userOptions || {}; + var options = { + httprpc: userOptions.httprpc || 'http://localhost:8080', + websockets: userOptions.websockets || 'ws://localhost:40404/eth' + }; + + var self = this; + var closeWithSuccess = function (success) { + ws.close(); + if (success) { + self.provider = new web3.providers.WebSocketProvider(options.websockets); + } else { + self.provider = new web3.providers.HttpRpcProvider(options.httprpc); + self.poll = self.provider.poll.bind(self.provider); + } + self.sendQueue.forEach(function (payload) { + self.provider(payload); + }); + self.onmessageQueue.forEach(function (handler) { + self.provider.onmessage = handler; + }); + }; + + var ws = new WebSocket(options.websockets); + + ws.onopen = function() { + closeWithSuccess(true); + }; + + ws.onerror = function() { + closeWithSuccess(false); + }; +}; + +AutoProvider.prototype.send = function (payload) { + if (this.provider) { + this.provider.send(payload); + return; + } + this.sendQueue.push(payload); +}; + +Object.defineProperty(AutoProvider.prototype, 'onmessage', { + set: function (handler) { + if (this.provider) { + this.provider.onmessage = handler; + return; + } + this.onmessageQueue.push(handler); + } +}); + +if (typeof(module) !== "undefined") + module.exports = AutoProvider; diff --git a/cmd/mist/assets/ext/ethereum.js/lib/contract.js b/cmd/mist/assets/ext/ethereum.js/lib/contract.js new file mode 100644 index 0000000000..dc84eb9961 --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/lib/contract.js @@ -0,0 +1,66 @@ +/* + This file is part of ethereum.js. + + ethereum.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ethereum.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with ethereum.js. If not, see . +*/ +/** @file contract.js + * @authors: + * Marek Kotewicz + * @date 2014 + */ + +// TODO: is these line is supposed to be here? +if (process.env.NODE_ENV !== 'build') { + var web3 = require('./web3'); // jshint ignore:line +} + +var abi = require('./abi'); + +var contract = function (address, desc) { + var inputParser = abi.inputParser(desc); + var outputParser = abi.outputParser(desc); + + var contract = {}; + + desc.forEach(function (method) { + contract[method.name] = function () { + var params = Array.prototype.slice.call(arguments); + var parsed = inputParser[method.name].apply(null, params); + + var onSuccess = function (result) { + return outputParser[method.name](result); + }; + + return { + call: function (extra) { + extra = extra || {}; + extra.to = address; + extra.data = parsed; + return web3.eth.call(extra).then(onSuccess); + }, + transact: function (extra) { + extra = extra || {}; + extra.to = address; + extra.data = parsed; + return web3.eth.transact(extra).then(onSuccess); + } + }; + }; + }); + + return contract; +}; + +if (typeof(module) !== "undefined") + module.exports = contract; diff --git a/cmd/mist/assets/ext/ethereum.js/lib/httprpc.js b/cmd/mist/assets/ext/ethereum.js/lib/httprpc.js new file mode 100644 index 0000000000..6823b96b47 --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/lib/httprpc.js @@ -0,0 +1,95 @@ +/* + This file is part of ethereum.js. + + ethereum.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ethereum.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with ethereum.js. If not, see . +*/ +/** @file httprpc.js + * @authors: + * Marek Kotewicz + * Marian Oancea + * @date 2014 + */ + +// TODO: is these line is supposed to be here? +if (process.env.NODE_ENV !== 'build') { + var XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest; // jshint ignore:line +} + +var HttpRpcProvider = function (host) { + this.handlers = []; + this.host = host; +}; + +function formatJsonRpcObject(object) { + return { + jsonrpc: '2.0', + method: object.call, + params: object.args, + id: object._id + }; +} + +function formatJsonRpcMessage(message) { + var object = JSON.parse(message); + + return { + _id: object.id, + data: object.result, + error: object.error + }; +} + +HttpRpcProvider.prototype.sendRequest = function (payload, cb) { + var data = formatJsonRpcObject(payload); + + var request = new XMLHttpRequest(); + request.open("POST", this.host, true); + request.send(JSON.stringify(data)); + request.onreadystatechange = function () { + if (request.readyState === 4 && cb) { + cb(request); + } + }; +}; + +HttpRpcProvider.prototype.send = function (payload) { + var self = this; + this.sendRequest(payload, function (request) { + self.handlers.forEach(function (handler) { + handler.call(self, formatJsonRpcMessage(request.responseText)); + }); + }); +}; + +HttpRpcProvider.prototype.poll = function (payload, id) { + var self = this; + this.sendRequest(payload, function (request) { + var parsed = JSON.parse(request.responseText); + if (parsed.error || (parsed.result instanceof Array ? parsed.result.length === 0 : !parsed.result)) { + return; + } + self.handlers.forEach(function (handler) { + handler.call(self, {_event: payload.call, _id: id, data: parsed.result}); + }); + }); +}; + +Object.defineProperty(HttpRpcProvider.prototype, "onmessage", { + set: function (handler) { + this.handlers.push(handler); + } +}); + +if (typeof(module) !== "undefined") + module.exports = HttpRpcProvider; diff --git a/cmd/mist/assets/ext/ethereum.js/lib/qt.js b/cmd/mist/assets/ext/ethereum.js/lib/qt.js new file mode 100644 index 0000000000..f51e65da4b --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/lib/qt.js @@ -0,0 +1,46 @@ +/* + This file is part of ethereum.js. + + ethereum.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ethereum.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with ethereum.js. If not, see . +*/ +/** @file qt.js + * @authors: + * Jeffrey Wilcke + * Marek Kotewicz + * @date 2014 + */ + +var QtProvider = function() { + this.handlers = []; + + var self = this; + navigator.qt.onmessage = function (message) { + self.handlers.forEach(function (handler) { + handler.call(self, JSON.parse(message.data)); + }); + }; +}; + +QtProvider.prototype.send = function(payload) { + navigator.qt.postMessage(JSON.stringify(payload)); +}; + +Object.defineProperty(QtProvider.prototype, "onmessage", { + set: function(handler) { + this.handlers.push(handler); + } +}); + +if (typeof(module) !== "undefined") + module.exports = QtProvider; diff --git a/cmd/mist/assets/ext/ethereum.js/lib/web3.js b/cmd/mist/assets/ext/ethereum.js/lib/web3.js new file mode 100644 index 0000000000..9a85c4d1bd --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/lib/web3.js @@ -0,0 +1,509 @@ +/* + This file is part of ethereum.js. + + ethereum.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ethereum.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with ethereum.js. If not, see . +*/ +/** @file main.js + * @authors: + * Jeffrey Wilcke + * Marek Kotewicz + * Marian Oancea + * Gav Wood + * @date 2014 + */ + +function flattenPromise (obj) { + if (obj instanceof Promise) { + return Promise.resolve(obj); + } + + if (obj instanceof Array) { + return new Promise(function (resolve) { + var promises = obj.map(function (o) { + return flattenPromise(o); + }); + + return Promise.all(promises).then(function (res) { + for (var i = 0; i < obj.length; i++) { + obj[i] = res[i]; + } + resolve(obj); + }); + }); + } + + if (obj instanceof Object) { + return new Promise(function (resolve) { + var keys = Object.keys(obj); + var promises = keys.map(function (key) { + return flattenPromise(obj[key]); + }); + + return Promise.all(promises).then(function (res) { + for (var i = 0; i < keys.length; i++) { + obj[keys[i]] = res[i]; + } + resolve(obj); + }); + }); + } + + return Promise.resolve(obj); +} + +var web3Methods = function () { + return [ + { name: 'sha3', call: 'web3_sha3' } + ]; +}; + +var ethMethods = function () { + var blockCall = function (args) { + return typeof args[0] === "string" ? "eth_blockByHash" : "eth_blockByNumber"; + }; + + var transactionCall = function (args) { + return typeof args[0] === "string" ? 'eth_transactionByHash' : 'eth_transactionByNumber'; + }; + + var uncleCall = function (args) { + return typeof args[0] === "string" ? 'eth_uncleByHash' : 'eth_uncleByNumber'; + }; + + var methods = [ + { name: 'balanceAt', call: 'eth_balanceAt' }, + { name: 'stateAt', call: 'eth_stateAt' }, + { name: 'storageAt', call: 'eth_storageAt' }, + { name: 'countAt', call: 'eth_countAt'}, + { name: 'codeAt', call: 'eth_codeAt' }, + { name: 'transact', call: 'eth_transact' }, + { name: 'call', call: 'eth_call' }, + { name: 'block', call: blockCall }, + { name: 'transaction', call: transactionCall }, + { name: 'uncle', call: uncleCall }, + { name: 'compilers', call: 'eth_compilers' }, + { name: 'lll', call: 'eth_lll' }, + { name: 'solidity', call: 'eth_solidity' }, + { name: 'serpent', call: 'eth_serpent' }, + { name: 'logs', call: 'eth_logs' } + ]; + return methods; +}; + +var ethProperties = function () { + return [ + { name: 'coinbase', getter: 'eth_coinbase', setter: 'eth_setCoinbase' }, + { name: 'listening', getter: 'eth_listening', setter: 'eth_setListening' }, + { name: 'mining', getter: 'eth_mining', setter: 'eth_setMining' }, + { name: 'gasPrice', getter: 'eth_gasPrice' }, + { name: 'account', getter: 'eth_account' }, + { name: 'accounts', getter: 'eth_accounts' }, + { name: 'peerCount', getter: 'eth_peerCount' }, + { name: 'defaultBlock', getter: 'eth_defaultBlock', setter: 'eth_setDefaultBlock' }, + { name: 'number', getter: 'eth_number'} + ]; +}; + +var dbMethods = function () { + return [ + { name: 'put', call: 'db_put' }, + { name: 'get', call: 'db_get' }, + { name: 'putString', call: 'db_putString' }, + { name: 'getString', call: 'db_getString' } + ]; +}; + +var shhMethods = function () { + return [ + { name: 'post', call: 'shh_post' }, + { name: 'newIdentity', call: 'shh_newIdentity' }, + { name: 'haveIdentity', call: 'shh_haveIdentity' }, + { name: 'newGroup', call: 'shh_newGroup' }, + { name: 'addToGroup', call: 'shh_addToGroup' } + ]; +}; + +var ethWatchMethods = function () { + var newFilter = function (args) { + return typeof args[0] === 'string' ? 'eth_newFilterString' : 'eth_newFilter'; + }; + + return [ + { name: 'newFilter', call: newFilter }, + { name: 'uninstallFilter', call: 'eth_uninstallFilter' }, + { name: 'getMessages', call: 'eth_filterLogs' } + ]; +}; + +var shhWatchMethods = function () { + return [ + { name: 'newFilter', call: 'shh_newFilter' }, + { name: 'uninstallFilter', call: 'shh_uninstallFilter' }, + { name: 'getMessage', call: 'shh_getMessages' } + ]; +}; + +var setupMethods = function (obj, methods) { + methods.forEach(function (method) { + obj[method.name] = function () { + return flattenPromise(Array.prototype.slice.call(arguments)).then(function (args) { + var call = typeof method.call === "function" ? method.call(args) : method.call; + return {call: call, args: args}; + }).then(function (request) { + return new Promise(function (resolve, reject) { + web3.provider.send(request, function (err, result) { + if (!err) { + resolve(result); + return; + } + reject(err); + }); + }); + }).catch(function(err) { + console.error(err); + }); + }; + }); +}; + +var setupProperties = function (obj, properties) { + properties.forEach(function (property) { + var proto = {}; + proto.get = function () { + return new Promise(function(resolve, reject) { + web3.provider.send({call: property.getter}, function(err, result) { + if (!err) { + resolve(result); + return; + } + reject(err); + }); + }); + }; + if (property.setter) { + proto.set = function (val) { + return flattenPromise([val]).then(function (args) { + return new Promise(function (resolve) { + web3.provider.send({call: property.setter, args: args}, function (err, result) { + if (!err) { + resolve(result); + return; + } + reject(err); + }); + }); + }).catch(function (err) { + console.error(err); + }); + }; + } + Object.defineProperty(obj, property.name, proto); + }); +}; + +// TODO: import from a dependency, don't duplicate. +var hexToDec = function (hex) { + return parseInt(hex, 16).toString(); +}; + +var decToHex = function (dec) { + return parseInt(dec).toString(16); +}; + + +var web3 = { + _callbacks: {}, + _events: {}, + providers: {}, + + toHex: function(str) { + var hex = ""; + for(var i = 0; i < str.length; i++) { + var n = str.charCodeAt(i).toString(16); + hex += n.length < 2 ? '0' + n : n; + } + + return hex; + }, + + toAscii: function(hex) { + // Find termination + var str = ""; + var i = 0, l = hex.length; + if (hex.substring(0, 2) === '0x') + i = 2; + for(; i < l; i+=2) { + var code = hex.charCodeAt(i); + if(code === 0) { + break; + } + + str += String.fromCharCode(parseInt(hex.substr(i, 2), 16)); + } + + return str; + }, + + fromAscii: function(str, pad) { + pad = pad === undefined ? 32 : pad; + var hex = this.toHex(str); + while(hex.length < pad*2) + hex += "00"; + return "0x" + hex; + }, + + toDecimal: function (val) { + return hexToDec(val.substring(2)); + }, + + fromDecimal: function (val) { + return "0x" + decToHex(val); + }, + + toEth: function(str) { + var val = typeof str === "string" ? str.indexOf('0x') === 0 ? parseInt(str.substr(2), 16) : parseInt(str) : str; + var unit = 0; + var units = [ 'wei', 'Kwei', 'Mwei', 'Gwei', 'szabo', 'finney', 'ether', 'grand', 'Mether', 'Gether', 'Tether', 'Pether', 'Eether', 'Zether', 'Yether', 'Nether', 'Dether', 'Vether', 'Uether' ]; + while (val > 3000 && unit < units.length - 1) + { + val /= 1000; + unit++; + } + var s = val.toString().length < val.toFixed(2).length ? val.toString() : val.toFixed(2); + var replaceFunction = function($0, $1, $2) { + return $1 + ',' + $2; + }; + + while (true) { + var o = s; + s = s.replace(/(\d)(\d\d\d[\.\,])/, replaceFunction); + if (o === s) + break; + } + return s + ' ' + units[unit]; + }, + + eth: { + prototype: Object(), // jshint ignore:line + watch: function (params) { + return new Filter(params, ethWatch); + } + }, + + db: { + prototype: Object() // jshint ignore:line + }, + + shh: { + prototype: Object(), // jshint ignore:line + watch: function (params) { + return new Filter(params, shhWatch); + } + }, + + on: function(event, id, cb) { + if(web3._events[event] === undefined) { + web3._events[event] = {}; + } + + web3._events[event][id] = cb; + return this; + }, + + off: function(event, id) { + if(web3._events[event] !== undefined) { + delete web3._events[event][id]; + } + + return this; + }, + + trigger: function(event, id, data) { + var callbacks = web3._events[event]; + if (!callbacks || !callbacks[id]) { + return; + } + var cb = callbacks[id]; + cb(data); + } +}; + +setupMethods(web3, web3Methods()); +setupMethods(web3.eth, ethMethods()); +setupProperties(web3.eth, ethProperties()); +setupMethods(web3.db, dbMethods()); +setupMethods(web3.shh, shhMethods()); + +var ethWatch = { + changed: 'eth_changed' +}; +setupMethods(ethWatch, ethWatchMethods()); +var shhWatch = { + changed: 'shh_changed' +}; +setupMethods(shhWatch, shhWatchMethods()); + +var ProviderManager = function() { + this.queued = []; + this.polls = []; + this.ready = false; + this.provider = undefined; + this.id = 1; + + var self = this; + var poll = function () { + if (self.provider && self.provider.poll) { + self.polls.forEach(function (data) { + data.data._id = self.id; + self.id++; + self.provider.poll(data.data, data.id); + }); + } + setTimeout(poll, 12000); + }; + poll(); +}; + +ProviderManager.prototype.send = function(data, cb) { + data._id = this.id; + if (cb) { + web3._callbacks[data._id] = cb; + } + + data.args = data.args || []; + this.id++; + + if(this.provider !== undefined) { + this.provider.send(data); + } else { + console.warn("provider is not set"); + this.queued.push(data); + } +}; + +ProviderManager.prototype.set = function(provider) { + if(this.provider !== undefined && this.provider.unload !== undefined) { + this.provider.unload(); + } + + this.provider = provider; + this.ready = true; +}; + +ProviderManager.prototype.sendQueued = function() { + for(var i = 0; this.queued.length; i++) { + // Resend + this.send(this.queued[i]); + } +}; + +ProviderManager.prototype.installed = function() { + return this.provider !== undefined; +}; + +ProviderManager.prototype.startPolling = function (data, pollId) { + if (!this.provider || !this.provider.poll) { + return; + } + this.polls.push({data: data, id: pollId}); +}; + +ProviderManager.prototype.stopPolling = function (pollId) { + for (var i = this.polls.length; i--;) { + var poll = this.polls[i]; + if (poll.id === pollId) { + this.polls.splice(i, 1); + } + } +}; + +web3.provider = new ProviderManager(); + +web3.setProvider = function(provider) { + provider.onmessage = messageHandler; + web3.provider.set(provider); + web3.provider.sendQueued(); +}; + +web3.haveProvider = function() { + return !!web3.provider.provider; +}; + +var Filter = function(options, impl) { + this.impl = impl; + this.callbacks = []; + + var self = this; + this.promise = impl.newFilter(options); + this.promise.then(function (id) { + self.id = id; + web3.on(impl.changed, id, self.trigger.bind(self)); + web3.provider.startPolling({call: impl.changed, args: [id]}, id); + }); +}; + +Filter.prototype.arrived = function(callback) { + this.changed(callback); +}; + +Filter.prototype.changed = function(callback) { + var self = this; + this.promise.then(function(id) { + self.callbacks.push(callback); + }); +}; + +Filter.prototype.trigger = function(messages) { + for(var i = 0; i < this.callbacks.length; i++) { + this.callbacks[i].call(this, messages); + } +}; + +Filter.prototype.uninstall = function() { + var self = this; + this.promise.then(function (id) { + self.impl.uninstallFilter(id); + web3.provider.stopPolling(id); + web3.off(impl.changed, id); + }); +}; + +Filter.prototype.messages = function() { + var self = this; + return this.promise.then(function (id) { + return self.impl.getMessages(id); + }); +}; + +Filter.prototype.logs = function () { + return this.messages(); +}; + +function messageHandler(data) { + if(data._event !== undefined) { + web3.trigger(data._event, data._id, data.data); + return; + } + + if(data._id) { + var cb = web3._callbacks[data._id]; + if (cb) { + cb.call(this, data.error, data.data); + delete web3._callbacks[data._id]; + } + } +} + +if (typeof(module) !== "undefined") + module.exports = web3; diff --git a/cmd/mist/assets/ext/ethereum.js/lib/websocket.js b/cmd/mist/assets/ext/ethereum.js/lib/websocket.js new file mode 100644 index 0000000000..5b40075e43 --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/lib/websocket.js @@ -0,0 +1,78 @@ +/* + This file is part of ethereum.js. + + ethereum.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ethereum.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with ethereum.js. If not, see . +*/ +/** @file websocket.js + * @authors: + * Jeffrey Wilcke + * Marek Kotewicz + * Marian Oancea + * @date 2014 + */ + +// TODO: is these line is supposed to be here? +if (process.env.NODE_ENV !== 'build') { + var WebSocket = require('ws'); // jshint ignore:line +} + +var WebSocketProvider = function(host) { + // onmessage handlers + this.handlers = []; + // queue will be filled with messages if send is invoked before the ws is ready + this.queued = []; + this.ready = false; + + this.ws = new WebSocket(host); + + var self = this; + this.ws.onmessage = function(event) { + for(var i = 0; i < self.handlers.length; i++) { + self.handlers[i].call(self, JSON.parse(event.data), event); + } + }; + + this.ws.onopen = function() { + self.ready = true; + + for(var i = 0; i < self.queued.length; i++) { + // Resend + self.send(self.queued[i]); + } + }; +}; + +WebSocketProvider.prototype.send = function(payload) { + if(this.ready) { + var data = JSON.stringify(payload); + + this.ws.send(data); + } else { + this.queued.push(payload); + } +}; + +WebSocketProvider.prototype.onMessage = function(handler) { + this.handlers.push(handler); +}; + +WebSocketProvider.prototype.unload = function() { + this.ws.close(); +}; +Object.defineProperty(WebSocketProvider.prototype, "onmessage", { + set: function(provider) { this.onMessage(provider); } +}); + +if (typeof(module) !== "undefined") + module.exports = WebSocketProvider; diff --git a/cmd/mist/assets/ext/ethereum.js/package.json b/cmd/mist/assets/ext/ethereum.js/package.json new file mode 100644 index 0000000000..8f5ba22555 --- /dev/null +++ b/cmd/mist/assets/ext/ethereum.js/package.json @@ -0,0 +1,67 @@ +{ + "name": "ethereum.js", + "namespace": "ethereum", + "version": "0.0.6", + "description": "Ethereum Compatible JavaScript API", + "main": "./index.js", + "directories": { + "lib": "./lib" + }, + "dependencies": { + "es6-promise": "*", + "ws": "*", + "xmlhttprequest": "*" + }, + "devDependencies": { + "bower": ">=1.3.0", + "browserify": ">=6.0", + "del": ">=0.1.1", + "envify": "^3.0.0", + "exorcist": "^0.1.6", + "gulp": ">=3.4.0", + "gulp-jshint": ">=1.5.0", + "gulp-rename": ">=1.2.0", + "gulp-uglify": ">=1.0.0", + "jshint": ">=2.5.0", + "uglifyify": "^2.6.0", + "unreachable-branch-transform": "^0.1.0", + "vinyl-source-stream": "^1.0.0" + }, + "scripts": { + "build": "gulp", + "watch": "gulp watch", + "lint": "gulp lint" + }, + "repository": { + "type": "git", + "url": "https://github.com/ethereum/ethereum.js.git" + }, + "homepage": "https://github.com/ethereum/ethereum.js", + "bugs": { + "url": "https://github.com/ethereum/ethereum.js/issues" + }, + "keywords": [ + "ethereum", + "javascript", + "API" + ], + "author": "ethdev.com", + "authors": [ + { + "name": "Jeffery Wilcke", + "email": "jeff@ethdev.com", + "url": "https://github.com/obscuren" + }, + { + "name": "Marek Kotewicz", + "email": "marek@ethdev.com", + "url": "https://github.com/debris" + }, + { + "name": "Marian Oancea", + "email": "marian@ethdev.com", + "url": "https://github.com/cubedro" + } + ], + "license": "LGPL-3.0" +} From bfa12d75f8c845b85b01c806019b99fb88a79520 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 9 Jan 2015 13:26:49 +0100 Subject: [PATCH 126/132] new switch --- cmd/mist/assets/qml/browser.qml | 66 +++++++++++++-------------------- 1 file changed, 26 insertions(+), 40 deletions(-) diff --git a/cmd/mist/assets/qml/browser.qml b/cmd/mist/assets/qml/browser.qml index 589f20dc6b..c22e09dc7a 100644 --- a/cmd/mist/assets/qml/browser.qml +++ b/cmd/mist/assets/qml/browser.qml @@ -174,51 +174,51 @@ Rectangle { try { switch(data.call) { - case "compile": + case "eth_compile": postData(data._id, eth.compile(data.args[0])) break - case "coinbase": + case "eth_coinbase": postData(data._id, eth.coinBase()) - case "account": + case "eth_account": postData(data._id, eth.key().address); - case "isListening": + case "eth_istening": postData(data._id, eth.isListening()) break - case "isMining": + case "eth_mining": postData(data._id, eth.isMining()) break - case "peerCount": + case "eth_peerCount": postData(data._id, eth.peerCount()) break - case "countAt": + case "eth_countAt": require(1) postData(data._id, eth.txCountAt(data.args[0])) break - case "codeAt": + case "eth_codeAt": require(1) var code = eth.codeAt(data.args[0]) postData(data._id, code); break - case "blockByNumber": + case "eth_blockByNumber": require(1) var block = eth.blockByNumber(data.args[0]) postData(data._id, block) break - case "blockByHash": + case "eth_blockByHash": require(1) var block = eth.blockByHash(data.args[0]) postData(data._id, block) @@ -229,8 +229,8 @@ Rectangle { postData(data._id, block.transactions[data.args[1]]) break - case "transactionByHash": - case "transactionByNumber": + case "eth_transactionByHash": + case "eth_transactionByNumber": require(2) var block; @@ -244,8 +244,8 @@ Rectangle { postData(data._id, tx) break - case "uncleByHash": - case "uncleByNumber": + case "eth_uncleByHash": + case "eth_uncleByNumber": require(2) var block; @@ -268,7 +268,7 @@ Rectangle { break - case "stateAt": + case "eth_stateAt": require(2); var storage = eth.storageAt(data.args[0], data.args[1]); @@ -276,55 +276,41 @@ Rectangle { break - case "call": + case "eth_call": require(1); var ret = eth.call(data.args) postData(data._id, ret) break - case "balanceAt": + case "eth_balanceAt": require(1); postData(data._id, eth.balanceAt(data.args[0])); break - case "watch": + case "eth_watch": require(2) eth.watch(data.args[0], data.args[1]) - case "disconnect": + case "eth_disconnect": require(1) postData(data._id, null) break; - case "messages": - require(1); - - var messages = JSON.parse(eth.getMessages(data.args[0])) - postData(data._id, messages) - break - - case "mutan": - require(1) - - var code = eth.compileMutan(data.args[0]) - postData(data._id, "0x"+code) - break; - - case "newFilterString": + case "eth_newFilterString": require(1) var id = eth.newFilterString(data.args[0]) postData(data._id, id); break; - case "newFilter": + case "eth_newFilter": require(1) var id = eth.newFilter(data.args[0]) postData(data._id, id); break; - case "getMessages": + case "eth_messages": require(1); var messages = eth.messages(data.args[0]); @@ -333,26 +319,26 @@ Rectangle { break; - case "deleteFilter": + case "eth_deleteFilter": require(1); eth.uninstallFilter(data.args[0]) break; - case "shhNewFilter": + case "shh_newFilter": require(1); var id = shh.watch(data.args[0], window); postData(data._id, id); break; - case "newIdentity": + case "shh_newIdentity": var id = shh.newIdentity() console.log("newIdentity", id) postData(data._id, id) break - case "post": + case "shh_post": require(1); var params = data.args[0]; From c9f566269b39780accfb7632b94dd7635be2022b Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 9 Jan 2015 13:28:48 +0100 Subject: [PATCH 127/132] merged --- cmd/mist/assets/qml/browser.qml | 1 - ui/qt/qwhisper/whisper.go | 2 -- whisper/message.go | 2 -- 3 files changed, 5 deletions(-) diff --git a/cmd/mist/assets/qml/browser.qml b/cmd/mist/assets/qml/browser.qml index c22e09dc7a..2791560ac2 100644 --- a/cmd/mist/assets/qml/browser.qml +++ b/cmd/mist/assets/qml/browser.qml @@ -333,7 +333,6 @@ Rectangle { case "shh_newIdentity": var id = shh.newIdentity() - console.log("newIdentity", id) postData(data._id, id) break diff --git a/ui/qt/qwhisper/whisper.go b/ui/qt/qwhisper/whisper.go index 8a064c81cd..62b68efaf4 100644 --- a/ui/qt/qwhisper/whisper.go +++ b/ui/qt/qwhisper/whisper.go @@ -1,7 +1,6 @@ package qwhisper import ( - "fmt" "time" "github.com/ethereum/go-ethereum/crypto" @@ -42,7 +41,6 @@ func (self *Whisper) Post(payload []string, to, from string, topics []string, pr data = append(data, ethutil.Hex2Bytes(d)...) } - fmt.Println(payload, data, "from", from, fromHex(from), crypto.ToECDSA(fromHex(from))) msg := whisper.NewMessage(data) envelope, err := msg.Seal(time.Duration(priority*100000), whisper.Opts{ Ttl: time.Duration(ttl), diff --git a/whisper/message.go b/whisper/message.go index 5bda849ec8..db0110b4a7 100644 --- a/whisper/message.go +++ b/whisper/message.go @@ -2,7 +2,6 @@ package whisper import ( "crypto/ecdsa" - "fmt" "time" "github.com/ethereum/go-ethereum/crypto" @@ -54,7 +53,6 @@ type Opts struct { } func (self *Message) Seal(pow time.Duration, opts Opts) (*Envelope, error) { - fmt.Println(opts) if opts.From != nil { err := self.sign(opts.From) if err != nil { From f9b0d1a8e738a207e6101b27b667ea390def9f69 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 9 Jan 2015 13:36:47 +0100 Subject: [PATCH 128/132] Updated to new ethereum.js api --- cmd/mist/assets/qml/browser.qml | 2 +- ui/qt/qwhisper/whisper.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/mist/assets/qml/browser.qml b/cmd/mist/assets/qml/browser.qml index 2791560ac2..f6d2d2d64b 100644 --- a/cmd/mist/assets/qml/browser.qml +++ b/cmd/mist/assets/qml/browser.qml @@ -70,7 +70,7 @@ Rectangle { } function onShhMessage(message, id) { - webview.postEvent("shhChanged", id, message) + webview.postEvent("shh_changed", id, message) } Item { diff --git a/ui/qt/qwhisper/whisper.go b/ui/qt/qwhisper/whisper.go index 62b68efaf4..8b4628a1b6 100644 --- a/ui/qt/qwhisper/whisper.go +++ b/ui/qt/qwhisper/whisper.go @@ -38,7 +38,7 @@ func (self *Whisper) SetView(view qml.Object) { func (self *Whisper) Post(payload []string, to, from string, topics []string, priority, ttl uint32) { var data []byte for _, d := range payload { - data = append(data, ethutil.Hex2Bytes(d)...) + data = append(data, fromHex(d)...) } msg := whisper.NewMessage(data) From 5c8c0ae04e83389e3b97c527c11c819f219e344d Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 9 Jan 2015 15:30:46 +0100 Subject: [PATCH 129/132] Fixed size 0 bug --- vm/stack.go | 4 ++++ vm/vm_debug.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/vm/stack.go b/vm/stack.go index b9eaa10cd4..f20470db36 100644 --- a/vm/stack.go +++ b/vm/stack.go @@ -152,6 +152,10 @@ func (m *Memory) Get(offset, size int64) []byte { } func (self *Memory) Geti(offset, size int64) (cpy []byte) { + if size == 0 { + return nil + } + if len(self.store) > int(offset) { cpy = make([]byte, size) copy(cpy, self.store[offset:offset+size]) diff --git a/vm/vm_debug.go b/vm/vm_debug.go index 92e4154e4f..656487c9b9 100644 --- a/vm/vm_debug.go +++ b/vm/vm_debug.go @@ -34,7 +34,7 @@ func NewDebugVm(env Environment) *DebugVm { lt = LogTyDiff } - return &DebugVm{env: env, logTy: lt, Recoverable: true} + return &DebugVm{env: env, logTy: lt, Recoverable: false} } func (self *DebugVm) Run(me, caller ContextRef, code []byte, value, gas, price *big.Int, callData []byte) (ret []byte, err error) { From 6eb455032cdf9fec37f7a2abfc833de64003beca Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 9 Jan 2015 15:32:14 +0100 Subject: [PATCH 130/132] recover --- vm/vm_debug.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/vm_debug.go b/vm/vm_debug.go index 656487c9b9..92e4154e4f 100644 --- a/vm/vm_debug.go +++ b/vm/vm_debug.go @@ -34,7 +34,7 @@ func NewDebugVm(env Environment) *DebugVm { lt = LogTyDiff } - return &DebugVm{env: env, logTy: lt, Recoverable: false} + return &DebugVm{env: env, logTy: lt, Recoverable: true} } func (self *DebugVm) Run(me, caller ContextRef, code []byte, value, gas, price *big.Int, callData []byte) (ret []byte, err error) { From 35f4bb96f313f4f04e70d1cf135be3a4759a8179 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 9 Jan 2015 16:44:09 +0100 Subject: [PATCH 131/132] Limit hashes. Closes #249 --- eth/protocol.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/eth/protocol.go b/eth/protocol.go index c9a5dea8df..24a0f0a8e8 100644 --- a/eth/protocol.go +++ b/eth/protocol.go @@ -67,6 +67,8 @@ type newBlockMsgData struct { TD *big.Int } +const maxHashes = 255 + type getBlockHashesMsgData struct { Hash []byte Amount uint64 @@ -139,6 +141,11 @@ func (self *ethProtocol) handle() error { if err := msg.Decode(&request); err != nil { return self.protoError(ErrDecode, "->msg %v: %v", msg, err) } + + //request.Amount = uint64(math.Min(float64(maxHashes), float64(request.Amount))) + if request.Amount > maxHashes { + request.Amount = maxHashes + } hashes := self.chainManager.GetBlockHashesFromHash(request.Hash, request.Amount) return p2p.EncodeMsg(self.rw, BlockHashesMsg, ethutil.ByteSliceToInterface(hashes)...) From 905b8cc82f3dc29131f45ccf29bd1d6c967fe132 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 9 Jan 2015 17:38:35 +0100 Subject: [PATCH 132/132] mem fixes for vm. Changed uncle inclusion tests --- core/block_processor.go | 34 ++++++++++++++++++++-------------- core/chain_manager.go | 22 ++++++++++++++++++++++ vm/stack.go | 4 ++++ 3 files changed, 46 insertions(+), 14 deletions(-) diff --git a/core/block_processor.go b/core/block_processor.go index 87e8233627..3ccf2d03c9 100644 --- a/core/block_processor.go +++ b/core/block_processor.go @@ -294,32 +294,38 @@ func (sm *BlockProcessor) ValidateBlock(block, parent *types.Block) error { func (sm *BlockProcessor) AccumelateRewards(statedb *state.StateDB, block, parent *types.Block) error { reward := new(big.Int).Set(BlockReward) - knownUncles := set.New() - for _, uncle := range parent.Uncles() { - knownUncles.Add(string(uncle.Hash())) + ancestors := set.New() + for _, ancestor := range sm.bc.GetAncestors(block, 6) { + ancestors.Add(string(ancestor.Hash())) } - nonces := ethutil.NewSet(block.Header().Nonce) + uncles := set.New() + uncles.Add(string(block.Hash())) for _, uncle := range block.Uncles() { - if nonces.Include(uncle.Nonce) { + if uncles.Has(string(uncle.Hash())) { // Error not unique return UncleError("Uncle not unique") } + uncles.Add(string(uncle.Hash())) - uncleParent := sm.bc.GetBlock(uncle.ParentHash) - if uncleParent == nil { + if !ancestors.Has(uncle.ParentHash) { return UncleError(fmt.Sprintf("Uncle's parent unknown (%x)", uncle.ParentHash[0:4])) } - if uncleParent.Header().Number.Cmp(new(big.Int).Sub(parent.Header().Number, big.NewInt(6))) < 0 { - return UncleError("Uncle too old") - } + /* + uncleParent := sm.bc.GetBlock(uncle.ParentHash) + if uncleParent == nil { + return UncleError(fmt.Sprintf("Uncle's parent unknown (%x)", uncle.ParentHash[0:4])) + } - if knownUncles.Has(string(uncle.Hash())) { - return UncleError("Uncle in chain") - } + if uncleParent.Number().Cmp(new(big.Int).Sub(parent.Number(), big.NewInt(6))) < 0 { + return UncleError("Uncle too old") + } - nonces.Insert(uncle.Nonce) + if knownUncles.Has(string(uncle.Hash())) { + return UncleError("Uncle in chain") + } + */ r := new(big.Int) r.Mul(BlockReward, big.NewInt(15)).Div(r, big.NewInt(16)) diff --git a/core/chain_manager.go b/core/chain_manager.go index 3e0a3fb23a..90b5692ac1 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -262,6 +262,28 @@ func (self *ChainManager) GetBlock(hash []byte) *types.Block { return &block } +func (self *ChainManager) GetUnclesInChain(block *types.Block, length int) (uncles []*types.Header) { + for i := 0; block != nil && i < length; i++ { + uncles = append(uncles, block.Uncles()...) + block = self.GetBlock(block.ParentHash()) + } + + return +} + +func (self *ChainManager) GetAncestors(block *types.Block, length int) (blocks []*types.Block) { + for i := 0; i < length; i++ { + block = self.GetBlock(block.ParentHash()) + if block == nil { + break + } + + blocks = append(blocks, block) + } + + return +} + func (self *ChainManager) GetBlockByNumber(num uint64) *types.Block { self.mu.RLock() defer self.mu.RUnlock() diff --git a/vm/stack.go b/vm/stack.go index f20470db36..e31f3eb576 100644 --- a/vm/stack.go +++ b/vm/stack.go @@ -142,6 +142,10 @@ func (m *Memory) Resize(size uint64) { } func (m *Memory) Get(offset, size int64) []byte { + if size == 0 { + return nil + } + if len(m.store) > int(offset) { end := int(math.Min(float64(len(m.store)), float64(offset+size)))