|
|
@ -186,7 +186,7 @@ func (self *StateTransition) TransitionState() (ret []byte, err error) { |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
stateCopy := self.env.State().Copy() |
|
|
|
//stateCopy := self.env.State().Copy()
|
|
|
|
vmenv := self.env |
|
|
|
vmenv := self.env |
|
|
|
var ref vm.ContextRef |
|
|
|
var ref vm.ContextRef |
|
|
|
if MessageCreatesContract(msg) { |
|
|
|
if MessageCreatesContract(msg) { |
|
|
@ -200,29 +200,33 @@ func (self *StateTransition) TransitionState() (ret []byte, err error) { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if vmenv, ok := vmenv.(*VMEnv); ok && tryJit { |
|
|
|
/* |
|
|
|
statelogger.Infof("CREATE: re-running using JIT (PH=%x)\n", stateCopy.Root()[:4]) |
|
|
|
if vmenv, ok := vmenv.(*VMEnv); ok && tryJit { |
|
|
|
// re-run using the JIT (validation for the JIT)
|
|
|
|
statelogger.Infof("CREATE: re-running using JIT (PH=%x)\n", stateCopy.Root()[:4]) |
|
|
|
goodState := vmenv.State().Copy() |
|
|
|
// re-run using the JIT (validation for the JIT)
|
|
|
|
vmenv.state = stateCopy |
|
|
|
goodState := vmenv.State().Copy() |
|
|
|
vmenv.SetVmType(vm.JitVmTy) |
|
|
|
vmenv.state = stateCopy |
|
|
|
vmenv.Create(sender, contract.Address(), self.msg.Data(), self.gas, self.gasPrice, self.value) |
|
|
|
vmenv.SetVmType(vm.JitVmTy) |
|
|
|
statelogger.Infof("DONE PH=%x STD_H=%x JIT_H=%x\n", stateCopy.Root()[:4], goodState.Root()[:4], vmenv.State().Root()[:4]) |
|
|
|
vmenv.Create(sender, contract.Address(), self.msg.Data(), self.gas, self.gasPrice, self.value) |
|
|
|
self.state.Set(goodState) |
|
|
|
statelogger.Infof("DONE PH=%x STD_H=%x JIT_H=%x\n", stateCopy.Root()[:4], goodState.Root()[:4], vmenv.State().Root()[:4]) |
|
|
|
} |
|
|
|
self.state.Set(goodState) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
*/ |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
ret, err = vmenv.Call(self.From(), self.To().Address(), self.msg.Data(), self.gas, self.gasPrice, self.value) |
|
|
|
ret, err = vmenv.Call(self.From(), self.To().Address(), self.msg.Data(), self.gas, self.gasPrice, self.value) |
|
|
|
|
|
|
|
|
|
|
|
if vmenv, ok := vmenv.(*VMEnv); ok && tryJit { |
|
|
|
/* |
|
|
|
statelogger.Infof("CALL: re-running using JIT (PH=%x)\n", stateCopy.Root()[:4]) |
|
|
|
if vmenv, ok := vmenv.(*VMEnv); ok && tryJit { |
|
|
|
// re-run using the JIT (validation for the JIT)
|
|
|
|
statelogger.Infof("CALL: re-running using JIT (PH=%x)\n", stateCopy.Root()[:4]) |
|
|
|
goodState := vmenv.State().Copy() |
|
|
|
// re-run using the JIT (validation for the JIT)
|
|
|
|
vmenv.state = stateCopy |
|
|
|
goodState := vmenv.State().Copy() |
|
|
|
vmenv.SetVmType(vm.JitVmTy) |
|
|
|
vmenv.state = stateCopy |
|
|
|
vmenv.Call(self.From(), self.To().Address(), self.msg.Data(), self.gas, self.gasPrice, self.value) |
|
|
|
vmenv.SetVmType(vm.JitVmTy) |
|
|
|
statelogger.Infof("DONE PH=%x STD_H=%x JIT_H=%x\n", stateCopy.Root()[:4], goodState.Root()[:4], vmenv.State().Root()[:4]) |
|
|
|
vmenv.Call(self.From(), self.To().Address(), self.msg.Data(), self.gas, self.gasPrice, self.value) |
|
|
|
self.state.Set(goodState) |
|
|
|
statelogger.Infof("DONE PH=%x STD_H=%x JIT_H=%x\n", stateCopy.Root()[:4], goodState.Root()[:4], vmenv.State().Root()[:4]) |
|
|
|
} |
|
|
|
self.state.Set(goodState) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
*/ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|