diff --git a/.gitignore b/.gitignore index 720b4764e5..e05a7c5ba5 100644 --- a/.gitignore +++ b/.gitignore @@ -14,7 +14,7 @@ */**/*tx_database* */**/*dapps* build/_vendor/pkg - +privatenet/ #* .#* *# @@ -52,3 +52,12 @@ shyftData/* shyft-cli/web3/token_test/node_modules shyft-cli/web3/transfer-through-master/node_modules shyft-cli/web3/transfer-through-master/build + +# Remove pg data +pg-data/* + +# Ignore shyftBlockExplorerApi vendored dependencies used for docker build +shyftBlockExplorerApi/vendor/**/.git +shyftBlockExplorerApi/vendor/* +!shyftBlockExplorerApi/vendor/*.json + diff --git a/README.md b/README.md index f7d50d21a6..d173086066 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,8 @@ Official golang implementation of the Ethereum protocol. -[![API Reference]( -https://camo.githubusercontent.com/915b7be44ada53c290eb157634330494ebe3e30a/68747470733a2f2f676f646f632e6f72672f6769746875622e636f6d2f676f6c616e672f6764646f3f7374617475732e737667 -)](https://godoc.org/github.com/ethereum/go-ethereum) -[![Go Report Card](https://goreportcard.com/badge/github.com/ethereum/go-ethereum)](https://goreportcard.com/report/github.com/ethereum/go-ethereum) +[![API Reference](https://camo.githubusercontent.com/915b7be44ada53c290eb157634330494ebe3e30a/68747470733a2f2f676f646f632e6f72672f6769746875622e636f6d2f676f6c616e672f6764646f3f7374617475732e737667)](https://godoc.org/github.com/empyrean/go-ethereum) +[![Go Report Card](https://goreportcard.com/badge/github.com/empyrean/go-ethereum)](https://goreportcard.com/report/github.com/empyrean/go-ethereum) [![Build Status](https://travis-ci.org/ShyftNetwork/shyft_go-ethereum.svg?branch=master)](https://travis-ci.org/ShyftNetwork/shyft_go-ethereum) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ethereum/go-ethereum?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) @@ -15,7 +13,7 @@ Binary archives are published at https://geth.ethereum.org/downloads/. ## Building the source For prerequisites and detailed build instructions please read the -[Installation Instructions](https://github.com/ethereum/go-ethereum/wiki/Building-Ethereum) +[Installation Instructions](https://github.com/empyrean/go-ethereum/wiki/Building-Ethereum) on the wiki. Building geth requires both a Go (version 1.7 or later) and a C compiler. @@ -32,21 +30,21 @@ or, to build the full suite of utilities: The go-ethereum project comes with several wrappers/executables found in the `cmd` directory. -| Command | Description | -|:----------:|-------------| -| **`geth`** | Our main Ethereum CLI client. It is the entry point into the Ethereum network (main-, test- or private net), capable of running as a full node (default) archive node (retaining all historical state) or a light node (retrieving data live). It can be used by other processes as a gateway into the Ethereum network via JSON RPC endpoints exposed on top of HTTP, WebSocket and/or IPC transports. `geth --help` and the [CLI Wiki page](https://github.com/ethereum/go-ethereum/wiki/Command-Line-Options) for command line options. | -| `abigen` | Source code generator to convert Ethereum contract definitions into easy to use, compile-time type-safe Go packages. It operates on plain [Ethereum contract ABIs](https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI) with expanded functionality if the contract bytecode is also available. However it also accepts Solidity source files, making development much more streamlined. Please see our [Native DApps](https://github.com/ethereum/go-ethereum/wiki/Native-DApps:-Go-bindings-to-Ethereum-contracts) wiki page for details. | -| `bootnode` | Stripped down version of our Ethereum client implementation that only takes part in the network node discovery protocol, but does not run any of the higher level application protocols. It can be used as a lightweight bootstrap node to aid in finding peers in private networks. | -| `evm` | Developer utility version of the EVM (Ethereum Virtual Machine) that is capable of running bytecode snippets within a configurable environment and execution mode. Its purpose is to allow isolated, fine-grained debugging of EVM opcodes (e.g. `evm --code 60ff60ff --debug`). | -| `gethrpctest` | Developer utility tool to support our [ethereum/rpc-test](https://github.com/ethereum/rpc-tests) test suite which validates baseline conformity to the [Ethereum JSON RPC](https://github.com/ethereum/wiki/wiki/JSON-RPC) specs. Please see the [test suite's readme](https://github.com/ethereum/rpc-tests/blob/master/README.md) for details. | -| `rlpdump` | Developer utility tool to convert binary RLP ([Recursive Length Prefix](https://github.com/ethereum/wiki/wiki/RLP)) dumps (data encoding used by the Ethereum protocol both network as well as consensus wise) to user friendlier hierarchical representation (e.g. `rlpdump --hex CE0183FFFFFFC4C304050583616263`). | -| `swarm` | swarm daemon and tools. This is the entrypoint for the swarm network. `swarm --help` for command line options and subcommands. See https://swarm-guide.readthedocs.io for swarm documentation. | -| `puppeth` | a CLI wizard that aids in creating a new Ethereum network. | +| Command | Description | +| :-----------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **`geth`** | Our main Ethereum CLI client. It is the entry point into the Ethereum network (main-, test- or private net), capable of running as a full node (default) archive node (retaining all historical state) or a light node (retrieving data live). It can be used by other processes as a gateway into the Ethereum network via JSON RPC endpoints exposed on top of HTTP, WebSocket and/or IPC transports. `geth --help` and the [CLI Wiki page](https://github.com/empyrean/go-ethereum/wiki/Command-Line-Options) for command line options. | +| `abigen` | Source code generator to convert Ethereum contract definitions into easy to use, compile-time type-safe Go packages. It operates on plain [Ethereum contract ABIs](https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI) with expanded functionality if the contract bytecode is also available. However it also accepts Solidity source files, making development much more streamlined. Please see our [Native DApps](https://github.com/empyrean/go-ethereum/wiki/Native-DApps:-Go-bindings-to-Ethereum-contracts) wiki page for details. | +| `bootnode` | Stripped down version of our Ethereum client implementation that only takes part in the network node discovery protocol, but does not run any of the higher level application protocols. It can be used as a lightweight bootstrap node to aid in finding peers in private networks. | +| `evm` | Developer utility version of the EVM (Ethereum Virtual Machine) that is capable of running bytecode snippets within a configurable environment and execution mode. Its purpose is to allow isolated, fine-grained debugging of EVM opcodes (e.g. `evm --code 60ff60ff --debug`). | +| `gethrpctest` | Developer utility tool to support our [ethereum/rpc-test](https://github.com/ethereum/rpc-tests) test suite which validates baseline conformity to the [Ethereum JSON RPC](https://github.com/ethereum/wiki/wiki/JSON-RPC) specs. Please see the [test suite's readme](https://github.com/ethereum/rpc-tests/blob/master/README.md) for details. | +| `rlpdump` | Developer utility tool to convert binary RLP ([Recursive Length Prefix](https://github.com/ethereum/wiki/wiki/RLP)) dumps (data encoding used by the Ethereum protocol both network as well as consensus wise) to user friendlier hierarchical representation (e.g. `rlpdump --hex CE0183FFFFFFC4C304050583616263`). | +| `swarm` | swarm daemon and tools. This is the entrypoint for the swarm network. `swarm --help` for command line options and subcommands. See https://swarm-guide.readthedocs.io for swarm documentation. | +| `puppeth` | a CLI wizard that aids in creating a new Ethereum network. | ## Running geth Going through all the possible command line flags is out of scope here (please consult our -[CLI Wiki page](https://github.com/ethereum/go-ethereum/wiki/Command-Line-Options)), but we've +[CLI Wiki page](https://github.com/empyrean/go-ethereum/wiki/Command-Line-Options)), but we've enumerated a few common parameter combos to get you up to speed quickly on how you can run your own Geth instance. @@ -63,14 +61,14 @@ $ geth console This command will: - * Start geth in fast sync mode (default, can be changed with the `--syncmode` flag), causing it to - download more data in exchange for avoiding processing the entire history of the Ethereum network, - which is very CPU intensive. - * Start up Geth's built-in interactive [JavaScript console](https://github.com/ethereum/go-ethereum/wiki/JavaScript-Console), - (via the trailing `console` subcommand) through which you can invoke all official [`web3` methods](https://github.com/ethereum/wiki/wiki/JavaScript-API) - as well as Geth's own [management APIs](https://github.com/ethereum/go-ethereum/wiki/Management-APIs). - This too is optional and if you leave it out you can always attach to an already running Geth instance - with `geth attach`. +- Start geth in fast sync mode (default, can be changed with the `--syncmode` flag), causing it to + download more data in exchange for avoiding processing the entire history of the Ethereum network, + which is very CPU intensive. +- Start up Geth's built-in interactive [JavaScript console](https://github.com/empyrean/go-ethereum/wiki/JavaScript-Console), + (via the trailing `console` subcommand) through which you can invoke all official [`web3` methods](https://github.com/ethereum/wiki/wiki/JavaScript-API) + as well as Geth's own [management APIs](https://github.com/empyrean/go-ethereum/wiki/Management-APIs). + This too is optional and if you leave it out you can always attach to an already running Geth instance + with `geth attach`. ### Full node on the Ethereum test network @@ -88,22 +86,22 @@ testnet too. Please see above for their explanations if you've skipped to here. Specifying the `--testnet` flag however will reconfigure your Geth instance a bit: - * Instead of using the default data directory (`~/.ethereum` on Linux for example), Geth will nest - itself one level deeper into a `testnet` subfolder (`~/.ethereum/testnet` on Linux). Note, on OSX - and Linux this also means that attaching to a running testnet node requires the use of a custom - endpoint since `geth attach` will try to attach to a production node endpoint by default. E.g. - `geth attach /testnet/geth.ipc`. Windows users are not affected by this. - * Instead of connecting the main Ethereum network, the client will connect to the test network, - which uses different P2P bootnodes, different network IDs and genesis states. +- Instead of using the default data directory (`~/.ethereum` on Linux for example), Geth will nest + itself one level deeper into a `testnet` subfolder (`~/.ethereum/testnet` on Linux). Note, on OSX + and Linux this also means that attaching to a running testnet node requires the use of a custom + endpoint since `geth attach` will try to attach to a production node endpoint by default. E.g. + `geth attach /testnet/geth.ipc`. Windows users are not affected by this. +- Instead of connecting the main Ethereum network, the client will connect to the test network, + which uses different P2P bootnodes, different network IDs and genesis states. -*Note: Although there are some internal protective measures to prevent transactions from crossing +_Note: Although there are some internal protective measures to prevent transactions from crossing over between the main network and test network, you should make sure to always use separate accounts for play-money and real-money. Unless you manually move accounts, Geth will by default correctly -separate the two networks and will not make any accounts available between them.* +separate the two networks and will not make any accounts available between them._ ### Full node on the Rinkeby test network -The above test network is a cross client one based on the ethash proof-of-work consensus algorithm. As such, it has certain extra overhead and is more susceptible to reorganization attacks due to the network's low difficulty / security. Go Ethereum also supports connecting to a proof-of-authority based test network called [*Rinkeby*](https://www.rinkeby.io) (operated by members of the community). This network is lighter, more secure, but is only supported by go-ethereum. +The above test network is a cross client one based on the ethash proof-of-work consensus algorithm. As such, it has certain extra overhead and is more susceptible to reorganization attacks due to the network's low difficulty / security. Go Ethereum also supports connecting to a proof-of-authority based test network called [_Rinkeby_](https://www.rinkeby.io) (operated by members of the community). This network is lighter, more secure, but is only supported by go-ethereum. ``` $ geth --rinkeby console @@ -123,7 +121,7 @@ To get an idea how the file should look like you can use the `dumpconfig` subcom $ geth --your-favourite-flags dumpconfig ``` -*Note: This works only with geth v1.6.0 and above.* +_Note: This works only with geth v1.6.0 and above._ #### Docker quick start @@ -135,7 +133,7 @@ docker run -d --name ethereum-node -v /Users/alice/ethereum:/root \ ethereum/client-go ``` -This will start geth in fast-sync mode with a DB memory allowance of 1GB just as the above command does. It will also create a persistent volume in your home directory for saving your blockchain as well as map the default ports. There is also an `alpine` tag available for a slim version of the image. +This will start geth in fast-sync mode with a DB memory allowance of 1GB just as the above command does. It will also create a persistent volume in your home directory for saving your blockchain as well as map the default ports. There is also an `alpine` tag available for a slim version of the image. Do not forget `--rpcaddr 0.0.0.0`, if you want to access RPC from other containers and/or hosts. By default, `geth` binds to the local interface and RPC endpoints is not accessible from the outside. @@ -144,7 +142,7 @@ Do not forget `--rpcaddr 0.0.0.0`, if you want to access RPC from other containe As a developer, sooner rather than later you'll want to start interacting with Geth and the Ethereum network via your own programs and not manually through the console. To aid this, Geth has built in support for a JSON-RPC based APIs ([standard APIs](https://github.com/ethereum/wiki/wiki/JSON-RPC) and -[Geth specific APIs](https://github.com/ethereum/go-ethereum/wiki/Management-APIs)). These can be +[Geth specific APIs](https://github.com/empyrean/go-ethereum/wiki/Management-APIs)). These can be exposed via HTTP, WebSockets and IPC (unix sockets on unix based platforms, and named pipes on Windows). The IPC interface is enabled by default and exposes all the APIs supported by Geth, whereas the HTTP @@ -153,19 +151,19 @@ These can be turned on/off and configured as you'd expect. HTTP based JSON-RPC API options: - * `--rpc` Enable the HTTP-RPC server - * `--rpcaddr` HTTP-RPC server listening interface (default: "localhost") - * `--rpcport` HTTP-RPC server listening port (default: 8545) - * `--rpcapi` API's offered over the HTTP-RPC interface (default: "eth,net,web3") - * `--rpccorsdomain` Comma separated list of domains from which to accept cross origin requests (browser enforced) - * `--ws` Enable the WS-RPC server - * `--wsaddr` WS-RPC server listening interface (default: "localhost") - * `--wsport` WS-RPC server listening port (default: 8546) - * `--wsapi` API's offered over the WS-RPC interface (default: "eth,net,web3") - * `--wsorigins` Origins from which to accept websockets requests - * `--ipcdisable` Disable the IPC-RPC server - * `--ipcapi` API's offered over the IPC-RPC interface (default: "admin,debug,eth,miner,net,personal,shh,txpool,web3") - * `--ipcpath` Filename for IPC socket/pipe within the datadir (explicit paths escape it) +- `--rpc` Enable the HTTP-RPC server +- `--rpcaddr` HTTP-RPC server listening interface (default: "localhost") +- `--rpcport` HTTP-RPC server listening port (default: 8545) +- `--rpcapi` API's offered over the HTTP-RPC interface (default: "eth,net,web3") +- `--rpccorsdomain` Comma separated list of domains from which to accept cross origin requests (browser enforced) +- `--ws` Enable the WS-RPC server +- `--wsaddr` WS-RPC server listening interface (default: "localhost") +- `--wsport` WS-RPC server listening port (default: 8546) +- `--wsapi` API's offered over the WS-RPC interface (default: "eth,net,web3") +- `--wsorigins` Origins from which to accept websockets requests +- `--ipcdisable` Disable the IPC-RPC server +- `--ipcapi` API's offered over the IPC-RPC interface (default: "admin,debug,eth,miner,net,personal,shh,txpool,web3") +- `--ipcpath` Filename for IPC socket/pipe within the datadir (explicit paths escape it) You'll need to use your own programming environments' capabilities (libraries, tools, etc) to connect via HTTP, WS or IPC to a Geth node configured with the above flags and you'll need to speak [JSON-RPC](http://www.jsonrpc.org/specification) @@ -189,20 +187,22 @@ and agree upon. This consists of a small JSON file (e.g. call it `genesis.json`) ```json { "config": { - "chainId": 0, - "homesteadBlock": 0, - "eip155Block": 0, - "eip158Block": 0 - }, - "alloc" : {}, - "coinbase" : "0x0000000000000000000000000000000000000000", - "difficulty" : "0x20000", - "extraData" : "", - "gasLimit" : "0x2fefd8", - "nonce" : "0x0000000000000042", - "mixhash" : "0x0000000000000000000000000000000000000000000000000000000000000000", - "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", - "timestamp" : "0x00" + "chainId": 0, + "homesteadBlock": 0, + "eip155Block": 0, + "eip158Block": 0 + }, + "alloc": {}, + "coinbase": "0x0000000000000000000000000000000000000000", + "difficulty": "0x20000", + "extraData": "", + "gasLimit": "0x2fefd8", + "nonce": "0x0000000000000042", + "mixhash": + "0x0000000000000000000000000000000000000000000000000000000000000000", + "parentHash": + "0x0000000000000000000000000000000000000000000000000000000000000000", + "timestamp": "0x00" } ``` @@ -228,7 +228,8 @@ $ geth init path/to/genesis.json #### Creating the rendezvous point With all nodes that you want to run initialized to the desired genesis state, you'll need to start a -bootstrap node that others can use to find each other in your network and/or over the internet. The +bootstrap node that others can use to find each other in your +network and/or over the internet. The clean way is to configure and run a dedicated bootnode: ``` @@ -241,7 +242,7 @@ that other nodes can use to connect to it and exchange peer information. Make su displayed IP address information (most probably `[::]`) with your externally accessible IP to get the actual `enode` URL. -*Note: You could also use a full fledged Geth node as a bootnode, but it's the less recommended way.* +_Note: You could also use a full fledged Geth node as a bootnode, but it's the less recommended way._ #### Starting up your member nodes @@ -254,8 +255,8 @@ private network separated, so do also specify a custom `--datadir` flag. $ geth --datadir=path/to/custom/data/folder --bootnodes= ``` -*Note: Since your network will be completely cut off from the main and test networks, you'll also -need to configure a miner to process transactions and create new blocks for you.* +_Note: Since your network will be completely cut off from the main and test networks, you'll also +need to configure a miner to process transactions and create new blocks for you._ #### Running a private miner @@ -280,12 +281,70 @@ limit blocks converge to (`--targetgaslimit`) and the price transactions are acc ## SHYFT NOTES #### CLI -Run `./shyft-geth.sh` with one of the following flags: -- `--setup` - Setups postgres and the shyft chain db. -- `--start` - Starts geth. -- `--reset` - Drops postgress and chain db, and reinstantiates both. -- `--js [web3 filename]` - Executes web3 calls with a passed file name. If the file name is `sendTransactions.js`, `./shyft-geth.sh --js sendTransactions`. +Run `./shyft-geth.sh` with one of the following flags: + +- `--setup` - Setups postgres and the shyft chain db. +- `--start` - Starts geth. +- `--reset` - Drops postgress and chain db, and reinstantiates both. +- `--js [web3 filename]` - Executes web3 calls with a passed file name. If the file name is `sendTransactions.js`, `./shyft-geth.sh --js sendTransactions`. + +#### Docker Images + +Docker Images are available for ShyftGeth and the Postgresql Database which can be used for development and testing. To launch these containers you will need to have docker-compose installed on your computer. Installation instructions for docker-compose are available [here](https://docs.docker.com/install/). + +To launch ShyftGeth, PG, the ShyftBlock Explorer Api and UI - issue the following command from the root of the project directory: + +`docker-compose up` + +If you would like to reinitialize/rebuild the docker images you can issue the following command: + +`docker-compose up --build` + +To rebuild any one of the services - issue the following commands: + +``` +docker-compose up -d --no-deps --build + +# ie. for shyftBlockExplorerApi: +# docker-compose up -d --no-deps --build shyft_block_api +``` +__The Postgresql Database Container will persist the database data to the the ./pg-data directory__. So if you do want to reinitialize the database you should delete the content of this directory prior to launching the docker containers. From your local machine you can view the database by connecting to the database in the container at 127.0.0.1:8001. To access the shyftBlockExplorer open a browser and visit http://localhost:3000 + +__Blockchain data is persisted to ./privatenet/.ethash__. If you would like to reset the test blockchain you will need to delete the ./privatenet directory. + +The docker container for the ShyftBlockExplorerApi utilizes govendor to minimize its image size. __If you would like the docker image for this container to reflect any uncommitted changes which may have occurred in the go-empyrean repository, ie. changes with respect to go-empyrean core (ie. cryptographic functions and database). Prior to launching the docker containers you should rebuild the vendor directory for the shyftBlockExplorerApi - by executing the following steps:__ + +``` +# remove existing shyftBlockExplorerApi vendor.json and vendored components: + +rm -rf shyftBlockExplorerApi/vendor + +# reinitialize vendor.json + +cd shyftBlockExplorerApi && govendor init + +# rebuild vendor.json using latest uncommitted changes + +govendor add -tree -uncommitted +external + +# due to a bug in govendor and it not being able to pull in some dependencies that are c-header files +# you should execute the following commands - see these issues - which whilst closed +# appears to have not been fixed: https://github.com/kardianos/govendor/issues/124 && https://github.com/kardianos/govendor/issues/61 + +govendor remove github.com/ShyftNetwork/go-empyrean/crypto/secp256k1/^ +govendor fetch github.com/ShyftNetwork/go-empyrean/crypto/secp256k1/^ + +``` + +NB: The Shyft Geth docker image size is 1+ GB so make sure you have adequate space on your disk drive/ + +_TODO_ + +- Find better dependency management solution that pulls in c header files without manual intervention +- Reduce size of the ShytfGeth docker container which is responsible for mining and running the blockchain +- Adjust docker scripts and ports to facilitate sending of test transactions +- Modify Docker scripts to facilitate hot reloading during development ## Contribution @@ -301,13 +360,13 @@ procedures quick and simple. Please make sure your contributions adhere to our coding guidelines: - * Code must adhere to the official Go [formatting](https://golang.org/doc/effective_go.html#formatting) guidelines (i.e. uses [gofmt](https://golang.org/cmd/gofmt/)). - * Code must be documented adhering to the official Go [commentary](https://golang.org/doc/effective_go.html#commentary) guidelines. - * Pull requests need to be based on and opened against the `master` branch. - * Commit messages should be prefixed with the package(s) they modify. - * E.g. "eth, rpc: make trace configs optional" +- Code must adhere to the official Go [formatting](https://golang.org/doc/effective_go.html#formatting) guidelines (i.e. uses [gofmt](https://golang.org/cmd/gofmt/)). +- Code must be documented adhering to the official Go [commentary](https://golang.org/doc/effective_go.html#commentary) guidelines. +- Pull requests need to be based on and opened against the `master` branch. +- Commit messages should be prefixed with the package(s) they modify. + - E.g. "eth, rpc: make trace configs optional" -Please see the [Developers' Guide](https://github.com/ethereum/go-ethereum/wiki/Developers'-Guide) +Please see the [Developers' Guide](https://github.com/empyrean/go-ethereum/wiki/Developers'-Guide) for more details on configuring your environment, managing project dependencies and testing procedures. ## License diff --git a/accounts/abi/event_test.go b/accounts/abi/event_test.go index b72bd1b646..c787849f4e 100644 --- a/accounts/abi/event_test.go +++ b/accounts/abi/event_test.go @@ -31,7 +31,6 @@ import ( "github.com/stretchr/testify/require" ) -var jsonEventTransfer = []byte(`{ "anonymous": false, "inputs": [ { diff --git a/build/pod.podspec b/build/pod.podspec index 2c14c280c7..13909c16bf 100644 --- a/build/pod.podspec +++ b/build/pod.podspec @@ -2,12 +2,12 @@ Pod::Spec.new do |spec| spec.name = 'Geth' spec.version = '{{.Version}}' spec.license = { :type => 'GNU Lesser General Public License, Version 3.0' } - spec.homepage = 'https://github.com/ethereum/go-ethereum' + spec.homepage = 'https://github.com/empyrean/go-ethereum' spec.authors = { {{range .Contributors}} '{{.Name}}' => '{{.Email}}',{{end}} } spec.summary = 'iOS Ethereum Client' - spec.source = { :git => 'https://github.com/ethereum/go-ethereum.git', :commit => '{{.Commit}}' } + spec.source = { :git => 'https://github.com/empyrean/go-ethereum.git', :commit => '{{.Commit}}' } spec.platform = :ios spec.ios.deployment_target = '9.0' diff --git a/config.toml b/config.toml index e48def5a74..fd1a8a1734 100644 --- a/config.toml +++ b/config.toml @@ -11,7 +11,7 @@ EnablePreimageRecording = false CacheDir = "ethash" CachesInMem = 2 CachesOnDisk = 3 -DatasetDir = "$HOME/.ethash" +DatasetDir = "./privatenet/.ethash" DatasetsInMem = 1 DatasetsOnDisk = 2 PowMode = 0 diff --git a/containers/docker/develop-alpine/Dockerfile b/containers/docker/develop-alpine/Dockerfile index 1f3e1112ec..27998998ea 100644 --- a/containers/docker/develop-alpine/Dockerfile +++ b/containers/docker/develop-alpine/Dockerfile @@ -2,11 +2,11 @@ FROM alpine:3.7 RUN \ apk add --update go git make gcc musl-dev linux-headers ca-certificates && \ - git clone --depth 1 https://github.com/ethereum/go-ethereum && \ - (cd go-ethereum && make geth) && \ - cp go-ethereum/build/bin/geth /geth && \ + git clone --depth 1 https://github.com/ShyftNetwork/go-empyrean && \ + (cd go-empyrean && make geth) && \ + cp go-empyrean/build/bin/geth /geth && \ apk del go git make gcc musl-dev linux-headers && \ - rm -rf /go-ethereum && rm -rf /var/cache/apk/* + rm -rf /go-empyrean && rm -rf /var/cache/apk/* EXPOSE 8545 EXPOSE 30303 diff --git a/containers/docker/develop-alpine/pg/Dockerfile b/containers/docker/develop-alpine/pg/Dockerfile new file mode 100644 index 0000000000..90d5ca89f3 --- /dev/null +++ b/containers/docker/develop-alpine/pg/Dockerfile @@ -0,0 +1,9 @@ +FROM postgres:10.4-alpine + +# @NOTE:Shyft - need to modify scripts to check db/table existence +WORKDIR / +COPY ./shyft-cli/postgres_setup/docker_init_user_db.sh /docker-entrypoint-initdb.d/ +COPY ./shyft-cli/postgres_setup/create_tables.psql /create_tables.psql +RUN cd /docker-entrypoint-initdb.d && ls -a +VOLUME ["/var/lib/postgresql"] +EXPOSE 5432 diff --git a/containers/docker/develop-alpine/shyftApi/Dockerfile b/containers/docker/develop-alpine/shyftApi/Dockerfile new file mode 100644 index 0000000000..f1bc0e3447 --- /dev/null +++ b/containers/docker/develop-alpine/shyftApi/Dockerfile @@ -0,0 +1,15 @@ +FROM golang:1.10.3-alpine + +RUN apk add --update git make gcc musl-dev linux-headers ca-certificates + +COPY ./shyftBlockExplorerApi /go/src/github.com/ShyftNetwork/go-empyrean/shyftBlockExplorerApi +COPY ./wait-for.sh / +WORKDIR /go/src/github.com/ShyftNetwork/go-empyrean/shyftBlockExplorerApi + +RUN go get -u github.com/kardianos/govendor +RUN govendor sync +RUN cat /go/src/github.com/ShyftNetwork/go-empyrean/shyftBlockExplorerApi/vendor/vendor.json +RUN echo `ls -l /go/src/github.com/ShyftNetwork/go-empyrean/shyftBlockExplorerApi/vendor` +CMD go run -v *.go + +EXPOSE 8080 diff --git a/containers/docker/develop-alpine/shyftApi/wait-for.sh b/containers/docker/develop-alpine/shyftApi/wait-for.sh new file mode 100755 index 0000000000..9745286daf --- /dev/null +++ b/containers/docker/develop-alpine/shyftApi/wait-for.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# https://github.com/eficode/wait-for.git +log() { + echo "[wait-for] [`date +'%Y%m%d%H%M%S'`] $@" +} + +usage() { + echo "Usage: `basename "$0"` [--timeout=15] : [:]" +} + +unknown_arg() { + log "[ERROR] unknown argument: '$@'" + usage + exit 2 +} + +wait_for() { + timeout=$1 && host=$2 && port=$3 + log "wait '$host':'$port' up to '$timeout'" + for i in `seq $timeout` ; do + if nc -z "$host" "$port" > /dev/null 2>&1 ; then + log "wait finish '$host:$port' [`expr $(date +%s) - $START`] seconds" + exit 0 + fi + log "wait attempt '${host}:${port}' [$i]" + sleep 1 + done + log "[ERROR] wait timeout of '$timeout' on '$host:$port'" + exit 1 +} + +trap 'kill $(jobs -p) &>/dev/null' EXIT + +START=$(date +%s) +timeout=30 +pids="" +for i in $@ ; do + case $i in + --timeout=*) timeout="${i#*=}" ;; + -t=*) timeout="${i#*=}" ;; + *:* ) + wait_for "$timeout" "${i%%:*}" "${i##*:}" & + pids="$pids $!" + ;; + *) unknown_arg "$i" ;; + esac +done + +status=0 +for pid in $pids; do + if ! wait $pid ; then + status=1 + fi +done + +log "wait done with status=$status" +exit $status diff --git a/containers/docker/develop-alpine/shyftGeth/Dockerfile b/containers/docker/develop-alpine/shyftGeth/Dockerfile new file mode 100644 index 0000000000..124f4ffde8 --- /dev/null +++ b/containers/docker/develop-alpine/shyftGeth/Dockerfile @@ -0,0 +1,24 @@ +FROM golang:1.10.3-alpine + +# To copy complete directory +COPY ./ /go/src/github.com/ShyftEthereum/go-empyrean +WORKDIR /go/src/github.com/ShyftEthereum/go-empyrean + +RUN \ + apk add --update git make gcc musl-dev linux-headers ca-certificates && \ + (cd /go/src/github.com/ShyftEthereum/go-empyrean && make geth) && \ + cp -v /go/src/github.com/ShyftEthereum/go-empyrean/build/bin/geth /bin + +COPY config.toml / +COPY unlockPasswords.txt / +COPY ShyftNetwork.json / + +COPY UTC--2018-03-18T22-35-03.111589431Z--43ec6d0942f7faef069f7f63d0384a27f529b062 / +COPY UTC--2018-03-18T22-36-53.786508893Z--9e602164c5826ebb5a6b68e4afd9cd466043dc4a / +COPY UTC--2018-03-18T22-37-04.212101982Z--5bd738164c61fb50eb12e227846cbaef2de965aa / +COPY UTC--2018-03-18T22-37-12.082606217Z--c04ee4131895f1d0c294d508af65d94060aa42bb / +COPY UTC--2018-03-18T22-37-19.650676366Z--07d899c4ac0c1725c35c5f816e60273b33a964f7 / + +WORKDIR /go/src/github.com/ShyftEthereum/go-empyrean + +CMD ["./shyft-cli/initShyftGeth.sh", "./shyft-cli/startShyftGeth.sh"] diff --git a/containers/docker/develop-alpine/shyftUi/Dockerfile b/containers/docker/develop-alpine/shyftUi/Dockerfile new file mode 100644 index 0000000000..10cc2171c7 --- /dev/null +++ b/containers/docker/develop-alpine/shyftUi/Dockerfile @@ -0,0 +1,25 @@ +FROM node:8.11.3-alpine + +# set working directory +RUN echo `cd usr && ls -a` +RUN mkdir -p usr/src/shyftBlockExplorerUI +WORKDIR /usr/src/shyftBlockExplorerUI + +# add `/usr/src/app/node_modules/.bin` to $PATH +ENV PATH /usr/src/shyftBlockExplorerUI/node_modules/.bin:$PATH + +# install and cache app dependencies +COPY ./shyftBlockExplorerUI/package.json /usr/src/shyftBlockExplorerUI/package.json +RUN npm install +# RUN npm add react-scripts@1.1.1 -g --silent +COPY ./shyftBlockExplorerUI/src /usr/src/shyftBlockExplorerUI/src +COPY ./shyftBlockExplorerUI/scripts /usr/src/shyftBlockExplorerUI/scripts +COPY ./shyftBlockExplorerUI/config /usr/src/shyftBlockExplorerUI/config +COPY ./shyftBlockExplorerUI/public /usr/src/shyftBlockExplorerUI/public + +# start app + +EXPOSE 3000 + +CMD ["npm", "start"] + diff --git a/containers/docker/develop-ubuntu/Dockerfile b/containers/docker/develop-ubuntu/Dockerfile index 8c4fe9f595..68e991cf9b 100644 --- a/containers/docker/develop-ubuntu/Dockerfile +++ b/containers/docker/develop-ubuntu/Dockerfile @@ -5,7 +5,7 @@ ENV PATH=/usr/lib/go-1.9/bin:$PATH RUN \ apt-get update && apt-get upgrade -q -y && \ apt-get install -y --no-install-recommends golang-1.9 git make gcc libc-dev ca-certificates && \ - git clone --depth 1 https://github.com/ethereum/go-ethereum && \ + git clone --depth 1 https://github.com/empyrean/go-ethereum && \ (cd go-ethereum && make geth) && \ cp go-ethereum/build/bin/geth /geth && \ apt-get remove -y golang-1.9 git make gcc libc-dev && apt autoremove -y && apt-get clean && \ diff --git a/containers/docker/master-alpine/Dockerfile b/containers/docker/master-alpine/Dockerfile index 8d4e7fe81a..7830495bd2 100644 --- a/containers/docker/master-alpine/Dockerfile +++ b/containers/docker/master-alpine/Dockerfile @@ -2,7 +2,7 @@ FROM alpine:3.7 RUN \ apk add --update go git make gcc musl-dev linux-headers ca-certificates && \ - git clone --depth 1 --branch release/1.8 https://github.com/ethereum/go-ethereum && \ + git clone --depth 1 --branch release/1.8 https://github.com/empyrean/go-ethereum && \ (cd go-ethereum && make geth) && \ cp go-ethereum/build/bin/geth /geth && \ apk del go git make gcc musl-dev linux-headers && \ diff --git a/containers/docker/master-ubuntu/Dockerfile b/containers/docker/master-ubuntu/Dockerfile index 4cfc4f58c0..4aeb19c292 100644 --- a/containers/docker/master-ubuntu/Dockerfile +++ b/containers/docker/master-ubuntu/Dockerfile @@ -5,7 +5,7 @@ ENV PATH=/usr/lib/go-1.9/bin:$PATH RUN \ apt-get update && apt-get upgrade -q -y && \ apt-get install -y --no-install-recommends golang-1.9 git make gcc libc-dev ca-certificates && \ - git clone --depth 1 --branch release/1.8 https://github.com/ethereum/go-ethereum && \ + git clone --depth 1 --branch release/1.8 https://github.com/empyrean/go-ethereum && \ (cd go-ethereum && make geth) && \ cp go-ethereum/build/bin/geth /geth && \ apt-get remove -y golang-1.9 git make gcc libc-dev && apt autoremove -y && apt-get clean && \ diff --git a/containers/vagrant/Vagrantfile b/containers/vagrant/Vagrantfile index 72ec366e21..f81238cac9 100644 --- a/containers/vagrant/Vagrantfile +++ b/containers/vagrant/Vagrantfile @@ -34,5 +34,5 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| end config.vm.synced_folder ".", "/vagrant", :disabled => true - config.vm.synced_folder "../../", "/home/vagrant/go/src/github.com/ethereum/go-ethereum" + config.vm.synced_folder "../../", "/home/vagrant/go/src/github.com/empyrean/go-ethereum" end diff --git a/containers/vagrant/provisioners/shell/centos.sh b/containers/vagrant/provisioners/shell/centos.sh index 744da4bfd4..0cf46065c9 100755 --- a/containers/vagrant/provisioners/shell/centos.sh +++ b/containers/vagrant/provisioners/shell/centos.sh @@ -6,6 +6,6 @@ sudo yum update -y wget --continue https://storage.googleapis.com/golang/go1.8.1.linux-amd64.tar.gz sudo tar -C /usr/local -xzf go1.8.1.linux-amd64.tar.gz -GETH_PATH="~vagrant/go/src/github.com/ethereum/go-ethereum/build/bin/" +GETH_PATH="~vagrant/go/src/github.com/empyrean/go-ethereum/build/bin/" echo "export PATH=$PATH:/usr/local/go/bin:$GETH_PATH" >> ~vagrant/.bashrc diff --git a/containers/vagrant/provisioners/shell/debian.sh b/containers/vagrant/provisioners/shell/debian.sh index 1c1793336d..6bb5ce7731 100755 --- a/containers/vagrant/provisioners/shell/debian.sh +++ b/containers/vagrant/provisioners/shell/debian.sh @@ -6,6 +6,6 @@ sudo apt-get update wget --continue https://storage.googleapis.com/golang/go1.8.1.linux-amd64.tar.gz sudo tar -C /usr/local -xzf go1.8.1.linux-amd64.tar.gz -GETH_PATH="~vagrant/go/src/github.com/ethereum/go-ethereum/build/bin/" +GETH_PATH="~vagrant/go/src/github.com/empyrean/go-ethereum/build/bin/" echo "export PATH=$PATH:/usr/local/go/bin:$GETH_PATH" >> ~vagrant/.bashrc diff --git a/containers/vagrant/provisioners/shell/ubuntu.sh b/containers/vagrant/provisioners/shell/ubuntu.sh index 1c1793336d..6bb5ce7731 100755 --- a/containers/vagrant/provisioners/shell/ubuntu.sh +++ b/containers/vagrant/provisioners/shell/ubuntu.sh @@ -6,6 +6,6 @@ sudo apt-get update wget --continue https://storage.googleapis.com/golang/go1.8.1.linux-amd64.tar.gz sudo tar -C /usr/local -xzf go1.8.1.linux-amd64.tar.gz -GETH_PATH="~vagrant/go/src/github.com/ethereum/go-ethereum/build/bin/" +GETH_PATH="~vagrant/go/src/github.com/empyrean/go-ethereum/build/bin/" echo "export PATH=$PATH:/usr/local/go/bin:$GETH_PATH" >> ~vagrant/.bashrc diff --git a/core/db.go b/core/db.go index 48f86ac7a1..4686de61fd 100644 --- a/core/db.go +++ b/core/db.go @@ -1,18 +1,25 @@ package core import ( - "fmt" - "database/sql" + "database/sql" + "fmt" + "os" ) var blockExplorerDb *sql.DB +// @NOTE: SHYFT - could be refactored to add a test db environment const ( - connStr = "user=postgres dbname=shyftdb sslmode=disable" - connStrTest = "user=postgres dbname=shyftdbtest sslmode=disable" + connStrTest = "user=postgres dbname=shyftdbtest password=docker sslmode=disable" ) -func InitDB() (*sql.DB, error){ +var connStr = connectionStr() + +// InitDB - initalizes a Postgresql Database for use by the Blockexplorer +func InitDB() (*sql.DB, error) { + // To set the environment you can run the program with an ENV variable DBENV. + // DBENV defaults to local for purposes of running the correct local + // database connection parameters but will use docker connection parameters if DBENV=docker db, err := sql.Open("postgres", connStr) if err != nil { fmt.Println("ERROR OPENING DB, NOT INITIALIZING") @@ -24,7 +31,17 @@ func InitDB() (*sql.DB, error){ } } -func InitDBTest() (*sql.DB, error){ +func connectionStr() string { + dbEnv := os.Getenv("DBENV") + switch dbEnv { + default: + return "user=postgres dbname=shyftdb host=localhost sslmode=disable" + case "docker": + return "user=postgres dbname=shyftdb host=pg password=docker sslmode=disable" + } +} + +func InitDBTest() (*sql.DB, error) { db, err := sql.Open("postgres", connStrTest) if err != nil { fmt.Println("ERROR OPENING DB, NOT INITIALIZING") @@ -37,9 +54,9 @@ func InitDBTest() (*sql.DB, error){ } func DBConnection() (*sql.DB, error) { - if (blockExplorerDb == nil) { + if blockExplorerDb == nil { _, err := InitDB() - if(err != nil) { + if err != nil { return nil, err } } diff --git a/dashboard/assets/components/Footer.jsx b/dashboard/assets/components/Footer.jsx index 20830cbba8..b123b8b871 100644 --- a/dashboard/assets/components/Footer.jsx +++ b/dashboard/assets/components/Footer.jsx @@ -165,7 +165,7 @@ class Footer extends Component { {general.commit && ( {'Commit '} - + {general.commit.substring(0, 8)} diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000000..4c4c75ff49 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,77 @@ +version: '3' + +services: + shyftgeth: + build: + context: $PWD + dockerfile: containers/docker/develop-alpine/shyftGeth/Dockerfile + ports: + - "8545:8545" + - "8546:8546" + - "30301:30301" + - "30303:30303/udp" + - "30304:30304" + volumes: + - .:/go/src/ShyftNetwork/go-empyrean + working_dir: /go/src/ShyftNetwork/go-empyrean + depends_on: + - pg + networks: + - shyftnet + command: > + sh -c 'cd /go/src/ShyftNetwork/go-empyrean && + ./wait-for.sh pg:5432 && + DBENV=docker export DBENV && + ./shyft-cli/initShyftGeth.sh && + ./shyft-cli/startShyftGeth.sh' + pg: + build: + context: $PWD + dockerfile: containers/docker/develop-alpine/pg/Dockerfile + volumes: + - ./pg-data:/var/lib/postgresql/data + ports: + - "8001:5432" + networks: + - shyftnet + environment: + - POSTGRES_USER=postgres + - POSTGRES_PASSWORD=docker + shyft_block_api: + build: + context: $PWD + dockerfile: containers/docker/develop-alpine/shyftApi/Dockerfile + # volumes: + # - ./shyftBlockExplorerApi:/go/src/github.com/ShyftNetwork/go-empyrean/shyftBlockExplorerApi + working_dir: /go/src/github.com/ShyftNetwork/go-empyrean/shyftBlockExplorerApi + ports: + - "8080:8080" + depends_on: + - shyftgeth + - pg + networks: + - shyftnet + command: > + sh -c ' + pwd && govendor remove github.com/ShyftNetwork/go-empyrean/crypto/secp256k1/^ && + govendor fetch github.com/ShyftNetwork/go-empyrean/crypto/secp256k1/^ && + /wait-for.sh pg:5432 && + DBENV=docker export DBENV && + go run -v *.go' + shyft_block_ui: + build: + context: $PWD + dockerfile: containers/docker/develop-alpine/shyftUi/Dockerfile + # volumes: + # - ./shyftBlockExplorerApi:/go/src/github.com/ShyftNetwork/go-empyrean/shyftBlockExplorerApi + ports: + - "3000:3000" + depends_on: + - shyft_block_api + networks: + - shyftnet +networks: + shyftnet: + driver: bridge + + diff --git a/internal/jsre/deps/web3.js b/internal/jsre/deps/web3.js index 9bb899384b..17634f0e36 100644 --- a/internal/jsre/deps/web3.js +++ b/internal/jsre/deps/web3.js @@ -5862,7 +5862,7 @@ module.exports = Shh; * @author Alex Beregszaszi * @date 2016 * - * Reference: https://github.com/ethereum/go-ethereum/blob/swarm/internal/web3ext/web3ext.go#L33 + * Reference: https://github.com/empyrean/go-ethereum/blob/swarm/internal/web3ext/web3ext.go#L33 */ "use strict"; diff --git a/shyft-cli/initShyftGeth.sh b/shyft-cli/initShyftGeth.sh index c6a8d115e1..08277e2c0e 100755 --- a/shyft-cli/initShyftGeth.sh +++ b/shyft-cli/initShyftGeth.sh @@ -1,2 +1,6 @@ #!/bin/sh -./build/bin/geth --identity "ShyftTestnetNode" --keystore ./ --datadir "./shyftData" init ShyftNetwork.json \ No newline at end of file +if [[ -z "${DBENV}" ]]; then + ./build/bin/geth --identity "ShyftTestnetNode" --keystore ./ --datadir "./shyftData" init ShyftNetwork.json +else + /bin/geth --identity "ShyftTestnetNode" --keystore ./ --datadir "./shyftData" init ShyftNetwork.json +fi diff --git a/shyft-cli/postgres_setup/create_shyftdb.psql b/shyft-cli/postgres_setup/create_shyftdb.psql index 2c029ee772..c24e909f63 100644 --- a/shyft-cli/postgres_setup/create_shyftdb.psql +++ b/shyft-cli/postgres_setup/create_shyftdb.psql @@ -1 +1 @@ -CREATE DATABASE shyftdb +CREATE DATABASE shyftdb; diff --git a/shyft-cli/postgres_setup/create_tables.psql b/shyft-cli/postgres_setup/create_tables.psql index b913fc4f25..35b1a5c927 100644 --- a/shyft-cli/postgres_setup/create_tables.psql +++ b/shyft-cli/postgres_setup/create_tables.psql @@ -55,4 +55,4 @@ CREATE TABLE IF NOT EXISTS internalTxs ( time text, input text, output text -) \ No newline at end of file +); \ No newline at end of file diff --git a/shyft-cli/postgres_setup/docker_init_user_db.sh b/shyft-cli/postgres_setup/docker_init_user_db.sh new file mode 100755 index 0000000000..ee358a08c3 --- /dev/null +++ b/shyft-cli/postgres_setup/docker_init_user_db.sh @@ -0,0 +1,10 @@ +#!/bin/bash +set -e +echo $POSTGRES_USER +echo $POSTGRES_DB +# createTables="$(cat /create_tables.psql)" +# echo $createTables +psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL + CREATE DATABASE shyftdb; +EOSQL +psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" -d shyftdb < /create_tables.psql diff --git a/shyft-cli/postgres_setup/drop_tables.psql b/shyft-cli/postgres_setup/drop_tables.psql index 8826b85093..368c809a42 100644 --- a/shyft-cli/postgres_setup/drop_tables.psql +++ b/shyft-cli/postgres_setup/drop_tables.psql @@ -1,3 +1,5 @@ +\connect +shyftdb; DROP TABLE internalTxs; DROP TABLE txs; DROP TABLE blocks; diff --git a/shyft-cli/startShyftGeth.sh b/shyft-cli/startShyftGeth.sh index 9085f628d3..5a782d97fb 100755 --- a/shyft-cli/startShyftGeth.sh +++ b/shyft-cli/startShyftGeth.sh @@ -1,2 +1,6 @@ #!/bin/sh -./build/bin/geth --config config.toml --ws --wsaddr="0.0.0.0" --wsorigins "*" --nat=none --mine --minerthreads 4 --targetgaslimit 80000000 --unlock "0x43EC6d0942f7fAeF069F7F63D0384a27f529B062,0x9e602164C5826ebb5A6B68E4AFD9Cd466043dc4A,0x5Bd738164C61FB50eb12E227846CbaeF2dE965Aa,0xC04eE4131895F1d0C294D508AF65D94060AA42BB,0x07D899C4aC0c1725C35C5f816e60273B33a964F7" --password ./unlockPasswords.txt +if [[ -z "${DBENV}" ]]; then + ./build/bin/geth --config config.toml --ws --wsaddr="0.0.0.0" --wsorigins "*" --nat=none --mine --minerthreads 4 --targetgaslimit 80000000 --unlock "0x43EC6d0942f7fAeF069F7F63D0384a27f529B062,0x9e602164C5826ebb5A6B68E4AFD9Cd466043dc4A,0x5Bd738164C61FB50eb12E227846CbaeF2dE965Aa,0xC04eE4131895F1d0C294D508AF65D94060AA42BB,0x07D899C4aC0c1725C35C5f816e60273B33a964F7" --password ./unlockPasswords.txt +else + /bin/geth --config config.toml --ws --wsaddr="0.0.0.0" --wsorigins "*" --nat=none --mine --minerthreads 4 --targetgaslimit 80000000 --unlock "0x43EC6d0942f7fAeF069F7F63D0384a27f529B062,0x9e602164C5826ebb5A6B68E4AFD9Cd466043dc4A,0x5Bd738164C61FB50eb12E227846CbaeF2dE965Aa,0xC04eE4131895F1d0C294D508AF65D94060AA42BB,0x07D899C4aC0c1725C35C5f816e60273B33a964F7" --password ./unlockPasswords.txt +fi diff --git a/shyftBlockExplorerApi/vendor/vendor.json b/shyftBlockExplorerApi/vendor/vendor.json new file mode 100644 index 0000000000..d29353990f --- /dev/null +++ b/shyftBlockExplorerApi/vendor/vendor.json @@ -0,0 +1,399 @@ +{ + "comment": "", + "ignore": "test", + "package": [ + { + "checksumSHA1": "4/fb4r/Y7MEVCaTN7PdPPRJBe7M=", + "path": "github.com/ShyftNetwork/go-empyrean/common", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "0lTXpt67indxty1DyfsGUhZUxtc=", + "path": "github.com/ShyftNetwork/go-empyrean/common/bitutil", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "Wzv00R7tDEPGN5lbROZLRork+38=", + "path": "github.com/ShyftNetwork/go-empyrean/common/hexutil", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "aNgexBwEfI8ANaaMyQDyeHuFCUY=", + "path": "github.com/ShyftNetwork/go-empyrean/common/math", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "zaAV9eypVRaotW+MMizuPxPJfHM=", + "path": "github.com/ShyftNetwork/go-empyrean/common/mclock", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "FZSyCzy79paVzTFiw9hwQMmYqYM=", + "path": "github.com/ShyftNetwork/go-empyrean/consensus", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "sT7DF05X1yBnMUcVgJhd4p+q7s0=", + "path": "github.com/ShyftNetwork/go-empyrean/consensus/ethash", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "Fdv4KUKWQ+owyPIUlv8c2WLS6B4=", + "path": "github.com/ShyftNetwork/go-empyrean/consensus/misc", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "2B0x5+B/4dtzj/xOwF7Q+yGhhr0=", + "path": "github.com/ShyftNetwork/go-empyrean/core", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "vhNvzOqmXFBYdZtrpWhW8jhmGzY=", + "path": "github.com/ShyftNetwork/go-empyrean/core/state", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "SRoGhYQpFaq3OQbf8g2WT2gAnwA=", + "path": "github.com/ShyftNetwork/go-empyrean/core/types", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "dMRUmW+Wq2zvupYeXuYj0k3Vndc=", + "path": "github.com/ShyftNetwork/go-empyrean/core/vm", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "MGgNhnPT/mJEIpdmWnTtewtzk0g=", + "path": "github.com/ShyftNetwork/go-empyrean/crypto", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "3glJGNkz78GAuDWdW0Vn4AshJZ8=", + "path": "github.com/ShyftNetwork/go-empyrean/crypto/bn256", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "YzKGOtVGw0wcMcQzyOcwx77TSsE=", + "path": "github.com/ShyftNetwork/go-empyrean/crypto/bn256/cloudflare", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "VXAuy+4VsjnX8wiXEFcxPYwMu0c=", + "path": "github.com/ShyftNetwork/go-empyrean/crypto/bn256/google", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "VtCDPH1wjVu+6mjuEqY57mRsjwA=", + "path": "github.com/ShyftNetwork/go-empyrean/crypto/secp256k1", + "revision": "81a40842f57bda0d10516e8a193ca2db45d67f2c", + "revisionTime": "2018-08-02T21:47:13Z" + }, + { + "checksumSHA1": "QR0Uoq+x3/CiCbNWHXmsTIDrdF0=", + "path": "github.com/ShyftNetwork/go-empyrean/crypto/sha3", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "DD9RzILcd1jH8JQS1wFnntJWb9Q=", + "path": "github.com/ShyftNetwork/go-empyrean/ethdb", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "XnrX5RuMLgEGBXCUJCzAAYAyfMQ=", + "path": "github.com/ShyftNetwork/go-empyrean/event", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "z1EsZ0xPHsbrmEP9f548xU5vRe0=", + "path": "github.com/ShyftNetwork/go-empyrean/log", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "o1Jo5QZjpoQu/jlV8EdRReqx12I=", + "path": "github.com/ShyftNetwork/go-empyrean/metrics", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "YHme1HzZG6QEuj+omsBga9q+Rng=", + "path": "github.com/ShyftNetwork/go-empyrean/params", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "YaGPda/QZ2y7bTdRsIIlyI1zZlo=", + "path": "github.com/ShyftNetwork/go-empyrean/rlp", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "8IM59NA2oUvUbqXJw+jYUcBIYWY=", + "path": "github.com/ShyftNetwork/go-empyrean/rpc", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "X+6gj7lAoWmwGhd8kZCr/r13Ljw=", + "path": "github.com/ShyftNetwork/go-empyrean/shyfttracerinterface", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "V0TAmfyHQS5bTiNTWBpPyWC26I4=", + "path": "github.com/ShyftNetwork/go-empyrean/trie", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "USkefO0g1U9mr+8hagv3fpSkrxg=", + "origin": "github.com/ShyftNetwork/go-empyrean/vendor/github.com/aristanetworks/goarista/monotime", + "path": "github.com/aristanetworks/goarista/monotime", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "gZQ6HheWahvZzIc3phBnOwoWHjE=", + "origin": "github.com/ShyftNetwork/go-empyrean/vendor/github.com/btcsuite/btcd/btcec", + "path": "github.com/btcsuite/btcd/btcec", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "zYnPsNAVm1/ViwCkN++dX2JQhBo=", + "origin": "github.com/ShyftNetwork/go-empyrean/vendor/github.com/edsrzf/mmap-go", + "path": "github.com/edsrzf/mmap-go", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "BP3m/oEeoC9ustdCYzAVS/gabqg=", + "path": "github.com/ethereum/go-ethereum/common/math", + "revision": "35fcd2f42388d10c2c638dd3e2b4bd4306b07c19", + "revisionTime": "2018-08-03T10:26:39Z" + }, + { + "checksumSHA1": "KZ3QD2QgUS4RcoKiA3mn5pSlJxQ=", + "origin": "github.com/ShyftNetwork/go-empyrean/vendor/github.com/go-stack/stack", + "path": "github.com/go-stack/stack", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "p/8vSviYF91gFflhrt5vkyksroo=", + "origin": "github.com/ShyftNetwork/go-empyrean/vendor/github.com/golang/snappy", + "path": "github.com/golang/snappy", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "g/V4qrXjUGG9B+e3hB+4NAYJ5Gs=", + "origin": "github.com/ShyftNetwork/go-empyrean/vendor/github.com/gorilla/context", + "path": "github.com/gorilla/context", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "XOY0t65siat4bLbC4VCmBA9dE7Y=", + "origin": "github.com/ShyftNetwork/go-empyrean/vendor/github.com/gorilla/handlers", + "path": "github.com/gorilla/handlers", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "YuYKzn2jczaM6DQcFDmukvAHUX4=", + "origin": "github.com/ShyftNetwork/go-empyrean/vendor/github.com/gorilla/mux", + "path": "github.com/gorilla/mux", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "d9PxF1XQGLMJZRct2R8qVM/eYlE=", + "origin": "github.com/ShyftNetwork/go-empyrean/vendor/github.com/hashicorp/golang-lru", + "path": "github.com/hashicorp/golang-lru", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "9hffs0bAIU6CquiRhKQdzjHnKt0=", + "origin": "github.com/ShyftNetwork/go-empyrean/vendor/github.com/hashicorp/golang-lru/simplelru", + "path": "github.com/hashicorp/golang-lru/simplelru", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "F7vsuKOVSMnFSi90odRxfhBEBeA=", + "origin": "github.com/ShyftNetwork/go-empyrean/vendor/github.com/lib/pq", + "path": "github.com/lib/pq", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "AU3fA8Sm33Vj9PBoRPSeYfxLRuE=", + "origin": "github.com/ShyftNetwork/go-empyrean/vendor/github.com/lib/pq/oid", + "path": "github.com/lib/pq/oid", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "LjPdvMphElL0GOVNQCsmZMVgWIw=", + "origin": "github.com/ShyftNetwork/go-empyrean/vendor/github.com/rs/cors", + "path": "github.com/rs/cors", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "hCRfPlNpqv8tvVivLzmXsoUOf1c=", + "origin": "github.com/ShyftNetwork/go-empyrean/vendor/github.com/rs/xhandler", + "path": "github.com/rs/xhandler", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "3QsnhPTXGytTbW3uDvQLgSo9s9M=", + "origin": "github.com/ShyftNetwork/go-empyrean/vendor/github.com/syndtr/goleveldb/leveldb", + "path": "github.com/syndtr/goleveldb/leveldb", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "EKIow7XkgNdWvR/982ffIZxKG8Y=", + "origin": "github.com/ShyftNetwork/go-empyrean/vendor/github.com/syndtr/goleveldb/leveldb/cache", + "path": "github.com/syndtr/goleveldb/leveldb/cache", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "5KPgnvCPlR0ysDAqo6jApzRQ3tw=", + "origin": "github.com/ShyftNetwork/go-empyrean/vendor/github.com/syndtr/goleveldb/leveldb/comparer", + "path": "github.com/syndtr/goleveldb/leveldb/comparer", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "1DRAxdlWzS4U0xKN/yQ/fdNN7f0=", + "origin": "github.com/ShyftNetwork/go-empyrean/vendor/github.com/syndtr/goleveldb/leveldb/errors", + "path": "github.com/syndtr/goleveldb/leveldb/errors", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "eqKeD6DS7eNCtxVYZEHHRKkyZrw=", + "origin": "github.com/ShyftNetwork/go-empyrean/vendor/github.com/syndtr/goleveldb/leveldb/filter", + "path": "github.com/syndtr/goleveldb/leveldb/filter", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "weSsccMav4BCerDpSLzh3mMxAYo=", + "origin": "github.com/ShyftNetwork/go-empyrean/vendor/github.com/syndtr/goleveldb/leveldb/iterator", + "path": "github.com/syndtr/goleveldb/leveldb/iterator", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "gJY7bRpELtO0PJpZXgPQ2BYFJ88=", + "origin": "github.com/ShyftNetwork/go-empyrean/vendor/github.com/syndtr/goleveldb/leveldb/journal", + "path": "github.com/syndtr/goleveldb/leveldb/journal", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "MtYY1b2234y/MlS+djL8tXVAcQs=", + "origin": "github.com/ShyftNetwork/go-empyrean/vendor/github.com/syndtr/goleveldb/leveldb/memdb", + "path": "github.com/syndtr/goleveldb/leveldb/memdb", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "UmQeotV+m8/FduKEfLOhjdp18rs=", + "origin": "github.com/ShyftNetwork/go-empyrean/vendor/github.com/syndtr/goleveldb/leveldb/opt", + "path": "github.com/syndtr/goleveldb/leveldb/opt", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "QCSae2ub87f8awH+PKMpd8ZYOtg=", + "origin": "github.com/ShyftNetwork/go-empyrean/vendor/github.com/syndtr/goleveldb/leveldb/storage", + "path": "github.com/syndtr/goleveldb/leveldb/storage", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "gWFPMz8OQeul0t54RM66yMTX49g=", + "origin": "github.com/ShyftNetwork/go-empyrean/vendor/github.com/syndtr/goleveldb/leveldb/table", + "path": "github.com/syndtr/goleveldb/leveldb/table", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "V/Dh7NV0/fy/5jX1KaAjmGcNbzI=", + "origin": "github.com/ShyftNetwork/go-empyrean/vendor/github.com/syndtr/goleveldb/leveldb/util", + "path": "github.com/syndtr/goleveldb/leveldb/util", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "y/oIaxq2d3WPizRZfVjo8RCRYTU=", + "origin": "github.com/ShyftNetwork/go-empyrean/vendor/golang.org/x/crypto/ripemd160", + "path": "golang.org/x/crypto/ripemd160", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "Y+HGqEkYM15ir+J93MEaHdyFy0c=", + "origin": "github.com/ShyftNetwork/go-empyrean/vendor/golang.org/x/net/context", + "path": "golang.org/x/net/context", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "7EZyXN0EmZLgGxZxK01IJua4c8o=", + "origin": "github.com/ShyftNetwork/go-empyrean/vendor/golang.org/x/net/websocket", + "path": "golang.org/x/net/websocket", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "NGg7/qIJVUfXi7xnEyyDLocdi6Y=", + "origin": "github.com/ShyftNetwork/go-empyrean/vendor/gopkg.in/fatih/set.v0", + "path": "gopkg.in/fatih/set.v0", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "DQXNV0EivoHm4q+bkdahYXrjjfE=", + "origin": "github.com/ShyftNetwork/go-empyrean/vendor/gopkg.in/karalabe/cookiejar.v2/collections/prque", + "path": "gopkg.in/karalabe/cookiejar.v2/collections/prque", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + }, + { + "checksumSHA1": "0xgs8lwcWLUffemlj+SsgKlxvDU=", + "origin": "github.com/ShyftNetwork/go-empyrean/vendor/gopkg.in/natefinch/npipe.v2", + "path": "gopkg.in/natefinch/npipe.v2", + "revision": "bc318b381ebd1042f4e282dd879a0463f9378786", + "revisionTime": "2018-08-03T12:51:19Z" + } + ], + "rootPath": "github.com/ShyftNetwork/go-empyrean/shyftBlockExplorerApi" +} diff --git a/shyftBlockExplorerUI/src/components/table/accounts/accountRows.js b/shyftBlockExplorerUI/src/components/table/accounts/accountRows.js index ecb160a04b..1113538e41 100644 --- a/shyftBlockExplorerUI/src/components/table/accounts/accountRows.js +++ b/shyftBlockExplorerUI/src/components/table/accounts/accountRows.js @@ -38,7 +38,7 @@ class AccountTable extends Component { Percentage={percentage.toFixed(2)} Addr={data.Addr} Balance={conversion} - TxCountAccount={data.TxCountAccount} + AcountNonce={data.AccountNonce} detailAccountHandler={this.props.detailAccountHandler} /> }); diff --git a/shyftBlockExplorerUI/src/components/table/accounts/accountsTable.js b/shyftBlockExplorerUI/src/components/table/accounts/accountsTable.js index 62451059dd..2f708d449c 100644 --- a/shyftBlockExplorerUI/src/components/table/accounts/accountsTable.js +++ b/shyftBlockExplorerUI/src/components/table/accounts/accountsTable.js @@ -12,7 +12,7 @@ const AccountsTable = (props) => { {props.Balance} {props.Percentage}% - {props.TxCountAccount} + {props.AccountNonce} ) diff --git a/shyftBlockExplorerUI/yarn.lock b/shyftBlockExplorerUI/yarn.lock index a566cb155d..7e3f63416e 100644 --- a/shyftBlockExplorerUI/yarn.lock +++ b/shyftBlockExplorerUI/yarn.lock @@ -349,6 +349,13 @@ aws4@^1.2.1, aws4@^1.6.0: version "1.7.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.7.0.tgz#d4d0e9b9dbfca77bf08eeb0a8a471550fe39e289" +axios@^0.18.0: + version "0.18.0" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.18.0.tgz#32d53e4851efdc0a11993b6cd000789d70c05102" + dependencies: + follow-redirects "^1.3.0" + is-buffer "^1.1.5" + axobject-query@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-0.1.0.tgz#62f59dbc59c9f9242759ca349960e7a2fe3c36c0" @@ -2792,6 +2799,12 @@ flatten@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782" +follow-redirects@^1.3.0: + version "1.5.2" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.2.tgz#5a9d80e0165957e5ef0c1210678fc5c4acb9fb03" + dependencies: + debug "^3.1.0" + for-in@^1.0.1, for-in@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" @@ -3172,6 +3185,16 @@ he@1.1.x: version "1.1.1" resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" +history@^4.7.2: + version "4.7.2" + resolved "https://registry.yarnpkg.com/history/-/history-4.7.2.tgz#22b5c7f31633c5b8021c7f4a8a954ac139ee8d5b" + dependencies: + invariant "^2.2.1" + loose-envify "^1.2.0" + resolve-pathname "^2.2.0" + value-equal "^0.4.0" + warning "^3.0.0" + hmac-drbg@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" @@ -3188,6 +3211,10 @@ hoek@4.x.x: version "4.2.1" resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.1.tgz#9634502aa12c445dd5a7c5734b572bb8738aacbb" +hoist-non-react-statics@^2.5.0: + version "2.5.5" + resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz#c5903cf409c0dfd908f388e619d86b9c1174cb47" + home-or-tmp@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" @@ -3427,7 +3454,7 @@ interpret@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614" -invariant@^2.2.2: +invariant@^2.2.1, invariant@^2.2.2, invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" dependencies: @@ -4042,6 +4069,10 @@ js-tokens@^3.0.0, js-tokens@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" +"js-tokens@^3.0.0 || ^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + js-yaml@^3.4.3, js-yaml@^3.7.0, js-yaml@^3.9.1: version "3.11.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.11.0.tgz#597c1a8bd57152f26d622ce4117851a51f5ebaef" @@ -4323,6 +4354,12 @@ loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.3.1: dependencies: js-tokens "^3.0.0" +loose-envify@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + loud-rejection@^1.0.0: version "1.6.0" resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" @@ -4998,7 +5035,7 @@ path-to-regexp@0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" -path-to-regexp@^1.0.1: +path-to-regexp@^1.0.1, path-to-regexp@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.7.0.tgz#59fde0f435badacba103a84e9d3bc64e96b9937d" dependencies: @@ -5432,6 +5469,13 @@ prop-types@^15.5.10, prop-types@^15.6.0: loose-envify "^1.3.1" object-assign "^4.1.1" +prop-types@^15.6.1: + version "15.6.2" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.2.tgz#05d5ca77b4453e985d60fc7ff8c859094a497102" + dependencies: + loose-envify "^1.3.1" + object-assign "^4.1.1" + proxy-addr@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.3.tgz#355f262505a621646b3130a728eb647e22055341" @@ -5588,6 +5632,29 @@ react-error-overlay@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-4.0.0.tgz#d198408a85b4070937a98667f500c832f86bd5d4" +react-router-dom@^4.2.2: + version "4.3.1" + resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-4.3.1.tgz#4c2619fc24c4fa87c9fd18f4fb4a43fe63fbd5c6" + dependencies: + history "^4.7.2" + invariant "^2.2.4" + loose-envify "^1.3.1" + prop-types "^15.6.1" + react-router "^4.3.1" + warning "^4.0.1" + +react-router@^4.3.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/react-router/-/react-router-4.3.1.tgz#aada4aef14c809cb2e686b05cee4742234506c4e" + dependencies: + history "^4.7.2" + hoist-non-react-statics "^2.5.0" + invariant "^2.2.4" + loose-envify "^1.3.1" + path-to-regexp "^1.7.0" + prop-types "^15.6.1" + warning "^4.0.1" + react@^16.3.1: version "16.3.2" resolved "https://registry.yarnpkg.com/react/-/react-16.3.2.tgz#fdc8420398533a1e58872f59091b272ce2f91ea9" @@ -5882,6 +5949,10 @@ resolve-from@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" +resolve-pathname@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/resolve-pathname/-/resolve-pathname-2.2.0.tgz#7e9ae21ed815fd63ab189adeee64dc831eefa879" + resolve-url@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" @@ -6855,6 +6926,10 @@ validate-npm-package-license@^3.0.1: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" +value-equal@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/value-equal/-/value-equal-0.4.0.tgz#c5bdd2f54ee093c04839d71ce2e4758a6890abc7" + vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" @@ -6883,6 +6958,18 @@ walker@~1.0.5: dependencies: makeerror "1.0.x" +warning@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/warning/-/warning-3.0.0.tgz#32e5377cb572de4ab04753bdf8821c01ed605b7c" + dependencies: + loose-envify "^1.0.0" + +warning@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/warning/-/warning-4.0.1.tgz#66ce376b7fbfe8a887c22bdf0e7349d73d397745" + dependencies: + loose-envify "^1.0.0" + watch@~0.10.0: version "0.10.0" resolved "https://registry.yarnpkg.com/watch/-/watch-0.10.0.tgz#77798b2da0f9910d595f1ace5b0c2258521f21dc" diff --git a/shyftDb/postgres_test.go b/shyftDb/postgres_test.go index 7a652301a5..99f41a7e7a 100644 --- a/shyftDb/postgres_test.go +++ b/shyftDb/postgres_test.go @@ -22,13 +22,13 @@ func ClearTables() { fmt.Println(err) } - sqlStatementTx:= `DELETE FROM txs` + sqlStatementTx := `DELETE FROM txs` _, err = blockExplorerDbTest.Exec(sqlStatementTx) if err != nil { panic(err) } - sqlStatementAcc:= `DELETE FROM accounts` + sqlStatementAcc := `DELETE FROM accounts` _, err = blockExplorerDbTest.Exec(sqlStatementAcc) if err != nil { panic(err) @@ -39,4 +39,4 @@ func ClearTables() { if err != nil { panic(err) } -} \ No newline at end of file +} diff --git a/swarm/dev/Makefile b/swarm/dev/Makefile index 365964b7f5..8204baf765 100644 --- a/swarm/dev/Makefile +++ b/swarm/dev/Makefile @@ -3,12 +3,12 @@ default: build build: - go build -o bin/swarm github.com/ethereum/go-ethereum/cmd/swarm - go build -o bin/geth github.com/ethereum/go-ethereum/cmd/geth - go build -o bin/bootnode github.com/ethereum/go-ethereum/cmd/bootnode + go build -o bin/swarm github.com/empyrean/go-ethereum/cmd/swarm + go build -o bin/geth github.com/empyrean/go-ethereum/cmd/geth + go build -o bin/bootnode github.com/empyrean/go-ethereum/cmd/bootnode cluster: build scripts/boot-cluster.sh test: - go test -v github.com/ethereum/go-ethereum/swarm/... + go test -v github.com/empyrean/go-ethereum/swarm/... diff --git a/swarm/dev/bashrc b/swarm/dev/bashrc index efb504fa36..b3cb4f861a 100644 --- a/swarm/dev/bashrc +++ b/swarm/dev/bashrc @@ -1,4 +1,4 @@ -export ROOT="${GOPATH}/src/github.com/ethereum/go-ethereum" +export ROOT="${GOPATH}/src/github.com/empyrean/go-ethereum" export PATH="${ROOT}/swarm/dev/bin:${PATH}" cd "${ROOT}/swarm/dev" diff --git a/swarm/dev/run.sh b/swarm/dev/run.sh index 2ad600dedf..8a4810433f 100755 --- a/swarm/dev/run.sh +++ b/swarm/dev/run.sh @@ -80,7 +80,7 @@ run_image() { --rm \ --hostname "${name}" \ --name "${name}" \ - --volume "${ROOT}:/go/src/github.com/ethereum/go-ethereum" \ + --volume "${ROOT}:/go/src/github.com/empyrean/go-ethereum" \ --volume "/var/run/docker.sock:/var/run/docker.sock" \ ${docker_args} \ "${name}" \ diff --git a/vendor/vendor.json b/vendor/vendor.json index a4f0d50adf..8b102d0a04 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -794,5 +794,5 @@ "revisionTime": "2017-08-11T01:42:03Z" } ], - "rootPath": "github.com/ethereum/go-ethereum" + "rootPath": "github.com/ShyftNetwork/go-empyrean" } diff --git a/wait-for.sh b/wait-for.sh new file mode 100755 index 0000000000..9745286daf --- /dev/null +++ b/wait-for.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# https://github.com/eficode/wait-for.git +log() { + echo "[wait-for] [`date +'%Y%m%d%H%M%S'`] $@" +} + +usage() { + echo "Usage: `basename "$0"` [--timeout=15] : [:]" +} + +unknown_arg() { + log "[ERROR] unknown argument: '$@'" + usage + exit 2 +} + +wait_for() { + timeout=$1 && host=$2 && port=$3 + log "wait '$host':'$port' up to '$timeout'" + for i in `seq $timeout` ; do + if nc -z "$host" "$port" > /dev/null 2>&1 ; then + log "wait finish '$host:$port' [`expr $(date +%s) - $START`] seconds" + exit 0 + fi + log "wait attempt '${host}:${port}' [$i]" + sleep 1 + done + log "[ERROR] wait timeout of '$timeout' on '$host:$port'" + exit 1 +} + +trap 'kill $(jobs -p) &>/dev/null' EXIT + +START=$(date +%s) +timeout=30 +pids="" +for i in $@ ; do + case $i in + --timeout=*) timeout="${i#*=}" ;; + -t=*) timeout="${i#*=}" ;; + *:* ) + wait_for "$timeout" "${i%%:*}" "${i##*:}" & + pids="$pids $!" + ;; + *) unknown_arg "$i" ;; + esac +done + +status=0 +for pid in $pids; do + if ! wait $pid ; then + status=1 + fi +done + +log "wait done with status=$status" +exit $status