diff --git a/.travis.yml b/.travis.yml index d09cbcdb09367b5a828a1cde8fdae817107c620c..21c15068b510196a4e933f67c6d400baf3240927 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 @@ -8,10 +8,10 @@ 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 + - 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 . @@ -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/Dockerfile b/Dockerfile index 1f37ce892a703f699152031a8003760a8e043949..82ce9f7fc41f66c33b27b7a51030917cd8cbb28e 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 diff --git a/README.md b/README.md index 564e5c56dde74cc93630a92d34c622bd9a7464d3..c54a555cb50e529323045bd152a565f9bf37f971 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ Ethereum [](http://build.ethdev.com:8010/builders/Linux%20Go%20master%20branch/builds/-1) master [](http://build.ethdev.com:8010/builders/Linux%20Go%20develop%20branch/builds/-1) develop +[](https://coveralls.io/r/ethereum/go-ethereum?branch=tests) tests Ethereum Go Client © 2014 Jeffrey Wilcke. diff --git a/_data/invalid1 b/_data/invalid1 new file mode 100755 index 0000000000000000000000000000000000000000..9c24b13e8e8f7f54c6a8434781e8a958bd56bd3e Binary files /dev/null and b/_data/invalid1 differ diff --git a/_data/valid1 b/_data/valid1 new file mode 100755 index 0000000000000000000000000000000000000000..809a55f1a6010b951e28e03b17ea0eb0d9528212 Binary files /dev/null and b/_data/valid1 differ diff --git a/_data/valid2 b/_data/valid2 new file mode 100755 index 0000000000000000000000000000000000000000..3e9d2971a9670a7ba81a50b24fd91685c73c5ffa Binary files /dev/null and b/_data/valid2 differ diff --git a/_data/valid3 b/_data/valid3 new file mode 100755 index 0000000000000000000000000000000000000000..685bc9fd7b38505d26c9d16223c9a55f23abcdf3 Binary files /dev/null and b/_data/valid3 differ diff --git a/_data/valid4 b/_data/valid4 new file mode 100755 index 0000000000000000000000000000000000000000..fc016057fa38e5c4f2f88129159540398f5cc1f9 Binary files /dev/null and b/_data/valid4 differ diff --git a/block_pool.go b/block_pool.go deleted file mode 100644 index 803927f21f9a0258b887d72195d37e5ed80757ca..0000000000000000000000000000000000000000 --- a/block_pool.go +++ /dev/null @@ -1,351 +0,0 @@ -package eth - -import ( - "bytes" - "container/list" - "fmt" - "math" - "math/big" - "sync" - "time" - - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/ethutil" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/wire" -) - -var poollogger = logger.NewLogger("BPOOL") - -type block struct { - from *Peer - peer *Peer - block *types.Block - reqAt time.Time - requested int -} - -type BlockPool struct { - mut sync.Mutex - - eth *Ethereum - - hashes [][]byte - pool map[string]*block - - td *big.Int - quit chan bool - - fetchingHashes bool - downloadStartedAt time.Time - - ChainLength, BlocksProcessed int - - peer *Peer -} - -func NewBlockPool(eth *Ethereum) *BlockPool { - return &BlockPool{ - eth: eth, - pool: make(map[string]*block), - td: ethutil.Big0, - quit: make(chan bool), - } -} - -func (self *BlockPool) Len() int { - return len(self.hashes) -} - -func (self *BlockPool) Reset() { - self.pool = make(map[string]*block) - self.hashes = nil -} - -func (self *BlockPool) HasLatestHash() bool { - self.mut.Lock() - defer self.mut.Unlock() - - return self.pool[string(self.eth.ChainManager().CurrentBlock.Hash())] != nil -} - -func (self *BlockPool) HasCommonHash(hash []byte) bool { - return self.eth.ChainManager().GetBlock(hash) != nil -} - -func (self *BlockPool) Blocks() (blocks types.Blocks) { - for _, item := range self.pool { - if item.block != nil { - blocks = append(blocks, item.block) - } - } - - return -} - -func (self *BlockPool) FetchHashes(peer *Peer) bool { - highestTd := self.eth.HighestTDPeer() - - if (self.peer == nil && peer.td.Cmp(highestTd) >= 0) || (self.peer != nil && peer.td.Cmp(self.peer.td) > 0) || self.peer == peer { - if self.peer != peer { - poollogger.Infof("Found better suitable peer (%v vs %v)\n", self.td, peer.td) - - if self.peer != nil { - self.peer.doneFetchingHashes = true - } - } - - self.peer = peer - self.td = peer.td - - if !self.HasLatestHash() { - self.fetchHashes() - } - - return true - } - - return false -} - -func (self *BlockPool) fetchHashes() { - peer := self.peer - - peer.doneFetchingHashes = false - - const amount = 256 - peerlogger.Debugf("Fetching hashes (%d) %x...\n", amount, peer.lastReceivedHash[0:4]) - peer.QueueMessage(wire.NewMessage(wire.MsgGetBlockHashesTy, []interface{}{peer.lastReceivedHash, uint32(amount)})) -} - -func (self *BlockPool) AddHash(hash []byte, peer *Peer) { - self.mut.Lock() - defer self.mut.Unlock() - - if self.pool[string(hash)] == nil { - self.pool[string(hash)] = &block{peer, nil, nil, time.Now(), 0} - - self.hashes = append([][]byte{hash}, self.hashes...) - } -} - -func (self *BlockPool) Add(b *types.Block, peer *Peer) { - self.addBlock(b, peer, false) -} - -func (self *BlockPool) AddNew(b *types.Block, peer *Peer) { - self.addBlock(b, peer, true) -} - -func (self *BlockPool) addBlock(b *types.Block, peer *Peer, newBlock bool) { - self.mut.Lock() - defer self.mut.Unlock() - - hash := string(b.Hash()) - - if self.pool[hash] == nil && !self.eth.ChainManager().HasBlock(b.Hash()) { - poollogger.Infof("Got unrequested block (%x...)\n", hash[0:4]) - - self.hashes = append(self.hashes, b.Hash()) - self.pool[hash] = &block{peer, peer, b, time.Now(), 0} - - // The following is only performed on an unrequested new block - if newBlock { - fmt.Println("1.", !self.eth.ChainManager().HasBlock(b.PrevHash), ethutil.Bytes2Hex(b.Hash()[0:4]), ethutil.Bytes2Hex(b.PrevHash[0:4])) - fmt.Println("2.", self.pool[string(b.PrevHash)] == nil) - fmt.Println("3.", !self.fetchingHashes) - if !self.eth.ChainManager().HasBlock(b.PrevHash) /*&& self.pool[string(b.PrevHash)] == nil*/ && !self.fetchingHashes { - poollogger.Infof("Unknown chain, requesting (%x...)\n", b.PrevHash[0:4]) - peer.QueueMessage(wire.NewMessage(wire.MsgGetBlockHashesTy, []interface{}{b.Hash(), uint32(256)})) - } - } - } else if self.pool[hash] != nil { - self.pool[hash].block = b - } - - self.BlocksProcessed++ -} - -func (self *BlockPool) Remove(hash []byte) { - self.mut.Lock() - defer self.mut.Unlock() - - self.hashes = ethutil.DeleteFromByteSlice(self.hashes, hash) - delete(self.pool, string(hash)) -} - -func (self *BlockPool) DistributeHashes() { - self.mut.Lock() - defer self.mut.Unlock() - - var ( - peerLen = self.eth.peers.Len() - amount = 256 * peerLen - dist = make(map[*Peer][][]byte) - ) - - num := int(math.Min(float64(amount), float64(len(self.pool)))) - for i, j := 0, 0; i < len(self.hashes) && j < num; i++ { - hash := self.hashes[i] - item := self.pool[string(hash)] - - if item != nil && item.block == nil { - var peer *Peer - lastFetchFailed := time.Since(item.reqAt) > 5*time.Second - - // Handle failed requests - if lastFetchFailed && item.requested > 5 && item.peer != nil { - if item.requested < 100 { - // Select peer the hash was retrieved off - peer = item.from - } else { - // Remove it - self.hashes = ethutil.DeleteFromByteSlice(self.hashes, hash) - delete(self.pool, string(hash)) - } - } else if lastFetchFailed || item.peer == nil { - // Find a suitable, available peer - eachPeer(self.eth.peers, func(p *Peer, v *list.Element) { - if peer == nil && len(dist[p]) < amount/peerLen && p.statusKnown { - peer = p - } - }) - } - - if peer != nil { - item.reqAt = time.Now() - item.peer = peer - item.requested++ - - dist[peer] = append(dist[peer], hash) - } - } - } - - for peer, hashes := range dist { - peer.FetchBlocks(hashes) - } - - if len(dist) > 0 { - self.downloadStartedAt = time.Now() - } -} - -func (self *BlockPool) Start() { - go self.downloadThread() - go self.chainThread() -} - -func (self *BlockPool) Stop() { - close(self.quit) -} - -func (self *BlockPool) downloadThread() { - serviceTimer := time.NewTicker(100 * time.Millisecond) -out: - for { - select { - case <-self.quit: - break out - case <-serviceTimer.C: - // Check if we're catching up. If not distribute the hashes to - // the peers and download the blockchain - self.fetchingHashes = false - eachPeer(self.eth.peers, func(p *Peer, v *list.Element) { - if p.statusKnown && p.FetchingHashes() { - self.fetchingHashes = true - } - }) - - if len(self.hashes) > 0 { - self.DistributeHashes() - } - - if self.ChainLength < len(self.hashes) { - self.ChainLength = len(self.hashes) - } - - if self.peer != nil && - !self.peer.doneFetchingHashes && - time.Since(self.peer.lastHashAt) > 10*time.Second && - time.Since(self.peer.lastHashRequestedAt) > 5*time.Second { - self.fetchHashes() - } - - /* - if !self.fetchingHashes { - blocks := self.Blocks() - chain.BlockBy(chain.Number).Sort(blocks) - - if len(blocks) > 0 { - if !self.eth.ChainManager().HasBlock(b.PrevHash) && self.pool[string(b.PrevHash)] == nil && !self.fetchingHashes { - } - } - } - */ - } - } -} - -func (self *BlockPool) chainThread() { - procTimer := time.NewTicker(500 * time.Millisecond) -out: - for { - select { - case <-self.quit: - break out - case <-procTimer.C: - blocks := self.Blocks() - types.BlockBy(types.Number).Sort(blocks) - - // Find common block - for i, block := range blocks { - if self.eth.ChainManager().HasBlock(block.PrevHash) { - blocks = blocks[i:] - break - } - } - - if len(blocks) > 0 { - if self.eth.ChainManager().HasBlock(blocks[0].PrevHash) { - for i, block := range blocks[1:] { - // NOTE: The Ith element in this loop refers to the previous block in - // outer "blocks" - if bytes.Compare(block.PrevHash, blocks[i].Hash()) != 0 { - blocks = blocks[:i] - - break - } - } - } else { - blocks = nil - } - } - - if len(blocks) > 0 { - chainman := self.eth.ChainManager() - - err := chainman.InsertChain(blocks) - if err != nil { - poollogger.Debugln(err) - - self.Reset() - - if self.peer != nil && self.peer.conn != nil { - poollogger.Debugf("Punishing peer for supplying bad chain (%v)\n", self.peer.conn.RemoteAddr()) - } - - // This peer gave us bad hashes and made us fetch a bad chain, therefor he shall be punished. - self.eth.BlacklistPeer(self.peer) - self.peer.StopWithReason(DiscBadPeer) - self.td = ethutil.Big0 - self.peer = nil - } - - for _, block := range blocks { - self.Remove(block.Hash()) - } - } - } - } -} diff --git a/cmd/ethereum/cmd.go b/cmd/ethereum/cmd.go index 8710d6136ed18c76d922d6c89a804a8f5f2387ae..d8b9ea48753271a24cf3d071e06ac0e529ed2958 100644 --- a/cmd/ethereum/cmd.go +++ b/cmd/ethereum/cmd.go @@ -21,9 +21,9 @@ import ( "io/ioutil" "os" - "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/cmd/ethereum/repl" "github.com/ethereum/go-ethereum/cmd/utils" + "github.com/ethereum/go-ethereum/eth" "github.com/ethereum/go-ethereum/javascript" ) diff --git a/cmd/ethereum/flags.go b/cmd/ethereum/flags.go index 783944cf25d381a185069ff1c08ef8c3d6a389ac..d27b739c36b0399c8c10841ef9adcc4989627847 100644 --- a/cmd/ethereum/flags.go +++ b/cmd/ethereum/flags.go @@ -38,7 +38,8 @@ var ( StartRpc bool StartWebSockets bool RpcPort int - UseUPnP bool + NatType string + PMPGateway string OutboundPort string ShowGenesis bool AddPeer string @@ -57,6 +58,7 @@ var ( DumpHash string DumpNumber int VmType int + ImportChain string ) // flags specific to cli client @@ -84,8 +86,9 @@ func Init() { flag.StringVar(&KeyRing, "keyring", "", "identifier for keyring to use") 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.StringVar(&NatType, "nat", "", "NAT support (UPNP|PMP) (none)") + flag.StringVar(&PMPGateway, "pmp", "", "Gateway IP for PMP") + 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") @@ -102,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 43551fb3a5dd0e94ac2d0e744e24ee45006fd212..7efee31e78ba1ac765eeb16ecd5575c5c1c1f879 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" @@ -30,7 +31,7 @@ import ( const ( ClientIdentifier = "Ethereum(G)" - Version = "0.7.9" + Version = "0.7.11" ) var clilogger = logger.NewLogger("CLI") @@ -38,6 +39,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 @@ -69,15 +74,15 @@ func main() { // create, import, export keys utils.KeyTasks(keyManager, KeyRing, GenAddr, SecretFile, ExportDir, NonInteractive) - clientIdentity := utils.NewClientIdentity(ClientIdentifier, Version, Identifier) + clientIdentity := utils.NewClientIdentity(ClientIdentifier, Version, Identifier, string(keyManager.PublicKey())) - ethereum := utils.NewEthereum(db, clientIdentity, keyManager, UseUPnP, OutboundPort, MaxPeer) + ethereum := utils.NewEthereum(db, clientIdentity, keyManager, utils.NatType(NatType, PMPGateway), OutboundPort, MaxPeer) if Dump { var block *types.Block if len(DumpHash) == 0 && DumpNumber == -1 { - block = ethereum.ChainManager().CurrentBlock + block = ethereum.ChainManager().CurrentBlock() } else if len(DumpHash) > 0 { block = ethereum.ChainManager().GetBlock(ethutil.Hex2Bytes(DumpHash)) } else { @@ -93,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()) @@ -112,6 +114,16 @@ func main() { utils.StartMining(ethereum) } + if len(ImportChain) > 0 { + start := time.Now() + err := utils.ImportChain(ethereum, ImportChain) + if err != nil { + clilogger.Infoln(err) + } + clilogger.Infoln("import done in", time.Since(start)) + return + } + // better reworked as cases if StartJsConsole { InitJsConsole(ethereum) @@ -131,5 +143,4 @@ func main() { // this blocks the thread ethereum.WaitForShutdown() - logger.Flush() } diff --git a/cmd/ethereum/repl/repl.go b/cmd/ethereum/repl/repl.go index a5146fecdc8acf5fbca2988d346e7934b19839a9..822aaa19d59a7c4ad956b6e5a44f8f60cc2710f9 100644 --- a/cmd/ethereum/repl/repl.go +++ b/cmd/ethereum/repl/repl.go @@ -24,7 +24,7 @@ import ( "os" "path" - "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/eth" "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/javascript" "github.com/ethereum/go-ethereum/logger" @@ -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/ethtest/.bowerrc b/cmd/ethtest/.bowerrc new file mode 100644 index 0000000000000000000000000000000000000000..c3a8813e8be6a2927c0e4031288a52ab0e8eafa9 --- /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 0000000000000000000000000000000000000000..60a2751d33207f404a43f55faa36bd7274ab99d7 --- /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/wire/.gitignore b/cmd/ethtest/.gitignore similarity index 77% rename from wire/.gitignore rename to cmd/ethtest/.gitignore index f725d58d14f7d1b6a8c41c45f78b4f38f529ae9e..399b6dc88230893b727b4c44b63f5d40cff4cd0b 100644 --- a/wire/.gitignore +++ b/cmd/ethtest/.gitignore @@ -4,9 +4,15 @@ # 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 0000000000000000000000000000000000000000..c0ec5f89d11ae69e316bb8fbef5c1b20d37261f3 --- /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 0000000000000000000000000000000000000000..5bbffe4fd33589399e66304aceea9478a9cc5954 --- /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 0000000000000000000000000000000000000000..fafacbd5a13e661e8c07a69d7946c87727990d5a --- /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 0000000000000000000000000000000000000000..0f187b873618b23c209f7b599d1c2907c0eaa6ea --- /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 <http://www.gnu.org/licenses/>. \ No newline at end of file diff --git a/cmd/ethtest/README.md b/cmd/ethtest/README.md new file mode 100644 index 0000000000000000000000000000000000000000..865b62c6b1a15e0b969d024abc5d69613abec935 --- /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] + +<!-- [](https://ci.testling.com/ethereum/ethereum.js) --> + +## 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 0000000000000000000000000000000000000000..cedae9023d44aaa240e4d9750dbe7244cc85a3a9 --- /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 0000000000000000000000000000000000000000..b64c15b9e27bd832e04c3a1c88bdba80ad62499a --- /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;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ +var findIndex=function(array,callback){for(var end=!1,i=0;i<array.length&&!end;i++)end=callback(array[i]);return end?i-1:-1},findMethodIndex=function(json,methodName){return findIndex(json,function(method){return method.name===methodName})},padLeft=function(number,n){return new Array(2*n-number.toString().length+1).join("0")+number},setupInputTypes=function(){var prefixedType=function(prefix){return function(type,value){var padding,expected=prefix;return 0!==type.indexOf(expected)?!1:(padding=parseInt(type.slice(expected.length))/8,padLeft(value,padding))}},namedType=function(name,padding,formatter){return function(type,value){return type!==name?!1:padLeft(formatter?value:formatter(value),padding)}},formatBool=function(value){return value?"1":"0"};return[prefixedType("uint"),prefixedType("int"),namedType("address",20),namedType("bool",1,formatBool)]},inputTypes=setupInputTypes(),toAbiInput=function(json,methodName,params){var method,i,found,j,val,bytes="",index=findMethodIndex(json,methodName);if(-1!==index){for(bytes=bytes+index+"x0",method=json[index],i=0;i<method.inputs.length;i++){for(found=!1,j=0;j<inputTypes.length&&!found;j++)val=parseInt(params[i]).toString(16),found=inputTypes[j](method.inputs[i].type,val);found||console.error("unsupported json type: "+method.inputs[i].type),bytes+=found}return bytes}},setupOutputTypes=function(){var prefixedType=function(prefix){return function(type){var padding,expected=prefix;return 0!==type.indexOf(expected)?-1:(padding=parseInt(type.slice(expected.length))/8,2*padding)}},namedType=function(name,padding){return function(type){return name===type?2*padding:-1}},formatInt=function(value){return parseInt(value,16)},formatBool=function(value){return"1"===value?!0:!1};return[{padding:prefixedType("uint"),format:formatInt},{padding:prefixedType("int"),format:formatInt},{padding:namedType("address",20)},{padding:namedType("bool",1),format:formatBool}]},outputTypes=setupOutputTypes(),fromAbiOutput=function(json,methodName,output){var result,method,i,padding,j,res,formatter,index=findMethodIndex(json,methodName);if(-1!==index){for(output=output.slice(2),result=[],method=json[index],i=0;i<method.outputs.length;i++){for(padding=-1,j=0;j<outputTypes.length&&-1===padding;j++)padding=outputTypes[j].padding(method.outputs[i].type);-1!==padding&&(res=output.slice(0,padding),formatter=outputTypes[j-1].format,result.push(formatter?formatter(res):res),output=output.slice(padding))}return result}},inputParser=function(json){var parser={};return json.forEach(function(method){parser[method.name]=function(){var params=Array.prototype.slice.call(arguments);return toAbiInput(json,method.name,params)}}),parser},outputParser=function(json){var parser={};return json.forEach(function(method){parser[method.name]=function(output){return fromAbiOutput(json,method.name,output)}}),parser};module.exports={inputParser:inputParser,outputParser:outputParser}; +},{}],2:[function(require,module,exports){ +var AutoProvider=function(userOptions){var options,self,closeWithSuccess,ws;if(!web3.haveProvider()){if(this.sendQueue=[],this.onmessageQueue=[],navigator.qt)return void(this.provider=new web3.providers.QtProvider);userOptions=userOptions||{},options={httprpc:userOptions.httprpc||"http://localhost:8080",websockets:userOptions.websockets||"ws://localhost:40404/eth"},self=this,closeWithSuccess=function(success){ws.close(),success?self.provider=new web3.providers.WebSocketProvider(options.websockets):(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})},ws=new WebSocket(options.websockets),ws.onopen=function(){closeWithSuccess(!0)},ws.onerror=function(){closeWithSuccess(!1)}}};AutoProvider.prototype.send=function(payload){return this.provider?void this.provider.send(payload):void this.sendQueue.push(payload)},Object.defineProperty(AutoProvider.prototype,"onmessage",{set:function(handler){return this.provider?void(this.provider.onmessage=handler):void this.onmessageQueue.push(handler)}}),module.exports=AutoProvider; +},{}],3:[function(require,module,exports){ +var abi,contract;abi=require("./abi"),contract=function(address,desc){var inputParser=abi.inputParser(desc),outputParser=abi.outputParser(desc),contract={};return desc.forEach(function(method){contract[method.name]=function(){var params=Array.prototype.slice.call(arguments),parsed=inputParser[method.name].apply(null,params),onSuccess=function(result){return outputParser[method.name](result)};return{call:function(extra){return extra=extra||{},extra.to=address,extra.data=parsed,web3.eth.call(extra).then(onSuccess)},transact:function(extra){return extra=extra||{},extra.to=address,extra.data=parsed,web3.eth.transact(extra).then(onSuccess)}}}}),contract},module.exports=contract; +},{"./abi":1}],4:[function(require,module,exports){ +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}}var HttpRpcProvider=function(host){this.handlers=[],this.host=host};HttpRpcProvider.prototype.sendRequest=function(payload,cb){var data=formatJsonRpcObject(payload),request=new XMLHttpRequest;request.open("POST",this.host,!0),request.send(JSON.stringify(data)),request.onreadystatechange=function(){4===request.readyState&&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);!parsed.error&&(parsed.result instanceof Array?0!==parsed.result.length:parsed.result)&&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){ +function flattenPromise(obj){return obj instanceof Promise?Promise.resolve(obj):obj instanceof Array?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)})}):obj instanceof Object?new Promise(function(resolve){var keys=Object.keys(obj),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)})}):Promise.resolve(obj)}function messageHandler(data){if(void 0!==data._event)return void web3.trigger(data._event,data._id,data.data);if(data._id){var cb=web3._callbacks[data._id];cb&&(cb.call(this,data.error,data.data),delete web3._callbacks[data._id])}}var ethWatch,shhWatch,ProviderManager,Filter,ethMethods=function(){var blockCall=function(args){return"string"==typeof args[0]?"eth_blockByHash":"eth_blockByNumber"},transactionCall=function(args){return"string"==typeof args[0]?"eth_transactionByHash":"eth_transactionByNumber"},uncleCall=function(args){return"string"==typeof args[0]?"eth_uncleByHash":"eth_uncleByNumber"},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},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"}]},dbMethods=function(){return[{name:"put",call:"db_put"},{name:"get",call:"db_get"},{name:"putString",call:"db_putString"},{name:"getString",call:"db_getString"}]},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"}]},ethWatchMethods=function(){var newFilter=function(args){return"string"==typeof args[0]?"eth_newFilterString":"eth_newFilter"};return[{name:"newFilter",call:newFilter},{name:"uninstallFilter",call:"eth_uninstallFilter"},{name:"getMessages",call:"eth_filterLogs"}]},shhWatchMethods=function(){return[{name:"newFilter",call:"shh_newFilter"},{name:"uninstallFilter",call:"shh_uninstallFilter"},{name:"getMessage",call:"shh_getMessages"}]},setupMethods=function(obj,methods){methods.forEach(function(method){obj[method.name]=function(){return flattenPromise(Array.prototype.slice.call(arguments)).then(function(args){var call="function"==typeof method.call?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){return err?void reject(err):void resolve(result)})})}).catch(function(err){console.error(err)})}})},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){return err?void reject(err):void resolve(result)})})},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){return err?void reject(err):void resolve(result)})})}).catch(function(err){console.error(err)})}),Object.defineProperty(obj,property.name,proto)})},web3={_callbacks:{},_events:{},providers:{},toHex:function(str){var i,n,hex="";for(i=0;i<str.length;i++)n=str.charCodeAt(i).toString(16),hex+=n.length<2?"0"+n:n;return hex},toAscii:function(hex){var code,str="",i=0,l=hex.length;for("0x"===hex.substring(0,2)&&(i=2);l>i&&(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;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()},module.exports=web3; +},{}],6:[function(require,module,exports){ +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; +},{}],7:[function(require,module,exports){ +var WebSocketProvider=function(host){this.handlers=[],this.queued=[],this.ready=!1,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=!0;for(var i=0;i<self.queued.length;i++)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/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; +},{"./lib/autoprovider":2,"./lib/contract":3,"./lib/httprpc":4,"./lib/main":5,"./lib/qt":6,"./lib/websocket":7}]},{},[]) + + +//# sourceMappingURL=ethereum.js.map \ No newline at end of file diff --git a/cmd/ethtest/dist/ethereum.js.map b/cmd/ethtest/dist/ethereum.js.map new file mode 100644 index 0000000000000000000000000000000000000000..b544cab530c1c7cc08b73d7667722f98bc90cf61 --- /dev/null +++ b/cmd/ethtest/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/main.js", + "lib/qt.js", + "lib/websocket.js", + "index.js" + ], + "names": [], + "mappings": "AAAA;ACAA;;ACAA;;ACAA;;ACAA;;ACAA;;ACAA;;ACAA;;ACAA", + "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<r.length;o++)s(r[o]);return s})", + "var findIndex=function(array,callback){for(var end=!1,i=0;i<array.length&&!end;i++)end=callback(array[i]);return end?i-1:-1},findMethodIndex=function(json,methodName){return findIndex(json,function(method){return method.name===methodName})},padLeft=function(number,n){return new Array(2*n-number.toString().length+1).join(\"0\")+number},setupInputTypes=function(){var prefixedType=function(prefix){return function(type,value){var padding,expected=prefix;return 0!==type.indexOf(expected)?!1:(padding=parseInt(type.slice(expected.length))/8,padLeft(value,padding))}},namedType=function(name,padding,formatter){return function(type,value){return type!==name?!1:padLeft(formatter?value:formatter(value),padding)}},formatBool=function(value){return value?\"1\":\"0\"};return[prefixedType(\"uint\"),prefixedType(\"int\"),namedType(\"address\",20),namedType(\"bool\",1,formatBool)]},inputTypes=setupInputTypes(),toAbiInput=function(json,methodName,params){var method,i,found,j,val,bytes=\"\",index=findMethodIndex(json,methodName);if(-1!==index){for(bytes=bytes+index+\"x0\",method=json[index],i=0;i<method.inputs.length;i++){for(found=!1,j=0;j<inputTypes.length&&!found;j++)val=parseInt(params[i]).toString(16),found=inputTypes[j](method.inputs[i].type,val);found||console.error(\"unsupported json type: \"+method.inputs[i].type),bytes+=found}return bytes}},setupOutputTypes=function(){var prefixedType=function(prefix){return function(type){var padding,expected=prefix;return 0!==type.indexOf(expected)?-1:(padding=parseInt(type.slice(expected.length))/8,2*padding)}},namedType=function(name,padding){return function(type){return name===type?2*padding:-1}},formatInt=function(value){return parseInt(value,16)},formatBool=function(value){return\"1\"===value?!0:!1};return[{padding:prefixedType(\"uint\"),format:formatInt},{padding:prefixedType(\"int\"),format:formatInt},{padding:namedType(\"address\",20)},{padding:namedType(\"bool\",1),format:formatBool}]},outputTypes=setupOutputTypes(),fromAbiOutput=function(json,methodName,output){var result,method,i,padding,j,res,formatter,index=findMethodIndex(json,methodName);if(-1!==index){for(output=output.slice(2),result=[],method=json[index],i=0;i<method.outputs.length;i++){for(padding=-1,j=0;j<outputTypes.length&&-1===padding;j++)padding=outputTypes[j].padding(method.outputs[i].type);-1!==padding&&(res=output.slice(0,padding),formatter=outputTypes[j-1].format,result.push(formatter?formatter(res):res),output=output.slice(padding))}return result}},inputParser=function(json){var parser={};return json.forEach(function(method){parser[method.name]=function(){var params=Array.prototype.slice.call(arguments);return toAbiInput(json,method.name,params)}}),parser},outputParser=function(json){var parser={};return json.forEach(function(method){parser[method.name]=function(output){return fromAbiOutput(json,method.name,output)}}),parser};module.exports={inputParser:inputParser,outputParser:outputParser};", + "var AutoProvider=function(userOptions){var options,self,closeWithSuccess,ws;if(!web3.haveProvider()){if(this.sendQueue=[],this.onmessageQueue=[],navigator.qt)return void(this.provider=new web3.providers.QtProvider);userOptions=userOptions||{},options={httprpc:userOptions.httprpc||\"http://localhost:8080\",websockets:userOptions.websockets||\"ws://localhost:40404/eth\"},self=this,closeWithSuccess=function(success){ws.close(),success?self.provider=new web3.providers.WebSocketProvider(options.websockets):(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})},ws=new WebSocket(options.websockets),ws.onopen=function(){closeWithSuccess(!0)},ws.onerror=function(){closeWithSuccess(!1)}}};AutoProvider.prototype.send=function(payload){return this.provider?void this.provider.send(payload):void this.sendQueue.push(payload)},Object.defineProperty(AutoProvider.prototype,\"onmessage\",{set:function(handler){return this.provider?void(this.provider.onmessage=handler):void this.onmessageQueue.push(handler)}}),module.exports=AutoProvider;", + "var abi,contract;abi=require(\"./abi\"),contract=function(address,desc){var inputParser=abi.inputParser(desc),outputParser=abi.outputParser(desc),contract={};return desc.forEach(function(method){contract[method.name]=function(){var params=Array.prototype.slice.call(arguments),parsed=inputParser[method.name].apply(null,params),onSuccess=function(result){return outputParser[method.name](result)};return{call:function(extra){return extra=extra||{},extra.to=address,extra.data=parsed,web3.eth.call(extra).then(onSuccess)},transact:function(extra){return extra=extra||{},extra.to=address,extra.data=parsed,web3.eth.transact(extra).then(onSuccess)}}}}),contract},module.exports=contract;", + "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}}var HttpRpcProvider=function(host){this.handlers=[],this.host=host};HttpRpcProvider.prototype.sendRequest=function(payload,cb){var data=formatJsonRpcObject(payload),request=new XMLHttpRequest;request.open(\"POST\",this.host,!0),request.send(JSON.stringify(data)),request.onreadystatechange=function(){4===request.readyState&&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);!parsed.error&&(parsed.result instanceof Array?0!==parsed.result.length:parsed.result)&&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;", + "function flattenPromise(obj){return obj instanceof Promise?Promise.resolve(obj):obj instanceof Array?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)})}):obj instanceof Object?new Promise(function(resolve){var keys=Object.keys(obj),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)})}):Promise.resolve(obj)}function messageHandler(data){if(void 0!==data._event)return void web3.trigger(data._event,data._id,data.data);if(data._id){var cb=web3._callbacks[data._id];cb&&(cb.call(this,data.error,data.data),delete web3._callbacks[data._id])}}var ethWatch,shhWatch,ProviderManager,Filter,ethMethods=function(){var blockCall=function(args){return\"string\"==typeof args[0]?\"eth_blockByHash\":\"eth_blockByNumber\"},transactionCall=function(args){return\"string\"==typeof args[0]?\"eth_transactionByHash\":\"eth_transactionByNumber\"},uncleCall=function(args){return\"string\"==typeof args[0]?\"eth_uncleByHash\":\"eth_uncleByNumber\"},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},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\"}]},dbMethods=function(){return[{name:\"put\",call:\"db_put\"},{name:\"get\",call:\"db_get\"},{name:\"putString\",call:\"db_putString\"},{name:\"getString\",call:\"db_getString\"}]},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\"}]},ethWatchMethods=function(){var newFilter=function(args){return\"string\"==typeof args[0]?\"eth_newFilterString\":\"eth_newFilter\"};return[{name:\"newFilter\",call:newFilter},{name:\"uninstallFilter\",call:\"eth_uninstallFilter\"},{name:\"getMessages\",call:\"eth_filterLogs\"}]},shhWatchMethods=function(){return[{name:\"newFilter\",call:\"shh_newFilter\"},{name:\"uninstallFilter\",call:\"shh_uninstallFilter\"},{name:\"getMessage\",call:\"shh_getMessages\"}]},setupMethods=function(obj,methods){methods.forEach(function(method){obj[method.name]=function(){return flattenPromise(Array.prototype.slice.call(arguments)).then(function(args){var call=\"function\"==typeof method.call?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){return err?void reject(err):void resolve(result)})})}).catch(function(err){console.error(err)})}})},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){return err?void reject(err):void resolve(result)})})},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){return err?void reject(err):void resolve(result)})})}).catch(function(err){console.error(err)})}),Object.defineProperty(obj,property.name,proto)})},web3={_callbacks:{},_events:{},providers:{},toHex:function(str){var i,n,hex=\"\";for(i=0;i<str.length;i++)n=str.charCodeAt(i).toString(16),hex+=n.length<2?\"0\"+n:n;return hex},toAscii:function(hex){var code,str=\"\",i=0,l=hex.length;for(\"0x\"===hex.substring(0,2)&&(i=2);l>i&&(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;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()},module.exports=web3;", + "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;", + "var WebSocketProvider=function(host){this.handlers=[],this.queued=[],this.ready=!1,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=!0;for(var i=0;i<self.queued.length;i++)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;", + "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;" + ] +} \ No newline at end of file diff --git a/cmd/ethtest/dist/ethereum.min.js b/cmd/ethtest/dist/ethereum.min.js new file mode 100644 index 0000000000000000000000000000000000000000..38ce01aa846934cd9f259c9b5dc105dce1a3983a --- /dev/null +++ b/cmd/ethtest/dist/ethereum.min.js @@ -0,0 +1 @@ +require=function t(e,n,r){function o(s,a){if(!n[s]){if(!e[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(i)return i(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[s]={exports:{}};e[s][0].call(l.exports,function(t){var n=e[s][1][t];return o(n?n:t)},l,l.exports,t,e,n,r)}return n[s].exports}for(var i="function"==typeof require&&require,s=0;s<r.length;s++)o(r[s]);return o}({1:[function(t,e){var n=function(t,e){for(var n=!1,r=0;r<t.length&&!n;r++)n=e(t[r]);return n?r-1:-1},r=function(t,e){return n(t,function(t){return t.name===e})},o=function(t,e){return new Array(2*e-t.toString().length+1).join("0")+t},i=function(){var t=function(t){return function(e,n){var r,i=t;return 0!==e.indexOf(i)?!1:(r=parseInt(e.slice(i.length))/8,o(n,r))}},e=function(t,e,n){return function(r,i){return r!==t?!1:o(n?i:n(i),e)}},n=function(t){return t?"1":"0"};return[t("uint"),t("int"),e("address",20),e("bool",1,n)]},s=i(),a=function(t,e,n){var o,i,a,u,c,l="",h=r(t,e);if(-1!==h){for(l=l+h+"x0",o=t[h],i=0;i<o.inputs.length;i++){for(a=!1,u=0;u<s.length&&!a;u++)c=parseInt(n[i]).toString(16),a=s[u](o.inputs[i].type,c);a||console.error("unsupported json type: "+o.inputs[i].type),l+=a}return l}},u=function(){var t=function(t){return function(e){var n,r=t;return 0!==e.indexOf(r)?-1:(n=parseInt(e.slice(r.length))/8,2*n)}},e=function(t,e){return function(n){return t===n?2*e:-1}},n=function(t){return parseInt(t,16)},r=function(t){return"1"===t?!0:!1};return[{padding:t("uint"),format:n},{padding:t("int"),format:n},{padding:e("address",20)},{padding:e("bool",1),format:r}]},c=u(),l=function(t,e,n){var o,i,s,a,u,l,h,p=r(t,e);if(-1!==p){for(n=n.slice(2),o=[],i=t[p],s=0;s<i.outputs.length;s++){for(a=-1,u=0;u<c.length&&-1===a;u++)a=c[u].padding(i.outputs[s].type);-1!==a&&(l=n.slice(0,a),h=c[u-1].format,o.push(h?h(l):l),n=n.slice(a))}return o}},h=function(t){var e={};return t.forEach(function(n){e[n.name]=function(){var e=Array.prototype.slice.call(arguments);return a(t,n.name,e)}}),e},p=function(t){var e={};return t.forEach(function(n){e[n.name]=function(e){return l(t,n.name,e)}}),e};e.exports={inputParser:h,outputParser:p}},{}],2:[function(t,e){var n=function(t){var e,n,r,o;if(!web3.haveProvider()){if(this.sendQueue=[],this.onmessageQueue=[],navigator.qt)return void(this.provider=new web3.providers.QtProvider);t=t||{},e={httprpc:t.httprpc||"http://localhost:8080",websockets:t.websockets||"ws://localhost:40404/eth"},n=this,r=function(t){o.close(),t?n.provider=new web3.providers.WebSocketProvider(e.websockets):(n.provider=new web3.providers.HttpRpcProvider(e.httprpc),n.poll=n.provider.poll.bind(n.provider)),n.sendQueue.forEach(function(t){n.provider(t)}),n.onmessageQueue.forEach(function(t){n.provider.onmessage=t})},o=new WebSocket(e.websockets),o.onopen=function(){r(!0)},o.onerror=function(){r(!1)}}};n.prototype.send=function(t){return this.provider?void this.provider.send(t):void this.sendQueue.push(t)},Object.defineProperty(n.prototype,"onmessage",{set:function(t){return this.provider?void(this.provider.onmessage=t):void this.onmessageQueue.push(t)}}),e.exports=n},{}],3:[function(t,e){var n,r;n=t("./abi"),r=function(t,e){var r=n.inputParser(e),o=n.outputParser(e),i={};return e.forEach(function(e){i[e.name]=function(){var n=Array.prototype.slice.call(arguments),i=r[e.name].apply(null,n),s=function(t){return o[e.name](t)};return{call:function(e){return e=e||{},e.to=t,e.data=i,web3.eth.call(e).then(s)},transact:function(e){return e=e||{},e.to=t,e.data=i,web3.eth.transact(e).then(s)}}}}),i},e.exports=r},{"./abi":1}],4:[function(t,e){function n(t){return{jsonrpc:"2.0",method:t.call,params:t.args,id:t._id}}function r(t){var e=JSON.parse(t);return{_id:e.id,data:e.result,error:e.error}}var o=function(t){this.handlers=[],this.host=t};o.prototype.sendRequest=function(t,e){var r=n(t),o=new XMLHttpRequest;o.open("POST",this.host,!0),o.send(JSON.stringify(r)),o.onreadystatechange=function(){4===o.readyState&&e&&e(o)}},o.prototype.send=function(t){var e=this;this.sendRequest(t,function(t){e.handlers.forEach(function(n){n.call(e,r(t.responseText))})})},o.prototype.poll=function(t,e){var n=this;this.sendRequest(t,function(r){var o=JSON.parse(r.responseText);!o.error&&(o.result instanceof Array?0!==o.result.length:o.result)&&n.handlers.forEach(function(r){r.call(n,{_event:t.call,_id:e,data:o.result})})})},Object.defineProperty(o.prototype,"onmessage",{set:function(t){this.handlers.push(t)}}),e.exports=o},{}],5:[function(t,e){function n(t){return t instanceof Promise?Promise.resolve(t):t instanceof Array?new Promise(function(e){var r=t.map(function(t){return n(t)});return Promise.all(r).then(function(n){for(var r=0;r<t.length;r++)t[r]=n[r];e(t)})}):t instanceof Object?new Promise(function(e){var r=Object.keys(t),o=r.map(function(e){return n(t[e])});return Promise.all(o).then(function(n){for(var o=0;o<r.length;o++)t[r[o]]=n[o];e(t)})}):Promise.resolve(t)}function r(t){if(void 0!==t._event)return void g.trigger(t._event,t._id,t.data);if(t._id){var e=g._callbacks[t._id];e&&(e.call(this,t.error,t.data),delete g._callbacks[t._id])}}var o,i,s,a,u=function(){var t=function(t){return"string"==typeof t[0]?"eth_blockByHash":"eth_blockByNumber"},e=function(t){return"string"==typeof t[0]?"eth_transactionByHash":"eth_transactionByNumber"},n=function(t){return"string"==typeof t[0]?"eth_uncleByHash":"eth_uncleByNumber"},r=[{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:t},{name:"transaction",call:e},{name:"uncle",call:n},{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 r},c=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"}]},l=function(){return[{name:"put",call:"db_put"},{name:"get",call:"db_get"},{name:"putString",call:"db_putString"},{name:"getString",call:"db_getString"}]},h=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"}]},p=function(){var t=function(t){return"string"==typeof t[0]?"eth_newFilterString":"eth_newFilter"};return[{name:"newFilter",call:t},{name:"uninstallFilter",call:"eth_uninstallFilter"},{name:"getMessages",call:"eth_filterLogs"}]},d=function(){return[{name:"newFilter",call:"shh_newFilter"},{name:"uninstallFilter",call:"shh_uninstallFilter"},{name:"getMessage",call:"shh_getMessages"}]},f=function(t,e){e.forEach(function(e){t[e.name]=function(){return n(Array.prototype.slice.call(arguments)).then(function(t){var n="function"==typeof e.call?e.call(t):e.call;return{call:n,args:t}}).then(function(t){return new Promise(function(e,n){g.provider.send(t,function(t,r){return t?void n(t):void e(r)})})}).catch(function(t){console.error(t)})}})},v=function(t,e){e.forEach(function(e){var r={};r.get=function(){return new Promise(function(t,n){g.provider.send({call:e.getter},function(e,r){return e?void n(e):void t(r)})})},e.setter&&(r.set=function(t){return n([t]).then(function(t){return new Promise(function(n){g.provider.send({call:e.setter,args:t},function(t,e){return t?void reject(t):void n(e)})})}).catch(function(t){console.error(t)})}),Object.defineProperty(t,e.name,r)})},g={_callbacks:{},_events:{},providers:{},toHex:function(t){var e,n,r="";for(e=0;e<t.length;e++)n=t.charCodeAt(e).toString(16),r+=n.length<2?"0"+n:n;return r},toAscii:function(t){var e,n="",r=0,o=t.length;for("0x"===t.substring(0,2)&&(r=2);o>r&&(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<this.callbacks.length;e++)this.callbacks[e].call(this,t)},a.prototype.uninstall=function(){var t=this;this.promise.then(function(e){t.impl.uninstallFilter(e),g.provider.stopPolling(e),g.off(impl.changed,e)})},a.prototype.messages=function(){var t=this;return this.promise.then(function(e){return t.impl.getMessages(e)})},a.prototype.logs=function(){return this.messages()},e.exports=g},{}],6:[function(t,e){var n=function(){this.handlers=[];var t=this;navigator.qt.onmessage=function(e){t.handlers.forEach(function(n){n.call(t,JSON.parse(e.data))})}};n.prototype.send=function(t){navigator.qt.postMessage(JSON.stringify(t))},Object.defineProperty(n.prototype,"onmessage",{set:function(t){this.handlers.push(t)}}),e.exports=n},{}],7:[function(t,e){var n=function(t){this.handlers=[],this.queued=[],this.ready=!1,this.ws=new WebSocket(t);var e=this;this.ws.onmessage=function(t){for(var n=0;n<e.handlers.length;n++)e.handlers[n].call(e,JSON.parse(t.data),t)},this.ws.onopen=function(){e.ready=!0;for(var t=0;t<e.queued.length;t++)e.send(e.queued[t])}};n.prototype.send=function(t){if(this.ready){var e=JSON.stringify(t);this.ws.send(e)}else this.queued.push(t)},n.prototype.onMessage=function(t){this.handlers.push(t)},n.prototype.unload=function(){this.ws.close()},Object.defineProperty(n.prototype,"onmessage",{set:function(t){this.onMessage(t)}}),e.exports=n},{}],web3:[function(t,e){var n=t("./lib/main");n.providers.WebSocketProvider=t("./lib/websocket"),n.providers.HttpRpcProvider=t("./lib/httprpc"),n.providers.QtProvider=t("./lib/qt"),n.providers.AutoProvider=t("./lib/autoprovider"),n.contract=t("./lib/contract"),e.exports=n},{"./lib/autoprovider":2,"./lib/contract":3,"./lib/httprpc":4,"./lib/main":5,"./lib/qt":6,"./lib/websocket":7}]},{},[]); \ No newline at end of file diff --git a/cmd/ethtest/example/contract.html b/cmd/ethtest/example/contract.html new file mode 100644 index 0000000000000000000000000000000000000000..44f0b03a1986317f232cdb8e0b90d567fb166e16 --- /dev/null +++ b/cmd/ethtest/example/contract.html @@ -0,0 +1,75 @@ +<!doctype> +<html> + +<head> +<script type="text/javascript" src="js/es6-promise/promise.min.js"></script> +<script type="text/javascript" src="../dist/ethereum.js"></script> +<script type="text/javascript"> + + var web3 = require('web3'); + web3.setProvider(new web3.providers.AutoProvider()); + + // solidity source code + var source = "" + + "contract test {\n" + + " function multiply(uint a) returns(uint d) {\n" + + " return a * 7;\n" + + " }\n" + + "}\n"; + + // contract description, this will be autogenerated somehow + var desc = [{ + "name": "multiply", + "inputs": [ + { + "name": "a", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "d", + "type": "uint256" + } + ] + }]; + + var contract; + + function createExampleContract() { + // hide create button + document.getElementById('create').style.visibility = 'hidden'; + document.getElementById('source').innerText = source; + + // create contract + web3.eth.transact({code: web3.eth.solidity(source)}).then(function (address) { + contract = web3.contract(address, desc); + document.getElementById('call').style.visibility = 'visible'; + }); + } + + function callExampleContract() { + // this should be generated by ethereum + var param = document.getElementById('value').value; + + // call the contract + contract.multiply(param).call().then(function(res) { + document.getElementById('result').innerText = res[0]; + }); + } + +</script> +</head> +<body> + <h1>contract</h1> + <div id="source"></div> + <div id='create'> + <button type="button" onClick="createExampleContract();">create example contract</button> + </div> + <div id='call' style='visibility: hidden;'> + <input type="number" id="value" onkeyup='callExampleContract()'></input> + </div> + <div id="result"></div> +</body> +</html> + diff --git a/cmd/ethtest/example/index.html b/cmd/ethtest/example/index.html new file mode 100644 index 0000000000000000000000000000000000000000..d0bf094ef2f23156d9580cb6a4098c44c9242704 --- /dev/null +++ b/cmd/ethtest/example/index.html @@ -0,0 +1,41 @@ +<!doctype> +<html> + +<head> +<script type="text/javascript" src="js/es6-promise/promise.min.js"></script> +<script type="text/javascript" src="../dist/ethereum.js"></script> +<script type="text/javascript"> + + var web3 = require('web3'); + web3.setProvider(new web3.providers.AutoProvider()); + + function watchBalance() { + var coinbase = web3.eth.coinbase; + var originalBalance = 0; + + web3.eth.balanceAt(coinbase).then(function (balance) { + originalBalance = web3.toDecimal(balance); + document.getElementById('original').innerText = 'original balance: ' + originalBalance + ' watching...'; + }); + + web3.eth.watch({altered: coinbase}).changed(function() { + web3.eth.balanceAt(coinbase).then(function (balance) { + var currentBalance = web3.toDecimal(balance); + document.getElementById("current").innerText = 'current: ' + currentBalance; + document.getElementById("diff").innerText = 'diff: ' + (currentBalance - originalBalance); + }); + }); + } + +</script> +</head> +<body> + <h1>coinbase balance</h1> + <button type="button" onClick="watchBalance();">watch balance</button> + <div></div> + <div id="original"></div> + <div id="current"></div> + <div id="diff"></div> +</body> +</html> + diff --git a/cmd/ethtest/example/node-app.js b/cmd/ethtest/example/node-app.js new file mode 100644 index 0000000000000000000000000000000000000000..f63fa9115ff439525848a38f54eca94b41076adb --- /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 0000000000000000000000000000000000000000..9e0717d8b123992b82ce4b9ebfd813669f0fbac2 --- /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 0000000000000000000000000000000000000000..c2de7e735e116903c0cbb97ba7f0ae45ef5d70b6 --- /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 0000000000000000000000000000000000000000..d5e47597e49ba87b4632a647a1eea43ca6656f37 --- /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 0000000000000000000000000000000000000000..2cff503d3840d6fe599fac86d3cfac600acc8e34 --- /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 <http://www.gnu.org/licenses/>. +*/ +/** @file abi.js + * @authors: + * Marek Kotewicz <marek@ethdev.com> + * Gav Wood <g@ethdev.com> + * @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 0000000000000000000000000000000000000000..bfbc3ab6e1ef3d983f0f7c12c400d0ddb4d67a4e --- /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 <http://www.gnu.org/licenses/>. +*/ +/** @file autoprovider.js + * @authors: + * Marek Kotewicz <marek@ethdev.com> + * Marian Oancea <marian@ethdev.com> + * @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 0000000000000000000000000000000000000000..17b077484bae50237848aa5754de35eef07a7c34 --- /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 <http://www.gnu.org/licenses/>. +*/ +/** @file contract.js + * @authors: + * Marek Kotewicz <marek@ethdev.com> + * @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 0000000000000000000000000000000000000000..ee6b5c30705f3391a91b64f1450f4a9b50fb71dc --- /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 <http://www.gnu.org/licenses/>. +*/ +/** @file httprpc.js + * @authors: + * Marek Kotewicz <marek@ethdev.com> + * Marian Oancea <marian@ethdev.com> + * @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 0000000000000000000000000000000000000000..59c60cfa816cec77ba05d75ce32cd2f9ea342491 --- /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 <http://www.gnu.org/licenses/>. +*/ +/** @file main.js + * @authors: + * Jeffrey Wilcke <jeff@ethdev.com> + * Marek Kotewicz <marek@ethdev.com> + * Marian Oancea <marian@ethdev.com> + * Gav Wood <g@ethdev.com> + * @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 0000000000000000000000000000000000000000..f022395476e4fbc7d84e367eac35934915e07f49 --- /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 <http://www.gnu.org/licenses/>. +*/ +/** @file qt.js + * @authors: + * Jeffrey Wilcke <jeff@ethdev.com> + * Marek Kotewicz <marek@ethdev.com> + * @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 0000000000000000000000000000000000000000..24a0725313fb4811e4ebcb00938bcc6025aabf33 --- /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 <http://www.gnu.org/licenses/>. +*/ +/** @file websocket.js + * @authors: + * Jeffrey Wilcke <jeff@ethdev.com> + * Marek Kotewicz <marek@ethdev.com> + * Marian Oancea <marian@ethdev.com> + * @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/main.go b/cmd/ethtest/main.go index 94ab779dbad455d6a02a3bf027233df3c8e82196..96ef94e4018740c82295f8b046bfd17496402630 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/cmd/ethtest/package.json b/cmd/ethtest/package.json new file mode 100644 index 0000000000000000000000000000000000000000..24141ea2e40d5a9c24a4810cae4ea32e59fa53bb --- /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" +} diff --git a/cmd/evm/main.go b/cmd/evm/main.go index c6c986a04ae5a5702660e43692d6ce1886327826..66bba72893cd694dc0de60065e0b5189017cf2e3 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)) @@ -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) { diff --git a/cmd/mist/assets/qml/webapp.qml b/cmd/mist/assets/qml/browser.qml similarity index 92% rename from cmd/mist/assets/qml/webapp.qml rename to cmd/mist/assets/qml/browser.qml index bd7399dc9b23e3d387b56ec2174ba3e212d26d72..abaab4f15c572af2f557a66b01f8d7fbdfa361b5 100644 --- a/cmd/mist/assets/qml/webapp.qml +++ b/cmd/mist/assets/qml/browser.qml @@ -66,7 +66,11 @@ Rectangle { 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 { @@ -327,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]; } //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) @@ -348,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/main.qml b/cmd/mist/assets/qml/main.qml index 9f1f214a6f459ec3e6225f4eb6183d0ea5b4c3c7..06a7bc2a8ed9b8385a730e8682681a174aa824d4 100644 --- a/cmd/mist/assets/qml/main.qml +++ b/cmd/mist/assets/qml/main.qml @@ -45,11 +45,12 @@ 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}); addPlugin("./views/transaction.qml", {noAdd: true, close: false, section: "legacy"}); + addPlugin("./views/whisper.qml", {noAdd: true, close: false, section: "legacy"}); addPlugin("./views/chain.qml", {noAdd: true, close: false, section: "legacy"}); addPlugin("./views/pending_tx.qml", {noAdd: true, close: false, section: "legacy"}); addPlugin("./views/info.qml", {noAdd: true, close: false, section: "legacy"}); @@ -786,8 +787,8 @@ ApplicationWindow { title: "About" minimumWidth: 350 maximumWidth: 350 - maximumHeight: 200 - minimumHeight: 200 + maximumHeight: 280 + minimumHeight: 280 Image { id: aboutIcon @@ -797,7 +798,7 @@ ApplicationWindow { smooth: true source: "../facet.png" x: 10 - y: 10 + y: 30 } Text { @@ -806,7 +807,7 @@ ApplicationWindow { anchors.top: parent.top anchors.topMargin: 30 font.pointSize: 12 - text: "<h2>Mist (0.6.5)</h2><h4>Amalthea</h4><br><h3>Development</h3>Jeffrey Wilcke<br>Viktor Trón<br><h3>Building</h3>Maran Hidskes" + text: "<h2>Mist (0.7.10)</h2><br><h3>Development</h3>Jeffrey Wilcke<br>Viktor Trón<br>Felix Lange<br>Taylor Gerring<br>Daniel Nagy<br><h3>UX</h3>Alex van de Sande<br>" } } diff --git a/cmd/mist/assets/qml/views/whisper.qml b/cmd/mist/assets/qml/views/whisper.qml new file mode 100644 index 0000000000000000000000000000000000000000..56c4f1b070ac18c798bea7deb9d420b1b3a5e4cc --- /dev/null +++ b/cmd/mist/assets/qml/views/whisper.qml @@ -0,0 +1,76 @@ + +import QtQuick 2.0 +import QtQuick.Controls 1.0; +import QtQuick.Layouts 1.0; +import QtQuick.Dialogs 1.0; +import QtQuick.Window 2.1; +import QtQuick.Controls.Styles 1.1 +import Ethereum 1.0 + +Rectangle { + id: root + property var title: "Whisper Traffic" + property var iconSource: "../facet.png" + property var menuItem + + objectName: "whisperView" + anchors.fill: parent + + property var identity: "" + Component.onCompleted: { + identity = shh.newIdentity() + console.log("New identity:", identity) + + var t = shh.watch({}, root) + } + + function onShhMessage(message, i) { + whisperModel.insert(0, {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" + } + TextField { + id: data + placeholderText: "Data" + } + TextField { + id: topics + placeholderText: "topic1, topic2, topic3, ..." + } + Button { + text: "Send" + onClicked: { + shh.post([eth.toHex(data.text)], "", identity, topics.text.split(","), 500, 50) + } + } + } + + TableView { + id: txTableView + anchors { + top: input.bottom + topMargin: 10 + bottom: parent.bottom + left: parent.left + right: parent.right + } + TableViewColumn{ id: fromRole; role: "from" ; title: "From"; width: 300 } + TableViewColumn{ role: "payload" ; title: "Payload" ; width: parent.width - fromRole.width - 2 } + + model: ListModel { + id: whisperModel + } + } +} diff --git a/cmd/mist/debugger.go b/cmd/mist/debugger.go index d7c584eab83e316e17af8343e44688796233588f..a7a286e2359585ebb1d91fead174f42791dfc21c 100644 --- a/cmd/mist/debugger.go +++ b/cmd/mist/debugger.go @@ -149,7 +149,7 @@ func (self *DebuggerWindow) Debug(valueStr, gasStr, gasPriceStr, scriptStr, data self.SetAsm(script) - block := self.lib.eth.ChainManager().CurrentBlock + block := self.lib.eth.ChainManager().CurrentBlock() env := utils.NewEnv(statedb, block, account.Address(), value) diff --git a/cmd/mist/flags.go b/cmd/mist/flags.go index 2ae0a0487145316e7c5bb87e008e6b051d9dcd8d..fcee28f19b57a2be83010d9853b4275cd12c6c8b 100644 --- a/cmd/mist/flags.go +++ b/cmd/mist/flags.go @@ -36,10 +36,12 @@ var ( Identifier string KeyRing string KeyStore string + PMPGateway string StartRpc bool StartWebSockets bool RpcPort int UseUPnP bool + NatType string OutboundPort string ShowGenesis bool AddPeer string @@ -104,17 +106,19 @@ 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") flag.BoolVar(&NonInteractive, "y", false, "non-interactive mode (say yes to confirmations)") flag.BoolVar(&UseSeed, "seed", true, "seed peers") flag.BoolVar(&GenAddr, "genaddr", false, "create a new priv/pub key") + flag.StringVar(&NatType, "nat", "", "NAT support (UPNP|PMP) (none)") 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") flag.StringVar(&LogFile, "logfile", "", "log file (defaults to standard output)") flag.StringVar(&Datadir, "datadir", defaultDataDir(), "specifies the datadir to use") + flag.StringVar(&PMPGateway, "pmp", "", "Gateway IP for PMP") flag.StringVar(&ConfigFile, "conf", defaultConfigFile, "config file") flag.StringVar(&DebugFile, "debug", "", "debug file (no debugging if not set)") flag.IntVar(&LogLevel, "loglevel", int(logger.InfoLevel), "loglevel: 0-5: silent,error,warn,info,debug,debug detail)") diff --git a/cmd/mist/gui.go b/cmd/mist/gui.go index fe066e9945585dc5c16725523a7252fc3ccb7919..e5e18bbaa80d3c34fb01d08e6262d9a4f2cb7d6c 100644 --- a/cmd/mist/gui.go +++ b/cmd/mist/gui.go @@ -30,50 +30,19 @@ import ( "strings" "time" - "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" + "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/wire" + "github.com/ethereum/go-ethereum/p2p" + "github.com/ethereum/go-ethereum/ui/qt/qwhisper" "github.com/ethereum/go-ethereum/xeth" "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 { @@ -87,7 +56,8 @@ type Gui struct { eth *eth.Ethereum // The public Ethereum library - uiLib *UiLib + uiLib *UiLib + whisper *qwhisper.Whisper txDb *ethdb.LDBDatabase @@ -97,7 +67,7 @@ type Gui struct { pipe *xeth.JSXEth Session string - clientIdentity *wire.SimpleClientIdentity + clientIdentity *p2p.SimpleClientIdentity config *ethutil.ConfigManager plugins map[string]plugin @@ -107,7 +77,7 @@ type Gui struct { } // Create GUI, but doesn't start it -func NewWindow(ethereum *eth.Ethereum, config *ethutil.ConfigManager, clientIdentity *wire.SimpleClientIdentity, session string, logLevel int) *Gui { +func NewWindow(ethereum *eth.Ethereum, config *ethutil.ConfigManager, clientIdentity *p2p.SimpleClientIdentity, session string, logLevel int) *Gui { db, err := ethdb.NewLDBDatabase("tx_database") if err != nil { panic(err) @@ -138,10 +108,12 @@ func (gui *Gui) Start(assetPath string) { gui.engine = qml.NewEngine() context := gui.engine.Context() gui.uiLib = NewUiLib(gui.engine, gui.eth, assetPath) + gui.whisper = qwhisper.New(gui.eth.Whisper()) // Expose the eth library and the ui library to QML context.SetVar("gui", gui) context.SetVar("eth", gui.uiLib) + context.SetVar("shh", gui.whisper) // Load the main QML interface data, _ := ethutil.Config.Db.Get([]byte("KeyRing")) @@ -246,10 +218,10 @@ func (gui *Gui) CreateAndSetPrivKey() (string, string, string, string) { } func (gui *Gui) setInitialChain(ancientBlocks bool) { - sBlk := gui.eth.ChainManager().LastBlockHash + 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) } @@ -297,7 +269,7 @@ func (gui *Gui) insertTransaction(window string, tx *types.Transaction) { addr := gui.address() var inout string - if bytes.Compare(tx.Sender(), addr) == 0 { + if bytes.Compare(tx.From(), addr) == 0 { inout = "send" } else { inout = "recv" @@ -305,27 +277,27 @@ func (gui *Gui) insertTransaction(window string, tx *types.Transaction) { var ( ptx = xeth.NewJSTx(tx, pipe.World().State()) - send = nameReg.Storage(tx.Sender()) - rec = nameReg.Storage(tx.Recipient) + send = nameReg.Storage(tx.From()) + rec = nameReg.Storage(tx.To()) s, r string ) - if tx.CreatesContract() { - rec = nameReg.Storage(tx.CreationAddress(pipe.World().State())) + if core.MessageCreatesContract(tx) { + rec = nameReg.Storage(core.AddressFromMessage(tx)) } if send.Len() != 0 { s = strings.Trim(send.Str(), "\x00") } else { - s = ethutil.Bytes2Hex(tx.Sender()) + s = ethutil.Bytes2Hex(tx.From()) } if rec.Len() != 0 { r = strings.Trim(rec.Str(), "\x00") } else { - if tx.CreatesContract() { - r = ethutil.Bytes2Hex(tx.CreationAddress(pipe.World().State())) + if core.MessageCreatesContract(tx) { + r = ethutil.Bytes2Hex(core.AddressFromMessage(tx)) } else { - r = ethutil.Bytes2Hex(tx.Recipient) + r = ethutil.Bytes2Hex(tx.To()) } } ptx.Sender = s @@ -350,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 @@ -391,6 +363,8 @@ func (gui *Gui) update() { gui.setPeerInfo() }() + gui.whisper.SetView(gui.win.Root().ObjectByName("whisperView")) + for _, plugin := range gui.plugins { guilogger.Infoln("Loading plugin ", plugin.Name) @@ -409,8 +383,7 @@ func (gui *Gui) update() { miningLabel := gui.getObjectByName("miningLabel") events := gui.eth.EventMux().Subscribe( - eth.ChainSyncEvent{}, - eth.PeerListEvent{}, + //eth.PeerListEvent{}, core.NewBlockEvent{}, core.TxPreEvent{}, core.TxPostEvent{}, @@ -427,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) } @@ -448,40 +421,39 @@ func (gui *Gui) update() { tx := ev.Tx object := state.GetAccount(gui.address()) - if bytes.Compare(tx.Sender(), gui.address()) == 0 { - object.SubAmount(tx.Value) + if bytes.Compare(tx.From(), gui.address()) == 0 { + object.SubAmount(tx.Value()) gui.txDb.Put(tx.Hash(), tx.RlpEncode()) - } else if bytes.Compare(tx.Recipient, gui.address()) == 0 { - object.AddAmount(tx.Value) + } 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 eth.PeerListEvent: - gui.setPeerInfo() } 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") - blockLength := gui.eth.BlockPool().BlocksProcessed - chainLength := gui.eth.BlockPool().ChainLength + /* + 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)) + 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() @@ -509,7 +481,7 @@ Heap Alloc: %d CGNext: %x NumGC: %d `, Version, runtime.Version(), - eth.ProtocolVersion, eth.P2PVersion, + eth.ProtocolVersion, 2, runtime.NumCPU, runtime.NumGoroutine(), runtime.NumCgoCall(), memStats.Alloc, memStats.HeapAlloc, memStats.NextGC, memStats.NumGC, @@ -531,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/html_container.go b/cmd/mist/html_container.go index b3fc219fad7da943e9a239113c9655f025714b3b..bd11ccd57e78b8b3cba2af9aca32a6e4f40763ba 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/main.go b/cmd/mist/main.go index 14336b4e8b7c5b0cfab731ff5aee80fc99f5b60d..6f578ff48f8b7027210146f32bc7ab1db6d95902 100644 --- a/cmd/mist/main.go +++ b/cmd/mist/main.go @@ -23,15 +23,15 @@ import ( "runtime" "time" - "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/cmd/utils" + "github.com/ethereum/go-ethereum/eth" "github.com/ethereum/go-ethereum/logger" "gopkg.in/qml.v1" ) const ( ClientIdentifier = "Mist" - Version = "0.7.9" + Version = "0.7.11" ) var ethereum *eth.Ethereum @@ -58,8 +58,8 @@ func run() error { // create, import, export keys utils.KeyTasks(keyManager, KeyRing, GenAddr, SecretFile, ExportDir, NonInteractive) - clientIdentity := utils.NewClientIdentity(ClientIdentifier, Version, Identifier) - ethereum = utils.NewEthereum(db, clientIdentity, keyManager, UseUPnP, OutboundPort, MaxPeer) + 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) @@ -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 @@ -100,16 +104,10 @@ func main() { utils.HandleInterrupt() - if StartWebSockets { - utils.StartWebSockets(ethereum) - } - // we need to run the interrupt callbacks in case gui is closed // this skips if we got here by actual interrupt stopping the GUI if !interrupted { utils.RunInterruptCallbacks(os.Interrupt) } - // this blocks the thread - ethereum.WaitForShutdown() logger.Flush() } diff --git a/cmd/mist/qml_container.go b/cmd/mist/qml_container.go index a0a46f9b1089203b22454938f0a57ba1134c3f0a..ed24737d0e64918376b074d2b27fdab47fe44771 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) } diff --git a/cmd/mist/ui_lib.go b/cmd/mist/ui_lib.go index fdbde50fd965d933739593454362812689c6bcbe..4a92f647969a697a9dc911fa99655dbef58b9edc 100644 --- a/cmd/mist/ui_lib.go +++ b/cmd/mist/ui_lib.go @@ -24,11 +24,12 @@ import ( "strconv" "strings" - "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/eth" "github.com/ethereum/go-ethereum/ethutil" + "github.com/ethereum/go-ethereum/event/filter" "github.com/ethereum/go-ethereum/javascript" "github.com/ethereum/go-ethereum/miner" "github.com/ethereum/go-ethereum/state" @@ -57,6 +58,7 @@ type UiLib struct { jsEngine *javascript.JSRE filterCallbacks map[int][]int + filterManager *filter.FilterManager miner *miner.Miner } @@ -64,6 +66,7 @@ type UiLib struct { func NewUiLib(engine *qml.Engine, eth *eth.Ethereum, assetPath string) *UiLib { lib := &UiLib{JSXEth: xeth.NewJSXEth(eth), engine: engine, eth: eth, assetPath: assetPath, jsEngine: javascript.NewJSRE(eth), filterCallbacks: make(map[int][]int)} //, filters: make(map[int]*xeth.JSFilter)} lib.miner = miner.New(eth.KeyManager().Address(), eth) + lib.filterManager = filter.NewFilterManager(eth.EventMux()) return lib } @@ -123,7 +126,8 @@ func (self *UiLib) LookupAddress(name string) string { } func (self *UiLib) PastPeers() *ethutil.List { - return ethutil.NewList(eth.PastPeers()) + return ethutil.NewList([]string{}) + //return ethutil.NewList(eth.PastPeers()) } func (self *UiLib) ImportTx(rlpTx string) { @@ -191,7 +195,7 @@ func (ui *UiLib) Connect(button qml.Object) { } func (ui *UiLib) ConnectToPeer(addr string) { - ui.eth.ConnectToPeer(addr) + ui.eth.SuggestPeer(addr) } func (ui *UiLib) AssetPath(p string) string { @@ -221,12 +225,89 @@ 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) { self.win.Root().Call("invokeFilterCallback", xeth.ToJSMessages(messages), id) } - id = self.eth.InstallFilter(filter) + id = self.filterManager.InstallFilter(filter) return id } @@ -239,12 +320,12 @@ func (self *UiLib) NewFilterString(typ string) (id int) { fmt.Println("QML is lagging") } } - id = self.eth.InstallFilter(filter) + id = self.filterManager.InstallFilter(filter) return id } func (self *UiLib) Messages(id int) *ethutil.List { - filter := self.eth.GetFilter(id) + filter := self.filterManager.GetFilter(id) if filter != nil { messages := xeth.ToJSMessages(filter.Find()) @@ -255,7 +336,7 @@ func (self *UiLib) Messages(id int) *ethutil.List { } func (self *UiLib) UninstallFilter(id int) { - self.eth.UninstallFilter(id) + self.filterManager.UninstallFilter(id) } func mapToTxParams(object map[string]interface{}) map[string]string { @@ -308,67 +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 - } -} diff --git a/cmd/utils/cmd.go b/cmd/utils/cmd.go index db7bcd35eb0314224e01f5cfe29378d8f8b55b8d..466c5138358a286d08dd5acbe2b01db0f41e8f74 100644 --- a/cmd/utils/cmd.go +++ b/cmd/utils/cmd.go @@ -4,23 +4,25 @@ import ( "fmt" "io" "log" + "net" "os" "os/signal" "path" "path/filepath" "regexp" "runtime" - "time" "bitbucket.org/kardianos/osext" - "github.com/ethereum/go-ethereum" + "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/wire" "github.com/ethereum/go-ethereum/xeth" ) @@ -144,17 +146,32 @@ func NewDatabase() ethutil.Database { return db } -func NewClientIdentity(clientIdentifier, version, customIdentifier string) *wire.SimpleClientIdentity { - return wire.NewSimpleClientIdentity(clientIdentifier, version, customIdentifier) +func NewClientIdentity(clientIdentifier, version, customIdentifier string, pubkey string) *p2p.SimpleClientIdentity { + return p2p.NewSimpleClientIdentity(clientIdentifier, version, customIdentifier, pubkey) } -func NewEthereum(db ethutil.Database, clientIdentity wire.ClientIdentity, keyManager *crypto.KeyManager, usePnp bool, OutboundPort string, MaxPeer int) *eth.Ethereum { - ethereum, err := eth.New(db, clientIdentity, keyManager, eth.CapDefault, usePnp) +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) } - ethereum.Port = OutboundPort - ethereum.MaxPeers = MaxPeer return ethereum } @@ -268,11 +285,6 @@ func StartMining(ethereum *eth.Ethereum) bool { if gminer == nil { gminer = miner.New(addr, ethereum) } - // Give it some time to connect with peers - time.Sleep(3 * time.Second) - for !ethereum.IsUpToDate() { - time.Sleep(5 * time.Second) - } gminer.Start() }() RegisterInterrupt(func(os.Signal) { @@ -315,7 +327,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 { @@ -325,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", fn) + 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 +} diff --git a/cmd/utils/vm_env.go b/cmd/utils/vm_env.go index eb52602c41e518cca888387e6a4eb77f499075d6..be6249e82d22859a67dbfce51d40dadf1feae28b 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) { @@ -49,9 +49,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) { diff --git a/cmd/utils/websockets.go b/cmd/utils/websockets.go index d3ba50e78954681bb25105f3719199f5f54204b8..e4bc1b1854e77de1434ab60113962f6e75c53495 100644 --- a/cmd/utils/websockets.go +++ b/cmd/utils/websockets.go @@ -1,12 +1,15 @@ package utils import ( - "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/eth" "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() } diff --git a/core/block_manager.go b/core/block_manager.go index f6c73bc2ca9e26626104de4c4abef53d704f718b..8a5455306c942f66b4196f10bbbea0dca9a0587d 100644 --- a/core/block_manager.go +++ b/core/block_manager.go @@ -2,7 +2,6 @@ package core import ( "bytes" - "container/list" "errors" "fmt" "math/big" @@ -14,10 +13,11 @@ import ( "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/logger" + "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/pow" "github.com/ethereum/go-ethereum/pow/ezp" "github.com/ethereum/go-ethereum/state" - "github.com/ethereum/go-ethereum/wire" + "gopkg.in/fatih/set.v0" ) var statelogger = logger.NewLogger("BLOCK") @@ -38,13 +38,12 @@ type EthManager interface { BlockManager() *BlockManager ChainManager() *ChainManager TxPool() *TxPool - Broadcast(msgType wire.MsgType, data []interface{}) PeerCount() int IsMining() bool IsListening() bool - Peers() *list.List + Peers() []*p2p.Peer KeyManager() *crypto.KeyManager - ClientIdentity() wire.ClientIdentity + ClientIdentity() p2p.ClientIdentity Db() ethutil.Database EventMux() *event.TypeMux } @@ -58,8 +57,8 @@ type BlockManager struct { mem map[string]*big.Int // Proof of work used for validating Pow pow.PoW - // The ethereum manager interface - eth EthManager + + txpool *TxPool // The last attempted block is mainly used for debugging purposes // This does not have to be a valid block and will be set during @@ -71,21 +70,21 @@ type BlockManager struct { eventMux *event.TypeMux } -func NewBlockManager(ethereum EthManager) *BlockManager { +func NewBlockManager(txpool *TxPool, chainManager *ChainManager, eventMux *event.TypeMux) *BlockManager { sm := &BlockManager{ mem: make(map[string]*big.Int), Pow: ezp.New(), - eth: ethereum, - bc: ethereum.ChainManager(), - eventMux: ethereum.EventMux(), + bc: chainManager, + eventMux: eventMux, + txpool: txpool, } return sm } 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) @@ -111,11 +110,11 @@ done: // If we are mining this block and validating we want to set the logs back to 0 state.EmptyLogs() - txGas := new(big.Int).Set(tx.Gas) + txGas := new(big.Int).Set(tx.Gas()) cb := state.GetStateObject(coinbase.Address()) st := NewStateTransition(cb, tx, state, block) - err = st.TransitionState() + _, err = st.TransitionState() if err != nil { switch { case IsNonceErr(err): @@ -129,12 +128,11 @@ done: statelogger.Infoln(err) erroneous = append(erroneous, tx) err = nil - continue } } txGas.Sub(txGas, st.gas) - cumulativeSum.Add(cumulativeSum, new(big.Int).Mul(txGas, tx.GasPrice)) + cumulativeSum.Add(cumulativeSum, new(big.Int).Mul(txGas, tx.GasPrice())) // Update the state with pending changes state.Update(txGas) @@ -143,6 +141,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 { @@ -158,7 +157,7 @@ done: } block.Reward = cumulativeSum - block.GasUsed = totalUsedGas + block.Header().GasUsed = totalUsedGas return receipts, handled, unhandled, erroneous, err } @@ -168,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) } @@ -183,13 +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() - - // 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() + state := state.New(parent.Trie().Copy()) // Block validation if err = sm.ValidateBlock(block, parent); err != nil { @@ -201,21 +195,24 @@ 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 { - err = fmt.Errorf("validating receipt root. received=%x got=%x", block.ReceiptSha, receiptSha) + 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 } @@ -225,8 +222,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,9 +235,9 @@ 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.eth.TxPool().RemoveSet(block.Transactions()) + sm.txpool.RemoveSet(block.Transactions()) return td, messages, nil } else { @@ -250,18 +247,18 @@ 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(sm.bc.Td(), uncleDiff) + td = td.Add(td, block.Header().Difficulty) // The new TD will only be accepted if the new difficulty is // is greater than the previous. - if td.Cmp(sm.bc.TD) > 0 { + if td.Cmp(sm.bc.Td()) > 0 { return td, true } @@ -273,13 +270,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 +288,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 +297,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(string(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(string(uncle.Hash())) { return UncleError("Uncle in chain") } @@ -333,15 +334,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 +350,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 3e48579b900976e5761ed3f40257d840a0cd0e2c..485c195d5ec7d423645b43d7861a762ee3719389 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -1,18 +1,22 @@ package core import ( + "bytes" "fmt" "math/big" + "sync" "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" + "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", @@ -30,39 +34,87 @@ 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 eventMux *event.TypeMux genesisBlock *types.Block // Last known total difficulty - TD *big.Int + mu sync.RWMutex + td *big.Int + lastBlockNumber uint64 + currentBlock *types.Block + lastBlockHash []byte + + transState *state.StateDB +} - LastBlockNumber uint64 +func (self *ChainManager) Td() *big.Int { + self.mu.RLock() + defer self.mu.RUnlock() - CurrentBlock *types.Block - LastBlockHash []byte + return self.td +} - transState *state.StateDB +func (self *ChainManager) LastBlockNumber() uint64 { + self.mu.RLock() + defer self.mu.RUnlock() + + return self.lastBlockNumber +} + +func (self *ChainManager) LastBlockHash() []byte { + self.mu.RLock() + defer self.mu.RUnlock() + + return self.lastBlockHash +} + +func (self *ChainManager) CurrentBlock() *types.Block { + self.mu.RLock() + defer self.mu.RUnlock() + + return self.currentBlock } func NewChainManager(mux *event.TypeMux) *ChainManager { bc := &ChainManager{} - bc.genesisBlock = types.NewBlockFromBytes(ethutil.Encode(Genesis)) + bc.genesisBlock = GenesisBlock() bc.eventMux = mux bc.setLastBlock() @@ -72,12 +124,19 @@ func NewChainManager(mux *event.TypeMux) *ChainManager { return bc } +func (self *ChainManager) Status() (td *big.Int, currentBlock []byte, genesisBlock []byte) { + self.mu.RLock() + defer self.mu.RUnlock() + + return self.td, self.currentBlock.Hash(), self.Genesis().Hash() +} + func (self *ChainManager) SetProcessor(proc types.BlockProcessor) { self.processor = proc } func (self *ChainManager) State() *state.StateDB { - return self.CurrentBlock.State() + return state.New(self.CurrentBlock().Trie()) } func (self *ChainManager) TransState() *state.StateDB { @@ -87,46 +146,48 @@ 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 - bc.LastBlockHash = block.Hash() - bc.LastBlockNumber = block.Number.Uint64() + var block types.Block + rlp.Decode(bytes.NewReader(data), &block) + bc.currentBlock = &block + bc.lastBlockHash = block.Hash() + 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(ethutil.Config.Db.LastKnownTD()) } else { bc.Reset() } - chainlogger.Infof("Last block (#%d) %x\n", bc.LastBlockNumber, bc.CurrentBlock.Hash()) + chainlogger.Infof("Last block (#%d) %x\n", bc.lastBlockNumber, bc.currentBlock.Hash()) } // Block creation & chain handling func (bc *ChainManager) NewBlock(coinbase []byte) *types.Block { - var root interface{} - hash := ZeroHash256 + bc.mu.RLock() + defer bc.mu.RUnlock() + + 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 + 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) } @@ -134,41 +195,46 @@ func (bc *ChainManager) NewBlock(coinbase []byte) *types.Block { } func (bc *ChainManager) Reset() { - AddTestNetFunds(bc.genesisBlock) + 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()) + } - bc.genesisBlock.Trie().Sync() // Prepare the genesis block bc.write(bc.genesisBlock) bc.insert(bc.genesisBlock) - bc.CurrentBlock = bc.genesisBlock - - bc.SetTotalDifficulty(ethutil.Big("0")) + bc.currentBlock = bc.genesisBlock - // Set the last know difficulty (might be 0x0 as initial value, Genesis) - bc.TD = ethutil.BigD(ethutil.Config.Db.LastKnownTD()) + bc.setTotalDifficulty(ethutil.Big("0")) } func (self *ChainManager) Export() []byte { - chainlogger.Infoln("exporting", self.CurrentBlock.Number, "blocks") + self.mu.RLock() + defer self.mu.RUnlock() - blocks := make(types.Blocks, int(self.CurrentBlock.Number.Int64())+1) - for block := self.CurrentBlock; block != nil; block = self.GetBlock(block.PrevHash) { - blocks[block.Number.Int64()] = block + chainlogger.Infof("exporting %v blocks...\n", self.currentBlock.Header().Number) + + 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 } + 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() + bc.currentBlock = block + bc.lastBlockHash = block.Hash() } func (bc *ChainManager) write(block *types.Block) { bc.writeBlockInfo(block) - encodedBlock := block.RlpEncode() + encodedBlock := ethutil.Encode(block) ethutil.Config.Db.Put(block.Hash(), encodedBlock) } @@ -183,7 +249,7 @@ func (bc *ChainManager) HasBlock(hash []byte) bool { return len(data) != 0 } -func (self *ChainManager) GetChainHashesFromHash(hash []byte, max uint64) (chain [][]byte) { +func (self *ChainManager) GetBlockHashesFromHash(hash []byte, max uint64) (chain [][]byte) { block := self.GetBlock(hash) if block == nil { return @@ -193,11 +259,11 @@ func (self *ChainManager) GetChainHashesFromHash(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 @@ -208,65 +274,61 @@ 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 { - block := self.CurrentBlock - for ; block != nil; block = self.GetBlock(block.PrevHash) { - if block.Number.Uint64() == num { + 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 } } - if block != nil && block.Number.Uint64() == 0 && num != 0 { + if block != nil && block.Header().Number.Uint64() == 0 && num != 0 { return nil } return block } -func (bc *ChainManager) SetTotalDifficulty(td *big.Int) { +func (bc *ChainManager) setTotalDifficulty(td *big.Int) { ethutil.Config.Db.Put([]byte("LTD"), td.Bytes()) - bc.TD = td + bc.td = td } 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()) + bc.lastBlockNumber++ } func (bc *ChainManager) Stop() { @@ -283,23 +345,29 @@ 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 } - self.write(block) - 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]) + self.mu.Lock() + { + self.write(block) + cblock := self.currentBlock + if td.Cmp(self.td) > 0 { + 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 = state.New(cblock.Trie().Copy()) } - self.SetTotalDifficulty(td) - self.insert(block) - self.transState = self.State().Copy() - //sm.eth.TxPool().RemoveSet(block.Transactions()) } + self.mu.Unlock() self.eventMux.Post(NewBlockEvent{block}) self.eventMux.Post(messages) diff --git a/core/chain_manager_test.go b/core/chain_manager_test.go index a84e3ff3b9dcc9b9a9652aff6b149094f74ac5af..108718901565d50e00144218c2287f6b05e0b1ba 100644 --- a/core/chain_manager_test.go +++ b/core/chain_manager_test.go @@ -2,18 +2,138 @@ package core import ( "fmt" + "os" "path" + "reflect" + "runtime" + "strconv" "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/event" + "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") + + 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("..", "_data", fn), os.O_RDONLY, os.ModePerm) + if err != nil { + return nil, err + } + defer fh.Close() + + var chain types.Blocks + if err := rlp.Decode(fh, &chain); err != nil { + return nil, err + } + + return chain, nil +} + +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() + } +} + func TestChainInsertions(t *testing.T) { - c1, err := ethutil.ReadAllFile(path.Join("..", "_data", "chain1")) + 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 { fmt.Println(err) t.FailNow() } - data1, _ := ethutil.Decode([]byte(c1), 0) - fmt.Println(data1) + + var eventMux event.TypeMux + chainMan := NewChainManager(&eventMux) + txPool := NewTxPool(chainMan, &eventMux) + blockMan := NewBlockManager(txPool, chainMan, &eventMux) + chainMan.SetProcessor(blockMan) + + const max = 2 + done := make(chan bool, max) + + go insertChain(done, chainMan, chain1, t) + go insertChain(done, chainMan, chain2, t) + + for i := 0; i < max; i++ { + <-done + } + + 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") + } +} + +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") + } } diff --git a/core/events.go b/core/events.go index deeba3e98299aadf8bbe6751e3c93fcebae6edbb..fe106da4965b9228ac80fb84084098ab4ee511e9 100644 --- a/core/events.go +++ b/core/events.go @@ -10,3 +10,6 @@ type TxPostEvent struct{ Tx *types.Transaction } // NewBlockEvent is posted when a block has been imported. type NewBlockEvent struct{ Block *types.Block } + +// NewMinedBlockEvent is posted when a block has been imported. +type NewMinedBlockEvent struct{ Block *types.Block } diff --git a/core/execution.go b/core/execution.go index 58d46c5092496de726849dd13f2657de96d9bd0e..b7eead0dd3d0d7508cc5dcc01d3e63d70160a2f6 100644 --- a/core/execution.go +++ b/core/execution.go @@ -3,22 +3,21 @@ package core import ( "fmt" "math/big" + "time" - "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/state" "github.com/ethereum/go-ethereum/vm" ) type Execution struct { - vm vm.VirtualMachine + env vm.Environment address, input []byte Gas, price, value *big.Int - object *state.StateObject SkipTransfer bool } -func NewExecution(vm vm.VirtualMachine, address, input []byte, gas, gasPrice, value *big.Int) *Execution { - return &Execution{vm: vm, address: address, input: input, Gas: gas, price: gasPrice, value: value} +func NewExecution(env vm.Environment, address, input []byte, gas, gasPrice, value *big.Int) *Execution { + return &Execution{env: env, address: address, input: input, Gas: gas, price: gasPrice, value: value} } func (self *Execution) Addr() []byte { @@ -27,14 +26,19 @@ 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() - chainlogger.Debugf("pre state %x\n", env.State().Root()) + env := self.env + evm := vm.New(env, vm.DebugVmTy) + + if env.Depth() == vm.MaxCallDepth { + // Consume all gas (by not returning it) and return a depth error + return nil, vm.DepthError{} + } from, to := env.State().GetStateObject(caller.Address()), env.State().GetOrNewStateObject(self.address) // Skipping transfer is used on testing for the initial call @@ -49,32 +53,19 @@ func (self *Execution) exec(code, contextAddr []byte, caller vm.ClosureRef) (ret } snapshot := env.State().Copy() - defer func() { - if vm.IsDepthErr(err) || vm.IsOOGErr(err) { - env.State().Set(snapshot) - } - chainlogger.Debugf("post state %x\n", env.State().Root()) - }() - - self.object = to - // Pre-compiled contracts (address.go) 1, 2 & 3. - naddr := ethutil.BigD(contextAddr).Uint64() - if p := vm.Precompiled[naddr]; p != nil { - if self.Gas.Cmp(p.Gas(len(self.input))) >= 0 { - ret = p.Call(self.input) - self.vm.Printf("NATIVE_FUNC(%x) => %x", naddr, ret) - self.vm.Endl() - } - } else { - ret, err = self.vm.Run(to, caller, code, self.value, self.Gas, self.price, self.input) + 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 } 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 } diff --git a/core/filter.go b/core/filter.go index fe3665bf391cf5bddce0121637e82ca3198c7d68..7c34748df43a637e98afc05bc3808ae3f7266ca6 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/filter_test.go b/core/filter_test.go index d53b835b7eb349b666a4924bfed2d7d7d24dcbd2..9a8bc9592b0bcef7115b5159d4f426ba4fbd39f8 100644 --- a/core/filter_test.go +++ b/core/filter_test.go @@ -1,7 +1 @@ package core - -// import "testing" - -// func TestFilter(t *testing.T) { -// NewFilter(NewTestManager()) -// } diff --git a/core/genesis.go b/core/genesis.go index 707154759a08c6d157c31cd4d6916283e9fc202e..10b40516ff2bc812fc3a5c530f329d5192e4b6de 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, 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 + genesis.Header().Time = 0 + + genesis.SetUncles([]*types.Header{}) + genesis.SetTransactions(types.Transactions{}) + genesis.SetReceipts(types.Receipts{}) -var Genesis = []interface{}{GenesisHeader, []interface{}{}, []interface{}{}} + 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/helper_test.go b/core/helper_test.go index b340144fddd1fad76cb79b60bfab9af8fab0f775..b8bf254d763387b7f468f4455a015264ae6fb4de 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/state_transition.go b/core/state_transition.go index 820ba66e61df3f001943979ebeb1abe2f62a0fe4..7b7026c29889e3beeb5ecb5d02fcea8c3d85e995 100644 --- a/core/state_transition.go +++ b/core/state_transition.go @@ -5,6 +5,8 @@ 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" "github.com/ethereum/go-ethereum/vm" ) @@ -27,48 +29,69 @@ import ( */ type StateTransition struct { coinbase, receiver []byte - tx *types.Transaction + msg Message gas, gasPrice *big.Int + initialGas *big.Int value *big.Int data []byte state *state.StateDB block *types.Block cb, rec, sen *state.StateObject + + Env vm.Environment } -func NewStateTransition(coinbase *state.StateObject, tx *types.Transaction, state *state.StateDB, block *types.Block) *StateTransition { - return &StateTransition{coinbase.Address(), tx.Recipient, tx, new(big.Int), new(big.Int).Set(tx.GasPrice), tx.Value, tx.Data, state, block, coinbase, nil, nil} +type Message interface { + Hash() []byte + + From() []byte + To() []byte + + GasPrice() *big.Int + Gas() *big.Int + Value() *big.Int + + Nonce() uint64 + Data() []byte } -func (self *StateTransition) Coinbase() *state.StateObject { - if self.cb != nil { - return self.cb - } +func AddressFromMessage(msg Message) []byte { + // Generate a new address + return crypto.Sha3(ethutil.NewValue([]interface{}{msg.From(), msg.Nonce()}).Encode())[12:] +} - self.cb = self.state.GetOrNewStateObject(self.coinbase) - return self.cb +func MessageCreatesContract(msg Message) bool { + return len(msg.To()) == 0 } -func (self *StateTransition) Sender() *state.StateObject { - if self.sen != nil { - return self.sen - } - self.sen = self.state.GetOrNewStateObject(self.tx.Sender()) +func MessageGasValue(msg Message) *big.Int { + return new(big.Int).Mul(msg.Gas(), msg.GasPrice()) +} - return self.sen +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) Receiver() *state.StateObject { - if self.tx != nil && self.tx.CreatesContract() { - return nil - } - if self.rec != nil { - return self.rec +func (self *StateTransition) VmEnv() vm.Environment { + if self.Env == nil { + self.Env = NewEnv(self.state, self.msg, self.block) } - self.rec = self.state.GetOrNewStateObject(self.tx.Recipient) - return self.rec + return self.Env +} + +func (self *StateTransition) Coinbase() *state.StateObject { + return self.state.GetOrNewStateObject(self.coinbase) +} +func (self *StateTransition) From() *state.StateObject { + return self.state.GetOrNewStateObject(self.msg.From()) +} +func (self *StateTransition) To() *state.StateObject { + if self.msg != nil && MessageCreatesContract(self.msg) { + return nil + } + return self.state.GetOrNewStateObject(self.msg.To()) } func (self *StateTransition) UseGas(amount *big.Int) error { @@ -87,41 +110,33 @@ func (self *StateTransition) AddGas(amount *big.Int) { func (self *StateTransition) BuyGas() error { var err error - sender := self.Sender() - if sender.Balance().Cmp(self.tx.GasValue()) < 0 { - return fmt.Errorf("Insufficient funds to pre-pay gas. Req %v, has %v", self.tx.GasValue(), sender.Balance()) + sender := self.From() + if sender.Balance().Cmp(MessageGasValue(self.msg)) < 0 { + return fmt.Errorf("insufficient ETH for gas (%x). Req %v, has %v", sender.Address()[:4], MessageGasValue(self.msg), sender.Balance()) } coinbase := self.Coinbase() - err = coinbase.BuyGas(self.tx.Gas, self.tx.GasPrice) + err = coinbase.BuyGas(self.msg.Gas(), self.msg.GasPrice()) if err != nil { return err } - self.AddGas(self.tx.Gas) - sender.SubAmount(self.tx.GasValue()) + self.AddGas(self.msg.Gas()) + self.initialGas.Set(self.msg.Gas()) + sender.SubAmount(MessageGasValue(self.msg)) return nil } -func (self *StateTransition) RefundGas() { - coinbase, sender := self.Coinbase(), self.Sender() - coinbase.RefundGas(self.gas, self.tx.GasPrice) - - // Return remaining gas - remaining := new(big.Int).Mul(self.gas, self.tx.GasPrice) - sender.AddAmount(remaining) -} - func (self *StateTransition) preCheck() (err error) { var ( - tx = self.tx - sender = self.Sender() + msg = self.msg + sender = self.From() ) // Make sure this transaction's nonce is correct - if sender.Nonce != tx.Nonce { - return NonceError(tx.Nonce, sender.Nonce) + if sender.Nonce != msg.Nonce() { + return NonceError(msg.Nonce(), sender.Nonce) } // Pre-pay gas / Buy gas of the coinbase account @@ -132,8 +147,8 @@ func (self *StateTransition) preCheck() (err error) { return nil } -func (self *StateTransition) TransitionState() (err error) { - statelogger.Debugf("(~) %x\n", self.tx.Hash()) +func (self *StateTransition) TransitionState() (ret []byte, err error) { + statelogger.Debugf("(~) %x\n", self.msg.Hash()) // XXX Transactions after this point are considered valid. if err = self.preCheck(); err != nil { @@ -141,8 +156,8 @@ func (self *StateTransition) TransitionState() (err error) { } var ( - tx = self.tx - sender = self.Sender() + msg = self.msg + sender = self.From() ) defer self.RefundGas() @@ -168,30 +183,56 @@ func (self *StateTransition) TransitionState() (err error) { return } - var ret []byte - vmenv := NewEnv(self.state, self.tx, self.block) + vmenv := self.VmEnv() var ref vm.ClosureRef - if tx.CreatesContract() { - self.rec = MakeContract(tx, self.state) - - ret, err, ref = vmenv.Create(sender, self.rec.Address(), self.tx.Data, self.gas, self.gasPrice, self.value) - ref.SetCode(ret) + 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) + 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) + } + } } else { - ret, err = vmenv.Call(self.Sender(), self.Receiver().Address(), self.tx.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 err != nil { - statelogger.Debugln(err) + self.UseGas(self.gas) } return } // Converts an transaction in to a state object -func MakeContract(tx *types.Transaction, state *state.StateDB) *state.StateObject { - addr := tx.CreationAddress(state) +func MakeContract(msg Message, state *state.StateDB) *state.StateObject { + addr := AddressFromMessage(msg) contract := state.GetOrNewStateObject(addr) - contract.InitCode = tx.Data + contract.InitCode = msg.Data() return contract } + +func (self *StateTransition) RefundGas() { + coinbase, sender := self.Coinbase(), self.From() + // 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 { + return new(big.Int).Sub(self.initialGas, self.gas) +} diff --git a/core/transaction_pool.go b/core/transaction_pool.go index 7166d35e8ddf3fd6119194cd5d4f656ca7115273..1149d4cfb87179359f0ff96d86d0b945858e5dbc 100644 --- a/core/transaction_pool.go +++ b/core/transaction_pool.go @@ -8,9 +8,9 @@ import ( "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" - "github.com/ethereum/go-ethereum/wire" ) var txplogger = logger.NewLogger("TXP") @@ -18,7 +18,9 @@ var txplogger = logger.NewLogger("TXP") const txPoolQueueSize = 50 type TxPoolHook chan *types.Transaction -type TxMsgTy byte +type TxMsg struct { + Tx *types.Transaction +} const ( minGasPrice = 1000000 @@ -26,11 +28,6 @@ const ( var MinGasPrice = big.NewInt(10000000000000) -type TxMsg struct { - Tx *types.Transaction - Type TxMsgTy -} - 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) { @@ -61,7 +58,6 @@ type TxProcessor interface { // pool is being drained or synced for whatever reason the transactions // will simple queue up and handled when the mutex is freed. type TxPool struct { - Ethereum EthManager // The mutex for accessing the Tx pool. mutex sync.Mutex // Queueing channel for reading and writing incoming @@ -75,14 +71,18 @@ type TxPool struct { SecondaryProcessor TxProcessor subscribers []chan TxMsg + + chainManager *ChainManager + eventMux *event.TypeMux } -func NewTxPool(ethereum EthManager) *TxPool { +func NewTxPool(chainManager *ChainManager, eventMux *event.TypeMux) *TxPool { return &TxPool{ - pool: list.New(), - queueChan: make(chan *types.Transaction, txPoolQueueSize), - quit: make(chan bool), - Ethereum: ethereum, + pool: list.New(), + queueChan: make(chan *types.Transaction, txPoolQueueSize), + quit: make(chan bool), + chainManager: chainManager, + eventMux: eventMux, } } @@ -94,20 +94,20 @@ func (pool *TxPool) addTransaction(tx *types.Transaction) { pool.pool.PushBack(tx) // Broadcast the transaction to the rest of the peers - pool.Ethereum.Broadcast(wire.MsgTxTy, []interface{}{tx.RlpData()}) + 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.Ethereum.ChainManager().CurrentBlock + 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.Recipient) != 0 && len(tx.Recipient) != 20 { - return fmt.Errorf("Invalid recipient. len = %d", len(tx.Recipient)) + if len(tx.To()) != 0 && len(tx.To()) != 20 { + return fmt.Errorf("Invalid recipient. len = %d", len(tx.To())) } v, _, _ := tx.Curve() @@ -116,19 +116,17 @@ func (pool *TxPool) ValidateTransaction(tx *types.Transaction) error { } // Get the sender - sender := pool.Ethereum.ChainManager().State().GetAccount(tx.Sender()) + senderAddr := tx.From() + if senderAddr == nil { + return fmt.Errorf("invalid sender") + } + sender := pool.chainManager.State().GetAccount(senderAddr) - totAmount := new(big.Int).Set(tx.Value) + 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.Sender()) - } - - if tx.IsContract() { - if tx.GasPrice.Cmp(big.NewInt(minGasPrice)) < 0 { - return fmt.Errorf("Gasprice too low, %s given should be at least %d.", tx.GasPrice, minGasPrice) - } + return fmt.Errorf("Insufficient amount in sender's (%x) account", tx.From()) } // Increment the nonce making each tx valid only once to prevent replay @@ -154,13 +152,10 @@ func (self *TxPool) Add(tx *types.Transaction) error { self.addTransaction(tx) - tmp := make([]byte, 4) - copy(tmp, tx.Recipient) - - txplogger.Debugf("(t) %x => %x (%v) %x\n", tx.Sender()[:4], tmp, tx.Value, tx.Hash()) + txplogger.Debugf("(t) %x => %x (%v) %x\n", tx.From()[:4], tx.To()[:4], tx.Value, tx.Hash()) // Notify the subscribers - go self.Ethereum.EventMux().Post(TxPreEvent{tx}) + go self.eventMux.Post(TxPreEvent{tx}) return nil } @@ -169,7 +164,17 @@ func (self *TxPool) Size() int { return self.pool.Len() } -func (pool *TxPool) CurrentTransactions() []*types.Transaction { +func (self *TxPool) AddTransactions(txs []*types.Transaction) { + for _, tx := range txs { + if err := self.Add(tx); err != nil { + txplogger.Infoln(err) + } else { + txplogger.Infof("tx %x\n", tx.Hash()[0:4]) + } + } +} + +func (pool *TxPool) GetTransactions() []*types.Transaction { pool.mutex.Lock() defer pool.mutex.Unlock() @@ -192,9 +197,9 @@ func (pool *TxPool) RemoveInvalid(state *state.StateDB) { for e := pool.pool.Front(); e != nil; e = e.Next() { tx := e.Value.(*types.Transaction) - sender := state.GetAccount(tx.Sender()) + sender := state.GetAccount(tx.From()) err := pool.ValidateTransaction(tx) - if err != nil || sender.Nonce >= tx.Nonce { + if err != nil || sender.Nonce >= tx.Nonce() { pool.pool.Remove(e) } } @@ -216,7 +221,7 @@ func (self *TxPool) RemoveSet(txs types.Transactions) { } func (pool *TxPool) Flush() []*types.Transaction { - txList := pool.CurrentTransactions() + txList := pool.GetTransactions() // Recreate a new list all together // XXX Is this the fastest way? diff --git a/core/types/block.go b/core/types/block.go index 0108bd58664a2922f958db12638501eab2c43473..7b4695f7333c61aeaaac0b918d091ac2444dba28 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -9,408 +9,259 @@ 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 BlockInfo struct { - Number uint64 - Hash []byte - Parent []byte - TD *big.Int -} - -func (bi *BlockInfo) RlpDecode(data []byte) { - decoder := ethutil.NewValueFromBytes(data) - - bi.Number = decoder.Get(0).Uint() - bi.Hash = decoder.Get(1).Bytes() - bi.Parent = decoder.Get(2).Bytes() - bi.TD = decoder.Get(3).BigInt() -} - -func (bi *BlockInfo) RlpEncode() []byte { - return ethutil.Encode([]interface{}{bi.Number, bi.Hash, bi.Parent, bi.TD}) -} - -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) { - bs := blockSorter{ - blocks: blocks, - by: self, - } - sort.Sort(bs) -} - -type blockSorter struct { - blocks Blocks - by func(b1, b2 *Block) bool -} - -func (self blockSorter) Len() int { return len(self.blocks) } -func (self blockSorter) Swap(i, j int) { - self.blocks[i], self.blocks[j] = self.blocks[j], self.blocks[i] -} -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 { +type Header struct { // Hash to the previous block - PrevHash ethutil.Bytes + ParentHash ethutil.Bytes // Uncles of this block - Uncles Blocks - UncleSha []byte + UncleHash []byte // The coin base address Coinbase []byte // Block Trie state - //state *ethutil.Trie - state *state.StateDB + Root []byte + // Tx sha + TxHash []byte + // Receipt sha + ReceiptHash []byte + // Bloom + Bloom []byte // 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 + // Creation time + Time uint64 // 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) +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) + } - return block + return fields } -// New block takes a raw encoded string -func NewBlockFromRlpValue(rlpValue *ethutil.Value) *Block { - block := &Block{} - block.RlpValueDecode(rlpValue) +func (self *Header) RlpData() interface{} { + return self.rlpData(true) +} - return block +func (self *Header) Hash() []byte { + return crypto.Sha3(ethutil.Encode(self.rlpData(true))) } -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(), +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, - UncleSha: nil, GasUsed: new(big.Int), GasLimit: new(big.Int), } - block.SetUncles([]*Block{}) - block.state = state.New(trie.New(ethutil.Config.Db, root)) + block := &Block{header: header, Reward: new(big.Int)} 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 NewBlockWithHeader(header *Header) *Block { + return &Block{header: header} } -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) +func (self *Block) DecodeRLP(s *rlp.Stream) error { + if _, err := s.List(); err != nil { + return err } - // ((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 - } + var header Header + if err := s.Decode(&header); err != nil { + return err } - 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() + var transactions []*Transaction + if err := s.Decode(&transactions); err != nil { + return err } - return encR -} + var uncleHeaders []*Header + if err := s.Decode(&uncleHeaders); err != nil { + return err + } -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() + 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) } - return uncles -} + if err := s.ListEnd(); err != nil { + return err + } -func (block *Block) SetUncles(uncles []*Block) { - block.Uncles = uncles - block.UncleSha = crypto.Sha3(ethutil.Encode(block.rlpUncles())) -} + self.header = &header + self.uncles = uncleHeaders + self.transactions = transactions -func (self *Block) SetReceipts(receipts Receipts) { - self.receipts = receipts - self.ReceiptSha = DeriveSha(receipts) - self.LogsBloom = CreateBloom(receipts) + return nil } -func (self *Block) SetTransactions(txs Transactions) { - self.transactions = txs - self.TxSha = DeriveSha(txs) +func (self *Block) Header() *Header { + return self.header } -func (block *Block) Value() *ethutil.Value { - return ethutil.NewValue([]interface{}{block.header(), block.transactions, block.rlpUncles()}) +func (self *Block) Uncles() []*Header { + return self.uncles } -func (block *Block) RlpEncode() []byte { - // Encode a slice interface which contains the header and the list of - // transactions. - return block.Value().Encode() +func (self *Block) SetUncles(uncleHeaders []*Header) { + self.uncles = uncleHeaders + self.header.UncleHash = crypto.Sha3(ethutil.Encode(uncleHeaders)) } -func (block *Block) RlpDecode(data []byte) { - rlpValue := ethutil.NewValueFromBytes(data) - block.RlpValueDecode(rlpValue) +func (self *Block) Transactions() Transactions { + return self.transactions } -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) Transaction(hash []byte) *Transaction { + for _, transaction := range self.transactions { + if bytes.Equal(hash, transaction.Hash()) { + return transaction } } - + return nil } -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 (self *Block) SetTransactions(transactions Transactions) { + self.transactions = transactions + self.header.TxHash = DeriveSha(transactions) } -func NewUncleBlockFromValue(header *ethutil.Value) *Block { - block := &Block{} - block.setHeader(header) - - return block +func (self *Block) Receipts() Receipts { + return self.receipts } -func (block *Block) Trie() *trie.Trie { - return block.state.Trie +func (self *Block) SetReceipts(receipts Receipts) { + self.receipts = receipts + self.header.ReceiptHash = DeriveSha(receipts) + self.header.Bloom = CreateBloom(receipts) } -func (block *Block) Root() interface{} { - return block.state.Root() +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() *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 } +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 { +Header: +[ +%v +] +Transactions: +%v +Uncles: +%v +} +`, 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 +`, 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) } -func (block *Block) Diff() *big.Int { - return block.Difficulty -} +type Blocks []*Block -func (self *Block) Receipts() []*Receipt { - return self.receipts -} +type BlockBy func(b1, b2 *Block) bool -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 (self BlockBy) Sort(blocks Blocks) { + bs := blockSorter{ + blocks: blocks, + by: self, } + sort.Sort(bs) } -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())) +type blockSorter struct { + blocks Blocks + by func(b1, b2 *Block) bool } -// Implement RlpEncodable -func (self *Block) RlpData() interface{} { - return self.Value().Val +func (self blockSorter) Len() int { return len(self.blocks) } +func (self blockSorter) Swap(i, j int) { + self.blocks[i], self.blocks[j] = self.blocks[j], self.blocks[i] } +func (self blockSorter) Less(i, j int) bool { return self.by(self.blocks[i], self.blocks[j]) } -// 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 0000000000000000000000000000000000000000..c85708975f9d1bb82102c1dc1bb35f85fe58a3fc --- /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/derive_sha.go b/core/types/derive_sha.go index 1897ff198f8d37bacb21f634d81cb1df80a02241..0beb1967096045732bbf1acc013edb6de96068dd 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/core/types/transaction.go b/core/types/transaction.go index 63edef756f43bbff9c43d7276f1386ac89bd8316..59244adc3d6c2133a96523a626096438e10793bb 100644 --- a/core/types/transaction.go +++ b/core/types/transaction.go @@ -1,42 +1,37 @@ package types import ( + "bytes" "fmt" "math/big" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethutil" - "github.com/ethereum/go-ethereum/state" + "github.com/ethereum/go-ethereum/rlp" "github.com/obscuren/secp256k1-go" ) -var ContractAddr = []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} - func IsContractAddr(addr []byte) bool { return len(addr) == 0 - //return bytes.Compare(addr, ContractAddr) == 0 } type Transaction struct { - Nonce uint64 - Recipient []byte - Value *big.Int - Gas *big.Int - GasPrice *big.Int - Data []byte - v byte - r, s []byte - - // Indicates whether this tx is a contract creation transaction - contractCreation bool + AccountNonce uint64 + Price *big.Int + GasLimit *big.Int + Recipient []byte + Amount *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, contractCreation: true} +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, contractCreation: IsContractAddr(to)} +func NewTransactionMessage(to []byte, Amount, gasAmount, price *big.Int, data []byte) *Transaction { + return &Transaction{Recipient: to, Amount: Amount, Price: price, GasLimit: gasAmount, Payload: data} } func NewTransactionFromBytes(data []byte) *Transaction { @@ -46,46 +41,55 @@ func NewTransactionFromBytes(data []byte) *Transaction { return tx } -func NewTransactionFromValue(val *ethutil.Value) *Transaction { +func NewTransactionFromAmount(val *ethutil.Value) *Transaction { tx := &Transaction{} tx.RlpValueDecode(val) return tx } -func (self *Transaction) GasValue() *big.Int { - return new(big.Int).Mul(self.Gas, self.GasPrice) +func (tx *Transaction) Hash() []byte { + data := []interface{}{tx.AccountNonce, tx.Price, tx.GasLimit, tx.Recipient, tx.Amount, tx.Payload} + + return crypto.Sha3(ethutil.Encode(data)) +} + +func (self *Transaction) Data() []byte { + return self.Payload } -func (self *Transaction) TotalValue() *big.Int { - v := self.GasValue() - return v.Add(v, self.Value) +func (self *Transaction) Gas() *big.Int { + return self.GasLimit } -func (tx *Transaction) Hash() []byte { - data := []interface{}{tx.Nonce, tx.GasPrice, tx.Gas, tx.Recipient, tx.Value, tx.Data} +func (self *Transaction) GasPrice() *big.Int { + return self.Price +} - return crypto.Sha3(ethutil.NewValue(data).Encode()) +func (self *Transaction) Value() *big.Int { + return self.Amount } -func (tx *Transaction) CreatesContract() bool { - return tx.contractCreation +func (self *Transaction) Nonce() uint64 { + return self.AccountNonce } -/* Deprecated */ -func (tx *Transaction) IsContract() bool { - return tx.CreatesContract() +func (self *Transaction) SetNonce(AccountNonce uint64) { + self.AccountNonce = AccountNonce } -func (tx *Transaction) CreationAddress(state *state.StateDB) []byte { - // Generate a new address - return crypto.Sha3(ethutil.NewValue([]interface{}{tx.Sender(), tx.Nonce}).Encode())[12:] +func (self *Transaction) From() []byte { + return self.sender() +} + +func (self *Transaction) To() []byte { + 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 } @@ -106,18 +110,18 @@ 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 } -func (tx *Transaction) Sender() []byte { +func (tx *Transaction) sender() []byte { pubkey := tx.PublicKey() // Validate the returned key. // Return nil if public key isn't in full format - if len(pubkey) != 0 && pubkey[0] != 4 { + if len(pubkey) == 0 || pubkey[0] != 4 { return nil } @@ -128,48 +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} - - // TODO Remove prefixing zero's - - return append(data, tx.v, new(big.Int).SetBytes(tx.r).Bytes(), new(big.Int).SetBytes(tx.s).Bytes()) -} + data := []interface{}{tx.AccountNonce, tx.Price, tx.GasLimit, tx.Recipient, tx.Amount, tx.Payload} -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.AccountNonce = decoder.Get(0).Uint() + tx.Price = decoder.Get(1).BigInt() + tx.GasLimit = 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() - - if IsContractAddr(tx.Recipient) { - tx.contractCreation = true - } + 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 { @@ -180,25 +173,28 @@ func (tx *Transaction) String() string { To: %x Nonce: %v GasPrice: %v - Gas: %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.Sender(), - tx.Recipient, - tx.Nonce, - tx.GasPrice, - tx.Gas, - tx.Value, - tx.Data, - tx.v, - tx.r, - tx.s) + tx.From(), + tx.To(), + tx.AccountNonce, + tx.Price, + tx.GasLimit, + tx.Amount, + tx.Payload, + tx.V, + tx.R, + tx.S, + ethutil.Encode(tx), + ) } // Transaction slice type for basic sorting @@ -221,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 9e18151881044a2c28d293d68937b2c298ff5427..209115eabfdc8ba918270228e9edfe3950baf40a 100644 --- a/core/vm_env.go +++ b/core/vm_env.go @@ -11,28 +11,28 @@ import ( type VMEnv struct { state *state.StateDB block *types.Block - tx *types.Transaction + msg Message depth int } -func NewEnv(state *state.StateDB, tx *types.Transaction, block *types.Block) *VMEnv { +func NewEnv(state *state.StateDB, msg Message, block *types.Block) *VMEnv { return &VMEnv{ state: state, block: block, - tx: tx, + msg: msg, } } -func (self *VMEnv) Origin() []byte { return self.tx.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) 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) Value() *big.Int { return self.tx.Value } +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) { @@ -43,9 +43,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) *Execution { - evm := vm.New(self, vm.DebugVmTy) - - return NewExecution(evm, addr, data, gas, price, value) + 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) { diff --git a/eth/backend.go b/eth/backend.go new file mode 100644 index 0000000000000000000000000000000000000000..383cda46f414bebe6501dbd30ec3a94ea04d2e46 --- /dev/null +++ b/eth/backend.go @@ -0,0 +1,249 @@ +package eth + +import ( + "net" + "sync" + + "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/ethutil" + "github.com/ethereum/go-ethereum/event" + ethlogger "github.com/ethereum/go-ethereum/logger" + "github.com/ethereum/go-ethereum/p2p" + "github.com/ethereum/go-ethereum/pow/ezp" + "github.com/ethereum/go-ethereum/rpc" + "github.com/ethereum/go-ethereum/whisper" +) + +const ( + seedNodeAddress = "poc-7.ethdev.com:30300" +) + +var logger = ethlogger.NewLogger("SERV") + +type Ethereum struct { + // Channel for shutting down the ethereum + shutdownChan chan bool + quit chan bool + + // DB interface + db ethutil.Database + blacklist p2p.Blacklist + + //*** 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 + + server *p2p.Server + eventMux *event.TypeMux + txSub event.Subscription + blockSub event.Subscription + + RpcServer *rpc.JsonRpcServer + keyManager *crypto.KeyManager + + clientIdentity p2p.ClientIdentity + + synclock sync.Mutex + syncGroup sync.WaitGroup + + Mining bool +} + +func New(db ethutil.Database, identity p2p.ClientIdentity, keyManager *crypto.KeyManager, nat p2p.NAT, port string, maxPeers int) (*Ethereum, error) { + + saveProtocolVersion(db) + ethutil.Config.Db = db + + eth := &Ethereum{ + shutdownChan: make(chan bool), + quit: make(chan bool), + db: db, + keyManager: keyManager, + clientIdentity: identity, + blacklist: p2p.NewBlacklist(), + eventMux: &event.TypeMux{}, + } + + eth.chainManager = core.NewChainManager(eth.EventMux()) + eth.txPool = core.NewTxPool(eth.chainManager, eth.EventMux()) + eth.blockManager = core.NewBlockManager(eth.txPool, eth.chainManager, eth.EventMux()) + eth.chainManager.SetProcessor(eth.blockManager) + eth.whisper = whisper.New() + + hasBlock := eth.chainManager.HasBlock + 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()} + + server := &p2p.Server{ + Identity: identity, + MaxPeers: maxPeers, + Protocols: protocols, + ListenAddr: ":" + port, + Blacklist: eth.blacklist, + NAT: nat, + } + + eth.server = server + + return eth, nil +} + +func (s *Ethereum) KeyManager() *crypto.KeyManager { + return s.keyManager +} + +func (s *Ethereum) ClientIdentity() p2p.ClientIdentity { + return s.clientIdentity +} + +func (s *Ethereum) ChainManager() *core.ChainManager { + return s.chainManager +} + +func (s *Ethereum) BlockManager() *core.BlockManager { + return s.blockManager +} + +func (s *Ethereum) TxPool() *core.TxPool { + return s.txPool +} + +func (s *Ethereum) BlockPool() *BlockPool { + return s.blockPool +} + +func (s *Ethereum) Whisper() *whisper.Whisper { + return s.whisper +} + +func (s *Ethereum) EventMux() *event.TypeMux { + return s.eventMux +} +func (self *Ethereum) Db() ethutil.Database { + return self.db +} + +func (s *Ethereum) IsMining() bool { + return s.Mining +} + +func (s *Ethereum) IsListening() bool { + // XXX TODO + return false +} + +func (s *Ethereum) PeerCount() int { + return s.server.PeerCount() +} + +func (s *Ethereum) Peers() []*p2p.Peer { + return s.server.Peers() +} + +func (s *Ethereum) MaxPeers() int { + return s.server.MaxPeers +} + +// Start the ethereum +func (s *Ethereum) Start(seed bool) error { + err := s.server.Start() + if err != nil { + return err + } + s.blockPool.Start() + s.whisper.Start() + + // broadcast transactions + s.txSub = s.eventMux.Subscribe(core.TxPreEvent{}) + go s.txBroadcastLoop() + + // broadcast mined blocks + s.blockSub = s.eventMux.Subscribe(core.NewMinedBlockEvent{}) + go s.blockBroadcastLoop() + + // TODO: read peers here + if seed { + logger.Infof("Connect to seed node %v", seedNodeAddress) + if err := s.SuggestPeer(seedNodeAddress); err != nil { + return err + } + } + + logger.Infoln("Server started") + return nil +} + +func (self *Ethereum) SuggestPeer(addr string) error { + netaddr, err := net.ResolveTCPAddr("tcp", addr) + if err != nil { + logger.Errorf("couldn't resolve %s:", addr, err) + return err + } + + self.server.SuggestPeer(netaddr.IP, netaddr.Port, nil) + return nil +} + +func (s *Ethereum) Stop() { + // Close the database + defer s.db.Close() + + close(s.quit) + + s.txSub.Unsubscribe() // quits txBroadcastLoop + s.blockSub.Unsubscribe() // quits blockBroadcastLoop + + if s.RpcServer != nil { + s.RpcServer.Stop() + } + s.txPool.Stop() + s.eventMux.Stop() + s.blockPool.Stop() + s.whisper.Stop() + + logger.Infoln("Server stopped") + close(s.shutdownChan) +} + +// This function will wait for a shutdown and resumes main thread execution +func (s *Ethereum) WaitForShutdown() { + <-s.shutdownChan +} + +// now tx broadcasting is taken out of txPool +// handled here via subscription, efficiency? +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()}) + } +} + +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()) + } +} + +func saveProtocolVersion(db ethutil.Database) { + d, _ := db.Get([]byte("ProtocolVersion")) + protocolVersion := ethutil.NewValue(d).Uint() + + if protocolVersion == 0 { + db.Put([]byte("ProtocolVersion"), ethutil.NewValue(ProtocolVersion).Bytes()) + } +} diff --git a/eth/block_pool.go b/eth/block_pool.go new file mode 100644 index 0000000000000000000000000000000000000000..7cfbc63f8679bff32de83e36f18cd6810e1e4c8b --- /dev/null +++ b/eth/block_pool.go @@ -0,0 +1,1015 @@ +package eth + +import ( + "math" + "math/big" + "math/rand" + "sort" + "sync" + "time" + + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/ethutil" + ethlogger "github.com/ethereum/go-ethereum/logger" + "github.com/ethereum/go-ethereum/pow" +) + +var poolLogger = ethlogger.NewLogger("Blockpool") + +const ( + blockHashesBatchSize = 256 + blockBatchSize = 64 + blocksRequestInterval = 10 // seconds + blocksRequestRepetition = 1 + blockHashesRequestInterval = 10 // seconds + blocksRequestMaxIdleRounds = 10 + 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 +} + +type BlockPool struct { + lock sync.RWMutex + pool map[string]*poolNode + + peersLock sync.RWMutex + peers map[string]*peerInfo + peer *peerInfo + + quit chan bool + wg sync.WaitGroup + running bool + + // the minimal interface with blockchain + hasBlock func(hash []byte) bool + insertChain func(types.Blocks) error + verifyPoW func(pow.Block) bool +} + +type peerInfo struct { + lock sync.RWMutex + + td *big.Int + currentBlock []byte + id string + + requestBlockHashes func([]byte) error + requestBlocks func([][]byte) error + peerError func(int, string, ...interface{}) + + sections map[string]*section + roots []*poolNode + quitC chan bool +} + +func NewBlockPool(hasBlock func(hash []byte) bool, insertChain func(types.Blocks) error, verifyPoW func(pow.Block) bool, +) *BlockPool { + return &BlockPool{ + hasBlock: hasBlock, + insertChain: insertChain, + verifyPoW: verifyPoW, + } +} + +// allows restart +func (self *BlockPool) Start() { + self.lock.Lock() + if self.running { + self.lock.Unlock() + return + } + self.running = true + self.quit = make(chan bool) + self.pool = make(map[string]*poolNode) + self.lock.Unlock() + + self.peersLock.Lock() + self.peers = make(map[string]*peerInfo) + self.peersLock.Unlock() + + poolLogger.Infoln("Started") + +} + +func (self *BlockPool) Stop() { + self.lock.Lock() + if !self.running { + self.lock.Unlock() + return + } + self.running = false + self.lock.Unlock() + + poolLogger.Infoln("Stopping") + + close(self.quit) + self.lock.Lock() + self.peersLock.Lock() + self.peers = nil + self.pool = nil + self.peer = nil + self.wg.Wait() + self.lock.Unlock() + self.peersLock.Unlock() + poolLogger.Infoln("Stopped") + +} + +// 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 := &peerInfo{ + td: td, + currentBlock: currentBlock, + id: peerId, //peer.Identity().Pubkey() + requestBlockHashes: requestBlockHashes, + requestBlocks: requestBlocks, + peerError: peerError, + } + self.peers[peerId] = peer + poolLogger.Debugf("add new peer %v with td %v", peerId, td) + 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) + self.peer = peer + return true + } + return false +} + +// RemovePeer is called by the eth protocol when the peer disconnects +func (self *BlockPool) RemovePeer(peerId string) { + self.peersLock.Lock() + defer self.peersLock.Unlock() + peer := self.peers[peerId] + if peer == nil { + return + } + self.peers[peerId] = nil + poolLogger.Debugf("remove peer %v", peerId[0:4]) + + // if current best peer is removed, need find a better one + if self.peer != nil && peerId == self.peer.id { + var newPeer *peerInfo + max := ethutil.Big0 + // peer with the highest self-acclaimed TD is chosen + for _, info := range self.peers { + if info.td.Cmp(max) > 0 { + max = info.td + newPeer = info + } + } + self.peer.stop(peer) + peer.start(self.peer) + if newPeer != nil { + poolLogger.Debugf("peer %v with td %v promoted to best peer", newPeer.id[0:4], newPeer.td) + } else { + poolLogger.Warnln("no peers left") + } + } +} + +// Entry point for eth protocol to add block hashes received via BlockHashesMsg +// only hashes from the best peer is handled +// this method is always responsible to initiate further hash requests until +// a known parent is reached unless cancelled by a peerChange event +// this process also launches all request processes on each chain section +// 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 + peer, best := self.getPeer(peerId) + if !best { + return + } + // peer is still the best + + var child *poolNode + var depth int + + // 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 + } + // 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 + } + } + 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() + } + }() +} + +// AddBlock is the entry point for the eth protocol when blockmsg is received upon requests +// It has a strict interpretation of the protocol in that if the block received has not been requested, it results in an error (which can be ignored) +// block is checked for PoW +// 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 { + return + } + if node == nil && !self.hasBlock(hash) { + self.peerError(peerId, ErrUnrequestedBlock, "%x", hash) + return + } + // validate block for PoW + if !self.verifyPoW(block) { + self.peerError(peerId, ErrInvalidPoW, "%x", hash) + } + node.Lock() + node.block = block + node.source = peerId + node.Unlock() +} + +// 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: + } + + node = bottom.parent + bottom.sectionRUnlock() + } + // remember root for this peer + peer.addRoot(node) + self.wg.Done() + }() +} + +// main worker thread on each section in the poolchain +// - kills the section if there are blocks missing after an absolute time +// - kills the section if there are maxIdleRounds of idle rounds of block requests with no response +// - periodically polls the chain section for missing blocks which are then requested from peers +// - registers the process controller on the peer so that if the peer is promoted as best peer the second time (after a disconnect of a better one), all active processes are switched back on unless they expire and killed () +// - 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 + + node.sectionLock() + defer node.sectionUnlock() + section := §ion{controlC: controlC, resetC: resetC} + node.section = section + + 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 + } + // 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 + } + } + + // 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 + } 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 + } + 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 + done = false + // processC supposed to be empty and never closed so just swap, no need to allocate + tempC := processC + processC = missingC + missingC = tempC + } + 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 not root of chain, switch off + poolLogger.Debugf("[%x] parent found, hash requests deactivated (after %v total attempts)\n", hash[0:4], blockHashesRequests) + blockHashesRequestTimer = nil + } 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) + } + 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) + + alarm = false + blocksRequestTimer = nil + blockHashesRequestTimer = nil + 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) + } + 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 + } + alarm = true + processC = missingC + if !once { + // if not run at least once fully, launch iterator + processC = make(chan *poolNode) + missingC = make(chan *poolNode) + self.foldUp(orignode, processC) + once = true + } + } + total = lastMissing + case <-resetC: + once = false + init = false + done = false + case node, ok := <-processC: + if !ok { + // channel closed, first iteration finished + init = true + once = true + continue + } + i++ + // if node has no block + node.RLock() + block := node.block + nhash := node.hash + knownParent := node.knownParent + node.RUnlock() + if !init { + depth++ + } + if block == nil { + missing++ + if !init { + total++ + } + hashes = append(hashes, nhash) + if len(hashes) == blockBatchSize { + 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) + } + } + } + } + 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) + + self.wg.Done() + node.sectionLock() + node.section.controlC = nil + node.sectionUnlock() + // this signals that controller not available + }() + return section + +} + +func (self *BlockPool) peerError(peerId string, code int, format string, params ...interface{}) { + self.peersLock.RLock() + defer self.peersLock.RUnlock() + peer, ok := self.peers[peerId] + if ok { + peer.peerError(code, format, 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 + } + } + i++ + } +} + +func (self *BlockPool) getPeer(peerId string) (*peerInfo, bool) { + self.peersLock.RLock() + defer self.peersLock.RUnlock() + if self.peer != nil && self.peer.id == peerId { + return self.peer, true + } + info, ok := self.peers[peerId] + if !ok { + panic("unknown peer") + } + return info, false +} + +func (self *peerInfo) addSection(hash []byte, section *section) { + self.lock.Lock() + defer self.lock.Unlock() + self.sections[string(hash)] = section +} + +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() + } + } else { + // child is on top of a chain need to close section + child.section.bottom = child + } + // adopt new 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 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 + } + } + 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() { + 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) { + 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 new file mode 100644 index 0000000000000000000000000000000000000000..315cc748db2ea54ff4db917153e075d833d4a67e --- /dev/null +++ b/eth/block_pool_test.go @@ -0,0 +1,198 @@ +package eth + +import ( + "bytes" + "fmt" + "log" + "os" + "sync" + "testing" + + "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" +) + +var sys = ethlogger.NewStdLogSystem(os.Stdout, log.LstdFlags, ethlogger.LogLevel(ethlogger.DebugDetailLevel)) + +type testChainManager struct { + knownBlock func(hash []byte) bool + addBlock func(*types.Block) error + checkPoW func(*types.Block) bool +} + +func (self *testChainManager) KnownBlock(hash []byte) bool { + if self.knownBlock != nil { + return self.knownBlock(hash) + } + 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 + } + } + 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") + } + } + 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...), + } +} + +type intToHash map[int][]byte + +type hashToInt map[string]int + +type testHashPool struct { + intToHash + hashToInt +} + +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) { + for _, i := range indexes { + hash, found := self.intToHash[i] + if !found { + hash = newHash(i) + self.intToHash[i] = hash + self.hashToInt[string(hash)] = i + } + hashes = append(hashes, hash) + } + return +} + +func (self *testHashPool) hashesToIndexes(hashes [][]byte) (indexes []int) { + for _, hash := range hashes { + i, found := self.hashToInt[string(hash)] + if !found { + i = -1 + } + indexes = append(indexes, i) + } + return +} + +type protocolChecker struct { + blockHashesRequests []int + blocksRequests [][]int + invalidBlocks []error + hashPool *testHashPool + lock sync.Mutex +} + +// -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 +} + +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 + } + return +} + +func (self *protocolChecker) invalidBlockCallBack() (invalidBlockCallBack func(error)) { + invalidBlockCallBack = func(err error) { + self.invalidBlocks = append(self.invalidBlocks, err) + } + return +} + +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(), + ) + if !best { + t.Errorf("peer not accepted as best") + } + blockPool.Stop() + +} diff --git a/eth/error.go b/eth/error.go new file mode 100644 index 0000000000000000000000000000000000000000..d1daad575032f8ca3e38e2588044faddf1069676 --- /dev/null +++ b/eth/error.go @@ -0,0 +1,71 @@ +package eth + +import ( + "fmt" +) + +const ( + ErrMsgTooLarge = iota + ErrDecode + ErrInvalidMsgCode + ErrProtocolVersionMismatch + ErrNetworkIdMismatch + ErrGenesisBlockMismatch + ErrNoStatusMsg + ErrExtraStatusMsg + ErrInvalidBlock + ErrInvalidPoW + ErrUnrequestedBlock +) + +var errorToString = map[int]string{ + ErrMsgTooLarge: "Message too long", + ErrDecode: "Invalid message", + ErrInvalidMsgCode: "Invalid message code", + ErrProtocolVersionMismatch: "Protocol version mismatch", + ErrNetworkIdMismatch: "NetworkId mismatch", + ErrGenesisBlockMismatch: "Genesis block mismatch", + ErrNoStatusMsg: "No status message", + ErrExtraStatusMsg: "Extra status message", + ErrInvalidBlock: "Invalid block", + ErrInvalidPoW: "Invalid PoW", + ErrUnrequestedBlock: "Unrequested block", +} + +type protocolError struct { + Code int + fatal bool + message string + format string + params []interface{} + // size int +} + +func newProtocolError(code int, format string, params ...interface{}) *protocolError { + return &protocolError{Code: code, format: format, params: params} +} + +func ProtocolError(code int, format string, params ...interface{}) (err *protocolError) { + err = newProtocolError(code, format, params...) + // report(err) + return +} + +func (self protocolError) Error() (message string) { + message = self.message + if message == "" { + message, ok := errorToString[self.Code] + if !ok { + panic("invalid error code") + } + if self.format != "" { + message += ": " + fmt.Sprintf(self.format, self.params...) + } + self.message = message + } + return +} + +func (self *protocolError) Fatal() bool { + return self.fatal +} diff --git a/eth/peer_util.go b/eth/peer_util.go new file mode 100644 index 0000000000000000000000000000000000000000..6cf80cde29f9699ee38b488c021031d58a475ce7 --- /dev/null +++ b/eth/peer_util.go @@ -0,0 +1,23 @@ +package eth + +import ( + "encoding/json" + + "github.com/ethereum/go-ethereum/ethutil" +) + +func WritePeers(path string, addresses []string) { + if len(addresses) > 0 { + data, _ := json.MarshalIndent(addresses, "", " ") + ethutil.WriteFile(path, data) + } +} + +func ReadPeers(path string) (ips []string, err error) { + var data string + data, err = ethutil.ReadAllFile(path) + if err != nil { + json.Unmarshal([]byte(data), &ips) + } + return +} diff --git a/eth/protocol.go b/eth/protocol.go new file mode 100644 index 0000000000000000000000000000000000000000..963d4179403785cf51a1d05751a9b11ebb7a25e8 --- /dev/null +++ b/eth/protocol.go @@ -0,0 +1,319 @@ +package eth + +import ( + "bytes" + "fmt" + "math" + "math/big" + + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/ethutil" + "github.com/ethereum/go-ethereum/p2p" + "github.com/ethereum/go-ethereum/rlp" +) + +const ( + ProtocolVersion = 49 + NetworkId = 0 + ProtocolLength = uint64(8) + ProtocolMaxMsgSize = 10 * 1024 * 1024 +) + +// eth protocol message codes +const ( + StatusMsg = iota + GetTxMsg // unused + TxMsg + GetBlockHashesMsg + BlockHashesMsg + GetBlocksMsg + BlocksMsg + NewBlockMsg +) + +// ethProtocol represents the ethereum wire protocol +// instance is running on each peer +type ethProtocol struct { + txPool txPool + chainManager chainManager + blockPool blockPool + peer *p2p.Peer + id string + rw p2p.MsgReadWriter +} + +// backend is the interface the ethereum protocol backend should implement +// used as an argument to EthProtocol +type txPool interface { + AddTransactions([]*types.Transaction) +} + +type chainManager interface { + GetBlockHashesFromHash(hash []byte, amount uint64) (hashes [][]byte) + GetBlock(hash []byte) (block *types.Block) + Status() (td *big.Int, currentBlock []byte, genesisBlock []byte) +} + +type blockPool interface { + AddBlockHashes(next func() ([]byte, bool), peerId string) + AddBlock(block *types.Block, peerId string) + AddPeer(td *big.Int, currentBlock []byte, peerId string, requestHashes func([]byte) error, requestBlocks func([][]byte) error, peerError func(int, string, ...interface{})) (best bool) + RemovePeer(peerId string) +} + +// message structs used for rlp decoding +type newBlockMsgData struct { + Block *types.Block + TD *big.Int +} + +type getBlockHashesMsgData struct { + Hash []byte + Amount uint64 +} + +// main entrypoint, wrappers starting a server running the eth protocol +// use this constructor to attach the protocol ("class") to server caps +// the Dev p2p layer then runs the protocol instance on each peer +func EthProtocol(txPool txPool, chainManager chainManager, blockPool blockPool) p2p.Protocol { + return p2p.Protocol{ + Name: "eth", + Version: ProtocolVersion, + Length: ProtocolLength, + Run: func(peer *p2p.Peer, rw p2p.MsgReadWriter) error { + return runEthProtocol(txPool, chainManager, blockPool, peer, rw) + }, + } +} + +// the main loop that handles incoming messages +// note RemovePeer in the post-disconnect hook +func runEthProtocol(txPool txPool, chainManager chainManager, blockPool blockPool, peer *p2p.Peer, rw p2p.MsgReadWriter) (err error) { + self := ðProtocol{ + txPool: txPool, + chainManager: chainManager, + blockPool: blockPool, + rw: rw, + peer: peer, + id: (string)(peer.Identity().Pubkey()), + } + err = self.handleStatus() + if err == nil { + for { + err = self.handle() + if err != nil { + fmt.Println(err) + self.blockPool.RemovePeer(self.id) + break + } + } + } + return +} + +func (self *ethProtocol) handle() error { + msg, err := self.rw.ReadMsg() + if err != nil { + return err + } + if msg.Size > ProtocolMaxMsgSize { + return ProtocolError(ErrMsgTooLarge, "%v > %v", msg.Size, ProtocolMaxMsgSize) + } + // make sure that the payload has been fully consumed + defer msg.Discard() + + switch msg.Code { + + case StatusMsg: + return ProtocolError(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) + } + self.txPool.AddTransactions(txs) + + case GetBlockHashesMsg: + var request getBlockHashesMsgData + if err := msg.Decode(&request); err != nil { + return ProtocolError(ErrDecode, "%v", 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)) + var err error + iter := func() (hash []byte, ok bool) { + hash, err = msgStream.Bytes() + if err == nil { + ok = true + } + 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)) + var blocks []interface{} + for i, hash := range blockHashes { + if i >= max { + break + } + block := self.chainManager.GetBlock(hash) + if block != nil { + blocks = append(blocks, block.RlpData()) + } + } + return self.rw.EncodeMsg(BlocksMsg, blocks...) + + case BlocksMsg: + msgStream := rlp.NewListStream(msg.Payload, uint64(msg.Size)) + for { + var block *types.Block + if err := msgStream.Decode(&block); err != nil { + if err == rlp.EOL { + break + } else { + return ProtocolError(ErrDecode, "%v", err) + } + } + self.blockPool.AddBlock(block, self.id) + } + + case NewBlockMsg: + var request newBlockMsgData + if err := msg.Decode(&request); err != nil { + return ProtocolError(ErrDecode, "%v", err) + } + hash := request.Block.Hash() + // to simplify backend interface adding a new block + // 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() (hash []byte, ok bool) { + if called { + called = false + return hash, true + } else { + return + } + } + self.blockPool.AddBlockHashes(iter, self.id) + self.blockPool.AddBlock(request.Block, self.id) + } + + default: + return ProtocolError(ErrInvalidMsgCode, "%v", msg.Code) + } + return nil +} + +type statusMsgData struct { + ProtocolVersion uint + NetworkId uint + TD *big.Int + CurrentBlock []byte + GenesisBlock []byte +} + +func (self *ethProtocol) statusMsg() p2p.Msg { + td, currentBlock, genesisBlock := self.chainManager.Status() + + return p2p.NewMsg(StatusMsg, + uint32(ProtocolVersion), + uint32(NetworkId), + td, + currentBlock, + genesisBlock, + ) +} + +func (self *ethProtocol) handleStatus() error { + // send precanned status message + if err := self.rw.WriteMsg(self.statusMsg()); err != nil { + return err + } + + // read and handle remote status + msg, err := self.rw.ReadMsg() + if err != nil { + return err + } + + if msg.Code != StatusMsg { + return ProtocolError(ErrNoStatusMsg, "first msg has code %x (!= %x)", msg.Code, StatusMsg) + } + + if msg.Size > ProtocolMaxMsgSize { + return ProtocolError(ErrMsgTooLarge, "%v > %v", msg.Size, ProtocolMaxMsgSize) + } + + var status statusMsgData + if err := msg.Decode(&status); err != nil { + return ProtocolError(ErrDecode, "%v", err) + } + + _, _, genesisBlock := self.chainManager.Status() + + if bytes.Compare(status.GenesisBlock, genesisBlock) != 0 { + return ProtocolError(ErrGenesisBlockMismatch, "%x (!= %x)", status.GenesisBlock, genesisBlock) + } + + if status.NetworkId != NetworkId { + return ProtocolError(ErrNetworkIdMismatch, "%d (!= %d)", status.NetworkId, NetworkId) + } + + if ProtocolVersion != status.ProtocolVersion { + return ProtocolError(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)") + + 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) +} + +func (self *ethProtocol) requestBlocks(hashes [][]byte) error { + self.peer.Debugf("fetching %v blocks", len(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) + } else { + self.peer.Debugln(err) + } + return +} + +func (self *ethProtocol) protoErrorDisconnect(code int, format string, params ...interface{}) { + err := ProtocolError(code, format, params...) + if err.Fatal() { + self.peer.Errorln(err) + // disconnect + } else { + self.peer.Debugln(err) + } + +} diff --git a/eth/protocol_test.go b/eth/protocol_test.go new file mode 100644 index 0000000000000000000000000000000000000000..322aec7b70141cc6ca02e8a15799b24e37a7dcc6 --- /dev/null +++ b/eth/protocol_test.go @@ -0,0 +1,232 @@ +package eth + +import ( + "io" + "math/big" + "testing" + + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/p2p" +) + +type testMsgReadWriter struct { + in chan p2p.Msg + out chan 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) WriteMsg(msg p2p.Msg) error { + self.out <- msg + 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 { + return msg, io.EOF + } + 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 { + 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 +} + +func (self *TestBackend) AddTransactions(txs []*types.Transaction) { + if self.addTransactions != nil { + self.addTransactions(txs) + } +} + +func (self *TestBackend) GetBlockHashes(hash []byte, amount uint32) (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) { + if self.status != nil { + td, currentBlock, genesisBlock = self.status() + } + return +} + +<<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> eth protocol changes +// TODO: refactor this into p2p/client_identity +type peerId struct { + pubkey []byte +} + +func (self *peerId) String() string { + return "test peer" +} + +func (self *peerId) Pubkey() (pubkey []byte) { + pubkey = self.pubkey + if len(pubkey) == 0 { + pubkey = crypto.GenerateNewKeyPair().PublicKey + self.pubkey = pubkey + } + return +} + +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) +} diff --git a/ethdb/database.go b/ethdb/database.go index 19aa83466e71aaa523f2725bd184edb1ce47db8c..47ddec9c0230c85edac6bc52c2f73a47a6a7601b 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() diff --git a/ethereum.go b/ethereum.go deleted file mode 100644 index e8b1a9500c4d8545e4cd5da049003032af0cbdf4..0000000000000000000000000000000000000000 --- a/ethereum.go +++ /dev/null @@ -1,659 +0,0 @@ -package eth - -import ( - "container/list" - "encoding/json" - "fmt" - "math/big" - "math/rand" - "net" - "path" - "strconv" - "strings" - "sync" - "sync/atomic" - "time" - - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethutil" - "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/rpc" - "github.com/ethereum/go-ethereum/state" - "github.com/ethereum/go-ethereum/wire" -) - -const ( - seedTextFileUri string = "http://www.ethereum.org/servers.poc3.txt" - seedNodeAddress = "poc-7.ethdev.com:30303" -) - -var loggerger = logger.NewLogger("SERV") - -func eachPeer(peers *list.List, callback func(*Peer, *list.Element)) { - // Loop thru the peers and close them (if we had them) - for e := peers.Front(); e != nil; e = e.Next() { - callback(e.Value.(*Peer), e) - } -} - -const ( - processReapingTimeout = 60 // TODO increase -) - -type Ethereum struct { - // Channel for shutting down the ethereum - shutdownChan chan bool - quit chan bool - - // DB interface - db ethutil.Database - // State manager for processing new blocks and managing the over all states - blockManager *core.BlockManager - // The transaction pool. Transaction can be pushed on this pool - // for later including in the blocks - txPool *core.TxPool - // The canonical chain - blockChain *core.ChainManager - // The block pool - blockPool *BlockPool - // Eventer - eventMux event.TypeMux - // Peers - peers *list.List - // Nonce - Nonce uint64 - - Addr net.Addr - Port string - - blacklist [][]byte - - peerMut sync.Mutex - - // Capabilities for outgoing peers - serverCaps Caps - - nat NAT - - // Specifies the desired amount of maximum peers - MaxPeers int - - Mining bool - - listening bool - - RpcServer *rpc.JsonRpcServer - - keyManager *crypto.KeyManager - - clientIdentity wire.ClientIdentity - - isUpToDate bool - - filterMu sync.RWMutex - filterId int - filters map[int]*core.Filter -} - -func New(db ethutil.Database, clientIdentity wire.ClientIdentity, keyManager *crypto.KeyManager, caps Caps, usePnp bool) (*Ethereum, error) { - var err error - var nat NAT - - if usePnp { - nat, err = Discover() - if err != nil { - loggerger.Debugln("UPnP failed", err) - } - } - - bootstrapDb(db) - - ethutil.Config.Db = db - - nonce, _ := ethutil.RandomUint64() - ethereum := &Ethereum{ - shutdownChan: make(chan bool), - quit: make(chan bool), - db: db, - peers: list.New(), - Nonce: nonce, - serverCaps: caps, - nat: nat, - keyManager: keyManager, - clientIdentity: clientIdentity, - isUpToDate: true, - filters: make(map[int]*core.Filter), - } - - ethereum.blockPool = NewBlockPool(ethereum) - ethereum.txPool = core.NewTxPool(ethereum) - ethereum.blockChain = core.NewChainManager(ethereum.EventMux()) - ethereum.blockManager = core.NewBlockManager(ethereum) - ethereum.blockChain.SetProcessor(ethereum.blockManager) - - // Start the tx pool - ethereum.txPool.Start() - - return ethereum, nil -} - -func (s *Ethereum) KeyManager() *crypto.KeyManager { - return s.keyManager -} - -func (s *Ethereum) ClientIdentity() wire.ClientIdentity { - return s.clientIdentity -} - -func (s *Ethereum) ChainManager() *core.ChainManager { - return s.blockChain -} - -func (s *Ethereum) BlockManager() *core.BlockManager { - return s.blockManager -} - -func (s *Ethereum) TxPool() *core.TxPool { - return s.txPool -} -func (s *Ethereum) BlockPool() *BlockPool { - return s.blockPool -} -func (s *Ethereum) EventMux() *event.TypeMux { - return &s.eventMux -} -func (self *Ethereum) Db() ethutil.Database { - return self.db -} - -func (s *Ethereum) ServerCaps() Caps { - return s.serverCaps -} -func (s *Ethereum) IsMining() bool { - return s.Mining -} -func (s *Ethereum) PeerCount() int { - return s.peers.Len() -} -func (s *Ethereum) IsUpToDate() bool { - upToDate := true - eachPeer(s.peers, func(peer *Peer, e *list.Element) { - if atomic.LoadInt32(&peer.connected) == 1 { - if peer.catchingUp == true && peer.versionKnown { - upToDate = false - } - } - }) - return upToDate -} -func (s *Ethereum) PushPeer(peer *Peer) { - s.peers.PushBack(peer) -} -func (s *Ethereum) IsListening() bool { - return s.listening -} - -func (s *Ethereum) HighestTDPeer() (td *big.Int) { - td = big.NewInt(0) - - eachPeer(s.peers, func(p *Peer, v *list.Element) { - if p.td.Cmp(td) > 0 { - td = p.td - } - }) - - return -} - -func (self *Ethereum) BlacklistPeer(peer *Peer) { - self.blacklist = append(self.blacklist, peer.pubkey) -} - -func (s *Ethereum) AddPeer(conn net.Conn) { - peer := NewPeer(conn, s, true) - - if peer != nil { - if s.peers.Len() < s.MaxPeers { - peer.Start() - } else { - loggerger.Debugf("Max connected peers reached. Not adding incoming peer.") - } - } -} - -func (s *Ethereum) ProcessPeerList(addrs []string) { - for _, addr := range addrs { - // TODO Probably requires some sanity checks - s.ConnectToPeer(addr) - } -} - -func (s *Ethereum) ConnectToPeer(addr string) error { - if s.peers.Len() < s.MaxPeers { - var alreadyConnected bool - - ahost, aport, _ := net.SplitHostPort(addr) - var chost string - - ips, err := net.LookupIP(ahost) - - if err != nil { - return err - } else { - // If more then one ip is available try stripping away the ipv6 ones - if len(ips) > 1 { - var ipsv4 []net.IP - // For now remove the ipv6 addresses - for _, ip := range ips { - if strings.Contains(ip.String(), "::") { - continue - } else { - ipsv4 = append(ipsv4, ip) - } - } - if len(ipsv4) == 0 { - return fmt.Errorf("[SERV] No IPV4 addresses available for hostname") - } - - // Pick a random ipv4 address, simulating round-robin DNS. - rand.Seed(time.Now().UTC().UnixNano()) - i := rand.Intn(len(ipsv4)) - chost = ipsv4[i].String() - } else { - if len(ips) == 0 { - return fmt.Errorf("[SERV] No IPs resolved for the given hostname") - return nil - } - chost = ips[0].String() - } - } - - eachPeer(s.peers, func(p *Peer, v *list.Element) { - if p.conn == nil { - return - } - phost, pport, _ := net.SplitHostPort(p.conn.RemoteAddr().String()) - - if phost == chost && pport == aport { - alreadyConnected = true - //loggerger.Debugf("Peer %s already added.\n", chost) - return - } - }) - - if alreadyConnected { - return nil - } - - NewOutboundPeer(addr, s, s.serverCaps) - } - - return nil -} - -func (s *Ethereum) OutboundPeers() []*Peer { - // Create a new peer slice with at least the length of the total peers - outboundPeers := make([]*Peer, s.peers.Len()) - length := 0 - eachPeer(s.peers, func(p *Peer, e *list.Element) { - if !p.inbound && p.conn != nil { - outboundPeers[length] = p - length++ - } - }) - - return outboundPeers[:length] -} - -func (s *Ethereum) InboundPeers() []*Peer { - // Create a new peer slice with at least the length of the total peers - inboundPeers := make([]*Peer, s.peers.Len()) - length := 0 - eachPeer(s.peers, func(p *Peer, e *list.Element) { - if p.inbound { - inboundPeers[length] = p - length++ - } - }) - - return inboundPeers[:length] -} - -func (s *Ethereum) InOutPeers() []*Peer { - // Reap the dead peers first - s.reapPeers() - - // Create a new peer slice with at least the length of the total peers - inboundPeers := make([]*Peer, s.peers.Len()) - length := 0 - eachPeer(s.peers, func(p *Peer, e *list.Element) { - // Only return peers with an actual ip - if len(p.host) > 0 { - inboundPeers[length] = p - length++ - } - }) - - return inboundPeers[:length] -} - -func (s *Ethereum) Broadcast(msgType wire.MsgType, data []interface{}) { - msg := wire.NewMessage(msgType, data) - s.BroadcastMsg(msg) -} - -func (s *Ethereum) BroadcastMsg(msg *wire.Msg) { - eachPeer(s.peers, func(p *Peer, e *list.Element) { - p.QueueMessage(msg) - }) -} - -func (s *Ethereum) Peers() *list.List { - return s.peers -} - -func (s *Ethereum) reapPeers() { - eachPeer(s.peers, func(p *Peer, e *list.Element) { - if atomic.LoadInt32(&p.disconnect) == 1 || (p.inbound && (time.Now().Unix()-p.lastPong) > int64(5*time.Minute)) { - s.removePeerElement(e) - } - }) -} - -func (s *Ethereum) removePeerElement(e *list.Element) { - s.peerMut.Lock() - defer s.peerMut.Unlock() - - s.peers.Remove(e) - - s.eventMux.Post(PeerListEvent{s.peers}) -} - -func (s *Ethereum) RemovePeer(p *Peer) { - eachPeer(s.peers, func(peer *Peer, e *list.Element) { - if peer == p { - s.removePeerElement(e) - } - }) -} - -func (s *Ethereum) reapDeadPeerHandler() { - reapTimer := time.NewTicker(processReapingTimeout * time.Second) - - for { - select { - case <-reapTimer.C: - s.reapPeers() - } - } -} - -// Start the ethereum -func (s *Ethereum) Start(seed bool) { - s.blockPool.Start() - - // Bind to addr and port - ln, err := net.Listen("tcp", ":"+s.Port) - if err != nil { - loggerger.Warnf("Port %s in use. Connection listening disabled. Acting as client", s.Port) - s.listening = false - } else { - s.listening = true - // Starting accepting connections - loggerger.Infoln("Ready and accepting connections") - // Start the peer handler - go s.peerHandler(ln) - } - - if s.nat != nil { - go s.upnpUpdateThread() - } - - // Start the reaping processes - go s.reapDeadPeerHandler() - go s.update() - go s.filterLoop() - - if seed { - s.Seed() - } - s.ConnectToPeer("localhost:40404") - loggerger.Infoln("Server started") -} - -func (s *Ethereum) Seed() { - // Sorry Py person. I must blacklist. you perform badly - s.blacklist = append(s.blacklist, ethutil.Hex2Bytes("64656330303561383532336435376331616537643864663236623336313863373537353163636634333530626263396330346237336262623931383064393031")) - ips := PastPeers() - if len(ips) > 0 { - for _, ip := range ips { - loggerger.Infoln("Connecting to previous peer ", ip) - s.ConnectToPeer(ip) - } - } else { - loggerger.Debugln("Retrieving seed nodes") - - // Eth-Go Bootstrapping - ips, er := net.LookupIP("seed.bysh.me") - if er == nil { - peers := []string{} - for _, ip := range ips { - node := fmt.Sprintf("%s:%d", ip.String(), 30303) - loggerger.Debugln("Found DNS Go Peer:", node) - peers = append(peers, node) - } - s.ProcessPeerList(peers) - } - - // Official DNS Bootstrapping - _, nodes, err := net.LookupSRV("eth", "tcp", "ethereum.org") - if err == nil { - peers := []string{} - // Iterate SRV nodes - for _, n := range nodes { - target := n.Target - port := strconv.Itoa(int(n.Port)) - // Resolve target to ip (Go returns list, so may resolve to multiple ips?) - addr, err := net.LookupHost(target) - if err == nil { - for _, a := range addr { - // Build string out of SRV port and Resolved IP - peer := net.JoinHostPort(a, port) - loggerger.Debugln("Found DNS Bootstrap Peer:", peer) - peers = append(peers, peer) - } - } else { - loggerger.Debugln("Couldn't resolve :", target) - } - } - // Connect to Peer list - s.ProcessPeerList(peers) - } - - s.ConnectToPeer(seedNodeAddress) - } -} - -func (s *Ethereum) peerHandler(listener net.Listener) { - for { - conn, err := listener.Accept() - if err != nil { - loggerger.Debugln(err) - - continue - } - - go s.AddPeer(conn) - } -} - -func (s *Ethereum) Stop() { - // Stop eventMux first, it will close all subscriptions. - s.eventMux.Stop() - - // Close the database - defer s.db.Close() - - var ips []string - eachPeer(s.peers, func(p *Peer, e *list.Element) { - ips = append(ips, p.conn.RemoteAddr().String()) - }) - - if len(ips) > 0 { - d, _ := json.MarshalIndent(ips, "", " ") - ethutil.WriteFile(path.Join(ethutil.Config.ExecPath, "known_peers.json"), d) - } - - eachPeer(s.peers, func(p *Peer, e *list.Element) { - p.Stop() - }) - - close(s.quit) - - if s.RpcServer != nil { - s.RpcServer.Stop() - } - s.txPool.Stop() - s.blockPool.Stop() - - loggerger.Infoln("Server stopped") - close(s.shutdownChan) -} - -// This function will wait for a shutdown and resumes main thread execution -func (s *Ethereum) WaitForShutdown() { - <-s.shutdownChan -} - -func (s *Ethereum) upnpUpdateThread() { - // Go off immediately to prevent code duplication, thereafter we renew - // lease every 15 minutes. - timer := time.NewTimer(5 * time.Minute) - lport, _ := strconv.ParseInt(s.Port, 10, 16) - first := true -out: - for { - select { - case <-timer.C: - var err error - _, err = s.nat.AddPortMapping("TCP", int(lport), int(lport), "eth listen port", 20*60) - if err != nil { - loggerger.Debugln("can't add UPnP port mapping:", err) - break out - } - if first && err == nil { - _, err = s.nat.GetExternalAddress() - if err != nil { - loggerger.Debugln("UPnP can't get external address:", err) - continue out - } - first = false - } - timer.Reset(time.Minute * 15) - case <-s.quit: - break out - } - } - - timer.Stop() - - if err := s.nat.DeletePortMapping("TCP", int(lport), int(lport)); err != nil { - loggerger.Debugln("unable to remove UPnP port mapping:", err) - } else { - loggerger.Debugln("succesfully disestablished UPnP port mapping") - } -} - -func (self *Ethereum) update() { - upToDateTimer := time.NewTicker(1 * time.Second) - -out: - for { - select { - case <-upToDateTimer.C: - if self.IsUpToDate() && !self.isUpToDate { - self.eventMux.Post(ChainSyncEvent{false}) - self.isUpToDate = true - } else if !self.IsUpToDate() && self.isUpToDate { - self.eventMux.Post(ChainSyncEvent{true}) - self.isUpToDate = false - } - case <-self.quit: - break out - } - } -} - -// InstallFilter adds filter for blockchain events. -// The filter's callbacks will run for matching blocks and messages. -// The filter should not be modified after it has been installed. -func (self *Ethereum) InstallFilter(filter *core.Filter) (id int) { - self.filterMu.Lock() - id = self.filterId - self.filters[id] = filter - self.filterId++ - self.filterMu.Unlock() - return id -} - -func (self *Ethereum) UninstallFilter(id int) { - self.filterMu.Lock() - delete(self.filters, id) - self.filterMu.Unlock() -} - -// GetFilter retrieves a filter installed using InstallFilter. -// The filter may not be modified. -func (self *Ethereum) GetFilter(id int) *core.Filter { - self.filterMu.RLock() - defer self.filterMu.RUnlock() - return self.filters[id] -} - -func (self *Ethereum) filterLoop() { - // Subscribe to events - events := self.eventMux.Subscribe(core.NewBlockEvent{}, state.Messages(nil)) - for event := range events.Chan() { - switch event := event.(type) { - case core.NewBlockEvent: - self.filterMu.RLock() - for _, filter := range self.filters { - if filter.BlockCallback != nil { - filter.BlockCallback(event.Block) - } - } - self.filterMu.RUnlock() - - case state.Messages: - self.filterMu.RLock() - for _, filter := range self.filters { - if filter.MessageCallback != nil { - msgs := filter.FilterMessages(event) - if len(msgs) > 0 { - filter.MessageCallback(msgs) - } - } - } - self.filterMu.RUnlock() - } - } -} - -func bootstrapDb(db ethutil.Database) { - d, _ := db.Get([]byte("ProtocolVersion")) - protov := ethutil.NewValue(d).Uint() - - if protov == 0 { - db.Put([]byte("ProtocolVersion"), ethutil.NewValue(ProtocolVersion).Bytes()) - } -} - -func PastPeers() []string { - var ips []string - data, _ := ethutil.ReadAllFile(path.Join(ethutil.Config.ExecPath, "known_peers.json")) - json.Unmarshal([]byte(data), &ips) - - return ips -} diff --git a/ethutil/rlp.go b/ethutil/rlp.go index 157dd4dd9f3a335d9124febd141dcdba140283f1..1bc1a58a715533fe576af796470888e15653bda8 100644 --- a/ethutil/rlp.go +++ b/ethutil/rlp.go @@ -2,7 +2,6 @@ package ethutil import ( "bytes" - "encoding/binary" "fmt" "math/big" "reflect" @@ -193,8 +192,13 @@ func Encode(object interface{}) []byte { if blen < 56 { buff.WriteByte(byte(blen) + 0xc0) } else { - buff.WriteByte(byte(intlen(int64(blen))) + 0xf7) - binary.Write(&buff, binary.BigEndian, int64(blen)) + ilen := byte(intlen(int64(blen))) + buff.WriteByte(ilen + 0xf7) + t := make([]byte, ilen) + for i := byte(0); i < ilen; i++ { + t[ilen-i-1] = byte(blen >> (i * 8)) + } + buff.Write(t) } buff.ReadFrom(&b) } diff --git a/ethutil/value.go b/ethutil/value.go index 6417b000817062c5fb84f12cd94da0ff29df2bf9..7d4a7d98c387d9c547ab1b80973672c7b0527fe1 100644 --- a/ethutil/value.go +++ b/ethutil/value.go @@ -397,5 +397,5 @@ func (it *ValueIterator) Value() *Value { } func (it *ValueIterator) Idx() int { - return it.idx + return it.idx - 1 } diff --git a/event/filter/generic_filter.go b/event/filter/generic_filter.go index b04b4801e773a10059a936dc88defed48658b920..2ce0f0642bb4475f190c58c0889070248b03668b 100644 --- a/event/filter/generic_filter.go +++ b/event/filter/generic_filter.go @@ -2,19 +2,29 @@ package filter type Generic struct { Str1, Str2, Str3 string + Data map[string]struct{} Fn func(data interface{}) } +// self = registered, f = incoming func (self Generic) Compare(f Filter) bool { + var strMatch, dataMatch = true, true + filter := f.(Generic) - if (len(self.Str1) == 0 || filter.Str1 == self.Str1) && - (len(self.Str2) == 0 || filter.Str2 == self.Str2) && - (len(self.Str3) == 0 || filter.Str3 == self.Str3) { - return true + if (len(self.Str1) > 0 && filter.Str1 != self.Str1) || + (len(self.Str2) > 0 && filter.Str2 != self.Str2) || + (len(self.Str3) > 0 && filter.Str3 != self.Str3) { + strMatch = false + } + + for k, _ := range self.Data { + if _, ok := filter.Data[k]; !ok { + return false + } } - return false + return strMatch && dataMatch } func (self Generic) Trigger(data interface{}) { diff --git a/event/filter/old_filter.go b/event/filter/old_filter.go new file mode 100644 index 0000000000000000000000000000000000000000..1a9a88173a6c12979263d01eb6f161b200a7cfbf --- /dev/null +++ b/event/filter/old_filter.go @@ -0,0 +1,94 @@ +// XXX This is the old filter system specifically for messages. This is till in used and could use some refactoring +package filter + +import ( + "sync" + + "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/event" + "github.com/ethereum/go-ethereum/state" +) + +type FilterManager struct { + eventMux *event.TypeMux + + filterMu sync.RWMutex + filterId int + filters map[int]*core.Filter + + quit chan struct{} +} + +func NewFilterManager(mux *event.TypeMux) *FilterManager { + return &FilterManager{ + eventMux: mux, + filters: make(map[int]*core.Filter), + } +} + +func (self *FilterManager) Start() { + go self.filterLoop() +} + +func (self *FilterManager) Stop() { + close(self.quit) +} + +func (self *FilterManager) InstallFilter(filter *core.Filter) (id int) { + self.filterMu.Lock() + id = self.filterId + self.filters[id] = filter + self.filterId++ + self.filterMu.Unlock() + return id +} + +func (self *FilterManager) UninstallFilter(id int) { + self.filterMu.Lock() + delete(self.filters, id) + self.filterMu.Unlock() +} + +// GetFilter retrieves a filter installed using InstallFilter. +// The filter may not be modified. +func (self *FilterManager) GetFilter(id int) *core.Filter { + self.filterMu.RLock() + defer self.filterMu.RUnlock() + return self.filters[id] +} + +func (self *FilterManager) filterLoop() { + // Subscribe to events + events := self.eventMux.Subscribe(core.NewBlockEvent{}, state.Messages(nil)) + +out: + for { + select { + case <-self.quit: + break out + case event := <-events.Chan(): + switch event := event.(type) { + case core.NewBlockEvent: + self.filterMu.RLock() + for _, filter := range self.filters { + if filter.BlockCallback != nil { + filter.BlockCallback(event.Block) + } + } + self.filterMu.RUnlock() + + case state.Messages: + self.filterMu.RLock() + for _, filter := range self.filters { + if filter.MessageCallback != nil { + msgs := filter.FilterMessages(event) + if len(msgs) > 0 { + filter.MessageCallback(msgs) + } + } + } + self.filterMu.RUnlock() + } + } + } +} diff --git a/events.go b/events.go deleted file mode 100644 index 5fff1d8314e6322b3ebedb0af18a4a1b971e8003..0000000000000000000000000000000000000000 --- a/events.go +++ /dev/null @@ -1,11 +0,0 @@ -package eth - -import "container/list" - -type PeerListEvent struct { - Peers *list.List -} - -type ChainSyncEvent struct { - InSync bool -} diff --git a/gocoverage.sh b/gocoverage.sh index 35038108b943305b42bffb95b68aa9c68b3b32ba..24c8e9280173bcc1363bb1e3408a98d850ef00bc 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 @@ -26,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 diff --git a/install_deps.sh b/install_deps.sh deleted file mode 100755 index 73a31332448304ec124f3a4c9d2f3e28eec61077..0000000000000000000000000000000000000000 --- 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 diff --git a/javascript/javascript_runtime.go b/javascript/javascript_runtime.go index a26f0154e7d26df73a34ac23ff02ccefd79b0b70..af1405049f30234b7564f59c6c3e28d539fbefc7 100644 --- a/javascript/javascript_runtime.go +++ b/javascript/javascript_runtime.go @@ -7,10 +7,10 @@ import ( "path" "path/filepath" - "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/eth" "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/logger" @@ -203,7 +203,7 @@ func (self *JSRE) addPeer(call otto.FunctionCall) otto.Value { if err != nil { return otto.FalseValue() } - self.ethereum.ConnectToPeer(host) + self.ethereum.SuggestPeer(host) return otto.TrueValue() } diff --git a/javascript/types.go b/javascript/types.go index d5acaecce8ad34a8647f82fb314be9e8126944f6..ce1d9995a49075f49977b4e92f30883fa70b57d3 100644 --- a/javascript/types.go +++ b/javascript/types.go @@ -3,7 +3,7 @@ package javascript import ( "fmt" - "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/eth" "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/state" "github.com/ethereum/go-ethereum/ui" @@ -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/miner/miner.go b/miner/miner.go index dc69dddc04880fa95842c4f700b8ba311828be5d..aefcadab80bb3d11988289835dfb0b93e3c8ef97 100644 --- a/miner/miner.go +++ b/miner/miner.go @@ -27,7 +27,7 @@ import ( "math/big" "sort" - "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/eth" "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/pow" "github.com/ethereum/go-ethereum/pow/ezp" @@ -36,7 +36,6 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/wire" ) type LocalTx struct { @@ -57,7 +56,7 @@ type Miner struct { eth *eth.Ethereum events event.Subscription - uncles types.Blocks + uncles []*types.Header localTxs map[int]*LocalTx localTxId int @@ -185,15 +184,17 @@ 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() + 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) } @@ -203,21 +204,22 @@ 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)) // 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) } else { - self.eth.Broadcast(wire.MsgBlockTy, []interface{}{block.Value().Val}) + self.eth.EventMux().Post(core.NewMinedBlockEvent{block}) minerlogger.Infof("🔨 Mined block %x\n", block.Hash()) minerlogger.Infoln(block) @@ -237,8 +239,8 @@ func (self *Miner) finiliseTxs() types.Transactions { key := self.eth.KeyManager() for i, ltx := range self.localTxs { tx := types.NewTransactionMessage(ltx.To, ethutil.Big(ltx.Value), ethutil.Big(ltx.Gas), ethutil.Big(ltx.GasPrice), ltx.Data) - tx.Nonce = state.GetNonce(self.Coinbase) - state.SetNonce(self.Coinbase, tx.Nonce+1) + tx.SetNonce(state.GetNonce(self.Coinbase)) + state.SetNonce(self.Coinbase, tx.Nonce()+1) tx.Sign(key.PrivateKey()) @@ -246,8 +248,8 @@ func (self *Miner) finiliseTxs() types.Transactions { } // Faster than append - for _, tx := range self.eth.TxPool().CurrentTransactions() { - if tx.GasPrice.Cmp(self.MinAcceptedGasPrice) >= 0 { + for _, tx := range self.eth.TxPool().GetTransactions() { + if tx.GasPrice().Cmp(self.MinAcceptedGasPrice) >= 0 { txs[actualSize] = tx actualSize++ } diff --git a/nat.go b/nat.go deleted file mode 100644 index 999308eb267696493004f7b31614a1ad56be603b..0000000000000000000000000000000000000000 --- a/nat.go +++ /dev/null @@ -1,12 +0,0 @@ -package eth - -import ( - "net" -) - -// protocol is either "udp" or "tcp" -type NAT interface { - GetExternalAddress() (addr net.IP, err error) - AddPortMapping(protocol string, externalPort, internalPort int, description string, timeout int) (mappedExternalPort int, err error) - DeletePortMapping(protocol string, externalPort, internalPort int) (err error) -} diff --git a/natpmp.go b/natpmp.go deleted file mode 100644 index 489342a4be162876ff59f641218f6110e7ae4b99..0000000000000000000000000000000000000000 --- a/natpmp.go +++ /dev/null @@ -1,55 +0,0 @@ -package eth - -import ( - "fmt" - "net" - - natpmp "github.com/jackpal/go-nat-pmp" -) - -// Adapt the NAT-PMP protocol to the NAT interface - -// TODO: -// + Register for changes to the external address. -// + Re-register port mapping when router reboots. -// + A mechanism for keeping a port mapping registered. - -type natPMPClient struct { - client *natpmp.Client -} - -func NewNatPMP(gateway net.IP) (nat NAT) { - return &natPMPClient{natpmp.NewClient(gateway)} -} - -func (n *natPMPClient) GetExternalAddress() (addr net.IP, err error) { - response, err := n.client.GetExternalAddress() - if err != nil { - return - } - ip := response.ExternalIPAddress - addr = net.IPv4(ip[0], ip[1], ip[2], ip[3]) - return -} - -func (n *natPMPClient) AddPortMapping(protocol string, externalPort, internalPort int, - description string, timeout int) (mappedExternalPort int, err error) { - if timeout <= 0 { - err = fmt.Errorf("timeout must not be <= 0") - return - } - // Note order of port arguments is switched between our AddPortMapping and the client's AddPortMapping. - response, err := n.client.AddPortMapping(protocol, internalPort, externalPort, timeout) - if err != nil { - return - } - mappedExternalPort = int(response.MappedExternalPort) - return -} - -func (n *natPMPClient) DeletePortMapping(protocol string, externalPort, internalPort int) (err error) { - // To destroy a mapping, send an add-port with - // an internalPort of the internal port to destroy, an external port of zero and a time of zero. - _, err = n.client.AddPortMapping(protocol, internalPort, 0, 0) - return -} diff --git a/natupnp.go b/natupnp.go deleted file mode 100644 index c7f9eeb622b30b3641cc51cbf3be29c63e73f21c..0000000000000000000000000000000000000000 --- a/natupnp.go +++ /dev/null @@ -1,338 +0,0 @@ -package eth - -// Just enough UPnP to be able to forward ports -// - -import ( - "bytes" - "encoding/xml" - "errors" - "net" - "net/http" - "os" - "strconv" - "strings" - "time" -) - -type upnpNAT struct { - serviceURL string - ourIP string -} - -func Discover() (nat NAT, err error) { - ssdp, err := net.ResolveUDPAddr("udp4", "239.255.255.250:1900") - if err != nil { - return - } - conn, err := net.ListenPacket("udp4", ":0") - if err != nil { - return - } - socket := conn.(*net.UDPConn) - defer socket.Close() - - err = socket.SetDeadline(time.Now().Add(10 * time.Second)) - if err != nil { - return - } - - st := "ST: urn:schemas-upnp-org:device:InternetGatewayDevice:1\r\n" - buf := bytes.NewBufferString( - "M-SEARCH * HTTP/1.1\r\n" + - "HOST: 239.255.255.250:1900\r\n" + - st + - "MAN: \"ssdp:discover\"\r\n" + - "MX: 2\r\n\r\n") - message := buf.Bytes() - answerBytes := make([]byte, 1024) - for i := 0; i < 3; i++ { - _, err = socket.WriteToUDP(message, ssdp) - if err != nil { - return - } - var n int - n, _, err = socket.ReadFromUDP(answerBytes) - if err != nil { - continue - // socket.Close() - // return - } - answer := string(answerBytes[0:n]) - if strings.Index(answer, "\r\n"+st) < 0 { - continue - } - // HTTP header field names are case-insensitive. - // http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 - locString := "\r\nlocation: " - answer = strings.ToLower(answer) - locIndex := strings.Index(answer, locString) - if locIndex < 0 { - continue - } - loc := answer[locIndex+len(locString):] - endIndex := strings.Index(loc, "\r\n") - if endIndex < 0 { - continue - } - locURL := loc[0:endIndex] - var serviceURL string - serviceURL, err = getServiceURL(locURL) - if err != nil { - return - } - var ourIP string - ourIP, err = getOurIP() - if err != nil { - return - } - nat = &upnpNAT{serviceURL: serviceURL, ourIP: ourIP} - return - } - err = errors.New("UPnP port discovery failed.") - return -} - -// service represents the Service type in an UPnP xml description. -// Only the parts we care about are present and thus the xml may have more -// fields than present in the structure. -type service struct { - ServiceType string `xml:"serviceType"` - ControlURL string `xml:"controlURL"` -} - -// deviceList represents the deviceList type in an UPnP xml description. -// Only the parts we care about are present and thus the xml may have more -// fields than present in the structure. -type deviceList struct { - XMLName xml.Name `xml:"deviceList"` - Device []device `xml:"device"` -} - -// serviceList represents the serviceList type in an UPnP xml description. -// Only the parts we care about are present and thus the xml may have more -// fields than present in the structure. -type serviceList struct { - XMLName xml.Name `xml:"serviceList"` - Service []service `xml:"service"` -} - -// device represents the device type in an UPnP xml description. -// Only the parts we care about are present and thus the xml may have more -// fields than present in the structure. -type device struct { - XMLName xml.Name `xml:"device"` - DeviceType string `xml:"deviceType"` - DeviceList deviceList `xml:"deviceList"` - ServiceList serviceList `xml:"serviceList"` -} - -// specVersion represents the specVersion in a UPnP xml description. -// Only the parts we care about are present and thus the xml may have more -// fields than present in the structure. -type specVersion struct { - XMLName xml.Name `xml:"specVersion"` - Major int `xml:"major"` - Minor int `xml:"minor"` -} - -// root represents the Root document for a UPnP xml description. -// Only the parts we care about are present and thus the xml may have more -// fields than present in the structure. -type root struct { - XMLName xml.Name `xml:"root"` - SpecVersion specVersion - Device device -} - -func getChildDevice(d *device, deviceType string) *device { - dl := d.DeviceList.Device - for i := 0; i < len(dl); i++ { - if dl[i].DeviceType == deviceType { - return &dl[i] - } - } - return nil -} - -func getChildService(d *device, serviceType string) *service { - sl := d.ServiceList.Service - for i := 0; i < len(sl); i++ { - if sl[i].ServiceType == serviceType { - return &sl[i] - } - } - return nil -} - -func getOurIP() (ip string, err error) { - hostname, err := os.Hostname() - if err != nil { - return - } - p, err := net.LookupIP(hostname) - if err != nil && len(p) > 0 { - return - } - return p[0].String(), nil -} - -func getServiceURL(rootURL string) (url string, err error) { - r, err := http.Get(rootURL) - if err != nil { - return - } - defer r.Body.Close() - if r.StatusCode >= 400 { - err = errors.New(string(r.StatusCode)) - return - } - var root root - err = xml.NewDecoder(r.Body).Decode(&root) - - if err != nil { - return - } - a := &root.Device - if a.DeviceType != "urn:schemas-upnp-org:device:InternetGatewayDevice:1" { - err = errors.New("No InternetGatewayDevice") - return - } - b := getChildDevice(a, "urn:schemas-upnp-org:device:WANDevice:1") - if b == nil { - err = errors.New("No WANDevice") - return - } - c := getChildDevice(b, "urn:schemas-upnp-org:device:WANConnectionDevice:1") - if c == nil { - err = errors.New("No WANConnectionDevice") - return - } - d := getChildService(c, "urn:schemas-upnp-org:service:WANIPConnection:1") - if d == nil { - err = errors.New("No WANIPConnection") - return - } - url = combineURL(rootURL, d.ControlURL) - return -} - -func combineURL(rootURL, subURL string) string { - protocolEnd := "://" - protoEndIndex := strings.Index(rootURL, protocolEnd) - a := rootURL[protoEndIndex+len(protocolEnd):] - rootIndex := strings.Index(a, "/") - return rootURL[0:protoEndIndex+len(protocolEnd)+rootIndex] + subURL -} - -func soapRequest(url, function, message string) (r *http.Response, err error) { - fullMessage := "<?xml version=\"1.0\" ?>" + - "<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">\r\n" + - "<s:Body>" + message + "</s:Body></s:Envelope>" - - req, err := http.NewRequest("POST", url, strings.NewReader(fullMessage)) - if err != nil { - return nil, err - } - req.Header.Set("Content-Type", "text/xml ; charset=\"utf-8\"") - req.Header.Set("User-Agent", "Darwin/10.0.0, UPnP/1.0, MiniUPnPc/1.3") - //req.Header.Set("Transfer-Encoding", "chunked") - req.Header.Set("SOAPAction", "\"urn:schemas-upnp-org:service:WANIPConnection:1#"+function+"\"") - req.Header.Set("Connection", "Close") - req.Header.Set("Cache-Control", "no-cache") - req.Header.Set("Pragma", "no-cache") - - // log.Stderr("soapRequest ", req) - //fmt.Println(fullMessage) - - r, err = http.DefaultClient.Do(req) - if err != nil { - return - } - - if r.Body != nil { - defer r.Body.Close() - } - - if r.StatusCode >= 400 { - // log.Stderr(function, r.StatusCode) - err = errors.New("Error " + strconv.Itoa(r.StatusCode) + " for " + function) - r = nil - return - } - return -} - -type statusInfo struct { - externalIpAddress string -} - -func (n *upnpNAT) getStatusInfo() (info statusInfo, err error) { - - message := "<u:GetStatusInfo xmlns:u=\"urn:schemas-upnp-org:service:WANIPConnection:1\">\r\n" + - "</u:GetStatusInfo>" - - var response *http.Response - response, err = soapRequest(n.serviceURL, "GetStatusInfo", message) - if err != nil { - return - } - - // TODO: Write a soap reply parser. It has to eat the Body and envelope tags... - - response.Body.Close() - return -} - -func (n *upnpNAT) GetExternalAddress() (addr net.IP, err error) { - info, err := n.getStatusInfo() - if err != nil { - return - } - addr = net.ParseIP(info.externalIpAddress) - return -} - -func (n *upnpNAT) AddPortMapping(protocol string, externalPort, internalPort int, description string, timeout int) (mappedExternalPort int, err error) { - // A single concatenation would break ARM compilation. - message := "<u:AddPortMapping xmlns:u=\"urn:schemas-upnp-org:service:WANIPConnection:1\">\r\n" + - "<NewRemoteHost></NewRemoteHost><NewExternalPort>" + strconv.Itoa(externalPort) - message += "</NewExternalPort><NewProtocol>" + protocol + "</NewProtocol>" - message += "<NewInternalPort>" + strconv.Itoa(internalPort) + "</NewInternalPort>" + - "<NewInternalClient>" + n.ourIP + "</NewInternalClient>" + - "<NewEnabled>1</NewEnabled><NewPortMappingDescription>" - message += description + - "</NewPortMappingDescription><NewLeaseDuration>" + strconv.Itoa(timeout) + - "</NewLeaseDuration></u:AddPortMapping>" - - var response *http.Response - response, err = soapRequest(n.serviceURL, "AddPortMapping", message) - if err != nil { - return - } - - // TODO: check response to see if the port was forwarded - // log.Println(message, response) - mappedExternalPort = externalPort - _ = response - return -} - -func (n *upnpNAT) DeletePortMapping(protocol string, externalPort, internalPort int) (err error) { - - message := "<u:DeletePortMapping xmlns:u=\"urn:schemas-upnp-org:service:WANIPConnection:1\">\r\n" + - "<NewRemoteHost></NewRemoteHost><NewExternalPort>" + strconv.Itoa(externalPort) + - "</NewExternalPort><NewProtocol>" + protocol + "</NewProtocol>" + - "</u:DeletePortMapping>" - - var response *http.Response - response, err = soapRequest(n.serviceURL, "DeletePortMapping", message) - if err != nil { - return - } - - // TODO: check response to see if the port was deleted - // log.Println(message, response) - _ = response - return -} diff --git a/p2p/server.go b/p2p/server.go index 8a608756665c49a1e66959581220537b2e4017bc..326781234313fb56f5208fb02ec600af100a8fe3 100644 --- a/p2p/server.go +++ b/p2p/server.go @@ -246,12 +246,7 @@ func (srv *Server) Stop() { func (srv *Server) discLoop() { for peer := range srv.peerDisconnect { - // peer has just disconnected. free up its slot. - srvlog.Infof("%v is gone", peer) - srv.peerSlots <- peer.slot - srv.lock.Lock() - srv.peers[peer.slot] = nil - srv.lock.Unlock() + srv.removePeer(peer) } } @@ -384,7 +379,7 @@ func (srv *Server) addPeer(conn net.Conn, desc *peerAddr, slot int) *Peer { func (srv *Server) removePeer(peer *Peer) { srv.lock.Lock() defer srv.lock.Unlock() - srvlog.Debugf("Removing peer %v %v (slot %v)\n", peer, peer.slot) + srvlog.Debugf("Removing %v (slot %v)\n", peer, peer.slot) if srv.peers[peer.slot] != peer { srvlog.Warnln("Invalid peer to remove:", peer) return @@ -416,6 +411,7 @@ func (srv *Server) verifyPeer(addr *peerAddr) error { return nil } +// TODO replace with "Set" type Blacklist interface { Get([]byte) (bool, error) Put([]byte) error diff --git a/peer.go b/peer.go deleted file mode 100644 index 331e9de37bf60e9406cbf27d3a5713b23ae7513d..0000000000000000000000000000000000000000 --- a/peer.go +++ /dev/null @@ -1,881 +0,0 @@ -package eth - -import ( - "bytes" - "container/list" - "fmt" - "math" - "math/big" - "net" - "strconv" - "strings" - "sync/atomic" - "time" - - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/ethutil" - "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/wire" -) - -var peerlogger = logger.NewLogger("PEER") - -const ( - // The size of the output buffer for writing messages - outputBufferSize = 50 - // Current protocol version - ProtocolVersion = 49 - // Current P2P version - P2PVersion = 2 - // Ethereum network version - NetVersion = 0 - // Interval for ping/pong message - pingPongTimer = 2 * time.Second -) - -type DiscReason byte - -const ( - // Values are given explicitly instead of by iota because these values are - // defined by the wire protocol spec; it is easier for humans to ensure - // correctness when values are explicit. - DiscRequested DiscReason = iota - DiscReTcpSysErr - DiscBadProto - DiscBadPeer - DiscTooManyPeers - DiscConnDup - DiscGenesisErr - DiscProtoErr - DiscQuitting -) - -var discReasonToString = []string{ - "requested", - "TCP sys error", - "bad protocol", - "useless peer", - "too many peers", - "already connected", - "wrong genesis block", - "incompatible network", - "quitting", -} - -func (d DiscReason) String() string { - if len(discReasonToString) < int(d) { - return "Unknown" - } - - return discReasonToString[d] -} - -// Peer capabilities -type Caps byte - -const ( - CapPeerDiscTy Caps = 1 << iota - CapTxTy - CapChainTy - - CapDefault = CapChainTy | CapTxTy | CapPeerDiscTy -) - -var capsToString = map[Caps]string{ - CapPeerDiscTy: "Peer discovery", - CapTxTy: "Transaction relaying", - CapChainTy: "Block chain relaying", -} - -func (c Caps) IsCap(cap Caps) bool { - return c&cap > 0 -} - -func (c Caps) String() string { - var caps []string - if c.IsCap(CapPeerDiscTy) { - caps = append(caps, capsToString[CapPeerDiscTy]) - } - if c.IsCap(CapChainTy) { - caps = append(caps, capsToString[CapChainTy]) - } - if c.IsCap(CapTxTy) { - caps = append(caps, capsToString[CapTxTy]) - } - - return strings.Join(caps, " | ") -} - -type Peer struct { - // Ethereum interface - ethereum *Ethereum - // Net connection - conn net.Conn - // Output queue which is used to communicate and handle messages - outputQueue chan *wire.Msg - // Quit channel - quit chan bool - // Determines whether it's an inbound or outbound peer - inbound bool - // Flag for checking the peer's connectivity state - connected int32 - disconnect int32 - // Last known message send - lastSend time.Time - // Indicated whether a verack has been send or not - // This flag is used by writeMessage to check if messages are allowed - // to be send or not. If no version is known all messages are ignored. - versionKnown bool - statusKnown bool - - // Last received pong message - lastPong int64 - lastBlockReceived time.Time - doneFetchingHashes bool - lastHashAt time.Time - lastHashRequestedAt time.Time - - host []byte - port uint16 - caps Caps - td *big.Int - bestHash []byte - lastReceivedHash []byte - requestedHashes [][]byte - - // This peer's public key - pubkey []byte - - // Indicated whether the node is catching up or not - catchingUp bool - diverted bool - blocksRequested int - - version string - - // We use this to give some kind of pingtime to a node, not very accurate, could be improved. - pingTime time.Duration - pingStartTime time.Time - - lastRequestedBlock *types.Block - - protocolCaps *ethutil.Value -} - -func NewPeer(conn net.Conn, ethereum *Ethereum, inbound bool) *Peer { - pubkey := ethereum.KeyManager().PublicKey()[1:] - - return &Peer{ - outputQueue: make(chan *wire.Msg, outputBufferSize), - quit: make(chan bool), - ethereum: ethereum, - conn: conn, - inbound: inbound, - disconnect: 0, - connected: 1, - port: 30303, - pubkey: pubkey, - blocksRequested: 10, - caps: ethereum.ServerCaps(), - version: ethereum.ClientIdentity().String(), - protocolCaps: ethutil.NewValue(nil), - td: big.NewInt(0), - doneFetchingHashes: true, - } -} - -func NewOutboundPeer(addr string, ethereum *Ethereum, caps Caps) *Peer { - p := &Peer{ - outputQueue: make(chan *wire.Msg, outputBufferSize), - quit: make(chan bool), - ethereum: ethereum, - inbound: false, - connected: 0, - disconnect: 0, - port: 30303, - caps: caps, - version: ethereum.ClientIdentity().String(), - protocolCaps: ethutil.NewValue(nil), - td: big.NewInt(0), - doneFetchingHashes: true, - } - - // Set up the connection in another goroutine so we don't block the main thread - go func() { - conn, err := p.Connect(addr) - if err != nil { - //peerlogger.Debugln("Connection to peer failed. Giving up.", err) - p.Stop() - return - } - p.conn = conn - - // Atomically set the connection state - atomic.StoreInt32(&p.connected, 1) - atomic.StoreInt32(&p.disconnect, 0) - - p.Start() - }() - - return p -} - -func (self *Peer) Connect(addr string) (conn net.Conn, err error) { - const maxTries = 3 - for attempts := 0; attempts < maxTries; attempts++ { - conn, err = net.DialTimeout("tcp", addr, 10*time.Second) - if err != nil { - time.Sleep(time.Duration(attempts*20) * time.Second) - continue - } - - // Success - return - } - - return -} - -// Getters -func (p *Peer) PingTime() string { - return p.pingTime.String() -} -func (p *Peer) Inbound() bool { - return p.inbound -} -func (p *Peer) LastSend() time.Time { - return p.lastSend -} -func (p *Peer) LastPong() int64 { - return p.lastPong -} -func (p *Peer) Host() []byte { - return p.host -} -func (p *Peer) Port() uint16 { - return p.port -} -func (p *Peer) Version() string { - return p.version -} -func (p *Peer) Connected() *int32 { - return &p.connected -} - -// Setters -func (p *Peer) SetVersion(version string) { - p.version = version -} - -// Outputs any RLP encoded data to the peer -func (p *Peer) QueueMessage(msg *wire.Msg) { - if atomic.LoadInt32(&p.connected) != 1 { - return - } - p.outputQueue <- msg -} - -func (p *Peer) writeMessage(msg *wire.Msg) { - // Ignore the write if we're not connected - if atomic.LoadInt32(&p.connected) != 1 { - return - } - - if !p.versionKnown { - switch msg.Type { - case wire.MsgHandshakeTy: // Ok - default: // Anything but ack is allowed - return - } - } else { - /* - if !p.statusKnown { - switch msg.Type { - case wire.MsgStatusTy: // Ok - default: // Anything but ack is allowed - return - } - } - */ - } - - peerlogger.DebugDetailf("(%v) <= %v\n", p.conn.RemoteAddr(), formatMessage(msg)) - - err := wire.WriteMessage(p.conn, msg) - if err != nil { - peerlogger.Debugln(" Can't send message:", err) - // Stop the client if there was an error writing to it - p.Stop() - return - } -} - -// Outbound message handler. Outbound messages are handled here -func (p *Peer) HandleOutbound() { - // The ping timer. Makes sure that every 2 minutes a ping is send to the peer - pingTimer := time.NewTicker(pingPongTimer) - serviceTimer := time.NewTicker(10 * time.Second) - -out: - for { - skip: - select { - // Main message queue. All outbound messages are processed through here - case msg := <-p.outputQueue: - if !p.statusKnown { - switch msg.Type { - case wire.MsgTxTy, wire.MsgGetBlockHashesTy, wire.MsgBlockHashesTy, wire.MsgGetBlocksTy, wire.MsgBlockTy: - break skip - } - } - - switch msg.Type { - case wire.MsgGetBlockHashesTy: - p.lastHashRequestedAt = time.Now() - } - - p.writeMessage(msg) - p.lastSend = time.Now() - - // Ping timer - case <-pingTimer.C: - p.writeMessage(wire.NewMessage(wire.MsgPingTy, "")) - p.pingStartTime = time.Now() - - // Service timer takes care of peer broadcasting, transaction - // posting or block posting - case <-serviceTimer.C: - p.QueueMessage(wire.NewMessage(wire.MsgGetPeersTy, "")) - - case <-p.quit: - // Break out of the for loop if a quit message is posted - break out - } - } - -clean: - // This loop is for draining the output queue and anybody waiting for us - for { - select { - case <-p.outputQueue: - // TODO - default: - break clean - } - } -} - -func formatMessage(msg *wire.Msg) (ret string) { - ret = fmt.Sprintf("%v %v", msg.Type, msg.Data) - - /* - XXX Commented out because I need the log level here to determine - if i should or shouldn't generate this message - */ - /* - switch msg.Type { - case wire.MsgPeersTy: - ret += fmt.Sprintf("(%d entries)", msg.Data.Len()) - case wire.MsgBlockTy: - b1, b2 := chain.NewBlockFromRlpValue(msg.Data.Get(0)), ethchain.NewBlockFromRlpValue(msg.Data.Get(msg.Data.Len()-1)) - ret += fmt.Sprintf("(%d entries) %x - %x", msg.Data.Len(), b1.Hash()[0:4], b2.Hash()[0:4]) - case wire.MsgBlockHashesTy: - h1, h2 := msg.Data.Get(0).Bytes(), msg.Data.Get(msg.Data.Len()-1).Bytes() - ret += fmt.Sprintf("(%d entries) %x - %x", msg.Data.Len(), h1, h2) - } - */ - - return -} - -// Inbound handler. Inbound messages are received here and passed to the appropriate methods -func (p *Peer) HandleInbound() { - for atomic.LoadInt32(&p.disconnect) == 0 { - - // HMM? - time.Sleep(50 * time.Millisecond) - // Wait for a message from the peer - msgs, err := wire.ReadMessages(p.conn) - if err != nil { - peerlogger.Debugln(err) - } - for _, msg := range msgs { - peerlogger.DebugDetailf("(%v) => %v\n", p.conn.RemoteAddr(), formatMessage(msg)) - - switch msg.Type { - case wire.MsgHandshakeTy: - // Version message - p.handleHandshake(msg) - - //if p.caps.IsCap(CapPeerDiscTy) { - p.QueueMessage(wire.NewMessage(wire.MsgGetPeersTy, "")) - //} - - case wire.MsgDiscTy: - p.Stop() - peerlogger.Infoln("Disconnect peer: ", DiscReason(msg.Data.Get(0).Uint())) - case wire.MsgPingTy: - // Respond back with pong - p.QueueMessage(wire.NewMessage(wire.MsgPongTy, "")) - case wire.MsgPongTy: - // If we received a pong back from a peer we set the - // last pong so the peer handler knows this peer is still - // active. - p.lastPong = time.Now().Unix() - p.pingTime = time.Since(p.pingStartTime) - case wire.MsgTxTy: - // If the message was a transaction queue the transaction - // in the TxPool where it will undergo validation and - // processing when a new block is found - for i := 0; i < msg.Data.Len(); i++ { - tx := types.NewTransactionFromValue(msg.Data.Get(i)) - err := p.ethereum.TxPool().Add(tx) - if err != nil { - peerlogger.Infoln(err) - } else { - peerlogger.Infof("tx OK (%x)\n", tx.Hash()[0:4]) - } - } - case wire.MsgGetPeersTy: - // Peer asked for list of connected peers - //p.pushPeers() - case wire.MsgPeersTy: - // Received a list of peers (probably because MsgGetPeersTy was send) - data := msg.Data - // Create new list of possible peers for the ethereum to process - peers := make([]string, data.Len()) - // Parse each possible peer - for i := 0; i < data.Len(); i++ { - value := data.Get(i) - peers[i] = unpackAddr(value.Get(0), value.Get(1).Uint()) - } - - // Connect to the list of peers - p.ethereum.ProcessPeerList(peers) - - case wire.MsgStatusTy: - // Handle peer's status msg - p.handleStatus(msg) - } - - // TMP - if p.statusKnown { - switch msg.Type { - - case wire.MsgGetBlockHashesTy: - if msg.Data.Len() < 2 { - peerlogger.Debugln("err: argument length invalid ", msg.Data.Len()) - } - - hash := msg.Data.Get(0).Bytes() - amount := msg.Data.Get(1).Uint() - - hashes := p.ethereum.ChainManager().GetChainHashesFromHash(hash, amount) - - p.QueueMessage(wire.NewMessage(wire.MsgBlockHashesTy, ethutil.ByteSliceToInterface(hashes))) - - case wire.MsgGetBlocksTy: - // Limit to max 300 blocks - max := int(math.Min(float64(msg.Data.Len()), 300.0)) - var blocks []interface{} - - for i := 0; i < max; i++ { - hash := msg.Data.Get(i).Bytes() - block := p.ethereum.ChainManager().GetBlock(hash) - if block != nil { - blocks = append(blocks, block.Value().Raw()) - } - } - - p.QueueMessage(wire.NewMessage(wire.MsgBlockTy, blocks)) - - case wire.MsgBlockHashesTy: - p.catchingUp = true - - blockPool := p.ethereum.blockPool - - foundCommonHash := false - p.lastHashAt = time.Now() - - it := msg.Data.NewIterator() - for it.Next() { - hash := it.Value().Bytes() - p.lastReceivedHash = hash - - if blockPool.HasCommonHash(hash) { - foundCommonHash = true - - break - } - - blockPool.AddHash(hash, p) - } - - if !foundCommonHash { - p.FetchHashes() - } else { - peerlogger.Infof("Found common hash (%x...)\n", p.lastReceivedHash[0:4]) - p.doneFetchingHashes = true - } - - case wire.MsgBlockTy: - p.catchingUp = true - - blockPool := p.ethereum.blockPool - - it := msg.Data.NewIterator() - for it.Next() { - block := types.NewBlockFromRlpValue(it.Value()) - blockPool.Add(block, p) - - p.lastBlockReceived = time.Now() - } - case wire.MsgNewBlockTy: - var ( - blockPool = p.ethereum.blockPool - block = types.NewBlockFromRlpValue(msg.Data.Get(0)) - td = msg.Data.Get(1).BigInt() - ) - - if td.Cmp(blockPool.td) > 0 { - p.ethereum.blockPool.AddNew(block, p) - } - } - - } - } - } - - p.Stop() -} - -func (self *Peer) FetchBlocks(hashes [][]byte) { - if len(hashes) > 0 { - peerlogger.Debugf("Fetching blocks (%d)\n", len(hashes)) - - self.QueueMessage(wire.NewMessage(wire.MsgGetBlocksTy, ethutil.ByteSliceToInterface(hashes))) - } -} - -func (self *Peer) FetchHashes() bool { - blockPool := self.ethereum.blockPool - - return blockPool.FetchHashes(self) -} - -func (self *Peer) FetchingHashes() bool { - return !self.doneFetchingHashes -} - -// General update method -func (self *Peer) update() { - serviceTimer := time.NewTicker(100 * time.Millisecond) - -out: - for { - select { - case <-serviceTimer.C: - if self.IsCap("eth") { - var ( - sinceBlock = time.Since(self.lastBlockReceived) - ) - - if sinceBlock > 5*time.Second { - self.catchingUp = false - } - } - case <-self.quit: - break out - } - } - - serviceTimer.Stop() -} - -func (p *Peer) Start() { - peerHost, peerPort, _ := net.SplitHostPort(p.conn.LocalAddr().String()) - servHost, servPort, _ := net.SplitHostPort(p.conn.RemoteAddr().String()) - - if p.inbound { - p.host, p.port = packAddr(peerHost, peerPort) - } else { - p.host, p.port = packAddr(servHost, servPort) - } - - err := p.pushHandshake() - if err != nil { - peerlogger.Debugln("Peer can't send outbound version ack", err) - - p.Stop() - - return - } - - go p.HandleOutbound() - // Run the inbound handler in a new goroutine - go p.HandleInbound() - // Run the general update handler - go p.update() - - // Wait a few seconds for startup and then ask for an initial ping - time.Sleep(2 * time.Second) - p.writeMessage(wire.NewMessage(wire.MsgPingTy, "")) - p.pingStartTime = time.Now() - -} - -func (p *Peer) Stop() { - p.StopWithReason(DiscRequested) -} - -func (p *Peer) StopWithReason(reason DiscReason) { - if atomic.AddInt32(&p.disconnect, 1) != 1 { - return - } - - // Pre-emptively remove the peer; don't wait for reaping. We already know it's dead if we are here - p.ethereum.RemovePeer(p) - - close(p.quit) - if atomic.LoadInt32(&p.connected) != 0 { - p.writeMessage(wire.NewMessage(wire.MsgDiscTy, reason)) - p.conn.Close() - } -} - -func (p *Peer) peersMessage() *wire.Msg { - outPeers := make([]interface{}, len(p.ethereum.InOutPeers())) - // Serialise each peer - for i, peer := range p.ethereum.InOutPeers() { - // Don't return localhost as valid peer - if !net.ParseIP(peer.conn.RemoteAddr().String()).IsLoopback() { - outPeers[i] = peer.RlpData() - } - } - - // Return the message to the peer with the known list of connected clients - return wire.NewMessage(wire.MsgPeersTy, outPeers) -} - -// Pushes the list of outbound peers to the client when requested -func (p *Peer) pushPeers() { - p.QueueMessage(p.peersMessage()) -} - -func (self *Peer) pushStatus() { - msg := wire.NewMessage(wire.MsgStatusTy, []interface{}{ - uint32(ProtocolVersion), - uint32(NetVersion), - self.ethereum.ChainManager().TD, - self.ethereum.ChainManager().CurrentBlock.Hash(), - self.ethereum.ChainManager().Genesis().Hash(), - }) - - self.QueueMessage(msg) -} - -func (self *Peer) handleStatus(msg *wire.Msg) { - c := msg.Data - - var ( - //protoVersion = c.Get(0).Uint() - netVersion = c.Get(1).Uint() - td = c.Get(2).BigInt() - bestHash = c.Get(3).Bytes() - genesis = c.Get(4).Bytes() - ) - - if bytes.Compare(self.ethereum.ChainManager().Genesis().Hash(), genesis) != 0 { - loggerger.Warnf("Invalid genisis hash %x. Disabling [eth]\n", genesis) - return - } - - if netVersion != NetVersion { - loggerger.Warnf("Invalid network version %d. Disabling [eth]\n", netVersion) - return - } - - /* - if protoVersion != ProtocolVersion { - loggerger.Warnf("Invalid protocol version %d. Disabling [eth]\n", protoVersion) - return - } - */ - - // Get the td and last hash - self.td = td - self.bestHash = bestHash - self.lastReceivedHash = bestHash - - self.statusKnown = true - - // Compare the total TD with the blockchain TD. If remote is higher - // fetch hashes from highest TD node. - self.FetchHashes() - - loggerger.Infof("Peer is [eth] capable. (TD = %v ~ %x)", self.td, self.bestHash) - -} - -func (p *Peer) pushHandshake() error { - pubkey := p.ethereum.KeyManager().PublicKey() - msg := wire.NewMessage(wire.MsgHandshakeTy, []interface{}{ - P2PVersion, []byte(p.version), []interface{}{[]interface{}{"eth", ProtocolVersion}}, p.port, pubkey[1:], - }) - - p.QueueMessage(msg) - - return nil -} - -func (p *Peer) handleHandshake(msg *wire.Msg) { - c := msg.Data - - var ( - p2pVersion = c.Get(0).Uint() - clientId = c.Get(1).Str() - caps = c.Get(2) - port = c.Get(3).Uint() - pub = c.Get(4).Bytes() - ) - - // Check correctness of p2p protocol version - if p2pVersion != P2PVersion { - peerlogger.Debugf("Invalid P2P version. Require protocol %d, received %d\n", P2PVersion, p2pVersion) - p.Stop() - return - } - - // Handle the pub key (validation, uniqueness) - if len(pub) == 0 { - peerlogger.Warnln("Pubkey required, not supplied in handshake.") - p.Stop() - return - } - - // Self connect detection - pubkey := p.ethereum.KeyManager().PublicKey() - if bytes.Compare(pubkey[1:], pub) == 0 { - p.Stop() - - return - } - - // Check for blacklisting - for _, pk := range p.ethereum.blacklist { - if bytes.Compare(pk, pub) == 0 { - peerlogger.Debugf("Blacklisted peer tried to connect (%x...)\n", pubkey[0:4]) - p.StopWithReason(DiscBadPeer) - - return - } - } - - usedPub := 0 - // This peer is already added to the peerlist so we expect to find a double pubkey at least once - eachPeer(p.ethereum.Peers(), func(peer *Peer, e *list.Element) { - if bytes.Compare(pub, peer.pubkey) == 0 { - usedPub++ - } - }) - - if usedPub > 0 { - peerlogger.Debugf("Pubkey %x found more then once. Already connected to client.", p.pubkey) - p.Stop() - return - } - p.pubkey = pub - - // If this is an inbound connection send an ack back - if p.inbound { - p.port = uint16(port) - } - - p.SetVersion(clientId) - - p.versionKnown = true - - p.ethereum.PushPeer(p) - p.ethereum.eventMux.Post(PeerListEvent{p.ethereum.Peers()}) - - p.protocolCaps = caps - - it := caps.NewIterator() - var capsStrs []string - for it.Next() { - cap := it.Value().Get(0).Str() - ver := it.Value().Get(1).Uint() - switch cap { - case "eth": - if ver != ProtocolVersion { - loggerger.Warnf("Invalid protocol version %d. Disabling [eth]\n", ver) - continue - } - p.pushStatus() - } - - capsStrs = append(capsStrs, fmt.Sprintf("%s/%d", cap, ver)) - } - - peerlogger.Infof("Added peer (%s) %d / %d (%v)\n", p.conn.RemoteAddr(), p.ethereum.Peers().Len(), p.ethereum.MaxPeers, capsStrs) - - peerlogger.Debugln(p) -} - -func (self *Peer) IsCap(cap string) bool { - capsIt := self.protocolCaps.NewIterator() - for capsIt.Next() { - if capsIt.Value().Str() == cap { - return true - } - } - - return false -} - -func (self *Peer) Caps() *ethutil.Value { - return self.protocolCaps -} - -func (p *Peer) String() string { - var strBoundType string - if p.inbound { - strBoundType = "inbound" - } else { - strBoundType = "outbound" - } - var strConnectType string - if atomic.LoadInt32(&p.disconnect) == 0 { - strConnectType = "connected" - } else { - strConnectType = "disconnected" - } - - return fmt.Sprintf("[%s] (%s) %v %s", strConnectType, strBoundType, p.conn.RemoteAddr(), p.version) - -} - -func (p *Peer) RlpData() []interface{} { - return []interface{}{p.host, p.port, p.pubkey} -} - -func packAddr(address, _port string) (host []byte, port uint16) { - p, _ := strconv.Atoi(_port) - port = uint16(p) - - h := net.ParseIP(address) - if ip := h.To4(); ip != nil { - host = []byte(ip) - } else { - host = []byte(h) - } - - return -} - -func unpackAddr(value *ethutil.Value, p uint64) string { - host, _ := net.IP(value.Bytes()).MarshalText() - prt := strconv.Itoa(int(p)) - - return net.JoinHostPort(string(host), prt) -} diff --git a/pow/block.go b/pow/block.go index 4759e19fb375b35007f362fa525f9ad0d891b51d..62df2b5ff593b9f3cc6254fea6c5a228cd92bd37 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 cdf89950f80afc8ddda92522f8ce2663264bfa81..f9f27326fa8a6a1c569231f939725248e0a27bb8 100644 --- a/pow/ezp/pow.go +++ b/pow/ezp/pow.go @@ -21,7 +21,7 @@ type EasyPow struct { } func New() *EasyPow { - return &EasyPow{} + return &EasyPow{turbo: true} } func (pow *EasyPow) GetHashrate() int64 { @@ -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() @@ -59,7 +59,7 @@ func (pow *EasyPow) Search(block pow.Block, stop <-chan struct{}) []byte { } sha := crypto.Sha3(big.NewInt(r.Int63()).Bytes()) - if pow.verify(hash, diff, sha) { + if verify(hash, diff, sha) { return sha } } @@ -72,7 +72,11 @@ func (pow *EasyPow) Search(block pow.Block, stop <-chan struct{}) []byte { return nil } -func (pow *EasyPow) verify(hash []byte, diff *big.Int, nonce []byte) bool { +func (pow *EasyPow) Verify(block pow.Block) bool { + return Verify(block) +} + +func verify(hash []byte, diff *big.Int, nonce []byte) bool { sha := sha3.NewKeccak256() d := append(hash, nonce...) @@ -84,6 +88,6 @@ func (pow *EasyPow) verify(hash []byte, diff *big.Int, nonce []byte) bool { return res.Cmp(verification) <= 0 } -func (pow *EasyPow) Verify(block pow.Block) bool { - return pow.verify(block.HashNoNonce(), block.Diff(), block.N()) +func Verify(block pow.Block) bool { + return verify(block.HashNoNonce(), block.Difficulty(), block.N()) } diff --git a/profile.cov b/profile.cov deleted file mode 100644 index e92cd379f39412d832e98554bc261ccbc6cf1c48..0000000000000000000000000000000000000000 --- 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 diff --git a/ptrie/fullnode.go b/ptrie/fullnode.go index 7a7f7d22d4f88bf2f3859a2e162b9348afc14148..4dd98049d5648e547c635829a04d8422e81c52d0 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 @@ -21,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 @@ -56,6 +60,10 @@ func (self *FullNode) RlpData() interface{} { } func (self *FullNode) set(k byte, value Node) { + if _, ok := value.(*ValueNode); ok && k != 16 { + fmt.Println(value, k) + } + self.nodes[int(k)] = value } diff --git a/ptrie/iterator.go b/ptrie/iterator.go index 5714bdbc8a511b847e47003867feaef87efc517f..787ba09c02b50c5b29f1954dad98f2aad19ced5a 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 2c85dbce72869a81382a464f5be480c6dbc7e0cb..ab90a1a021c54ab383e6eb283e4ef7c3b19b9dcf 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 9fe9ea52a5606f71570d8788666f0dbc3714cd69..5c83b57d055c67a5adfb86e81c73151e14e3da68 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)) } } @@ -204,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 } @@ -223,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 @@ -264,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)) } } @@ -274,8 +288,13 @@ 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))) + // 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++ { @@ -284,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 { @@ -310,3 +329,7 @@ func (self *Trie) store(node Node) interface{} { return node.RlpData() } + +func (self *Trie) PrintRoot() { + fmt.Println(self.root) +} diff --git a/ptrie/trie_test.go b/ptrie/trie_test.go index 5b1c641401ae50bfedd6940ccf0d6af0e7c1e6b0..63a8ed36e66cee72cc7436d0fc54d13dc8901c37 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 c1f5ecf3a0e1dfb7c02d23f1f5d85a59079bd53e..40ecff50ce5346a269e9a5b503ed40f875889f11 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 b8af4e702a914a42c2f80edf99b30833e5b1a55e..420ad975708d151ac68a908b5f460029082aa20c 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 81% rename from state/state.go rename to state/statedb.go index ca3f2af9cf6574966ed81b787ae65f7edf1f4a55..6a11fc328f7483884fdcaff960e943c96c884d74 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,21 +17,21 @@ 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 manifest *Manifest - refund map[string][]refund + refund map[string]*big.Int logs Logs } // 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][]refund)} +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() { @@ -55,12 +56,11 @@ func (self *StateDB) GetBalance(addr []byte) *big.Int { return ethutil.Big0 } -type refund struct { - gas, price *big.Int -} - -func (self *StateDB) Refund(addr []byte, gas, price *big.Int) { - self.refund[string(addr)] = append(self.refund[string(addr)], refund{gas, price}) +func (self *StateDB) Refund(addr []byte, gas *big.Int) { + if self.refund[string(addr)] == nil { + self.refund[string(addr)] = new(big.Int) + } + self.refund[string(addr)].Add(self.refund[string(addr)], gas) } func (self *StateDB) AddBalance(addr []byte, amount *big.Int) { @@ -95,6 +95,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 { @@ -134,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())) } @@ -153,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 } @@ -200,18 +207,18 @@ 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() } for addr, refund := range self.refund { - state.refund[addr] = refund + state.refund[addr] = new(big.Int).Set(refund) } logs := make(Logs, len(self.logs)) @@ -229,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 { @@ -266,30 +273,24 @@ func (s *StateDB) Sync() { stateObject.State.Sync() } - s.Trie.Sync() + s.trie.Commit() s.Empty() } func (self *StateDB) Empty() { self.stateObjects = make(map[string]*StateObject) - self.refund = make(map[string][]refund) + self.refund = make(map[string]*big.Int) +} + +func (self *StateDB) Refunds() map[string]*big.Int { + return self.refund } func (self *StateDB) Update(gasUsed *big.Int) { var deleted bool - // Refund any gas that's left - // XXX THIS WILL CHANGE IN POC8 - uhalf := new(big.Int).Div(gasUsed, ethutil.Big2) - for addr, refs := range self.refund { - for _, ref := range refs { - refund := ethutil.BigMin(uhalf, ref.gas) - - self.GetStateObject([]byte(addr)).AddBalance(refund.Mul(refund, ref.price)) - } - } - self.refund = make(map[string][]refund) + self.refund = make(map[string]*big.Int) for _, stateObject := range self.stateObjects { if stateObject.remove { @@ -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/tests/files/StateTests/stInitCodeTest.json b/tests/files/StateTests/stInitCodeTest.json new file mode 100644 index 0000000000000000000000000000000000000000..1c4670cef312f5cbfa7cbe497036b1dc1018b373 --- /dev/null +++ b/tests/files/StateTests/stInitCodeTest.json @@ -0,0 +1,924 @@ +{ + "CallRecursiveContract" : { + "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" : "1", + "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" : "0", + "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" + } + }, + "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", + "currentDifficulty" : "45678256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1", + "code" : "0x602060006000f0", + "nonce" : "1", + "storage" : { + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "605", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "99394", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + }, + "d2571607e241ecf590ed94b12d87c94babe36db6" : { + "balance" : "0", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "0", + "code" : "0x602060006000f0", + "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" + } + }, + "NotEnoughCashContractCreation" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "2", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "2", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "0x600a80600c6000396000f300600160008035811a8100", + "gasLimit" : "599", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "", + "value" : "1" + } + }, + "OutOfGasContractCreation" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "1770", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : { + "balance" : "1", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "8229", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "10000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "0x600a80600c6000396000f300600160008035811a8100", + "gasLimit" : "590", + "gasPrice" : "3", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "", + "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", + "currentDifficulty" : "45678256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "599", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : { + "balance" : "1", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "99400", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "100000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "0x600a80600c6000396000f300600160008035811a8100", + "gasLimit" : "599", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "", + "value" : "1" + } + }, + "TransactionCreateSuicideContract" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0xff600160008035811a81", + "post" : { + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "653", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : { + "balance" : "1", + "code" : "0xff600160008035811a81", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "9346", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "10000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "0x600a80600c6000396000f300ff600160008035811a81", + "gasLimit" : "1000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "", + "value" : "1" + } + }, + "TransactionStopInitCode" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "599", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : { + "balance" : "1", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "9400", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "10000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "0x600a80600c600039600000f30000600160008035811a81", + "gasLimit" : "1000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "", + "value" : "1" + } + }, + "TransactionSuicideInitCode" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "0000000000000000000000000000000000000000" : { + "balance" : "1", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "611", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "9388", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "10000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "0x600a80600c6000396000fff3ffff600160008035811a81", + "gasLimit" : "1000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "", + "value" : "1" + } + } +} diff --git a/tests/files/StateTests/stRefundTest.json b/tests/files/StateTests/stRefundTest.json new file mode 100644 index 0000000000000000000000000000000000000000..08ae1fac837b068c78e73d6c8fc4a0a3191f34d5 --- /dev/null +++ b/tests/files/StateTests/stRefundTest.json @@ -0,0 +1,523 @@ +{ + "refund500" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "code" : "0x600154506002545060ff60020a600a553031600b55600060015560006002556000600355600060045560006005556000600655", + "nonce" : "0", + "storage" : { + "0x0a" : "0x8000000000000000000000000000000000000000000000000000000000000000", + "0x0b" : "0x0de0b6b3a7640000" + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "592", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "9408", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "code" : "0x600154506002545060ff60020a600a553031600b55600060015560006002556000600355600060045560006005556000600655", + "nonce" : "0", + "storage" : { + "0x01" : "0x01", + "0x02" : "0x01", + "0x03" : "0x01", + "0x04" : "0x01", + "0x05" : "0x01", + "0x06" : "0x01" + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "10000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "10000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "0" + } + }, + "refund50_1" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "code" : "0x60006001556000600255600060035560006004556000600555", + "nonce" : "0", + "storage" : { + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "255", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "9745", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "code" : "0x60006001556000600255600060035560006004556000600555", + "nonce" : "0", + "storage" : { + "0x01" : "0x01", + "0x02" : "0x01", + "0x03" : "0x01", + "0x04" : "0x01", + "0x05" : "0x01" + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "10000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "10000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "0" + } + }, + "refund50_2" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "code" : "0x6001600a556001600b5560006001556000600255600060035560006004556000600555", + "nonce" : "0", + "storage" : { + "0x0a" : "0x01", + "0x0b" : "0x01" + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "614", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "9386", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "code" : "0x6001600a556001600b5560006001556000600255600060035560006004556000600555", + "nonce" : "0", + "storage" : { + "0x01" : "0x01", + "0x02" : "0x01", + "0x03" : "0x01", + "0x04" : "0x01", + "0x05" : "0x01" + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "10000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "10000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "0" + } + }, + "refund600" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "code" : "0x600154506002545061ffff60020a600a553031600b55600060015560006002556000600355600060045560006005556000600655", + "nonce" : "0", + "storage" : { + "0x0b" : "0x0de0b6b3a7640000" + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "492", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "9508", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "code" : "0x600154506002545061ffff60020a600a553031600b55600060015560006002556000600355600060045560006005556000600655", + "nonce" : "0", + "storage" : { + "0x01" : "0x01", + "0x02" : "0x01", + "0x03" : "0x01", + "0x04" : "0x01", + "0x05" : "0x01", + "0x06" : "0x01" + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "10000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "10000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "0" + } + }, + "refund_NoOOG_1" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "code" : "0x6000600155", + "nonce" : "0", + "storage" : { + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "402", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "100", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "code" : "0x6000600155", + "nonce" : "0", + "storage" : { + "0x01" : "0x01" + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "502", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "502", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "0" + } + }, + "refund_OOG" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "code" : "0x6000600155", + "nonce" : "0", + "storage" : { + "0x01" : "0x01" + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "500", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "code" : "0x6000600155", + "nonce" : "0", + "storage" : { + "0x01" : "0x01" + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "500", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "500", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "0" + } + }, + "refund_changeNonZeroStorage" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000010", + "code" : "0x6017600155", + "nonce" : "0", + "storage" : { + "0x01" : "0x17" + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "602", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "388", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "code" : "0x6017600155", + "nonce" : "0", + "storage" : { + "0x01" : "0x01" + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "850", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "10" + } + }, + "refund_getEtherBack" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000010", + "code" : "0x6000600155", + "nonce" : "0", + "storage" : { + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "402", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "588", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "code" : "0x6000600155", + "nonce" : "0", + "storage" : { + "0x01" : "0x01" + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "850", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "10" + } + } +} \ No newline at end of file diff --git a/tests/files/StateTests/stSystemOperationsTest.json b/tests/files/StateTests/stSystemOperationsTest.json index a74d32ae5608111f11a69fa60610c4ca4940d1ab..e92c8d9adb4f889a2a913a1fdab4e87e4ee39830 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" + } } } diff --git a/tests/files/StateTests/stTransactionTest.json b/tests/files/StateTests/stTransactionTest.json new file mode 100644 index 0000000000000000000000000000000000000000..0de85079799286498760bfdd5e1a300187510f3c --- /dev/null +++ b/tests/files/StateTests/stTransactionTest.json @@ -0,0 +1,277 @@ +{ + "EmptyTransaction" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "100000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "100000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "", + "gasPrice" : "", + "nonce" : "", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "", + "value" : "" + } + }, + "TransactionFromCoinbaseNotEnoughFounds" : { + "env" : { + "currentCoinbase" : "a94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "currentDifficulty" : "45678256", + "currentGasLimit" : "1100", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "600", + "gasPrice" : "1", + "nonce" : "", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "value" : "502" + } + }, + "TransactionSendingToEmpty" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "500", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : { + "balance" : "0", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "99500", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "100000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "500", + "gasPrice" : "1", + "nonce" : "", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "", + "value" : "" + } + }, + "TransactionSendingToZero" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "0000000000000000000000000000000000000000" : { + "balance" : "1", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "500", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "99499", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "100000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "5000", + "gasPrice" : "1", + "nonce" : "", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "0000000000000000000000000000000000000000", + "value" : "1" + } + }, + "TransactionToItself" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "500", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "99500", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "100000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "5000", + "gasPrice" : "1", + "nonce" : "", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "a94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "value" : "1" + } + }, + "TransactionToItselfNotEnoughFounds" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1101", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1101", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : "", + "gasLimit" : "600", + "gasPrice" : "1", + "nonce" : "", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "a94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "value" : "502" + } + } +} \ No newline at end of file diff --git a/tests/files/TrieTests/trietest.json b/tests/files/TrieTests/trietest.json index ce5c2d191bae774713f7ebd6dd8b15ec20cf228d..d871a8a813c2071861f22bc524ceb66aac7763e5 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 0000000000000000000000000000000000000000..87796042cf0e2f1fabd6e6045535c7880bdcfa30 --- /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 0000000000000000000000000000000000000000..17758b8d899b6d004065705c939b68f761fe47eb --- /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 0000000000000000000000000000000000000000..782e78a1c4452dfe555c44aa16387c286242192d --- /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 0000000000000000000000000000000000000000..fc661805d915eabdcffeee19b67e4e2303a96e6d --- /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 0000000000000000000000000000000000000000..2a6d004ae8eb9531d6271be95f961c4c7502d17d --- /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 0000000000000000000000000000000000000000..4925a5abde8d74a3758a6776a27a10f6054aa8f7 --- /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 0000000000000000000000000000000000000000..ad2b3a27e9fec8e668a6e7258f7d622f7f3adf89 --- /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 0000000000000000000000000000000000000000..58e7cd2d1e89a4c9d9a175b399ddc4709ed426bd --- /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 0000000000000000000000000000000000000000..51a58e1a3997698daa92c49d352e172c9023b3a2 --- /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 0000000000000000000000000000000000000000..fe7fad0628599cf2ce1b14522eff198686957304 --- /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 0000000000000000000000000000000000000000..4d3acf6c210f03b4a9fd0abb70861bacdcd938b0 --- /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 0000000000000000000000000000000000000000..52d885a00c72bba7274809a1b79d1f40d8641235 --- /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 0000000000000000000000000000000000000000..334f6644c13b38cddaa51a6200dac9668ad176ee --- /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 0000000000000000000000000000000000000000..7992fb0031995ef61b7c1693d7b566a9cdf2800f --- /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 0000000000000000000000000000000000000000..ef3b6ae10a01acaeee2190e348618ec9087f42b2 --- /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 0000000000000000000000000000000000000000..fe298915b1be4687fbfdf8882c591d168f651cb8 --- /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 0000000000000000000000000000000000000000..09aa5b75b1bb624cf01610a936d465385383281d --- /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 0000000000000000000000000000000000000000..95e1ca48bbf126eb549b259dbbaa3cc4a99ac466 --- /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 0000000000000000000000000000000000000000..6516f112b8e1a2f10d6a019039693eacff408d7f --- /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 0000000000000000000000000000000000000000..93d737617d41aefda88c61d335a2e1a35212c6f8 --- /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 0000000000000000000000000000000000000000..c0c1941ac0776ba94820cd632b84f57cab7500e0 --- /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 0000000000000000000000000000000000000000..be169fdd3741834ea7533893f18ad47f1e427de4 --- /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 0000000000000000000000000000000000000000..272360cedc649fc6eaf079369298e6084a6658a9 --- /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 0000000000000000000000000000000000000000..5e573c9c3e93c8a688387d9b8ef153c0d79a6819 --- /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 0000000000000000000000000000000000000000..4668a5fa2cfd49bcc987d9529c5f20d85e4f82d9 --- /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 0000000000000000000000000000000000000000..319d75badb67b81460df59e2d557e1b751363a87 --- /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 0000000000000000000000000000000000000000..47dd53b7362a4c4473917a6168b0af5d127dcf7c --- /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 0000000000000000000000000000000000000000..a34fc6960a439e8cadedc30916a3495950c925d6 --- /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 0000000000000000000000000000000000000000..e7b4a3ddef1dfd990a0c5b71ee742c8ab90dc4ec --- /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 0000000000000000000000000000000000000000..5aea43ebe8a64536f729c652ed7a248e8a698984 --- /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 0000000000000000000000000000000000000000..d1be27e2d0d57a783428b3b9dc9f77b570cf6047 --- /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 0000000000000000000000000000000000000000..81c9941241a265da9809354a5eadea144b3a9391 --- /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 0000000000000000000000000000000000000000..22db4ecd5a181bec9de429c97a41f4aa5c0622be --- /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 0000000000000000000000000000000000000000..0766e10c89e7a04cb4083055829433aa8eb56a3d --- /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 0000000000000000000000000000000000000000..67cf1422943b60c045b0cbb21c076fcc20c67737 --- /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 0000000000000000000000000000000000000000..11062c07e363484f8be8f10f2e5cb75c75df54e9 --- /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 0000000000000000000000000000000000000000..93c1344b985f14dd73e358fb8f406561674fc18e --- /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 0000000000000000000000000000000000000000..f014bd1e2d2c696848afd19b8ebb5fffd40ebe05 --- /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 0000000000000000000000000000000000000000..c7727700c851b19d21bd6a233097ae8a462198c4 --- /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 0000000000000000000000000000000000000000..c9c5212622f1ccd53c5f75e994d075ce6ebb825d --- /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 0000000000000000000000000000000000000000..bdd16f0ff6c22eba1b860423762555587f78157d --- /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 0000000000000000000000000000000000000000..80b936ea644da01914e0709fef96515433d7d9e3 --- /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 0000000000000000000000000000000000000000..29e23a5137abba8a95dce0c9cfc2460bb4f1a29e --- /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 0000000000000000000000000000000000000000..a09f74c74b148c278813bf05088b88808946d7dd --- /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 0000000000000000000000000000000000000000..071f396d5f0770d7ce289228f6dd3540d3c9ffa4 --- /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 0000000000000000000000000000000000000000..9abe830e2977b6209023a152477cfa1a10d7de3c --- /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 0000000000000000000000000000000000000000..0950d81113598f04ff1492e87825c282e3108b12 --- /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 0000000000000000000000000000000000000000..a5fd738f49bcd95051a703728f9d9262a507678f --- /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 0000000000000000000000000000000000000000..9195dda7c36a7acc0eac4e629ff13402076d4746 --- /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 0000000000000000000000000000000000000000..1e0d270e08af492760e3ac015ffbf51a9ec32201 --- /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 0000000000000000000000000000000000000000..7cb1a645d47929307431d451de43a925c67c8d28 --- /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 0000000000000000000000000000000000000000..002adc177fcfd4cedac07d5ebfbb9fe2c5b94887 --- /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 0000000000000000000000000000000000000000..2c2d93ece6972119e94cc6642b559cb1a5f9f47f --- /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 0000000000000000000000000000000000000000..d15f99283bcd89bbcb1b7629d3b49968e7c67ec8 --- /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 0000000000000000000000000000000000000000..19fd77e9f2ca11e9f9a9129dd7eb11c0000ac99c --- /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 0000000000000000000000000000000000000000..0dbe95db2979c59b89e2d2fa2a8f90d8104da0f3 --- /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 0000000000000000000000000000000000000000..f2f44c98030c939a014a12a39eaf701547bb5414 --- /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 0000000000000000000000000000000000000000..086226a33b5ec2a5a97c4410f5324c00c894839a --- /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 0000000000000000000000000000000000000000..0e460d25558d3b4e07dfc64d7eb8df92caf48291 --- /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 0000000000000000000000000000000000000000..540d8aaec13aee7d6314fc8456ab65d0d2a34a90 --- /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 0000000000000000000000000000000000000000..96662a2121bc6bef7a870646eee1309df56e5c85 --- /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 0000000000000000000000000000000000000000..46303f2e4cae0b7ea7cf3de3c26bee767b7bffda --- /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 0000000000000000000000000000000000000000..f00ef52395d890eb786f01a5d773c9e7570daade --- /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 0000000000000000000000000000000000000000..3a20f94fef64cb4598f657b4a5ded7a6d7c3bee8 --- /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 0000000000000000000000000000000000000000..610e96357b5659f0f89e1ef1ee0df4e0b2953861 --- /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 0000000000000000000000000000000000000000..dd49687bdbcfe1c5ec9815b48df8b02d36c45197 --- /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 0000000000000000000000000000000000000000..f310618c574d136e1102bedf0945c897228aac01 --- /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 0000000000000000000000000000000000000000..c692af1a30a817459497365b552834bdfb12979d --- /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 0000000000000000000000000000000000000000..a6f68ee386c6770300422f74802ba083712bb2eb --- /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 0000000000000000000000000000000000000000..ced426ebf74591dd8e56e378e78f8a349ab59077 --- /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 0000000000000000000000000000000000000000..6f2685b55456efcff73f54caedef48a5d3d04566 --- /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 0000000000000000000000000000000000000000..148480178e2c5ee27cbe81165fd47473ec876ea1 --- /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 0000000000000000000000000000000000000000..24e84b4f6130555c30d0c0b6c3d0d6cffea1de5e --- /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 0000000000000000000000000000000000000000..bd8cf6a8d03d3b8114dd7dad6e33423160ad965a --- /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 0000000000000000000000000000000000000000..7431224db670c91499183ee7e1eedd651e711960 --- /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 0000000000000000000000000000000000000000..fe57fadc474e384445bcd87d81b5ff9d7da15536 --- /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 0000000000000000000000000000000000000000..6954e5552b24ccebd64dcf53893405336fa51c32 --- /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 0000000000000000000000000000000000000000..016007e5d63776a48370b75447687ffd465afd34 --- /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 0000000000000000000000000000000000000000..e06f002561c7e2ea9e08e359fb668ae423bb164a --- /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/randomTest.json b/tests/files/VMTests/RandomTests/201412232242.json similarity index 90% rename from tests/files/VMTests/RandomTests/randomTest.json rename to tests/files/VMTests/RandomTests/201412232242.json index dad2ee4a2264c24b2e13eceabc6027e05a10b866..187beecc99f6551e3ec0fe4fd9a74c450adeb892 100644 --- a/tests/files/VMTests/RandomTests/randomTest.json +++ b/tests/files/VMTests/RandomTests/201412232242.json @@ -13,21 +13,21 @@ "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "code" : "0x675545", + "code" : "0x5a627678", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, - "gas" : "9999", + "gas" : "9998", "logs" : [ ], "out" : "0x", "post" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", - "code" : "0x675545", + "code" : "0x5a627678", "nonce" : "0", "storage" : { } @@ -36,11 +36,11 @@ "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", - "code" : "0x675545", + "code" : "0x5a627678", "nonce" : "0", "storage" : { } } } } -} \ No newline at end of file +} diff --git a/tests/files/VMTests/RandomTests/201412232243.json b/tests/files/VMTests/RandomTests/201412232243.json new file mode 100644 index 0000000000000000000000000000000000000000..9c4debb6954be80574613ee920abd7340ac123ad --- /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 0000000000000000000000000000000000000000..2221e2d098547da2ef0a5157729ce3484529ac9b --- /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 0000000000000000000000000000000000000000..744d0c09be73468d139012d3d64a226d2c52055c --- /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 0000000000000000000000000000000000000000..10570bd0986a7fa0975853ea4d088f417523b8e5 --- /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 0000000000000000000000000000000000000000..5a4e4b8c8c32fafaa288e5884cbb8b20f32a8d4d --- /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 0000000000000000000000000000000000000000..090cfd12b52c59b84af9b9b53af9cfdb74ec2ff4 --- /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 0000000000000000000000000000000000000000..dae482455cf94145ad8dc02d5f9fabda824aeb2e --- /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 0000000000000000000000000000000000000000..78ad0357814cb6973d21c7af33357e4b75da476d --- /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 0000000000000000000000000000000000000000..6ec63467a0ffe751589280063ffb1d3bf52c7f3f --- /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 0000000000000000000000000000000000000000..2af0327d5a9091242e762946a5bcc43e9f1bbada --- /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 0000000000000000000000000000000000000000..fd816757573472e98b04268887a1b2ba426decf0 --- /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 0000000000000000000000000000000000000000..afdb01d7f4e54487505dd3d5725f4fcbec93b255 --- /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 0000000000000000000000000000000000000000..20ae3118b13200a40267ab367cb260aa681e9f7c --- /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 0000000000000000000000000000000000000000..c55291821f456917a6f64bcbd42b98ed66f896c5 --- /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 0000000000000000000000000000000000000000..446b11a8fb09a60ecbd33476535a29c92542513a --- /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 0000000000000000000000000000000000000000..777dfdee606f2496d6583a63230718f873ba3fe2 --- /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 0000000000000000000000000000000000000000..1904566d8f1e3fc0a4f79ee93e6d8063dff1a40f --- /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 0000000000000000000000000000000000000000..950cbdb9e3b70a811d01223a660f415b6c00f126 --- /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 0000000000000000000000000000000000000000..ca840ed47e17253806a00fc87244c0ba59036570 --- /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 0000000000000000000000000000000000000000..a18a42c3e52b1f15d8100420d74c60878af3580f --- /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 0000000000000000000000000000000000000000..b565d84c0de68c7078116c610e43042d0e056946 --- /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 0000000000000000000000000000000000000000..12ceb63e407c13627be203b1b0230561242278f3 --- /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 0000000000000000000000000000000000000000..7e6a5151105a390cd8eeee29bc752487680d1d87 --- /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 0000000000000000000000000000000000000000..5dbbe3376beff907e092abf3fb88e397e408e42a --- /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 0000000000000000000000000000000000000000..4e2cca5dce2fbf97fde4fb3d926e44c447b0b6e0 --- /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 0000000000000000000000000000000000000000..d70461cfd63f1e5deb8cc68c3419c20e9392083d --- /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 0000000000000000000000000000000000000000..19ee3e8b95bf176d3454796a4d71b8f55e79f68d --- /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 0000000000000000000000000000000000000000..ac7c63297fe5c5c596818e60b24e5f094cbb6089 --- /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 0000000000000000000000000000000000000000..b16ef5077f0735e7941dcf66cf78e5fbd98f6abb --- /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 0000000000000000000000000000000000000000..9c227c2a6dda5d72b52d7cb70db7ebf2b2f8f955 --- /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 0000000000000000000000000000000000000000..53837b64130d538de62453f031d9bb1ce5f33e27 --- /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 0000000000000000000000000000000000000000..87e41146f9d1630c2da5e4dd23100de73ba8dd42 --- /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 0000000000000000000000000000000000000000..b415205d6694afb6a5df8ab61c730459d8c9e04f --- /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 0000000000000000000000000000000000000000..e089db9369864b445a9ec78c12fc7175ba1ee82f --- /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 0000000000000000000000000000000000000000..29852711f549783495f535df575dfc1b10f3bd43 --- /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 0000000000000000000000000000000000000000..f6ea120fb534f284c5a0201ba720ab163d57b3a6 --- /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 0000000000000000000000000000000000000000..b5ed168d00c5bc27e2bc6f66b9e2046a9459750a --- /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 0000000000000000000000000000000000000000..c260f35ec15a70f1427fbcd426d5db625380ecc9 --- /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 0000000000000000000000000000000000000000..ec4f5cf3240cd7da7623ad3711d132e57a8c454f --- /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 0000000000000000000000000000000000000000..e9894c621f1703df6066efecdf318b32e1c59fea --- /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 0000000000000000000000000000000000000000..6fd26bc5c7c89d55456be2851c38f7b2973e9b14 --- /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 0000000000000000000000000000000000000000..07a4c3489a50a42a020a8f95ba934de49a70c0b2 --- /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 0000000000000000000000000000000000000000..4979c02852b7392a8ecd7a1cae7f100304de6158 --- /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 0000000000000000000000000000000000000000..23122711dd55e6425e53098598273d5cd632a307 --- /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 0000000000000000000000000000000000000000..22f293187ce05516ddc51bef4341139996c1c300 --- /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 0000000000000000000000000000000000000000..0a7ca313f3f33432edb65b0901a52f4e66379046 --- /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 0000000000000000000000000000000000000000..6a630a206efd73b865b3a9a289c3c1e2d4daec94 --- /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 0000000000000000000000000000000000000000..5abc60d571f43e98ae374d404505a0508cdb4505 --- /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 0000000000000000000000000000000000000000..c42707c04182d805cde23ac8419cc4827111058a --- /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 0000000000000000000000000000000000000000..c91bab832bf72bbddca6b02bc4e2668c2c3f8851 --- /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 0000000000000000000000000000000000000000..2ddd8bb0e5f9ef19eb937eae8d2b50c806d5fb41 --- /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 0000000000000000000000000000000000000000..2e3332259d978123476d075f8916ca56aca6743e --- /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 0000000000000000000000000000000000000000..b7951de1e3791daebc7dbf7b972ae0eb6bdc2c3e --- /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 0000000000000000000000000000000000000000..23f796d25a5c2f725307a82970f64b043821aebb --- /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 0000000000000000000000000000000000000000..51a5588855d3504215f969b0f592d2fc76e8e0c6 --- /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 0000000000000000000000000000000000000000..346a08a81f237b6dec7f5c763d504d702050cb8c --- /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 0000000000000000000000000000000000000000..3a51d6cd81ee29ef5cf3f8b4df332f7e88f71a54 --- /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 0000000000000000000000000000000000000000..4fc212c6c06c9cc99a91b16908b0ac2006142fa6 --- /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 0000000000000000000000000000000000000000..7e65c1ee3ece64389e63b9fe15ea0006dd8b1b7e --- /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 0000000000000000000000000000000000000000..47b38fd28c2480fc1e098a4dba0d12ed2c4c2451 --- /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 0000000000000000000000000000000000000000..e387cce6b2ab26b9ca39a7f30ea337d3c437fefd --- /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 0000000000000000000000000000000000000000..aecb337baf8a8101ab1340c034b0745247704d02 --- /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 0000000000000000000000000000000000000000..85f6ace5eb529e8a090c53e8090cb5abf4d619b2 --- /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 0000000000000000000000000000000000000000..add2acbeef7cde20f10b7d38a1398132b801099a --- /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 0000000000000000000000000000000000000000..1b4d8c88b2360cafbc9de930d90c25f3b386c1ea --- /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 0000000000000000000000000000000000000000..0469b08eaa7a01e4c6ccdcc2c5c4746f8ee818e2 --- /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 0000000000000000000000000000000000000000..249196e8d0f6c8e2d2213c2d3f4125b6f10dcc9f --- /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 0000000000000000000000000000000000000000..c95992dcfba3524a00f142b8f0c9860bbe33821f --- /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 0000000000000000000000000000000000000000..0443ae12f532601bbaa659002970d732c453809f --- /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 0000000000000000000000000000000000000000..63534bf530da1e74540f89fec2dd295eeea32ddc --- /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 0000000000000000000000000000000000000000..bc97885436ac0752dab2d49cd5311c069ddeb239 --- /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 0000000000000000000000000000000000000000..b9e91d6b59041f3b5df2544d583b8ceb03e7c8a4 --- /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 0000000000000000000000000000000000000000..469541b726cc5d935fc92978690cf52cf8601383 --- /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 0000000000000000000000000000000000000000..f336bd0c6e7b8167bc3363a6b2fdd9e354fc05fd --- /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 0000000000000000000000000000000000000000..34040d50b4e9b1a297a9ae5da3eab58ec5d042da --- /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 0000000000000000000000000000000000000000..59ebb5276a778da8bc100238196bae6360de808e --- /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 0000000000000000000000000000000000000000..8a3848714652d02a516d0ef20d3fe70e42e824b6 --- /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 0000000000000000000000000000000000000000..224784e079bf18eb0c6b7de2cc7fabf4cc9e1cf1 --- /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 0000000000000000000000000000000000000000..e3591cc051769bfbd1e384d9e2f61328cbbd5480 --- /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 0000000000000000000000000000000000000000..1289b318948752c52eb360715ad8ea0697ea534f --- /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 0000000000000000000000000000000000000000..ea21a15a13c42751c7c974d4e19c38969a071a08 --- /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 0000000000000000000000000000000000000000..a59e7139a8d03460d81d06b6354e8187a45e6cac --- /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 0000000000000000000000000000000000000000..4f2ed42537061a1d8c273d9f86d6139d72887fe2 --- /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 0000000000000000000000000000000000000000..0dc11d56228b333e8886c7cb9e5a0c25b93c57c1 --- /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 0000000000000000000000000000000000000000..b1cdfaf49c671339df11fa12e288d1ec56ee5c96 --- /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 0000000000000000000000000000000000000000..12a0c501764b931d2a0ddfda1663c84c8564265a --- /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 0000000000000000000000000000000000000000..949caeafd85da64bcee9d741c2a2c8c05716f3ae --- /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 0000000000000000000000000000000000000000..098b397f98805066acec6f16b2df670bf934459d --- /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 0000000000000000000000000000000000000000..b4214c4ff1d54463c53f8eb8ab6452a2ca940289 --- /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 0000000000000000000000000000000000000000..7a7711682f527bf7dc4d52eb84a04ea23e5b2a97 --- /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 0000000000000000000000000000000000000000..fbb10dd942d30a5a4444c8fab0fc72bb6a17931f --- /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 0000000000000000000000000000000000000000..2c19c86675bc5c5fbdb88853cbd3963bff5bbe82 --- /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 0000000000000000000000000000000000000000..93210a712684cf1c1aff0c93d83d1ef1f33845ec --- /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 0000000000000000000000000000000000000000..df5777d587e7efd4e6899fa61e5202610ff79296 --- /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 0000000000000000000000000000000000000000..1b2dac5d6ebb3c7aa67b1912d4ced4f8f24ef314 --- /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 0000000000000000000000000000000000000000..3bf5674f3b5ecfb96bf5a6b81824b33a225ba5a8 --- /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 0000000000000000000000000000000000000000..d3d79807b81968877f1b3b956e63da9de87333fd --- /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 0000000000000000000000000000000000000000..23101221b9de1aff5a96584a6ac4bdef440e0c53 --- /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 0000000000000000000000000000000000000000..16703dd22e3f402aeab198062e331b10fccd643c --- /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 0000000000000000000000000000000000000000..e503a120100862fbe81adb6f0af0305fa687153c --- /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 0000000000000000000000000000000000000000..dc870490503d770f16be5fefe51bfc9b6b33eaa5 --- /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 0000000000000000000000000000000000000000..cf7080e616d330b3c76be31a0b6673105c3f4113 --- /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 0000000000000000000000000000000000000000..121d7d20c6316220651c931b0b66737422689db0 --- /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 0000000000000000000000000000000000000000..48ed88b8d0c51c6a7484eb4050ebb6dc10ef97b0 --- /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 0000000000000000000000000000000000000000..51ae819e0f5f140d128cf84441e9227ffdbbf71e --- /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 0000000000000000000000000000000000000000..1efb2ca7bf69e010399be71ecf044879a08ad5a5 --- /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 0000000000000000000000000000000000000000..a4625e3a3cd3479a8392d499599d4ccc7b2585fe --- /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 0000000000000000000000000000000000000000..cd84f56b054c48e95650502ed472e9568ef49209 --- /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 0000000000000000000000000000000000000000..d817941a397d219292fd192af1858aeb7e6371f7 --- /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 0000000000000000000000000000000000000000..0e5d2061ec503a9e5a97c2cdd4c01e028d71d745 --- /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 0000000000000000000000000000000000000000..bc76f4449cc4b30bb79a773eebf9ed3155518bd8 --- /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 0000000000000000000000000000000000000000..224e2279a91939cc8ed86e1f3ad44b324c11ddae --- /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 0000000000000000000000000000000000000000..c23b35808067afc96da6931df8bc0b6d780c002b --- /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 0000000000000000000000000000000000000000..d6e9dcad98ad83e85fe462d88e6922edfba81e13 --- /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 0000000000000000000000000000000000000000..c91bab832bf72bbddca6b02bc4e2668c2c3f8851 --- /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 0000000000000000000000000000000000000000..56286402068d8265be87e41d12e0d276191f89b2 --- /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 0000000000000000000000000000000000000000..d9bd81435ed1799166730a8d9a13d0801b7ce517 --- /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 0000000000000000000000000000000000000000..95faf8f007ccc9803f5f42977d9ab91b4d1e7ff7 --- /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 0000000000000000000000000000000000000000..6ccd3a9ae3ee7ccf4f4c72786d2120096c030375 --- /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 0000000000000000000000000000000000000000..9ddf2dffaaef0e623bd9d85521641a1f1e7f4eb9 --- /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 0000000000000000000000000000000000000000..a29e0c49e9e13c30befbd1b11a4ed171f25e90c4 --- /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 0000000000000000000000000000000000000000..1b71caa6191029d69aa61487dd3f4d4aed011507 --- /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 0000000000000000000000000000000000000000..fe4e1f75120f6e5b5a210b332b52312315135f26 --- /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 0000000000000000000000000000000000000000..61f14cda70da9b504518071733ca315929240254 --- /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 0000000000000000000000000000000000000000..2807e44209dd00694f7bf2aaf2d4ee8e543e4a8e --- /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 0000000000000000000000000000000000000000..eb993999e646de13e5bb4ddff6a295a0c69bd04d --- /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 0000000000000000000000000000000000000000..df14911a98a9391e11aeb71e658e24d33338403d --- /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 0000000000000000000000000000000000000000..1d393795b9bf27a64fd76bb9aa267449bccbeed9 --- /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 0000000000000000000000000000000000000000..996cceb38c20de7e3405552720e71adf4779068a --- /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 0000000000000000000000000000000000000000..2ed09c30871273bd50843028081d2a1bf215d060 --- /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 0000000000000000000000000000000000000000..1b95fc3566e5e29f7a4043ccb3104c41370bff09 --- /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 0000000000000000000000000000000000000000..1711a2518447157a9517375f451923b215e7f969 --- /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 0000000000000000000000000000000000000000..b712123638e930da84dd6f6fcfc8ce01d2e73983 --- /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 0000000000000000000000000000000000000000..13ee5245a0be7a0498d5852ffe9d49869f62f39e --- /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 0000000000000000000000000000000000000000..ef5719cc28f1054c27768eed18dffe2c41eeb15b --- /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 0000000000000000000000000000000000000000..50af4ddb5a011e66de97b12cc2c12772f070c55a --- /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 0000000000000000000000000000000000000000..d30c379a946396820b50e5fefdb0e9fc3d18f855 --- /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 0000000000000000000000000000000000000000..f0d652a41e63020e52939b989ceb328604ef91a2 --- /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 0000000000000000000000000000000000000000..04ab40ea8ff0f1e745987f57f4ba1aa7d41b7614 --- /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 0000000000000000000000000000000000000000..6b6006f78ec2c29562e3dace52b63ae527246512 --- /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 0000000000000000000000000000000000000000..d098717123e8513e3cbd389fe5bfba29320fdf88 --- /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 0000000000000000000000000000000000000000..610739e5c0c0dc6355dcca661249b3e236e7582c --- /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 0000000000000000000000000000000000000000..bb2942d65bb1db79e97f823752c98618bbc7e7b3 --- /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 0000000000000000000000000000000000000000..b773adc8ed8fe09d34b246eb788859b854eb0d9b --- /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 0000000000000000000000000000000000000000..f22abf009ce91b1f769a4854d565e4ef7d8e98f2 --- /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 0000000000000000000000000000000000000000..c616e6e13281e9e79a5cf3a97d422a26f6316b2b --- /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 0000000000000000000000000000000000000000..e5d7d42bc54a40310803ade49d0d924ff4901ccf --- /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 0000000000000000000000000000000000000000..9760e6fae8cdcfdf072df9113b33e3beb3b21b1a --- /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 0000000000000000000000000000000000000000..dbcb6e1e3b1c055e6a98bec3871a34d16be23684 --- /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 0000000000000000000000000000000000000000..99c475b29bd1f23f8f4e52e8609224e5c6db14c1 --- /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 0000000000000000000000000000000000000000..f9b8c54396339fe727d334f75243d6ff4c6b2d7a --- /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 0000000000000000000000000000000000000000..aff74db9e668a77fb83220fa8537cbe4cac9765d --- /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 0000000000000000000000000000000000000000..27ae65712b700480e8c612101ecfa9dce06a9064 --- /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/VMTests/vmArithmeticTest.json b/tests/files/VMTests/vmArithmeticTest.json index 2cc165f5d058138107a19d43bf9a0275ab0febca..88d209dfaf5e835c77e6009b755b08f7a54e0953 100644 --- a/tests/files/VMTests/vmArithmeticTest.json +++ b/tests/files/VMTests/vmArithmeticTest.json @@ -12,12 +12,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9696", @@ -57,12 +57,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x60047fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9696", @@ -102,12 +102,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "10000", @@ -146,12 +146,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x6000600001600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9896", @@ -190,12 +190,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600101600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9896", @@ -234,12 +234,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x60026002600108600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9695", @@ -279,12 +279,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x60026002600003600160000308600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9691", @@ -324,12 +324,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x60036001600660000308600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9693", @@ -369,12 +369,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x60036001600660000308600360056000030714600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9887", @@ -413,12 +413,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x60036001600660000308600360056000030614600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9687", @@ -458,12 +458,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x60036000036001600408600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9693", @@ -503,12 +503,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x60026003600003600160040814600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9891", @@ -547,12 +547,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x6002600504600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9696", @@ -592,12 +592,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x6018601704600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9896", @@ -636,12 +636,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x6018600004600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9896", @@ -680,12 +680,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x6001600104600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9696", @@ -725,12 +725,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x6000600204600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9896", @@ -769,12 +769,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x600260020a600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9695", @@ -814,12 +814,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0a600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9664", @@ -859,12 +859,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x637fffffff637fffffff0a600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9692", @@ -904,12 +904,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x637fffffff60000a600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9892", @@ -948,12 +948,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x6000637fffffff0a600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9696", @@ -993,12 +993,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x60016101010a600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9695", @@ -1038,12 +1038,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x61010160010a600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9694", @@ -1083,12 +1083,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x61010160020a600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9894", @@ -1127,12 +1127,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x6003600206600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9696", @@ -1172,12 +1172,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff06600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9696", @@ -1217,12 +1217,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600006600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9896", @@ -1261,12 +1261,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x6000600306600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9896", @@ -1305,12 +1305,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x6003600260000306600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9694", @@ -1350,12 +1350,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x6003600202600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9696", @@ -1395,12 +1395,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff02600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9696", @@ -1440,12 +1440,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x6017600002600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9896", @@ -1484,12 +1484,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x6001601702600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9696", @@ -1529,12 +1529,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f800000000000000000000000000000000000000000000000000000000000000002600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9696", @@ -1574,12 +1574,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x7f80000000000000000000000000000000000000000000000000000000000000007f800000000000000000000000000000000000000000000000000000000000000002600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9896", @@ -1618,12 +1618,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x7f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff02600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9696", @@ -1663,12 +1663,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x60026002600109600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9895", @@ -1707,12 +1707,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x60036002600003600160000309600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9891", @@ -1751,12 +1751,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x60036001600560000309600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9693", @@ -1796,12 +1796,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x60036001600560000309600360056000030714600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9887", @@ -1840,12 +1840,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x60036001600560000309600360056000030614600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9687", @@ -1885,12 +1885,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x60036000036001600509600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9693", @@ -1930,12 +1930,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x60026003600003600160050914600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9891", @@ -1974,12 +1974,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60000305600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9694", @@ -2019,12 +2019,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6000037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff05600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9694", @@ -2064,12 +2064,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x6004600003600260000305600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9892", @@ -2108,12 +2108,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x6002600003600405600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9694", @@ -2153,12 +2153,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x6000600003600360000305600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9892", @@ -2197,12 +2197,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60000305600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9894", @@ -2241,12 +2241,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x62126af460500b600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9696", @@ -2286,12 +2286,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x600060000b600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9896", @@ -2330,12 +2330,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60000b600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9696", @@ -2375,12 +2375,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0b600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9696", @@ -2420,12 +2420,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0b600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9696", @@ -2465,12 +2465,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x60ff68f000000000000000010b600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9696", @@ -2510,12 +2510,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0b600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9896", @@ -2554,12 +2554,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x62122f6a60000b600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9696", @@ -2599,12 +2599,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x62126af460010b600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9696", @@ -2644,12 +2644,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x6212faf460010b600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9696", @@ -2689,12 +2689,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x66f000000000000161ffff0b600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9696", @@ -2734,12 +2734,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x62122ff460000b600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9696", @@ -2779,12 +2779,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x6003600003600560000307600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9692", @@ -2824,12 +2824,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x6003600003600507600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9694", @@ -2869,12 +2869,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x6003600560000307600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9694", @@ -2914,12 +2914,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600260000307600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9894", @@ -2958,12 +2958,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x6000600260000307600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9894", @@ -3002,12 +3002,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x00", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "10000", @@ -3046,12 +3046,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x6001601703600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9696", @@ -3091,12 +3091,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x6003600203600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9696", @@ -3136,12 +3136,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x6017600003600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9696", @@ -3181,12 +3181,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600003600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9696", @@ -3226,12 +3226,12 @@ }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", "code" : "0x60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03600055", "data" : "0x", "gas" : "10000", "gasPrice" : "100000000000000", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", "value" : "1000000000000000000" }, "gas" : "9696", @@ -3258,4 +3258,4 @@ } } } -} \ No newline at end of file +} diff --git a/tests/files/index.js b/tests/files/index.js index 730107a27ebb50241cedd2c60c793eb88b224575..99c19aa132e1f36aee31c49b5146bf7ab650925d 100644 --- a/tests/files/index.js +++ b/tests/files/index.js @@ -4,16 +4,25 @@ 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'), + stInitCodeTest: require('./StateTests/stInitCodeTest.json'), + 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') }, VMTests: { + vmRandom: require('./VMTests/RandomTests/randomTest'), vmArithmeticTest: require('./VMTests/vmArithmeticTest'), vmBitwiseLogicOperationTest: require('./VMTests/vmBitwiseLogicOperationTest'), vmBlockInfoTest: require('./VMTests/vmBlockInfoTest'), @@ -22,6 +31,6 @@ module.exports = { vmLogTest: require('./VMTests/vmLogTest'), vmPushDupSwapTest: require('./VMTests/vmPushDupSwapTest'), vmSha3Test: require('./VMTests/vmSha3Test'), - vmtests: require('./VMTests/vmtests'), + vmtests: require('./VMTests/vmtests') } }; diff --git a/tests/helper/trie.go b/tests/helper/trie.go index 32432cc7a52b4bf1e4d43b4f4c98d26cd1a7c68b..3cfb0bbe5e34942dc9c7c6814c45e0b1748ad2b7 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) } diff --git a/tests/helper/vm.go b/tests/helper/vm.go index 0c77e87fb212cbe537965b3afc50380f42f1720f..e174e0892eb158e10992c0977d8f406c8e49043e 100644 --- a/tests/helper/vm.go +++ b/tests/helper/vm.go @@ -44,6 +44,7 @@ func NewEnvFromMap(state *state.StateDB, envValues map[string]string, exeValues env.time = ethutil.Big(envValues["currentTimestamp"]).Int64() env.difficulty = ethutil.Big(envValues["currentDifficulty"]) env.gasLimit = ethutil.Big(envValues["currentGasLimit"]) + env.Gas = new(big.Int) return env } @@ -67,8 +68,7 @@ func (self *Env) Transfer(from, to vm.Account, amount *big.Int) error { } func (self *Env) vm(addr, data []byte, gas, price, value *big.Int) *core.Execution { - evm := vm.New(self, vm.DebugVmTy) - exec := core.NewExecution(evm, addr, data, gas, price, value) + exec := core.NewExecution(self, addr, data, gas, price, value) exec.SkipTransfer = self.skipTransfer return exec @@ -110,7 +110,7 @@ func RunVm(state *state.StateDB, env, exec map[string]string) ([]byte, state.Log return ret, vmenv.logs, vmenv.Gas, err } -func RunState(state *state.StateDB, env, tx map[string]string) ([]byte, state.Logs, *big.Int, error) { +func RunState(statedb *state.StateDB, env, tx map[string]string) ([]byte, state.Logs, *big.Int, error) { var ( keyPair, _ = crypto.NewKeyPairFromSec([]byte(ethutil.Hex2Bytes(tx["secretKey"]))) to = FromHex(tx["to"]) @@ -118,13 +118,39 @@ func RunState(state *state.StateDB, env, tx map[string]string) ([]byte, state.Lo gas = ethutil.Big(tx["gasLimit"]) price = ethutil.Big(tx["gasPrice"]) value = ethutil.Big(tx["value"]) + caddr = FromHex(env["currentCoinbase"]) ) - caller := state.GetOrNewStateObject(keyPair.Address()) + coinbase := statedb.GetOrNewStateObject(caddr) + coinbase.SetGasPool(ethutil.Big(env["currentGasLimit"])) - vmenv := NewEnvFromMap(state, env, tx) - vmenv.origin = caller.Address() - ret, err := vmenv.Call(caller, to, data, gas, price, value) + 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) + vmenv.origin = keyPair.Address() + st.Env = vmenv + ret, err := st.TransitionState() + statedb.Update(vmenv.Gas) return ret, vmenv.logs, vmenv.Gas, err } + +type Message struct { + from, to []byte + value, gas, price *big.Int + data []byte +} + +func NewMessage(from, to, data []byte, value, gas, price *big.Int) Message { + return Message{from, to, value, gas, price, data} +} + +func (self Message) Hash() []byte { return nil } +func (self Message) From() []byte { return self.from } +func (self Message) To() []byte { return self.to } +func (self Message) GasPrice() *big.Int { return self.price } +func (self Message) Gas() *big.Int { return self.gas } +func (self Message) Value() *big.Int { return self.value } +func (self Message) Nonce() uint64 { return 0 } +func (self Message) Data() []byte { return self.data } diff --git a/tests/vm/gh_test.go b/tests/vm/gh_test.go index da5a412515bf4457d6828b6fe9b8ecaff26f32bf..f1e4d1acc88df32c84773c01fffa8ae40a44169c 100644 --- a/tests/vm/gh_test.go +++ b/tests/vm/gh_test.go @@ -8,6 +8,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" "github.com/ethereum/go-ethereum/tests/helper" ) @@ -81,6 +82,9 @@ func RunVmTest(p string, t *testing.T) { for addr, account := range test.Pre { obj := StateObjectFromAccount(addr, account) statedb.SetStateObject(obj) + for a, v := range account.Storage { + obj.SetState(helper.FromHex(a), ethutil.NewValue(helper.FromHex(v))) + } } // XXX Yeah, yeah... @@ -103,16 +107,17 @@ 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) } - // 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) @@ -120,15 +125,29 @@ 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) + } } } for addr, account := range test.Post { obj := statedb.GetStateObject(helper.FromHex(addr)) + if obj == nil { + continue + } + + if len(test.Exec) == 0 { + if obj.Balance().Cmp(ethutil.Big(account.Balance)) != 0 { + t.Errorf("%s's : (%x) balance failed. Expected %v, got %v => %v\n", name, obj.Address()[:4], account.Balance, obj.Balance(), new(big.Int).Sub(ethutil.Big(account.Balance), obj.Balance())) + } + } + for addr, value := range account.Storage { v := obj.GetState(helper.FromHex(addr)).Bytes() vexp := helper.FromHex(value) @@ -140,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)) { @@ -149,6 +167,7 @@ func RunVmTest(p string, t *testing.T) { } } } + logger.Flush() } // I've created a new function for each tests so it's easier to identify where the problem lies if any of them fail. @@ -212,7 +231,12 @@ func TestStateRecursiveCreate(t *testing.T) { RunVmTest(fn, t) } -func TestStateSpecialTest(t *testing.T) { +func TestStateSpecial(t *testing.T) { const fn = "../files/StateTests/stSpecialTest.json" RunVmTest(fn, t) } + +func TestStateRefund(t *testing.T) { + const fn = "../files/StateTests/stRefundTest.json" + RunVmTest(fn, t) +} diff --git a/ui/qt/qwhisper/message.go b/ui/qt/qwhisper/message.go new file mode 100644 index 0000000000000000000000000000000000000000..c8764739966dbbd153aba5c4c5398f77d9a347c3 --- /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 int32 + Payload string + From string +} + +func ToQMessage(msg *whisper.Message) *Message { + return &Message{ + ref: msg, + Flags: int32(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 0000000000000000000000000000000000000000..0ccedc7194ebc5edcc37d180e44903a9351ce804 --- /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 bed23c8a7c646784591d73495d5bc4984a134fae..0627acd298b16aabcd5ed090a61ccadc177c064a 100644 --- a/ui/qt/qwhisper/whisper.go +++ b/ui/qt/qwhisper/whisper.go @@ -1,11 +1,13 @@ package qwhisper import ( + "fmt" "time" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/whisper" + "gopkg.in/qml.v1" ) func fromHex(s string) []byte { @@ -18,25 +20,40 @@ func toHex(b []byte) string { return "0x" + ethutil.Bytes2Hex(b) } type Whisper struct { *whisper.Whisper + view qml.Object + + watches map[int]*Watch } func New(w *whisper.Whisper) *Whisper { - return &Whisper{w} + return &Whisper{w, nil, make(map[int]*Watch)} +} + +func (self *Whisper) SetView(view qml.Object) { + self.view = view } -func (self *Whisper) Post(data string, pow, ttl uint32, to, from string) { - msg := whisper.NewMessage(fromHex(data)) - envelope, err := msg.Seal(time.Duration(pow), whisper.Opts{ - Ttl: time.Duration(ttl), - To: crypto.ToECDSAPub(fromHex(to)), - From: crypto.ToECDSA(fromHex(from)), +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: crypto.ToECDSA(fromHex(from)), + Topics: whisper.TopicsFromString(topics...), }) if err != nil { + fmt.Println(err) // handle error return } if err := self.Whisper.Send(envelope); err != nil { + fmt.Println(err) // handle error return } @@ -46,16 +63,23 @@ func (self *Whisper) NewIdentity() string { return toHex(self.Whisper.NewIdentity().D.Bytes()) } -func (self *Whisper) HasIdentify(key string) bool { +func (self *Whisper) HasIdentity(key string) bool { return self.Whisper.HasIdentity(crypto.ToECDSA(fromHex(key))) } -func (self *Whisper) Watch(opts map[string]interface{}) { +func (self *Whisper) Watch(opts map[string]interface{}, view *qml.Common) int { filter := filterFromMap(opts) + var i int filter.Fn = func(msg *whisper.Message) { - // TODO POST TO QT WINDOW + if view != nil { + view.Call("onShhMessage", ToQMessage(msg), i) + } } - self.Whisper.Watch(filter) + + i = self.Whisper.Watch(filter) + self.watches[i] = &Watch{} + + return i } func filterFromMap(opts map[string]interface{}) (f whisper.Filter) { @@ -65,6 +89,11 @@ func filterFromMap(opts map[string]interface{}) (f whisper.Filter) { if from, ok := opts["from"].(string); ok { f.From = crypto.ToECDSAPub(fromHex(from)) } + if topicList, ok := opts["topics"].(*qml.List); ok { + var topics []string + topicList.Convert(&topics) + f.Topics = whisper.TopicsFromString(topics...) + } return } diff --git a/ui/qt/qwhisper/whisper_test.go b/ui/qt/qwhisper/whisper_test.go new file mode 100644 index 0000000000000000000000000000000000000000..efa4e6238da4a1b4ca634c94b2eba5628be9666c --- /dev/null +++ b/ui/qt/qwhisper/whisper_test.go @@ -0,0 +1,15 @@ +package qwhisper + +import ( + "testing" + + "github.com/ethereum/go-ethereum/whisper" +) + +func TestHasIdentity(t *testing.T) { + qw := New(whisper.New()) + id := qw.NewIdentity() + if !qw.HasIdentity(id) { + t.Error("expected to have identity") + } +} diff --git a/vm/address.go b/vm/address.go index be8921a3b1c243129a6afe729caa50c3b38d9ff2..611979c94137d0b21b35a15c01574878d455265a 100644 --- a/vm/address.go +++ b/vm/address.go @@ -11,25 +11,25 @@ type Address interface { Call(in []byte) []byte } -type PrecompiledAddress struct { +type PrecompiledAccount struct { Gas func(l int) *big.Int fn func(in []byte) []byte } -func (self PrecompiledAddress) Call(in []byte) []byte { +func (self PrecompiledAccount) Call(in []byte) []byte { return self.fn(in) } -var Precompiled = map[uint64]*PrecompiledAddress{ - 1: &PrecompiledAddress{func(l int) *big.Int { +var Precompiled = map[string]*PrecompiledAccount{ + string(ethutil.LeftPadBytes([]byte{1}, 20)): &PrecompiledAccount{func(l int) *big.Int { return GasEcrecover }, ecrecoverFunc}, - 2: &PrecompiledAddress{func(l int) *big.Int { + 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}, - 3: &PrecompiledAddress{func(l int) *big.Int { + 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 diff --git a/vm/closure.go b/vm/closure.go index bd5268f96ff2adeff460c3a90ca88e89149a0a3e..df216f2aed713ec2c98cfadfbf4b589d9081a87f 100644 --- a/vm/closure.go +++ b/vm/closure.go @@ -1,6 +1,7 @@ package vm import ( + "math" "math/big" "github.com/ethereum/go-ethereum/ethutil" @@ -11,8 +12,6 @@ type ClosureRef interface { ReturnGas(*big.Int, *big.Int) Address() []byte SetCode([]byte) - GetStorage(*big.Int) *ethutil.Value - SetStorage(*big.Int, *ethutil.Value) } type Closure struct { @@ -41,10 +40,6 @@ func NewClosure(msg *state.Message, caller ClosureRef, object ClosureRef, code [ return c } -func (c *Closure) GetValue(x uint64) *ethutil.Value { - return c.GetRangeValue(x, 1) -} - func (c *Closure) GetOp(x uint64) OpCode { return OpCode(c.GetByte(x)) } @@ -58,37 +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] -} - -func (c *Closure) GetRangeValue(x, y uint64) *ethutil.Value { - if x >= uint64(len(c.Code)) || y >= uint64(len(c.Code)) { - return ethutil.NewValue(0) - } - - partial := c.Code[x : x+y] - - return ethutil.NewValue(partial) -} - -/* - * State storage functions - */ -func (c *Closure) SetStorage(x *big.Int, val *ethutil.Value) { - c.object.SetStorage(x, val) + return c.GetRangeValue(uint64(x), uint64(y)) } -func (c *Closure) GetStorage(x *big.Int) *ethutil.Value { - m := c.object.GetStorage(x) - if m == nil { - return ethutil.EmptyValue() - } +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 m + return ethutil.LeftPadBytes(c.Code[x:y], int(size)) } func (c *Closure) Return(ret []byte) []byte { @@ -123,10 +95,6 @@ func (c *Closure) ReturnGas(gas, price *big.Int) { /* * Set / Get */ -func (c *Closure) Caller() ClosureRef { - return c.caller -} - func (c *Closure) Address() []byte { return c.object.Address() } diff --git a/vm/common.go b/vm/common.go index 592d44ccd33f6758d7270702d996be3b0129f679..529bbdeb185bea5712a6702ab2d05b848dc4a006 100644 --- a/vm/common.go +++ b/vm/common.go @@ -37,7 +37,7 @@ var ( GasLog = big.NewInt(32) GasSha256 = big.NewInt(50) GasRipemd = big.NewInt(50) - GasEcrecover = big.NewInt(100) + GasEcrecover = big.NewInt(500) Pow256 = ethutil.BigPow(2, 256) @@ -48,7 +48,7 @@ var ( S256 = ethutil.S256 ) -const MaxCallDepth = 1025 +const MaxCallDepth = 1024 func calcMemSize(off, l *big.Int) *big.Int { if l.Cmp(ethutil.Big0) == 0 { diff --git a/vm/environment.go b/vm/environment.go index d77fb14193159eb7b0fb3cff1c417746ab7f99a6..969bc5e43168b8cde2b0eef179d3a1c604a99089 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/stack.go b/vm/stack.go index 6091479cb78e6bc84fcccc7c34b917afdbf5961d..b9eaa10cd4dc4a3469006902802a536a2e76c064 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 8af1979b19295f206cc8380b98ffc3141f79935c..8829a9de0bc5a6af7967b1e332cf2163fff2249d 100644 --- a/vm/vm_debug.go +++ b/vm/vm_debug.go @@ -2,6 +2,7 @@ package vm import ( "fmt" + "math" "math/big" "github.com/ethereum/go-ethereum/crypto" @@ -48,16 +49,11 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * }) closure := NewClosure(msg, caller, me, code, gas, price) - if self.env.Depth() == MaxCallDepth { - //closure.UseGas(gas) - return closure.Return(nil), DepthError{} - } - 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() @@ -108,13 +103,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 gas: %v (d) %x\n", self.env.Depth(), closure.Address(), closure.Gas, callData) - for { prevStep = step // The base for all big integer arithmetic @@ -124,154 +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) - } - } - - addStepGasUsage(GasStep) - - var newMemSize *big.Int = ethutil.Big0 - // Stack Check, memory resize & gas phase - switch op { - // 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 - 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 := closure.GetStorage(x) - if val.BigInt().Cmp(ethutil.Big0) == 0 && len(y.Bytes()) > 0 { - // 0 => non 0 - mult = ethutil.Big3 - } else if val.BigInt().Cmp(ethutil.Big0) != 0 && len(y.Bytes()) == 0 { - statedb.Refund(closure.caller.Address(), GasSStoreRefund, closure.Price) - - mult = ethutil.Big0 - } else { - // non 0 => non 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) + self.Printf("(pc) %-3d -o- %-14s (m) %-4d (s) %-4d ", pc, op.String(), mem.Len(), stack.Len()) - newMemSize = calcMemSize(stack.Peek(), u256(32)) - case MSTORE8: - require(2) - newMemSize = calcMemSize(stack.Peek(), u256(1)) - case RETURN: - require(2) + newMemSize, gas := self.calculateGasAndSize(closure, caller, op, statedb, mem, stack) - 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]) - case CALLDATACOPY: - require(2) - - newMemSize = calcMemSize(stack.Peek(), stack.data[stack.Len()-3]) - case CODECOPY: - require(3) - - newMemSize = calcMemSize(stack.Peek(), stack.data[stack.Len()-3]) - case EXTCODECOPY: - require(4) - - newMemSize = calcMemSize(stack.data[stack.Len()-2], 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]) - } - - 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) - 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() @@ -643,9 +495,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 } @@ -661,14 +511,13 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * cOff = 0 l = 0 } else if cOff+l > size { - l = 0 + 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) @@ -710,19 +559,15 @@ 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) - data := closure.GetRangeValue(pc+1, a) - val := ethutil.BigD(data.Bytes()) + byts := closure.GetRangeValue(pc+1, a) // 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 - self.Printf(" => 0x%x", data.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: @@ -777,10 +622,7 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price * val, loc := stack.Popn() statedb.SetState(closure.Address(), loc.Bytes(), val) - // Debug sessions are allowed to run without message - if closure.message != nil { - closure.message.AddStorageChange(loc.Bytes()) - } + closure.message.AddStorageChange(loc.Bytes()) self.Printf(" {0x%x : 0x%x}", loc.Bytes(), val.Bytes()) case JUMP: @@ -895,14 +737,16 @@ 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: - receiver := statedb.GetOrNewStateObject(stack.Pop().Bytes()) + balance := statedb.GetBalance(closure.Address()) + + self.Printf(" => (%x) %v", receiver.Address()[:4], balance) - receiver.AddAmount(statedb.GetBalance(closure.Address())) + receiver.AddAmount(balance) statedb.Delete(closure.Address()) fallthrough @@ -941,6 +785,180 @@ 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) { + ret = p.Call(callData) + self.Printf("NATIVE_FUNC => %x", ret) + self.Endl() + + return closure.Return(ret), nil + } else { + self.Endl() + + tmp := new(big.Int).Set(closure.Gas) + + closure.UseGas(closure.Gas) + + return closure.Return(nil), OOG(gas, tmp) + } +} + func (self *DebugVm) Printf(format string, v ...interface{}) VirtualMachine { if self.logTy == LogTyPretty { self.logStr += fmt.Sprintf(format, v...) diff --git a/whisper/doc.go b/whisper/doc.go new file mode 100644 index 0000000000000000000000000000000000000000..986df8fb9b92e78ea926042313c5ffcad56c64ed --- /dev/null +++ b/whisper/doc.go @@ -0,0 +1,16 @@ +/* +Package whisper implements the Whisper PoC-1. + +(https://github.com/ethereum/wiki/wiki/Whisper-PoC-1-Protocol-Spec) + +Whisper combines aspects of both DHTs and datagram messaging systems (e.g. UDP). +As such it may be likened and compared to both, not dissimilar to the +matter/energy duality (apologies to physicists for the blatant abuse of a +fundamental and beautiful natural principle). + +Whisper is a pure identity-based messaging system. Whisper provides a low-level +(non-application-specific) but easily-accessible API without being based upon +or prejudiced by the low-level hardware attributes and characteristics, +particularly the notion of singular endpoints. +*/ +package whisper diff --git a/whisper/envelope.go b/whisper/envelope.go index 683e881283faedc09faf07c045da930c7284f64e..066e20f6a38be3e12a36cbe5f1c6368d7f4b737a 100644 --- a/whisper/envelope.go +++ b/whisper/envelope.go @@ -11,6 +11,7 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/rlp" + "github.com/obscuren/ecies" ) const ( @@ -73,10 +74,15 @@ func (self *Envelope) Open(prv *ecdsa.PrivateKey) (msg *Message, err error) { message.Flags = data[0] message.Signature = data[1:66] } - message.Payload = data[dataStart:] + + payload := data[dataStart:] if prv != nil { - message.Payload, err = crypto.Decrypt(prv, message.Payload) - if err != nil { + message.Payload, err = crypto.Decrypt(prv, payload) + switch err { + case ecies.ErrInvalidPublicKey: // Payload isn't encrypted + message.Payload = payload + return &message, err + default: return nil, fmt.Errorf("unable to open envelope. Decrypt failed: %v", err) } } diff --git a/whisper/main.go b/whisper/main.go index 2ee2f3ff12128e33542e706bf54fff5a46fac2ff..edd5f7004fa98779d967377e651e7f5897644e7d 100644 --- a/whisper/main.go +++ b/whisper/main.go @@ -5,10 +5,8 @@ package main import ( "fmt" "log" - "net" "os" - "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/whisper" @@ -20,12 +18,12 @@ func main() { pub, _ := secp256k1.GenerateKeyPair() - whisper := whisper.New(&event.TypeMux{}) + whisper := whisper.New() srv := p2p.Server{ MaxPeers: 10, Identity: p2p.NewSimpleClientIdentity("whisper-go", "1.0", "", string(pub)), - ListenAddr: ":30303", + ListenAddr: ":30300", NAT: p2p.UPNP(), Protocols: []p2p.Protocol{whisper.Protocol()}, @@ -35,13 +33,5 @@ func main() { os.Exit(1) } - // add seed peers - seed, err := net.ResolveTCPAddr("tcp", "poc-7.ethdev.com:30300") - if err != nil { - fmt.Println("couldn't resolve:", err) - os.Exit(1) - } - srv.SuggestPeer(seed.IP, seed.Port, nil) - select {} } diff --git a/whisper/util.go b/whisper/util.go index abef1d667e1769b8bc79eeae4366721cbdce6583..7a222395fe9ee1bafa4eaa777f9e06c8799912b6 100644 --- a/whisper/util.go +++ b/whisper/util.go @@ -18,10 +18,19 @@ func Topics(data [][]byte) [][]byte { return d } -func TopicsFromString(data []string) [][]byte { +func TopicsFromString(data ...string) [][]byte { d := make([][]byte, len(data)) for i, str := range data { d[i] = hashTopic([]byte(str)) } return d } + +func bytesToMap(s [][]byte) map[string]struct{} { + m := make(map[string]struct{}) + for _, topic := range s { + m[string(topic)] = struct{}{} + } + + return m +} diff --git a/whisper/whisper.go b/whisper/whisper.go index 356debd1c2b5011f246af4e32e480f15aea6af50..ffcdd7d409a92ae4e8198d0b543eaf65f54ae5ef 100644 --- a/whisper/whisper.go +++ b/whisper/whisper.go @@ -4,13 +4,14 @@ import ( "bytes" "crypto/ecdsa" "errors" - "fmt" "sync" "time" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/event/filter" + "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/p2p" + "github.com/obscuren/ecies" "gopkg.in/fatih/set.v0" ) @@ -47,6 +48,8 @@ type MessageEvent struct { const DefaultTtl = 50 * time.Second +var wlogger = logger.NewLogger("SHH") + type Whisper struct { protocol p2p.Protocol filters *filter.Filters @@ -68,17 +71,6 @@ func New() *Whisper { quit: make(chan struct{}), } whisper.filters.Start() - go whisper.update() - - // XXX TODO REMOVE TESTING CODE - msg := NewMessage([]byte(fmt.Sprintf("Hello world. This is whisper-go. Incase you're wondering; the time is %v", time.Now()))) - envelope, _ := msg.Seal(DefaultPow, Opts{ - Ttl: DefaultTtl, - }) - if err := whisper.Send(envelope); err != nil { - fmt.Println(err) - } - // XXX TODO REMOVE TESTING CODE // p2p whisper sub protocol handler whisper.protocol = p2p.Protocol{ @@ -91,6 +83,11 @@ func New() *Whisper { return whisper } +func (self *Whisper) Start() { + wlogger.Infoln("Whisper started") + go self.update() +} + func (self *Whisper) Stop() { close(self.quit) } @@ -122,6 +119,7 @@ func (self *Whisper) Watch(opts Filter) int { return self.filters.Install(filter.Generic{ Str1: string(crypto.FromECDSA(opts.To)), Str2: string(crypto.FromECDSAPub(opts.From)), + Data: bytesToMap(opts.Topics), Fn: func(data interface{}) { opts.Fn(data.(*Message)) }, @@ -177,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 @@ -230,13 +228,14 @@ 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 { + 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) } else { - fmt.Println(err) + wlogger.Infoln(err) } } } diff --git a/wire/README.md b/wire/README.md deleted file mode 100644 index 7f63688b3cfe2e083c1eeeb4a3096975442c94c1..0000000000000000000000000000000000000000 --- a/wire/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# ethwire - -The ethwire package contains the ethereum wire protocol. The ethwire -package is required to write and read from the ethereum network. - -# Installation - -`go get github.com/ethereum/ethwire-go` - -# Messaging overview - -The Ethereum Wire protocol defines the communication between the nodes -running Ethereum. Further reader reading can be done on the -[Wiki](http://wiki.ethereum.org/index.php/Wire_Protocol). - -# Reading Messages - -```go -// Read and validate the next eth message from the provided connection. -// returns a error message with the details. -msg, err := ethwire.ReadMessage(conn) -if err != nil { - // Handle error -} -``` - -# Writing Messages - -```go -// Constructs a message which can be interpreted by the eth network. -// Write the inventory to network -err := ethwire.WriteMessage(conn, &Msg{ - Type: ethwire.MsgInvTy, - Data : []interface{}{...}, -}) -``` diff --git a/wire/client_identity.go b/wire/client_identity.go deleted file mode 100644 index 0a268024a92b9b39ce9cbfbbc698a439e05271bc..0000000000000000000000000000000000000000 --- a/wire/client_identity.go +++ /dev/null @@ -1,56 +0,0 @@ -package wire - -import ( - "fmt" - "runtime" -) - -// should be used in Peer handleHandshake, incorporate Caps, ProtocolVersion, Pubkey etc. -type ClientIdentity interface { - String() string -} - -type SimpleClientIdentity struct { - clientIdentifier string - version string - customIdentifier string - os string - implementation string -} - -func NewSimpleClientIdentity(clientIdentifier string, version string, customIdentifier string) *SimpleClientIdentity { - clientIdentity := &SimpleClientIdentity{ - clientIdentifier: clientIdentifier, - version: version, - customIdentifier: customIdentifier, - os: runtime.GOOS, - implementation: runtime.Version(), - } - - return clientIdentity -} - -func (c *SimpleClientIdentity) init() { -} - -func (c *SimpleClientIdentity) String() string { - var id string - if len(c.customIdentifier) > 0 { - id = "/" + c.customIdentifier - } - - return fmt.Sprintf("%s/v%s%s/%s/%s", - c.clientIdentifier, - c.version, - id, - c.os, - c.implementation) -} - -func (c *SimpleClientIdentity) SetCustomIdentifier(customIdentifier string) { - c.customIdentifier = customIdentifier -} - -func (c *SimpleClientIdentity) GetCustomIdentifier() string { - return c.customIdentifier -} diff --git a/wire/client_identity_test.go b/wire/client_identity_test.go deleted file mode 100644 index c0e7a0159aff4ea30f6527f0f070ed67f7db5526..0000000000000000000000000000000000000000 --- a/wire/client_identity_test.go +++ /dev/null @@ -1,30 +0,0 @@ -package wire - -import ( - "fmt" - "runtime" - "testing" -) - -func TestClientIdentity(t *testing.T) { - clientIdentity := NewSimpleClientIdentity("Ethereum(G)", "0.5.16", "test") - clientString := clientIdentity.String() - expected := fmt.Sprintf("Ethereum(G)/v0.5.16/test/%s/%s", runtime.GOOS, runtime.Version()) - if clientString != expected { - t.Errorf("Expected clientIdentity to be %q, got %q", expected, clientString) - } - customIdentifier := clientIdentity.GetCustomIdentifier() - if customIdentifier != "test" { - t.Errorf("Expected clientIdentity.GetCustomIdentifier() to be 'test', got %q", customIdentifier) - } - clientIdentity.SetCustomIdentifier("test2") - customIdentifier = clientIdentity.GetCustomIdentifier() - if customIdentifier != "test2" { - t.Errorf("Expected clientIdentity.GetCustomIdentifier() to be 'test2', got %q", customIdentifier) - } - clientString = clientIdentity.String() - expected = fmt.Sprintf("Ethereum(G)/v0.5.16/test2/%s/%s", runtime.GOOS, runtime.Version()) - if clientString != expected { - t.Errorf("Expected clientIdentity to be %q, got %q", expected, clientString) - } -} diff --git a/wire/messages2.go b/wire/messages2.go deleted file mode 100644 index acbd9e0d5cc07f052316f0578c9fdfe40550821b..0000000000000000000000000000000000000000 --- a/wire/messages2.go +++ /dev/null @@ -1,199 +0,0 @@ -package wire - -import ( - "bytes" - "errors" - "fmt" - "net" - "time" - - "github.com/ethereum/go-ethereum/ethutil" -) - -// The connection object allows you to set up a connection to the Ethereum network. -// The Connection object takes care of all encoding and sending objects properly over -// the network. -type Connection struct { - conn net.Conn - nTimeout time.Duration - pendingMessages Messages -} - -// Create a new connection to the Ethereum network -func New(conn net.Conn) *Connection { - return &Connection{conn: conn, nTimeout: 500} -} - -// Read, reads from the network. It will block until the next message is received. -func (self *Connection) Read() *Msg { - if len(self.pendingMessages) == 0 { - self.readMessages() - } - - ret := self.pendingMessages[0] - self.pendingMessages = self.pendingMessages[1:] - - return ret - -} - -// Write to the Ethereum network specifying the type of the message and -// the data. Data can be of type RlpEncodable or []interface{}. Returns -// nil or if something went wrong an error. -func (self *Connection) Write(typ MsgType, v ...interface{}) error { - var pack []byte - - slice := [][]interface{}{[]interface{}{byte(typ)}} - for _, value := range v { - if encodable, ok := value.(ethutil.RlpEncodeDecode); ok { - slice = append(slice, encodable.RlpValue()) - } else if raw, ok := value.([]interface{}); ok { - slice = append(slice, raw) - } else { - panic(fmt.Sprintf("Unable to 'write' object of type %T", value)) - } - } - - // Encode the type and the (RLP encoded) data for sending over the wire - encoded := ethutil.NewValue(slice).Encode() - payloadLength := ethutil.NumberToBytes(uint32(len(encoded)), 32) - - // Write magic token and payload length (first 8 bytes) - pack = append(MagicToken, payloadLength...) - pack = append(pack, encoded...) - - // Write to the connection - _, err := self.conn.Write(pack) - if err != nil { - return err - } - - return nil -} - -func (self *Connection) readMessage(data []byte) (msg *Msg, remaining []byte, done bool, err error) { - if len(data) == 0 { - return nil, nil, true, nil - } - - if len(data) <= 8 { - return nil, remaining, false, errors.New("Invalid message") - } - - // Check if the received 4 first bytes are the magic token - if bytes.Compare(MagicToken, data[:4]) != 0 { - return nil, nil, false, fmt.Errorf("MagicToken mismatch. Received %v", data[:4]) - } - - messageLength := ethutil.BytesToNumber(data[4:8]) - remaining = data[8+messageLength:] - if int(messageLength) > len(data[8:]) { - return nil, nil, false, fmt.Errorf("message length %d, expected %d", len(data[8:]), messageLength) - } - - message := data[8 : 8+messageLength] - decoder := ethutil.NewValueFromBytes(message) - // Type of message - t := decoder.Get(0).Uint() - // Actual data - d := decoder.SliceFrom(1) - - msg = &Msg{ - Type: MsgType(t), - Data: d, - } - - return -} - -// The basic message reader waits for data on the given connection, decoding -// and doing a few sanity checks such as if there's a data type and -// unmarhals the given data -func (self *Connection) readMessages() (err error) { - // The recovering function in case anything goes horribly wrong - defer func() { - if r := recover(); r != nil { - err = fmt.Errorf("wire.ReadMessage error: %v", r) - } - }() - - // Buff for writing network message to - //buff := make([]byte, 1440) - var buff []byte - var totalBytes int - for { - // Give buffering some time - self.conn.SetReadDeadline(time.Now().Add(self.nTimeout * time.Millisecond)) - // Create a new temporarily buffer - b := make([]byte, 1440) - // Wait for a message from this peer - n, _ := self.conn.Read(b) - if err != nil && n == 0 { - if err.Error() != "EOF" { - fmt.Println("err now", err) - return err - } else { - break - } - - // Messages can't be empty - } else if n == 0 { - break - } - - buff = append(buff, b[:n]...) - totalBytes += n - } - - // Reslice buffer - buff = buff[:totalBytes] - msg, remaining, done, err := self.readMessage(buff) - for ; done != true; msg, remaining, done, err = self.readMessage(remaining) { - //log.Println("rx", msg) - - if msg != nil { - self.pendingMessages = append(self.pendingMessages, msg) - } - } - - return -} - -func ReadMessage(data []byte) (msg *Msg, remaining []byte, done bool, err error) { - if len(data) == 0 { - return nil, nil, true, nil - } - - if len(data) <= 8 { - return nil, remaining, false, errors.New("Invalid message") - } - - // Check if the received 4 first bytes are the magic token - if bytes.Compare(MagicToken, data[:4]) != 0 { - return nil, nil, false, fmt.Errorf("MagicToken mismatch. Received %v", data[:4]) - } - - messageLength := ethutil.BytesToNumber(data[4:8]) - remaining = data[8+messageLength:] - if int(messageLength) > len(data[8:]) { - return nil, nil, false, fmt.Errorf("message length %d, expected %d", len(data[8:]), messageLength) - } - - message := data[8 : 8+messageLength] - decoder := ethutil.NewValueFromBytes(message) - // Type of message - t := decoder.Get(0).Uint() - // Actual data - d := decoder.SliceFrom(1) - - msg = &Msg{ - Type: MsgType(t), - Data: d, - } - - return -} - -func bufferedRead(conn net.Conn) ([]byte, error) { - return nil, nil -} diff --git a/wire/messaging.go b/wire/messaging.go deleted file mode 100644 index 9c6cb5944e057f40afd1634cea6c5f4218c70cb3..0000000000000000000000000000000000000000 --- a/wire/messaging.go +++ /dev/null @@ -1,178 +0,0 @@ -// Package wire provides low level access to the Ethereum network and allows -// you to broadcast data over the network. -package wire - -import ( - "bytes" - "fmt" - "net" - "time" - - "github.com/ethereum/go-ethereum/ethutil" -) - -// Connection interface describing the methods required to implement the wire protocol. -type Conn interface { - Write(typ MsgType, v ...interface{}) error - Read() *Msg -} - -// The magic token which should be the first 4 bytes of every message and can be used as separator between messages. -var MagicToken = []byte{34, 64, 8, 145} - -type MsgType byte - -const ( - // Values are given explicitly instead of by iota because these values are - // defined by the wire protocol spec; it is easier for humans to ensure - // correctness when values are explicit. - MsgHandshakeTy = 0x00 - MsgDiscTy = 0x01 - MsgPingTy = 0x02 - MsgPongTy = 0x03 - MsgGetPeersTy = 0x04 - MsgPeersTy = 0x05 - - MsgStatusTy = 0x10 - MsgTxTy = 0x12 - MsgGetBlockHashesTy = 0x13 - MsgBlockHashesTy = 0x14 - MsgGetBlocksTy = 0x15 - MsgBlockTy = 0x16 - MsgNewBlockTy = 0x17 -) - -var msgTypeToString = map[MsgType]string{ - MsgHandshakeTy: "Handshake", - MsgDiscTy: "Disconnect", - MsgPingTy: "Ping", - MsgPongTy: "Pong", - MsgGetPeersTy: "Get peers", - MsgStatusTy: "Status", - MsgPeersTy: "Peers", - MsgTxTy: "Transactions", - MsgBlockTy: "Blocks", - //MsgGetTxsTy: "Get Txs", - MsgGetBlockHashesTy: "Get block hashes", - MsgBlockHashesTy: "Block hashes", - MsgGetBlocksTy: "Get blocks", -} - -func (mt MsgType) String() string { - return msgTypeToString[mt] -} - -type Msg struct { - Type MsgType // Specifies how the encoded data should be interpreted - //Data []byte - Data *ethutil.Value -} - -func NewMessage(msgType MsgType, data interface{}) *Msg { - return &Msg{ - Type: msgType, - Data: ethutil.NewValue(data), - } -} - -type Messages []*Msg - -// The basic message reader waits for data on the given connection, decoding -// and doing a few sanity checks such as if there's a data type and -// unmarhals the given data -func ReadMessages(conn net.Conn) (msgs []*Msg, err error) { - // The recovering function in case anything goes horribly wrong - defer func() { - if r := recover(); r != nil { - err = fmt.Errorf("wire.ReadMessage error: %v", r) - } - }() - - var ( - buff []byte - messages [][]byte - msgLength int - ) - - for { - // Give buffering some time - conn.SetReadDeadline(time.Now().Add(5 * time.Millisecond)) - // Create a new temporarily buffer - b := make([]byte, 1440) - n, _ := conn.Read(b) - if err != nil && n == 0 { - if err.Error() != "EOF" { - fmt.Println("err now", err) - return nil, err - } else { - break - } - } - - if n == 0 && len(buff) == 0 { - // If there's nothing on the wire wait for a bit - time.Sleep(200 * time.Millisecond) - - continue - } - - buff = append(buff, b[:n]...) - if msgLength == 0 { - // Check if the received 4 first bytes are the magic token - if bytes.Compare(MagicToken, buff[:4]) != 0 { - return nil, fmt.Errorf("MagicToken mismatch. Received %v", buff[:4]) - } - - // Read the length of the message - msgLength = int(ethutil.BytesToNumber(buff[4:8])) - - // Remove the token and length - buff = buff[8:] - } - - if len(buff) >= msgLength { - messages = append(messages, buff[:msgLength]) - buff = buff[msgLength:] - msgLength = 0 - - if len(buff) == 0 { - break - } - } - } - - for _, m := range messages { - decoder := ethutil.NewValueFromBytes(m) - // Type of message - t := decoder.Get(0).Uint() - // Actual data - d := decoder.SliceFrom(1) - - msgs = append(msgs, &Msg{Type: MsgType(t), Data: d}) - } - - return -} - -// The basic message writer takes care of writing data over the given -// connection and does some basic error checking -func WriteMessage(conn net.Conn, msg *Msg) error { - var pack []byte - - // Encode the type and the (RLP encoded) data for sending over the wire - encoded := ethutil.NewValue(append([]interface{}{byte(msg.Type)}, msg.Data.Slice()...)).Encode() - payloadLength := ethutil.NumberToBytes(uint32(len(encoded)), 32) - - // Write magic token and payload length (first 8 bytes) - pack = append(MagicToken, payloadLength...) - pack = append(pack, encoded...) - //fmt.Printf("payload %v (%v) %q\n", msg.Type, conn.RemoteAddr(), encoded) - - // Write to the connection - _, err := conn.Write(pack) - if err != nil { - return err - } - - return nil -} diff --git a/xeth/hexface.go b/xeth/hexface.go index c1f49453d75dfb94cc3c9f22fd9b75860557f7ca..c3d8cef86430b2112fc66e8360320c98309d8cda 100644 --- a/xeth/hexface.go +++ b/xeth/hexface.go @@ -3,7 +3,6 @@ package xeth import ( "bytes" "encoding/json" - "sync/atomic" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" @@ -29,7 +28,7 @@ func (self *JSXEth) BlockByHash(strHash string) *JSBlock { func (self *JSXEth) BlockByNumber(num int32) *JSBlock { if num == -1 { - return NewJSBlock(self.obj.ChainManager().CurrentBlock) + return NewJSBlock(self.obj.ChainManager().CurrentBlock()) } return NewJSBlock(self.obj.ChainManager().GetBlockByNumber(uint64(num))) @@ -63,12 +62,8 @@ func (self *JSXEth) PeerCount() int { func (self *JSXEth) Peers() []JSPeer { var peers []JSPeer - for peer := self.obj.Peers().Front(); peer != nil; peer = peer.Next() { - p := peer.Value.(core.Peer) - // we only want connected peers - if atomic.LoadInt32(p.Connected()) != 0 { - peers = append(peers, *NewJSPeer(p)) - } + for _, peer := range self.obj.Peers() { + peers = append(peers, *NewJSPeer(peer)) } return peers @@ -143,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 { @@ -216,7 +211,7 @@ func (self *JSXEth) Transact(key, toStr, valueStr, gasStr, gasPriceStr, codeStr return "", err } if types.IsContractAddr(to) { - return ethutil.Bytes2Hex(tx.CreationAddress(nil)), nil + return ethutil.Bytes2Hex(core.AddressFromMessage(tx)), nil } return ethutil.Bytes2Hex(tx.Hash()), nil @@ -229,7 +224,7 @@ func (self *JSXEth) PushTx(txStr string) (*JSReceipt, error) { return nil, err } - return NewJSReciept(tx.CreatesContract(), tx.CreationAddress(self.World().State()), tx.Hash(), tx.Sender()), nil + return NewJSReciept(core.MessageCreatesContract(tx), core.AddressFromMessage(tx), tx.Hash(), tx.From()), nil } func (self *JSXEth) CompileMutan(code string) string { diff --git a/xeth/js_types.go b/xeth/js_types.go index da26439cfd563be390ea200ae3232e4e852e4769..4bb1f4e7da585b06da0075e7d8eeace43c6bf7bd 100644 --- a/xeth/js_types.go +++ b/xeth/js_types.go @@ -1,14 +1,13 @@ package xeth import ( - "fmt" - "strconv" "strings" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethutil" + "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/state" ) @@ -43,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(), } } @@ -71,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 } @@ -97,21 +96,21 @@ type JSTransaction struct { func NewJSTx(tx *types.Transaction, state *state.StateDB) *JSTransaction { hash := ethutil.Bytes2Hex(tx.Hash()) - receiver := ethutil.Bytes2Hex(tx.Recipient) + receiver := ethutil.Bytes2Hex(tx.To()) if receiver == "0000000000000000000000000000000000000000" { - receiver = ethutil.Bytes2Hex(tx.CreationAddress(state)) + receiver = ethutil.Bytes2Hex(core.AddressFromMessage(tx)) } - sender := ethutil.Bytes2Hex(tx.Sender()) - createsContract := tx.CreatesContract() + sender := ethutil.Bytes2Hex(tx.From()) + createsContract := core.MessageCreatesContract(tx) var data string - if tx.CreatesContract() { - data = strings.Join(core.Disassemble(tx.Data), "\n") + if createsContract { + data = strings.Join(core.Disassemble(tx.Data()), "\n") } else { - data = ethutil.Bytes2Hex(tx.Data) + data = ethutil.Bytes2Hex(tx.Data()) } - return &JSTransaction{ref: tx, Hash: hash, Value: ethutil.CurrencyToString(tx.Value), Address: receiver, Contract: tx.CreatesContract(), Gas: tx.Gas.String(), GasPrice: tx.GasPrice.String(), Data: data, Sender: sender, CreatesContract: createsContract, RawData: ethutil.Bytes2Hex(tx.Data)} + return &JSTransaction{ref: tx, Hash: hash, Value: ethutil.CurrencyToString(tx.Value()), Address: receiver, Contract: createsContract, Gas: tx.Gas().String(), GasPrice: tx.GasPrice().String(), Data: data, Sender: sender, CreatesContract: createsContract, RawData: ethutil.Bytes2Hex(tx.Data())} } func (self *JSTransaction) ToString() string { @@ -155,38 +154,36 @@ func NewPReciept(contractCreation bool, creationAddress, hash, address []byte) * // Peer interface exposed to QML type JSPeer struct { - ref *core.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"` -} - -func NewJSPeer(peer core.Peer) *JSPeer { - if peer == nil { - return nil - } - - 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, 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, ", ") + "]"} + 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"` +} + +func NewJSPeer(peer *p2p.Peer) *JSPeer { + + // 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, ", ") + "]"} } type JSReceipt struct { diff --git a/xeth/pipe.go b/xeth/pipe.go index a8d8ed999f12333b1750496b477b61c3ae9fbafe..775d5cfc5883c9c0b6f5eba1e99ae0ee75b1dd01 100644 --- a/xeth/pipe.go +++ b/xeth/pipe.go @@ -82,7 +82,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()) - block = self.chainManager.CurrentBlock + block = self.chainManager.CurrentBlock() ) self.Vm.State = self.World().State().Copy() @@ -134,13 +134,13 @@ func (self *XEth) Transact(key *crypto.KeyPair, to []byte, value, gas, price *et state := self.chainManager.TransState() nonce := state.GetNonce(key.Address()) - tx.Nonce = nonce + tx.SetNonce(nonce) tx.Sign(key.PrivateKey) // 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) @@ -150,7 +150,7 @@ func (self *XEth) Transact(key *crypto.KeyPair, to []byte, value, gas, price *et state.SetNonce(key.Address(), nonce+1) if contractCreation { - addr := tx.CreationAddress(self.World().State()) + addr := core.AddressFromMessage(tx) pipelogger.Infof("Contract addr %x\n", addr) } @@ -163,8 +163,8 @@ func (self *XEth) PushTx(tx *types.Transaction) ([]byte, error) { return nil, err } - if tx.Recipient == nil { - addr := tx.CreationAddress(self.World().State()) + if tx.To() == nil { + addr := core.AddressFromMessage(tx) pipelogger.Infof("Contract addr %x\n", addr) return addr, nil } diff --git a/xeth/vm_env.go b/xeth/vm_env.go index ce53e9a3089512edaa32f55605f182c505b74a2f..7633e0640cc271375e38ae4b8d43f6bc0ab6f235 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) { @@ -47,9 +47,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(me vm.ClosureRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error) { diff --git a/xeth/world.go b/xeth/world.go index 956ef1e15fbd6f69230e7aecbe81a0f0f094a572..008a084234c7b54d518dd0c69076c1c1054925c3 100644 --- a/xeth/world.go +++ b/xeth/world.go @@ -1,8 +1,7 @@ package xeth import ( - "container/list" - + "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/state" ) @@ -55,7 +54,7 @@ func (self *World) IsListening() bool { return self.pipe.obj.IsListening() } -func (self *World) Peers() *list.List { +func (self *World) Peers() []*p2p.Peer { return self.pipe.obj.Peers() }