Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
20c742e4
Commit
20c742e4
authored
Oct 18, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved ethvm => vm
parent
a02dc4cc
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
24 additions
and
23 deletions
+24
-23
state_transition.go
ethchain/state_transition.go
+6
-6
pipe.go
ethpipe/pipe.go
+3
-3
.ethtest
vm/.ethtest
+0
-0
address.go
vm/address.go
+1
-1
asm.go
vm/asm.go
+3
-2
closure.go
vm/closure.go
+1
-1
common.go
vm/common.go
+1
-1
debugger.go
vm/debugger.go
+1
-1
environment.go
vm/environment.go
+1
-1
execution.go
vm/execution.go
+1
-1
stack.go
vm/stack.go
+1
-1
types.go
vm/types.go
+1
-1
virtual_machine.go
vm/virtual_machine.go
+1
-1
vm.go
vm/vm.go
+1
-1
vm_debug.go
vm/vm_debug.go
+1
-1
vm_test.go
vm/vm_test.go
+1
-1
No files found.
ethchain/state_transition.go
View file @
20c742e4
...
...
@@ -7,7 +7,7 @@ import (
"github.com/ethereum/eth-go/ethstate"
"github.com/ethereum/eth-go/ethtrie"
"github.com/ethereum/eth-go/ethutil"
"github.com/ethereum/eth-go/
eth
vm"
"github.com/ethereum/eth-go/vm"
)
/*
...
...
@@ -160,13 +160,13 @@ func (self *StateTransition) TransitionState() (err error) {
sender
.
Nonce
+=
1
// Transaction gas
if
err
=
self
.
UseGas
(
eth
vm
.
GasTx
);
err
!=
nil
{
if
err
=
self
.
UseGas
(
vm
.
GasTx
);
err
!=
nil
{
return
}
// Pay data gas
dataPrice
:=
big
.
NewInt
(
int64
(
len
(
self
.
data
)))
dataPrice
.
Mul
(
dataPrice
,
eth
vm
.
GasData
)
dataPrice
.
Mul
(
dataPrice
,
vm
.
GasData
)
if
err
=
self
.
UseGas
(
dataPrice
);
err
!=
nil
{
return
}
...
...
@@ -261,11 +261,11 @@ func (self *StateTransition) Eval(msg *ethstate.Message, script []byte, context
transactor
=
self
.
Sender
()
state
=
self
.
state
env
=
NewEnv
(
state
,
self
.
tx
,
self
.
block
)
callerClosure
=
eth
vm
.
NewClosure
(
msg
,
transactor
,
context
,
script
,
self
.
gas
,
self
.
gasPrice
)
callerClosure
=
vm
.
NewClosure
(
msg
,
transactor
,
context
,
script
,
self
.
gas
,
self
.
gasPrice
)
)
//vm :=
ethvm.New(env, eth
vm.Type(ethutil.Config.VmType))
vm
:=
ethvm
.
New
(
env
,
eth
vm
.
DebugVmTy
)
//vm :=
vm.New(env,
vm.Type(ethutil.Config.VmType))
vm
:=
vm
.
New
(
env
,
vm
.
DebugVmTy
)
ret
,
_
,
err
=
callerClosure
.
Call
(
vm
,
self
.
tx
.
Data
)
...
...
ethpipe/pipe.go
View file @
20c742e4
...
...
@@ -9,7 +9,7 @@ import (
"github.com/ethereum/eth-go/ethlog"
"github.com/ethereum/eth-go/ethstate"
"github.com/ethereum/eth-go/ethutil"
"github.com/ethereum/eth-go/
eth
vm"
"github.com/ethereum/eth-go/vm"
)
var
logger
=
ethlog
.
NewLogger
(
"PIPE"
)
...
...
@@ -58,9 +58,9 @@ func (self *Pipe) ExecuteObject(object *Object, data []byte, value, gas, price *
self
.
Vm
.
State
=
self
.
World
()
.
State
()
.
Copy
()
vm
:=
ethvm
.
New
(
NewEnv
(
self
.
Vm
.
State
,
block
,
value
.
BigInt
(),
initiator
.
Address
()),
eth
vm
.
Type
(
ethutil
.
Config
.
VmType
))
evm
:=
vm
.
New
(
NewEnv
(
self
.
Vm
.
State
,
block
,
value
.
BigInt
(),
initiator
.
Address
()),
vm
.
Type
(
ethutil
.
Config
.
VmType
))
msg
:=
ethvm
.
NewExecution
(
vm
,
object
.
Address
(),
data
,
gas
.
BigInt
(),
price
.
BigInt
(),
value
.
BigInt
())
msg
:=
vm
.
NewExecution
(
e
vm
,
object
.
Address
(),
data
,
gas
.
BigInt
(),
price
.
BigInt
(),
value
.
BigInt
())
ret
,
err
:=
msg
.
Exec
(
object
.
Address
(),
initiator
)
fmt
.
Println
(
"returned from call"
,
ret
,
err
)
...
...
eth
vm/.ethtest
→
vm/.ethtest
View file @
20c742e4
File moved
eth
vm/address.go
→
vm/address.go
View file @
20c742e4
package
eth
vm
package
vm
import
(
"math/big"
...
...
eth
vm/asm.go
→
vm/asm.go
View file @
20c742e4
package
eth
vm
package
vm
import
(
"fmt"
"github.com/ethereum/eth-go/ethutil"
"math/big"
"github.com/ethereum/eth-go/ethutil"
)
func
Disassemble
(
script
[]
byte
)
(
asm
[]
string
)
{
...
...
eth
vm/closure.go
→
vm/closure.go
View file @
20c742e4
package
eth
vm
package
vm
// TODO Re write VM to use values instead of big integers?
...
...
eth
vm/common.go
→
vm/common.go
View file @
20c742e4
package
eth
vm
package
vm
import
(
"math/big"
...
...
eth
vm/debugger.go
→
vm/debugger.go
View file @
20c742e4
package
eth
vm
package
vm
import
"github.com/ethereum/eth-go/ethstate"
...
...
eth
vm/environment.go
→
vm/environment.go
View file @
20c742e4
package
eth
vm
package
vm
import
(
"math/big"
...
...
eth
vm/execution.go
→
vm/execution.go
View file @
20c742e4
package
eth
vm
package
vm
import
(
"fmt"
...
...
eth
vm/stack.go
→
vm/stack.go
View file @
20c742e4
package
eth
vm
package
vm
import
(
"fmt"
...
...
eth
vm/types.go
→
vm/types.go
View file @
20c742e4
package
eth
vm
package
vm
import
(
"fmt"
...
...
eth
vm/virtual_machine.go
→
vm/virtual_machine.go
View file @
20c742e4
package
eth
vm
package
vm
type
VirtualMachine
interface
{
Env
()
Environment
...
...
eth
vm/vm.go
→
vm/vm.go
View file @
20c742e4
package
eth
vm
package
vm
import
(
"fmt"
...
...
eth
vm/vm_debug.go
→
vm/vm_debug.go
View file @
20c742e4
package
eth
vm
package
vm
import
(
"fmt"
...
...
eth
vm/vm_test.go
→
vm/vm_test.go
View file @
20c742e4
package
eth
vm
package
vm
import
(
"bytes"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment