mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 14:46:42 +00:00
Modify geth to gubiq
This commit is contained in:
parent
e7d58c4cd8
commit
885de700ff
74 changed files with 400 additions and 400 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -25,7 +25,7 @@ build/_vendor/pkg
|
|||
# used by the Makefile
|
||||
/build/_workspace/
|
||||
/build/bin/
|
||||
/geth*.zip
|
||||
/gubiq*.zip
|
||||
|
||||
# travis
|
||||
profile.tmp
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ matrix:
|
|||
- gcc-multilib
|
||||
script:
|
||||
# Build for the primary platforms that Trusty can manage
|
||||
- go run build/ci.go debsrc -signer "Go Ethereum Linux Builder <geth-ci@ethereum.org>" -upload ppa:ethereum/ethereum
|
||||
- go run build/ci.go debsrc -signer "Go Ethereum Linux Builder <gubiq-ci@ethereum.org>" -upload ppa:ethereum/ethereum
|
||||
- go run build/ci.go install
|
||||
- go run build/ci.go archive -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds
|
||||
- go run build/ci.go install -arch 386
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@ FROM alpine:3.3
|
|||
ADD . /go-ethereum
|
||||
RUN \
|
||||
apk add --update git go make gcc musl-dev && \
|
||||
(cd go-ethereum && make geth) && \
|
||||
cp go-ethereum/build/bin/geth /geth && \
|
||||
(cd go-ethereum && make gubiq) && \
|
||||
cp go-ethereum/build/bin/gubiq /gubiq && \
|
||||
apk del git go make gcc musl-dev && \
|
||||
rm -rf /go-ethereum && rm -rf /var/cache/apk/*
|
||||
|
||||
EXPOSE 8588
|
||||
EXPOSE 30303
|
||||
|
||||
ENTRYPOINT ["/geth"]
|
||||
ENTRYPOINT ["/gubiq"]
|
||||
|
|
|
|||
122
Makefile
122
Makefile
|
|
@ -2,20 +2,20 @@
|
|||
# with Go source code. If you know what GOPATH is then you probably
|
||||
# don't need to bother with make.
|
||||
|
||||
.PHONY: geth geth-cross evm all test clean
|
||||
.PHONY: geth-linux geth-linux-386 geth-linux-amd64 geth-linux-mips64 geth-linux-mips64le
|
||||
.PHONY: geth-linux-arm geth-linux-arm-5 geth-linux-arm-6 geth-linux-arm-7 geth-linux-arm64
|
||||
.PHONY: geth-darwin geth-darwin-386 geth-darwin-amd64
|
||||
.PHONY: geth-windows geth-windows-386 geth-windows-amd64
|
||||
.PHONY: geth-android geth-ios
|
||||
.PHONY: gubiq gubiq-cross evm all test clean
|
||||
.PHONY: gubiq-linux gubiq-linux-386 gubiq-linux-amd64 gubiq-linux-mips64 gubiq-linux-mips64le
|
||||
.PHONY: gubiq-linux-arm gubiq-linux-arm-5 gubiq-linux-arm-6 gubiq-linux-arm-7 gubiq-linux-arm64
|
||||
.PHONY: gubiq-darwin gubiq-darwin-386 gubiq-darwin-amd64
|
||||
.PHONY: gubiq-windows gubiq-windows-386 gubiq-windows-amd64
|
||||
.PHONY: gubiq-android gubiq-ios
|
||||
|
||||
GOBIN = build/bin
|
||||
GO ?= latest
|
||||
|
||||
geth:
|
||||
build/env.sh go run build/ci.go install ./cmd/geth
|
||||
gubiq:
|
||||
build/env.sh go run build/ci.go install ./cmd/gubiq
|
||||
@echo "Done building."
|
||||
@echo "Run \"$(GOBIN)/geth\" to launch geth."
|
||||
@echo "Run \"$(GOBIN)/gubiq\" to launch gubiq."
|
||||
|
||||
evm:
|
||||
build/env.sh go run build/ci.go install ./cmd/evm
|
||||
|
|
@ -33,92 +33,92 @@ clean:
|
|||
|
||||
# Cross Compilation Targets (xgo)
|
||||
|
||||
geth-cross: geth-linux geth-darwin geth-windows geth-android geth-ios
|
||||
gubiq-cross: gubiq-linux gubiq-darwin gubiq-windows gubiq-android gubiq-ios
|
||||
@echo "Full cross compilation done:"
|
||||
@ls -ld $(GOBIN)/geth-*
|
||||
@ls -ld $(GOBIN)/gubiq-*
|
||||
|
||||
geth-linux: geth-linux-386 geth-linux-amd64 geth-linux-arm geth-linux-mips64 geth-linux-mips64le
|
||||
gubiq-linux: gubiq-linux-386 gubiq-linux-amd64 gubiq-linux-arm gubiq-linux-mips64 gubiq-linux-mips64le
|
||||
@echo "Linux cross compilation done:"
|
||||
@ls -ld $(GOBIN)/geth-linux-*
|
||||
@ls -ld $(GOBIN)/gubiq-linux-*
|
||||
|
||||
geth-linux-386:
|
||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --dest=$(GOBIN) --targets=linux/386 -v ./cmd/geth
|
||||
gubiq-linux-386:
|
||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --dest=$(GOBIN) --targets=linux/386 -v ./cmd/gubiq
|
||||
@echo "Linux 386 cross compilation done:"
|
||||
@ls -ld $(GOBIN)/geth-linux-* | grep 386
|
||||
@ls -ld $(GOBIN)/gubiq-linux-* | grep 386
|
||||
|
||||
geth-linux-amd64:
|
||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --dest=$(GOBIN) --targets=linux/amd64 -v ./cmd/geth
|
||||
gubiq-linux-amd64:
|
||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --dest=$(GOBIN) --targets=linux/amd64 -v ./cmd/gubiq
|
||||
@echo "Linux amd64 cross compilation done:"
|
||||
@ls -ld $(GOBIN)/geth-linux-* | grep amd64
|
||||
@ls -ld $(GOBIN)/gubiq-linux-* | grep amd64
|
||||
|
||||
geth-linux-arm: geth-linux-arm-5 geth-linux-arm-6 geth-linux-arm-7 geth-linux-arm64
|
||||
gubiq-linux-arm: gubiq-linux-arm-5 gubiq-linux-arm-6 gubiq-linux-arm-7 gubiq-linux-arm64
|
||||
@echo "Linux ARM cross compilation done:"
|
||||
@ls -ld $(GOBIN)/geth-linux-* | grep arm
|
||||
@ls -ld $(GOBIN)/gubiq-linux-* | grep arm
|
||||
|
||||
geth-linux-arm-5:
|
||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --dest=$(GOBIN) --targets=linux/arm-5 -v ./cmd/geth
|
||||
gubiq-linux-arm-5:
|
||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --dest=$(GOBIN) --targets=linux/arm-5 -v ./cmd/gubiq
|
||||
@echo "Linux ARMv5 cross compilation done:"
|
||||
@ls -ld $(GOBIN)/geth-linux-* | grep arm-5
|
||||
@ls -ld $(GOBIN)/gubiq-linux-* | grep arm-5
|
||||
|
||||
geth-linux-arm-6:
|
||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --dest=$(GOBIN) --targets=linux/arm-6 -v ./cmd/geth
|
||||
gubiq-linux-arm-6:
|
||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --dest=$(GOBIN) --targets=linux/arm-6 -v ./cmd/gubiq
|
||||
@echo "Linux ARMv6 cross compilation done:"
|
||||
@ls -ld $(GOBIN)/geth-linux-* | grep arm-6
|
||||
@ls -ld $(GOBIN)/gubiq-linux-* | grep arm-6
|
||||
|
||||
geth-linux-arm-7:
|
||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --dest=$(GOBIN) --targets=linux/arm-7 -v ./cmd/geth
|
||||
gubiq-linux-arm-7:
|
||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --dest=$(GOBIN) --targets=linux/arm-7 -v ./cmd/gubiq
|
||||
@echo "Linux ARMv7 cross compilation done:"
|
||||
@ls -ld $(GOBIN)/geth-linux-* | grep arm-7
|
||||
@ls -ld $(GOBIN)/gubiq-linux-* | grep arm-7
|
||||
|
||||
geth-linux-arm64:
|
||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --dest=$(GOBIN) --targets=linux/arm64 -v ./cmd/geth
|
||||
gubiq-linux-arm64:
|
||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --dest=$(GOBIN) --targets=linux/arm64 -v ./cmd/gubiq
|
||||
@echo "Linux ARM64 cross compilation done:"
|
||||
@ls -ld $(GOBIN)/geth-linux-* | grep arm64
|
||||
@ls -ld $(GOBIN)/gubiq-linux-* | grep arm64
|
||||
|
||||
geth-linux-mips64:
|
||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --dest=$(GOBIN) --targets=linux/mips64 -v ./cmd/geth
|
||||
gubiq-linux-mips64:
|
||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --dest=$(GOBIN) --targets=linux/mips64 -v ./cmd/gubiq
|
||||
@echo "Linux MIPS64 cross compilation done:"
|
||||
@ls -ld $(GOBIN)/geth-linux-* | grep mips64
|
||||
@ls -ld $(GOBIN)/gubiq-linux-* | grep mips64
|
||||
|
||||
geth-linux-mips64le:
|
||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --dest=$(GOBIN) --targets=linux/mips64le -v ./cmd/geth
|
||||
gubiq-linux-mips64le:
|
||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --dest=$(GOBIN) --targets=linux/mips64le -v ./cmd/gubiq
|
||||
@echo "Linux MIPS64le cross compilation done:"
|
||||
@ls -ld $(GOBIN)/geth-linux-* | grep mips64le
|
||||
@ls -ld $(GOBIN)/gubiq-linux-* | grep mips64le
|
||||
|
||||
geth-darwin: geth-darwin-386 geth-darwin-amd64
|
||||
gubiq-darwin: gubiq-darwin-386 gubiq-darwin-amd64
|
||||
@echo "Darwin cross compilation done:"
|
||||
@ls -ld $(GOBIN)/geth-darwin-*
|
||||
@ls -ld $(GOBIN)/gubiq-darwin-*
|
||||
|
||||
geth-darwin-386:
|
||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --dest=$(GOBIN) --targets=darwin/386 -v ./cmd/geth
|
||||
gubiq-darwin-386:
|
||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --dest=$(GOBIN) --targets=darwin/386 -v ./cmd/gubiq
|
||||
@echo "Darwin 386 cross compilation done:"
|
||||
@ls -ld $(GOBIN)/geth-darwin-* | grep 386
|
||||
@ls -ld $(GOBIN)/gubiq-darwin-* | grep 386
|
||||
|
||||
geth-darwin-amd64:
|
||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --dest=$(GOBIN) --targets=darwin/amd64 -v ./cmd/geth
|
||||
gubiq-darwin-amd64:
|
||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --dest=$(GOBIN) --targets=darwin/amd64 -v ./cmd/gubiq
|
||||
@echo "Darwin amd64 cross compilation done:"
|
||||
@ls -ld $(GOBIN)/geth-darwin-* | grep amd64
|
||||
@ls -ld $(GOBIN)/gubiq-darwin-* | grep amd64
|
||||
|
||||
geth-windows: geth-windows-386 geth-windows-amd64
|
||||
gubiq-windows: gubiq-windows-386 gubiq-windows-amd64
|
||||
@echo "Windows cross compilation done:"
|
||||
@ls -ld $(GOBIN)/geth-windows-*
|
||||
@ls -ld $(GOBIN)/gubiq-windows-*
|
||||
|
||||
geth-windows-386:
|
||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --dest=$(GOBIN) --targets=windows/386 -v ./cmd/geth
|
||||
gubiq-windows-386:
|
||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --dest=$(GOBIN) --targets=windows/386 -v ./cmd/gubiq
|
||||
@echo "Windows 386 cross compilation done:"
|
||||
@ls -ld $(GOBIN)/geth-windows-* | grep 386
|
||||
@ls -ld $(GOBIN)/gubiq-windows-* | grep 386
|
||||
|
||||
geth-windows-amd64:
|
||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --dest=$(GOBIN) --targets=windows/amd64 -v ./cmd/geth
|
||||
gubiq-windows-amd64:
|
||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --dest=$(GOBIN) --targets=windows/amd64 -v ./cmd/gubiq
|
||||
@echo "Windows amd64 cross compilation done:"
|
||||
@ls -ld $(GOBIN)/geth-windows-* | grep amd64
|
||||
@ls -ld $(GOBIN)/gubiq-windows-* | grep amd64
|
||||
|
||||
geth-android:
|
||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --dest=$(GOBIN) --targets=android-21/aar -v ./cmd/geth
|
||||
gubiq-android:
|
||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --dest=$(GOBIN) --targets=android-21/aar -v ./cmd/gubiq
|
||||
@echo "Android cross compilation done:"
|
||||
@ls -ld $(GOBIN)/geth-android-*
|
||||
@ls -ld $(GOBIN)/gubiq-android-*
|
||||
|
||||
geth-ios:
|
||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --dest=$(GOBIN) --targets=ios-7.0/framework -v ./cmd/geth
|
||||
gubiq-ios:
|
||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --dest=$(GOBIN) --targets=ios-7.0/framework -v ./cmd/gubiq
|
||||
@echo "iOS framework cross compilation done:"
|
||||
@ls -ld $(GOBIN)/geth-ios-*
|
||||
@ls -ld $(GOBIN)/gubiq-ios-*
|
||||
|
|
|
|||
62
README.md
62
README.md
|
|
@ -8,7 +8,7 @@ https://camo.githubusercontent.com/915b7be44ada53c290eb157634330494ebe3e30a/6874
|
|||
[](https://gitter.im/ethereum/go-ethereum?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||
|
||||
Automated builds are available for stable releases and the unstable master branch.
|
||||
Binary archives are published at https://geth.ethereum.org/downloads/.
|
||||
Binary archives are published at https://gubiq.ethereum.org/downloads/.
|
||||
|
||||
## Building the source
|
||||
|
||||
|
|
@ -16,11 +16,11 @@ For prerequisites and detailed build instructions please read the
|
|||
[Installation Instructions](https://github.com/ubiq/go-ubiq/wiki/Building-Ethereum)
|
||||
on the wiki.
|
||||
|
||||
Building geth requires both a Go and a C compiler.
|
||||
Building gubiq requires both a Go and a C compiler.
|
||||
You can install them using your favourite package manager.
|
||||
Once the dependencies are installed, run
|
||||
|
||||
make geth
|
||||
make gubiq
|
||||
|
||||
or, to build the full suite of utilities:
|
||||
|
||||
|
|
@ -32,23 +32,23 @@ The go-ethereum project comes with several wrappers/executables found in the `cm
|
|||
|
||||
| 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/ubiq/go-ubiq/wiki/Command-Line-Options) for command line options |
|
||||
| **`gubiq`** | 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. `gubiq --help` and the [CLI Wiki page](https://github.com/ubiq/go-ubiq/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/ubiq/go-ubiq/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. |
|
||||
| `disasm` | Bytecode disassembler to convert EVM (Ethereum Virtual Machine) bytecode into more user friendly assembly-like opcodes (e.g. `echo "6001" | disasm`). For details on the individual opcodes, please see pages 22-30 of the [Ethereum Yellow Paper](http://gavwood.com/paper.pdf). |
|
||||
| `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 insolated, 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. |
|
||||
| `gubiqrpctest` | 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`). |
|
||||
| `bzzd` | swarm daemon. This is the entrypoint for the swarm network. `bzzd --help` for command line options. See http://swarm-guide.readthedocs.io for swarm documentation. |
|
||||
| `bzzup` | swarm command line file uploader. `bzzup --help` for command line options |
|
||||
| `bzzhash` | command to calculate the swarm hash of a file or directory. `bzzhash --help` for command line options |
|
||||
|
||||
## Running geth
|
||||
## Running gubiq
|
||||
|
||||
Going through all the possible command line flags is out of scope here (please consult our
|
||||
[CLI Wiki page](https://github.com/ubiq/go-ubiq/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.
|
||||
own Gubiq instance.
|
||||
|
||||
### Full node on the main Ethereum network
|
||||
|
||||
|
|
@ -58,21 +58,21 @@ the user doesn't care about years-old historical data, so we can fast-sync quick
|
|||
state of the network. To do so:
|
||||
|
||||
```
|
||||
$ geth --fast --cache=512 console
|
||||
$ gubiq --fast --cache=512 console
|
||||
```
|
||||
|
||||
This command will:
|
||||
|
||||
* Start geth in fast sync mode (`--fast`), causing it to download more data in exchange for avoiding
|
||||
* Start gubiq in fast sync mode (`--fast`), causing it to download more data in exchange for avoiding
|
||||
processing the entire history of the Ethereum network, which is very CPU intensive.
|
||||
* Bump the memory allowance of the database to 512MB (`--cache=512`), which can help significantly in
|
||||
sync times especially for HDD users. This flag is optional and you can set it as high or as low as
|
||||
you'd like, though we'd recommend the 512MB - 2GB range.
|
||||
* Start up Geth's built-in interactive [JavaScript console](https://github.com/ubiq/go-ubiq/wiki/JavaScript-Console),
|
||||
* Start up Gubiq's built-in interactive [JavaScript console](https://github.com/ubiq/go-ubiq/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/ubiq/go-ubiq/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`.
|
||||
as well as Gubiq's own [management APIs](https://github.com/ubiq/go-ubiq/wiki/Management-APIs).
|
||||
This too is optional and if you leave it out you can always attach to an already running Gubiq instance
|
||||
with `gubiq --attach`.
|
||||
|
||||
### Full node on the Ethereum test network
|
||||
|
||||
|
|
@ -82,23 +82,23 @@ entire system. In other words, instead of attaching to the main network, you wan
|
|||
network with your node, which is fully equivalent to the main network, but with play-Ether only.
|
||||
|
||||
```
|
||||
$ geth --testnet --fast --cache=512 console
|
||||
$ gubiq --testnet --fast --cache=512 console
|
||||
```
|
||||
|
||||
The `--fast`, `--cache` flags and `console` subcommand have the exact same meaning as above and they
|
||||
are equially useful on the 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:
|
||||
Specifying the `--testnet` flag however will reconfigure your Gubiq instance a bit:
|
||||
|
||||
* Instead of using the default data directory (`~/.ethereum` on Linux for example), Geth will nest
|
||||
* Instead of using the default data directory (`~/.ethereum` on Linux for example), Gubiq will nest
|
||||
itself one level deeper into a `testnet` subfolder (`~/.ethereum/testnet` on Linux).
|
||||
* 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
|
||||
over between the main network and test network (different starting nonces), you should make sure to
|
||||
always use separate accounts for play-money and real-money. Unless you manually move accounts, Geth
|
||||
always use separate accounts for play-money and real-money. Unless you manually move accounts, Gubiq
|
||||
will by default correctly separate the two networks and will not make any accounts available between
|
||||
them.*
|
||||
|
||||
|
|
@ -112,17 +112,17 @@ docker run -d --name ethereum-node -v /Users/alice/ethereum:/root \
|
|||
ethereum/client-go --fast --cache=512
|
||||
```
|
||||
|
||||
This will start geth in fast sync mode with a DB memory allowance of 512MB 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 gubiq in fast sync mode with a DB memory allowance of 512MB 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.
|
||||
|
||||
### Programatically interfacing Geth nodes
|
||||
### Programatically interfacing Gubiq nodes
|
||||
|
||||
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
|
||||
As a developer, sooner rather than later you'll want to start interacting with Gubiq and the Ethereum
|
||||
network via your own programs and not manually through the console. To aid this, Gubiq 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/ubiq/go-ubiq/wiki/Management-APIs)). These can be
|
||||
[Gubiq specific APIs](https://github.com/ubiq/go-ubiq/wiki/Management-APIs)). These can be
|
||||
exposed via HTTP, WebSockets and IPC (unix sockets on unix based platroms, and named pipes on Windows).
|
||||
|
||||
The IPC interface is enabled by default and exposes all the APIs supported by Geth, whereas the HTTP
|
||||
The IPC interface is enabled by default and exposes all the APIs supported by Gubiq, whereas the HTTP
|
||||
and WS interfaces need to manually be enabled and only expose a subset of APIs due to security reasons.
|
||||
These can be turned on/off and configured as you'd expect.
|
||||
|
||||
|
|
@ -143,7 +143,7 @@ HTTP based JSON-RPC API options:
|
|||
* `--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)
|
||||
via HTTP, WS or IPC to a Gubiq node configured with the above flags and you'll need to speak [JSON-RPC](http://www.jsonrpc.org/specification)
|
||||
on all transports. You can reuse the same connection for multiple requests!
|
||||
|
||||
**Note: Please understand the security implications of opening up an HTTP/WS based transport before
|
||||
|
|
@ -187,11 +187,11 @@ configs:
|
|||
}
|
||||
```
|
||||
|
||||
With the genesis state defined in the above JSON file, you'll need to initialize **every** Geth node
|
||||
With the genesis state defined in the above JSON file, you'll need to initialize **every** Gubiq node
|
||||
with it prior to starting it up to ensure all blockchain parameters are correctly set:
|
||||
|
||||
```
|
||||
$ geth init path/to/genesis.json
|
||||
$ gubiq init path/to/genesis.json
|
||||
```
|
||||
|
||||
#### Creating the rendezvous point
|
||||
|
|
@ -210,17 +210,17 @@ 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 Gubiq node as a bootnode, but it's the less recommended way.*
|
||||
|
||||
#### Starting up your member nodes
|
||||
|
||||
With the bootnode operational and externally reachable (you can try `telnet <ip> <port>` to ensure
|
||||
it's indeed reachable), start every subsequent Geth node pointed to the bootnode for peer discovery
|
||||
it's indeed reachable), start every subsequent Gubiq node pointed to the bootnode for peer discovery
|
||||
via the `--bootnodes` flag. It will probably also be desirable to keep the data directory of your
|
||||
private network separated, so do also specify a custom `--datadir` flag.
|
||||
|
||||
```
|
||||
$ geth --datadir=path/to/custom/data/folder --bootnodes=<bootnode-enode-url-from-above>
|
||||
$ gubiq --datadir=path/to/custom/data/folder --bootnodes=<bootnode-enode-url-from-above>
|
||||
```
|
||||
|
||||
*Note: Since your network will be completely cut off from the main and test networks, you'll also
|
||||
|
|
@ -235,11 +235,11 @@ repository.
|
|||
|
||||
In a private network setting however, a single CPU miner instance is more than enough for practical
|
||||
purposes as it can produce a stable stream of blocks at the correct intervals without needing heavy
|
||||
resources (consider running on a single thread, no need for multiple ones either). To start a Geth
|
||||
resources (consider running on a single thread, no need for multiple ones either). To start a Gubiq
|
||||
instance for mining, run it with all your usual flags, extended by:
|
||||
|
||||
```
|
||||
$ geth <usual-flags> --mine --minerthreads=1 --etherbase=0x0000000000000000000000000000000000000000
|
||||
$ gubiq <usual-flags> --mine --minerthreads=1 --etherbase=0x0000000000000000000000000000000000000000
|
||||
```
|
||||
|
||||
Which will start mining bocks and transactions on a single CPU thread, crediting all proceedings to
|
||||
|
|
|
|||
|
|
@ -274,8 +274,8 @@ const tmplSourceJava = `
|
|||
|
||||
package {{.Package}};
|
||||
|
||||
import org.ethereum.geth.*;
|
||||
import org.ethereum.geth.internal.*;
|
||||
import org.ethereum.gubiq.*;
|
||||
import org.ethereum.gubiq.internal.*;
|
||||
|
||||
{{range $contract := .Contracts}}
|
||||
public class {{.Type}} {
|
||||
|
|
@ -288,11 +288,11 @@ import org.ethereum.geth.internal.*;
|
|||
|
||||
// deploy deploys a new Ethereum contract, binding an instance of {{.Type}} to it.
|
||||
public static {{.Type}} deploy(TransactOpts auth, EthereumClient client{{range .Constructor.Inputs}}, {{bindtype .Type}} {{.Name}}{{end}}) throws Exception {
|
||||
Interfaces args = Geth.newInterfaces({{(len .Constructor.Inputs)}});
|
||||
Interfaces args = Gubiq.newInterfaces({{(len .Constructor.Inputs)}});
|
||||
{{range $index, $element := .Constructor.Inputs}}
|
||||
args.set({{$index}}, Geth.newInterface()); args.get({{$index}}).set{{namedtype (bindtype .Type) .Type}}({{.Name}});
|
||||
args.set({{$index}}, Gubiq.newInterface()); args.get({{$index}}).set{{namedtype (bindtype .Type) .Type}}({{.Name}});
|
||||
{{end}}
|
||||
return new {{.Type}}(Geth.deployContract(auth, ABI, BYTECODE, client, args));
|
||||
return new {{.Type}}(Gubiq.deployContract(auth, ABI, BYTECODE, client, args));
|
||||
}
|
||||
|
||||
// Internal constructor used by contract deployment.
|
||||
|
|
@ -314,7 +314,7 @@ import org.ethereum.geth.internal.*;
|
|||
|
||||
// Creates a new instance of {{.Type}}, bound to a specific deployed contract.
|
||||
public {{.Type}}(Address address, EthereumClient client) throws Exception {
|
||||
this(Geth.bindContract(address, ABI, client));
|
||||
this(Gubiq.bindContract(address, ABI, client));
|
||||
}
|
||||
|
||||
{{range .Calls}}
|
||||
|
|
@ -330,16 +330,16 @@ import org.ethereum.geth.internal.*;
|
|||
//
|
||||
// Solidity: {{.Original.String}}
|
||||
public {{if gt (len .Normalized.Outputs) 1}}{{capitalise .Normalized.Name}}Results{{else}}{{range .Normalized.Outputs}}{{bindtype .Type}}{{end}}{{end}} {{.Normalized.Name}}(CallOpts opts{{range .Normalized.Inputs}}, {{bindtype .Type}} {{.Name}}{{end}}) throws Exception {
|
||||
Interfaces args = Geth.newInterfaces({{(len .Normalized.Inputs)}});
|
||||
{{range $index, $item := .Normalized.Inputs}}args.set({{$index}}, Geth.newInterface()); args.get({{$index}}).set{{namedtype (bindtype .Type) .Type}}({{.Name}});
|
||||
Interfaces args = Gubiq.newInterfaces({{(len .Normalized.Inputs)}});
|
||||
{{range $index, $item := .Normalized.Inputs}}args.set({{$index}}, Gubiq.newInterface()); args.get({{$index}}).set{{namedtype (bindtype .Type) .Type}}({{.Name}});
|
||||
{{end}}
|
||||
|
||||
Interfaces results = Geth.newInterfaces({{(len .Normalized.Outputs)}});
|
||||
{{range $index, $item := .Normalized.Outputs}}Interface result{{$index}} = Geth.newInterface(); result{{$index}}.setDefault{{namedtype (bindtype .Type) .Type}}(); results.set({{$index}}, result{{$index}});
|
||||
Interfaces results = Gubiq.newInterfaces({{(len .Normalized.Outputs)}});
|
||||
{{range $index, $item := .Normalized.Outputs}}Interface result{{$index}} = Gubiq.newInterface(); result{{$index}}.setDefault{{namedtype (bindtype .Type) .Type}}(); results.set({{$index}}, result{{$index}});
|
||||
{{end}}
|
||||
|
||||
if (opts == null) {
|
||||
opts = Geth.newCallOpts();
|
||||
opts = Gubiq.newCallOpts();
|
||||
}
|
||||
this.Contract.call(opts, results, "{{.Original.Name}}", args);
|
||||
{{if gt (len .Normalized.Outputs) 1}}
|
||||
|
|
@ -357,8 +357,8 @@ import org.ethereum.geth.internal.*;
|
|||
//
|
||||
// Solidity: {{.Original.String}}
|
||||
public Transaction {{.Normalized.Name}}(TransactOpts opts{{range .Normalized.Inputs}}, {{bindtype .Type}} {{.Name}}{{end}}) throws Exception {
|
||||
Interfaces args = Geth.newInterfaces({{(len .Normalized.Inputs)}});
|
||||
{{range $index, $item := .Normalized.Inputs}}args.set({{$index}}, Geth.newInterface()); args.get({{$index}}).set{{namedtype (bindtype .Type) .Type}}({{.Name}});
|
||||
Interfaces args = Gubiq.newInterfaces({{(len .Normalized.Inputs)}});
|
||||
{{range $index, $item := .Normalized.Inputs}}args.set({{$index}}, Gubiq.newInterface()); args.get({{$index}}).set{{namedtype (bindtype .Type) .Type}}({{.Name}});
|
||||
{{end}}
|
||||
|
||||
return this.Contract.transact(opts, "{{.Original.Name}}" , args);
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ import (
|
|||
)
|
||||
|
||||
func tmpKeyStore(t *testing.T, encrypted bool) (dir string, ks keyStore) {
|
||||
d, err := ioutil.TempDir("", "geth-keystore-test")
|
||||
d, err := ioutil.TempDir("", "gubiq-keystore-test")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@ build_script:
|
|||
- go run build\ci.go install -arch %GETH_ARCH%
|
||||
|
||||
after_build:
|
||||
- go run build\ci.go archive -arch %GETH_ARCH% -type zip -signer WINDOWS_SIGNING_KEY -upload gethstore/builds
|
||||
- go run build\ci.go nsis -arch %GETH_ARCH% -signer WINDOWS_SIGNING_KEY -upload gethstore/builds
|
||||
- go run build\ci.go archive -arch %GETH_ARCH% -type zip -signer WINDOWS_SIGNING_KEY -upload gubiqstore/builds
|
||||
- go run build\ci.go nsis -arch %GETH_ARCH% -signer WINDOWS_SIGNING_KEY -upload gubiqstore/builds
|
||||
|
||||
test_script:
|
||||
- set GOARCH=%GETH_ARCH%
|
||||
|
|
|
|||
|
|
@ -61,4 +61,4 @@ Then go into the source package directory for your running distribution and buil
|
|||
Built packages are placed in the dist/ directory.
|
||||
|
||||
$ cd ..
|
||||
$ dpkg-deb -c geth-unstable_1.5.0+xenial_amd64.deb
|
||||
$ dpkg-deb -c gubiq-unstable_1.5.0+xenial_amd64.deb
|
||||
|
|
|
|||
56
build/ci.go
56
build/ci.go
|
|
@ -60,25 +60,25 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
// Files that end up in the geth*.zip archive.
|
||||
gethArchiveFiles = []string{
|
||||
// Files that end up in the gubiq*.zip archive.
|
||||
gubiqArchiveFiles = []string{
|
||||
"COPYING",
|
||||
executablePath("geth"),
|
||||
executablePath("gubiq"),
|
||||
}
|
||||
|
||||
// Files that end up in the geth-alltools*.zip archive.
|
||||
// Files that end up in the gubiq-alltools*.zip archive.
|
||||
allToolsArchiveFiles = []string{
|
||||
"COPYING",
|
||||
executablePath("abigen"),
|
||||
executablePath("evm"),
|
||||
executablePath("geth"),
|
||||
executablePath("gubiq"),
|
||||
executablePath("rlpdump"),
|
||||
}
|
||||
|
||||
// A debian package is created for all executables listed here.
|
||||
debExecutables = []debExecutable{
|
||||
{
|
||||
Name: "geth",
|
||||
Name: "gubiq",
|
||||
Description: "Ethereum CLI client.",
|
||||
},
|
||||
{
|
||||
|
|
@ -301,7 +301,7 @@ func doArchive(cmdline []string) {
|
|||
arch = flag.String("arch", runtime.GOARCH, "Architecture cross packaging")
|
||||
atype = flag.String("type", "zip", "Type of archive to write (zip|tar)")
|
||||
signer = flag.String("signer", "", `Environment variable holding the signing key (e.g. LINUX_SIGNING_KEY)`)
|
||||
upload = flag.String("upload", "", `Destination to upload the archives (usually "gethstore/builds")`)
|
||||
upload = flag.String("upload", "", `Destination to upload the archives (usually "gubiqstore/builds")`)
|
||||
ext string
|
||||
)
|
||||
flag.CommandLine.Parse(cmdline)
|
||||
|
|
@ -317,17 +317,17 @@ func doArchive(cmdline []string) {
|
|||
var (
|
||||
env = build.Env()
|
||||
base = archiveBasename(*arch, env)
|
||||
geth = "geth-" + base + ext
|
||||
alltools = "geth-alltools-" + base + ext
|
||||
gubiq = "gubiq-" + base + ext
|
||||
alltools = "gubiq-alltools-" + base + ext
|
||||
)
|
||||
maybeSkipArchive(env)
|
||||
if err := build.WriteArchive(geth, gethArchiveFiles); err != nil {
|
||||
if err := build.WriteArchive(gubiq, gubiqArchiveFiles); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
if err := build.WriteArchive(alltools, allToolsArchiveFiles); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
for _, archive := range []string{geth, alltools} {
|
||||
for _, archive := range []string{gubiq, alltools} {
|
||||
if err := archiveUpload(archive, *upload, *signer); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
|
@ -450,7 +450,7 @@ func makeWorkdir(wdflag string) string {
|
|||
if wdflag != "" {
|
||||
err = os.MkdirAll(wdflag, 0744)
|
||||
} else {
|
||||
wdflag, err = ioutil.TempDir("", "geth-build-")
|
||||
wdflag, err = ioutil.TempDir("", "gubiq-build-")
|
||||
}
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
|
@ -587,7 +587,7 @@ func doWindowsInstaller(cmdline []string) {
|
|||
var (
|
||||
arch = flag.String("arch", runtime.GOARCH, "Architecture for cross build packaging")
|
||||
signer = flag.String("signer", "", `Environment variable holding the signing key (e.g. WINDOWS_SIGNING_KEY)`)
|
||||
upload = flag.String("upload", "", `Destination to upload the archives (usually "gethstore/builds")`)
|
||||
upload = flag.String("upload", "", `Destination to upload the archives (usually "gubiqstore/builds")`)
|
||||
workdir = flag.String("workdir", "", `Output directory for packages (uses temp dir if unset)`)
|
||||
)
|
||||
flag.CommandLine.Parse(cmdline)
|
||||
|
|
@ -599,28 +599,28 @@ func doWindowsInstaller(cmdline []string) {
|
|||
var (
|
||||
devTools []string
|
||||
allTools []string
|
||||
gethTool string
|
||||
gubiqTool string
|
||||
)
|
||||
for _, file := range allToolsArchiveFiles {
|
||||
if file == "COPYING" { // license, copied later
|
||||
continue
|
||||
}
|
||||
allTools = append(allTools, filepath.Base(file))
|
||||
if filepath.Base(file) == "geth.exe" {
|
||||
gethTool = file
|
||||
if filepath.Base(file) == "gubiq.exe" {
|
||||
gubiqTool = file
|
||||
} else {
|
||||
devTools = append(devTools, file)
|
||||
}
|
||||
}
|
||||
|
||||
// Render NSIS scripts: Installer NSIS contains two installer sections,
|
||||
// first section contains the geth binary, second section holds the dev tools.
|
||||
// first section contains the gubiq binary, second section holds the dev tools.
|
||||
templateData := map[string]interface{}{
|
||||
"License": "COPYING",
|
||||
"Geth": gethTool,
|
||||
"Gubiq": gubiqTool,
|
||||
"DevTools": devTools,
|
||||
}
|
||||
build.Render("build/nsis.geth.nsi", filepath.Join(*workdir, "geth.nsi"), 0644, nil)
|
||||
build.Render("build/nsis.gubiq.nsi", filepath.Join(*workdir, "gubiq.nsi"), 0644, nil)
|
||||
build.Render("build/nsis.install.nsh", filepath.Join(*workdir, "install.nsh"), 0644, templateData)
|
||||
build.Render("build/nsis.uninstall.nsh", filepath.Join(*workdir, "uninstall.nsh"), 0644, allTools)
|
||||
build.Render("build/nsis.envvarupdate.nsh", filepath.Join(*workdir, "EnvVarUpdate.nsh"), 0644, nil)
|
||||
|
|
@ -634,14 +634,14 @@ func doWindowsInstaller(cmdline []string) {
|
|||
if env.Commit != "" {
|
||||
version[2] += "-" + env.Commit[:8]
|
||||
}
|
||||
installer, _ := filepath.Abs("geth-" + archiveBasename(*arch, env) + ".exe")
|
||||
installer, _ := filepath.Abs("gubiq-" + archiveBasename(*arch, env) + ".exe")
|
||||
build.MustRunCommand("makensis.exe",
|
||||
"/DOUTPUTFILE="+installer,
|
||||
"/DMAJORVERSION="+version[0],
|
||||
"/DMINORVERSION="+version[1],
|
||||
"/DBUILDVERSION="+version[2],
|
||||
"/DARCH="+*arch,
|
||||
filepath.Join(*workdir, "geth.nsi"),
|
||||
filepath.Join(*workdir, "gubiq.nsi"),
|
||||
)
|
||||
|
||||
// Sign and publish installer.
|
||||
|
|
@ -656,7 +656,7 @@ func doAndroidArchive(cmdline []string) {
|
|||
var (
|
||||
signer = flag.String("signer", "", `Environment variable holding the signing key (e.g. ANDROID_SIGNING_KEY)`)
|
||||
deploy = flag.String("deploy", "", `Destination to deploy the archive (usually "https://oss.sonatype.org")`)
|
||||
upload = flag.String("upload", "", `Destination to upload the archive (usually "gethstore/builds")`)
|
||||
upload = flag.String("upload", "", `Destination to upload the archive (usually "gubiqstore/builds")`)
|
||||
)
|
||||
flag.CommandLine.Parse(cmdline)
|
||||
env := build.Env()
|
||||
|
|
@ -673,8 +673,8 @@ func doAndroidArchive(cmdline []string) {
|
|||
maybeSkipArchive(env)
|
||||
|
||||
// Sign and upload the archive to Azure
|
||||
archive := "geth-" + archiveBasename("android", env) + ".aar"
|
||||
os.Rename("geth.aar", archive)
|
||||
archive := "gubiq-" + archiveBasename("android", env) + ".aar"
|
||||
os.Rename("gubiq.aar", archive)
|
||||
|
||||
if err := archiveUpload(archive, *upload, *signer); err != nil {
|
||||
log.Fatal(err)
|
||||
|
|
@ -758,7 +758,7 @@ func newMavenMetadata(env build.Environment) mavenMetadata {
|
|||
}
|
||||
return mavenMetadata{
|
||||
Version: version,
|
||||
Package: "geth-" + version,
|
||||
Package: "gubiq-" + version,
|
||||
Develop: isUnstableBuild(env),
|
||||
Contributors: contribs,
|
||||
}
|
||||
|
|
@ -770,7 +770,7 @@ func doXCodeFramework(cmdline []string) {
|
|||
var (
|
||||
signer = flag.String("signer", "", `Environment variable holding the signing key (e.g. IOS_SIGNING_KEY)`)
|
||||
deploy = flag.String("deploy", "", `Destination to deploy the archive (usually "trunk")`)
|
||||
upload = flag.String("upload", "", `Destination to upload the archives (usually "gethstore/builds")`)
|
||||
upload = flag.String("upload", "", `Destination to upload the archives (usually "gubiqstore/builds")`)
|
||||
)
|
||||
flag.CommandLine.Parse(cmdline)
|
||||
env := build.Env()
|
||||
|
|
@ -778,7 +778,7 @@ func doXCodeFramework(cmdline []string) {
|
|||
// Build the iOS XCode framework
|
||||
build.MustRun(goTool("get", "golang.org/x/mobile/cmd/gomobile"))
|
||||
|
||||
archive := "geth-" + archiveBasename("ios", env)
|
||||
archive := "gubiq-" + archiveBasename("ios", env)
|
||||
if err := os.Mkdir(archive, os.ModePerm); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
|
@ -835,7 +835,7 @@ func newPodMetadata(env build.Environment) podMetadata {
|
|||
}
|
||||
}
|
||||
}
|
||||
name := "Geth"
|
||||
name := "Gubiq"
|
||||
if isUnstableBuild(env) {
|
||||
name += "Develop"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ Vcs-Browser: https://github.com/ubiq/go-ubiq
|
|||
Package: {{.Name}}
|
||||
Architecture: any
|
||||
Depends: ${misc:Depends}, {{.ExeList}}
|
||||
Description: Meta-package to install geth and other tools
|
||||
Meta-package to install geth and other tools
|
||||
Description: Meta-package to install gubiq and other tools
|
||||
Meta-package to install gubiq and other tools
|
||||
|
||||
{{range .Executables}}
|
||||
Package: {{$.ExeName .}}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>org.ethereum</groupId>
|
||||
<artifactId>geth</artifactId>
|
||||
<artifactId>gubiq</artifactId>
|
||||
<version>{{.Version}}</version>
|
||||
<packaging>aar</packaging>
|
||||
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@
|
|||
# - BUILDVERSION, build id version
|
||||
#
|
||||
# The created installer executes the following steps:
|
||||
# 1. install geth for all users
|
||||
# 1. install gubiq for all users
|
||||
# 2. install optional development tools such as abigen
|
||||
# 3. create an uninstaller
|
||||
# 4. configures the Windows firewall for geth
|
||||
# 5. create geth, attach and uninstall start menu entries
|
||||
# 4. configures the Windows firewall for gubiq
|
||||
# 5. create gubiq, attach and uninstall start menu entries
|
||||
# 6. configures the registry that allows Windows to manage the package through its platform tools
|
||||
# 7. adds the environment system wide variable ETHEREUM_SOCKET
|
||||
# 8. adds the install directory to %PATH%
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
CRCCheck on
|
||||
|
||||
!define GROUPNAME "Ethereum"
|
||||
!define APPNAME "Geth"
|
||||
!define APPNAME "Gubiq"
|
||||
!define DESCRIPTION "Official Go implementation of the Ethereum protocol"
|
||||
!addplugindir .\
|
||||
|
||||
|
|
@ -50,7 +50,7 @@ ${EndIf}
|
|||
!macroend
|
||||
|
||||
function .onInit
|
||||
# make vars are global for all users since geth is installed global
|
||||
# make vars are global for all users since gubiq is installed global
|
||||
setShellVarContext all
|
||||
!insertmacro VerifyUserIsAdmin
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
Name "geth ${MAJORVERSION}.${MINORVERSION}.${BUILDVERSION}" # VERSION variables set through command line arguments
|
||||
Name "gubiq ${MAJORVERSION}.${MINORVERSION}.${BUILDVERSION}" # VERSION variables set through command line arguments
|
||||
InstallDir "$InstDir"
|
||||
OutFile "${OUTPUTFILE}" # set through command line arguments
|
||||
|
||||
|
|
@ -12,32 +12,32 @@ PageEx license
|
|||
LicenseData {{.License}}
|
||||
PageExEnd
|
||||
|
||||
# Install geth binary
|
||||
Section "Geth" GETH_IDX
|
||||
# Install gubiq binary
|
||||
Section "Gubiq" GETH_IDX
|
||||
SetOutPath $INSTDIR
|
||||
file {{.Geth}}
|
||||
file {{.Gubiq}}
|
||||
|
||||
# Create start menu launcher
|
||||
createDirectory "$SMPROGRAMS\${APPNAME}"
|
||||
createShortCut "$SMPROGRAMS\${APPNAME}\${APPNAME}.lnk" "$INSTDIR\geth.exe" "--fast" "--cache=512"
|
||||
createShortCut "$SMPROGRAMS\${APPNAME}\Attach.lnk" "$INSTDIR\geth.exe" "attach" "" ""
|
||||
createShortCut "$SMPROGRAMS\${APPNAME}\${APPNAME}.lnk" "$INSTDIR\gubiq.exe" "--fast" "--cache=512"
|
||||
createShortCut "$SMPROGRAMS\${APPNAME}\Attach.lnk" "$INSTDIR\gubiq.exe" "attach" "" ""
|
||||
createShortCut "$SMPROGRAMS\${APPNAME}\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "" ""
|
||||
|
||||
# Firewall - remove rules (if exists)
|
||||
SimpleFC::AdvRemoveRule "Geth incoming peers (TCP:30303)"
|
||||
SimpleFC::AdvRemoveRule "Geth outgoing peers (TCP:30303)"
|
||||
SimpleFC::AdvRemoveRule "Geth UDP discovery (UDP:30303)"
|
||||
SimpleFC::AdvRemoveRule "Gubiq incoming peers (TCP:30303)"
|
||||
SimpleFC::AdvRemoveRule "Gubiq outgoing peers (TCP:30303)"
|
||||
SimpleFC::AdvRemoveRule "Gubiq UDP discovery (UDP:30303)"
|
||||
|
||||
# Firewall - add rules
|
||||
SimpleFC::AdvAddRule "Geth incoming peers (TCP:30303)" "" 6 1 1 2147483647 1 "$INSTDIR\geth.exe" "" "" "Ethereum" 30303 "" "" ""
|
||||
SimpleFC::AdvAddRule "Geth outgoing peers (TCP:30303)" "" 6 2 1 2147483647 1 "$INSTDIR\geth.exe" "" "" "Ethereum" "" 30303 "" ""
|
||||
SimpleFC::AdvAddRule "Geth UDP discovery (UDP:30303)" "" 17 2 1 2147483647 1 "$INSTDIR\geth.exe" "" "" "Ethereum" "" 30303 "" ""
|
||||
SimpleFC::AdvAddRule "Gubiq incoming peers (TCP:30303)" "" 6 1 1 2147483647 1 "$INSTDIR\gubiq.exe" "" "" "Ethereum" 30303 "" "" ""
|
||||
SimpleFC::AdvAddRule "Gubiq outgoing peers (TCP:30303)" "" 6 2 1 2147483647 1 "$INSTDIR\gubiq.exe" "" "" "Ethereum" "" 30303 "" ""
|
||||
SimpleFC::AdvAddRule "Gubiq UDP discovery (UDP:30303)" "" 17 2 1 2147483647 1 "$INSTDIR\gubiq.exe" "" "" "Ethereum" "" 30303 "" ""
|
||||
|
||||
# Set default IPC endpoint (https://github.com/ethereum/EIPs/issues/147)
|
||||
${EnvVarUpdate} $0 "ETHEREUM_SOCKET" "R" "HKLM" "\\.\pipe\gubiq.ipc"
|
||||
${EnvVarUpdate} $0 "ETHEREUM_SOCKET" "A" "HKLM" "\\.\pipe\gubiq.ipc"
|
||||
|
||||
# Add geth to PATH
|
||||
# Add gubiq to PATH
|
||||
${EnvVarUpdate} $0 "PATH" "A" "HKLM" $INSTDIR
|
||||
SectionEnd
|
||||
|
||||
|
|
|
|||
|
|
@ -17,9 +17,9 @@ Section "Uninstall"
|
|||
rmDir "$SMPROGRAMS\${APPNAME}"
|
||||
|
||||
# Firewall - remove rules if exists
|
||||
SimpleFC::AdvRemoveRule "Geth incoming peers (TCP:30303)"
|
||||
SimpleFC::AdvRemoveRule "Geth outgoing peers (TCP:30303)"
|
||||
SimpleFC::AdvRemoveRule "Geth UDP discovery (UDP:30303)"
|
||||
SimpleFC::AdvRemoveRule "Gubiq incoming peers (TCP:30303)"
|
||||
SimpleFC::AdvRemoveRule "Gubiq outgoing peers (TCP:30303)"
|
||||
SimpleFC::AdvRemoveRule "Gubiq UDP discovery (UDP:30303)"
|
||||
|
||||
# Remove IPC endpoint (https://github.com/ethereum/EIPs/issues/147)
|
||||
${un.EnvVarUpdate} $0 "ETHEREUM_SOCKET" "R" "HKLM" "\\.\pipe\gubiq.ipc"
|
||||
|
|
|
|||
|
|
@ -11,12 +11,12 @@ Pod::Spec.new do |spec|
|
|||
|
||||
spec.platform = :ios
|
||||
spec.ios.deployment_target = '9.0'
|
||||
spec.ios.vendored_frameworks = 'Frameworks/Geth.framework'
|
||||
spec.ios.vendored_frameworks = 'Frameworks/Gubiq.framework'
|
||||
|
||||
spec.prepare_command = <<-CMD
|
||||
curl https://gethstore.blob.core.windows.net/builds/geth-ios-all-{{.Version}}.tar.gz | tar -xvz
|
||||
curl https://gubiqstore.blob.core.windows.net/builds/gubiq-ios-all-{{.Version}}.tar.gz | tar -xvz
|
||||
mkdir Frameworks
|
||||
mv geth-ios-all-{{.Version}}/Geth.framework Frameworks
|
||||
rm -rf geth-ios-all-{{.Version}}
|
||||
mv gubiq-ios-all-{{.Version}}/Gubiq.framework Frameworks
|
||||
rm -rf gubiq-ios-all-{{.Version}}
|
||||
CMD
|
||||
end
|
||||
|
|
|
|||
|
|
@ -23,10 +23,10 @@ dependencies:
|
|||
|
||||
test:
|
||||
override:
|
||||
# Build Geth and move into a known folder
|
||||
- make geth
|
||||
- cp ./build/bin/geth $HOME/geth
|
||||
# Build Gubiq and move into a known folder
|
||||
- make gubiq
|
||||
- cp ./build/bin/gubiq $HOME/gubiq
|
||||
|
||||
# Run hive and move all generated logs into the public artifacts folder
|
||||
- (cd ~/.go_workspace/src/github.com/karalabe/hive && hive --docker-noshell --client=go-ethereum:local --override=$HOME/geth --test=. --sim=.)
|
||||
- (cd ~/.go_workspace/src/github.com/karalabe/hive && hive --docker-noshell --client=go-ethereum:local --override=$HOME/gubiq --test=. --sim=.)
|
||||
- cp -r ~/.go_workspace/src/github.com/karalabe/hive/workspace/logs/* $CIRCLE_ARTIFACTS
|
||||
|
|
|
|||
|
|
@ -76,14 +76,14 @@ var (
|
|||
EthAPI = cli.StringFlag{
|
||||
Name: "ethapi",
|
||||
Usage: "URL of the Ethereum API provider",
|
||||
Value: node.DefaultIPCEndpoint("geth"),
|
||||
Value: node.DefaultIPCEndpoint("gubiq"),
|
||||
}
|
||||
)
|
||||
|
||||
var defaultBootnodes = []string{}
|
||||
|
||||
func init() {
|
||||
// Override flag defaults so bzzd can run alongside geth.
|
||||
// Override flag defaults so bzzd can run alongside gubiq.
|
||||
utils.ListenPortFlag.Value = 30399
|
||||
utils.IPCPathFlag.Value = utils.DirectoryString{Value: "bzzd.ipc"}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ var (
|
|||
ArgsUsage: "",
|
||||
Category: "ACCOUNT COMMANDS",
|
||||
Description: `
|
||||
geth wallet import /path/to/my/presale.wallet
|
||||
gubiq wallet import /path/to/my/presale.wallet
|
||||
|
||||
will prompt for your password and imports your ether presale account.
|
||||
It can be used non-interactively with the --password option taking a
|
||||
|
|
@ -107,7 +107,7 @@ TODO: Please write this
|
|||
Usage: "Create a new account",
|
||||
ArgsUsage: " ",
|
||||
Description: `
|
||||
geth account new
|
||||
gubiq account new
|
||||
|
||||
Creates a new account. Prints the address.
|
||||
|
||||
|
|
@ -117,7 +117,7 @@ You must remember this passphrase to unlock your account in the future.
|
|||
|
||||
For non-interactive use the passphrase can be specified with the --password flag:
|
||||
|
||||
geth --password <passwordfile> account new
|
||||
gubiq --password <passwordfile> account new
|
||||
|
||||
Note, this is meant to be used for testing only, it is a bad idea to save your
|
||||
password to file or expose in any other way.
|
||||
|
|
@ -129,7 +129,7 @@ password to file or expose in any other way.
|
|||
Usage: "Update an existing account",
|
||||
ArgsUsage: "<address>",
|
||||
Description: `
|
||||
geth account update <address>
|
||||
gubiq account update <address>
|
||||
|
||||
Update an existing account.
|
||||
|
||||
|
|
@ -141,7 +141,7 @@ format to the newest format or change the password for an account.
|
|||
|
||||
For non-interactive use the passphrase can be specified with the --password flag:
|
||||
|
||||
geth --password <passwordfile> account update <address>
|
||||
gubiq --password <passwordfile> account update <address>
|
||||
|
||||
Since only one password can be given, only format update can be performed,
|
||||
changing your password is only possible interactively.
|
||||
|
|
@ -153,7 +153,7 @@ changing your password is only possible interactively.
|
|||
Usage: "Import a private key into a new account",
|
||||
ArgsUsage: "<keyFile>",
|
||||
Description: `
|
||||
geth account import <keyfile>
|
||||
gubiq account import <keyfile>
|
||||
|
||||
Imports an unencrypted private key from <keyfile> and creates a new account.
|
||||
Prints the address.
|
||||
|
|
@ -166,7 +166,7 @@ You must remember this passphrase to unlock your account in the future.
|
|||
|
||||
For non-interactive use the passphrase can be specified with the -password flag:
|
||||
|
||||
geth --password <passwordfile> account import <keyfile>
|
||||
gubiq --password <passwordfile> account import <keyfile>
|
||||
|
||||
Note:
|
||||
As you can directly copy your encrypted accounts to another ethereum instance,
|
||||
|
|
@ -43,22 +43,22 @@ func tmpDatadirWithKeystore(t *testing.T) string {
|
|||
}
|
||||
|
||||
func TestAccountListEmpty(t *testing.T) {
|
||||
geth := runGeth(t, "account")
|
||||
geth.expectExit()
|
||||
gubiq := runGubiq(t, "account")
|
||||
gubiq.expectExit()
|
||||
}
|
||||
|
||||
func TestAccountList(t *testing.T) {
|
||||
datadir := tmpDatadirWithKeystore(t)
|
||||
geth := runGeth(t, "--datadir", datadir, "account")
|
||||
defer geth.expectExit()
|
||||
gubiq := runGubiq(t, "--datadir", datadir, "account")
|
||||
defer gubiq.expectExit()
|
||||
if runtime.GOOS == "windows" {
|
||||
geth.expect(`
|
||||
gubiq.expect(`
|
||||
Account #0: {7ef5a6135f1fd6a02593eedc869c6d41d934aef8} {{.Datadir}}\keystore\UTC--2016-03-22T12-57-55.920751759Z--7ef5a6135f1fd6a02593eedc869c6d41d934aef8
|
||||
Account #1: {f466859ead1932d743d622cb74fc058882e8648a} {{.Datadir}}\keystore\aaa
|
||||
Account #2: {289d485d9771714cce91d3393d764e1311907acc} {{.Datadir}}\keystore\zzz
|
||||
`)
|
||||
} else {
|
||||
geth.expect(`
|
||||
gubiq.expect(`
|
||||
Account #0: {7ef5a6135f1fd6a02593eedc869c6d41d934aef8} {{.Datadir}}/keystore/UTC--2016-03-22T12-57-55.920751759Z--7ef5a6135f1fd6a02593eedc869c6d41d934aef8
|
||||
Account #1: {f466859ead1932d743d622cb74fc058882e8648a} {{.Datadir}}/keystore/aaa
|
||||
Account #2: {289d485d9771714cce91d3393d764e1311907acc} {{.Datadir}}/keystore/zzz
|
||||
|
|
@ -67,21 +67,21 @@ Account #2: {289d485d9771714cce91d3393d764e1311907acc} {{.Datadir}}/keystore/zzz
|
|||
}
|
||||
|
||||
func TestAccountNew(t *testing.T) {
|
||||
geth := runGeth(t, "--lightkdf", "account", "new")
|
||||
defer geth.expectExit()
|
||||
geth.expect(`
|
||||
gubiq := runGubiq(t, "--lightkdf", "account", "new")
|
||||
defer gubiq.expectExit()
|
||||
gubiq.expect(`
|
||||
Your new account is locked with a password. Please give a password. Do not forget this password.
|
||||
!! Unsupported terminal, password will be echoed.
|
||||
Passphrase: {{.InputLine "foobar"}}
|
||||
Repeat passphrase: {{.InputLine "foobar"}}
|
||||
`)
|
||||
geth.expectRegexp(`Address: \{[0-9a-f]{40}\}\n`)
|
||||
gubiq.expectRegexp(`Address: \{[0-9a-f]{40}\}\n`)
|
||||
}
|
||||
|
||||
func TestAccountNewBadRepeat(t *testing.T) {
|
||||
geth := runGeth(t, "--lightkdf", "account", "new")
|
||||
defer geth.expectExit()
|
||||
geth.expect(`
|
||||
gubiq := runGubiq(t, "--lightkdf", "account", "new")
|
||||
defer gubiq.expectExit()
|
||||
gubiq.expect(`
|
||||
Your new account is locked with a password. Please give a password. Do not forget this password.
|
||||
!! Unsupported terminal, password will be echoed.
|
||||
Passphrase: {{.InputLine "something"}}
|
||||
|
|
@ -92,11 +92,11 @@ Fatal: Passphrases do not match
|
|||
|
||||
func TestAccountUpdate(t *testing.T) {
|
||||
datadir := tmpDatadirWithKeystore(t)
|
||||
geth := runGeth(t,
|
||||
gubiq := runGubiq(t,
|
||||
"--datadir", datadir, "--lightkdf",
|
||||
"account", "update", "f466859ead1932d743d622cb74fc058882e8648a")
|
||||
defer geth.expectExit()
|
||||
geth.expect(`
|
||||
defer gubiq.expectExit()
|
||||
gubiq.expect(`
|
||||
Unlocking account f466859ead1932d743d622cb74fc058882e8648a | Attempt 1/3
|
||||
!! Unsupported terminal, password will be echoed.
|
||||
Passphrase: {{.InputLine "foobar"}}
|
||||
|
|
@ -107,24 +107,24 @@ Repeat passphrase: {{.InputLine "foobar2"}}
|
|||
}
|
||||
|
||||
func TestWalletImport(t *testing.T) {
|
||||
geth := runGeth(t, "--lightkdf", "wallet", "import", "testdata/guswallet.json")
|
||||
defer geth.expectExit()
|
||||
geth.expect(`
|
||||
gubiq := runGubiq(t, "--lightkdf", "wallet", "import", "testdata/guswallet.json")
|
||||
defer gubiq.expectExit()
|
||||
gubiq.expect(`
|
||||
!! Unsupported terminal, password will be echoed.
|
||||
Passphrase: {{.InputLine "foo"}}
|
||||
Address: {d4584b5f6229b7be90727b0fc8c6b91bb427821f}
|
||||
`)
|
||||
|
||||
files, err := ioutil.ReadDir(filepath.Join(geth.Datadir, "keystore"))
|
||||
files, err := ioutil.ReadDir(filepath.Join(gubiq.Datadir, "keystore"))
|
||||
if len(files) != 1 {
|
||||
t.Errorf("expected one key file in keystore directory, found %d files (error: %v)", len(files), err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestWalletImportBadPassword(t *testing.T) {
|
||||
geth := runGeth(t, "--lightkdf", "wallet", "import", "testdata/guswallet.json")
|
||||
defer geth.expectExit()
|
||||
geth.expect(`
|
||||
gubiq := runGubiq(t, "--lightkdf", "wallet", "import", "testdata/guswallet.json")
|
||||
defer gubiq.expectExit()
|
||||
gubiq.expect(`
|
||||
!! Unsupported terminal, password will be echoed.
|
||||
Passphrase: {{.InputLine "wrong"}}
|
||||
Fatal: could not decrypt key with given passphrase
|
||||
|
|
@ -133,22 +133,22 @@ Fatal: could not decrypt key with given passphrase
|
|||
|
||||
func TestUnlockFlag(t *testing.T) {
|
||||
datadir := tmpDatadirWithKeystore(t)
|
||||
geth := runGeth(t,
|
||||
gubiq := runGubiq(t,
|
||||
"--datadir", datadir, "--nat", "none", "--nodiscover", "--dev",
|
||||
"--unlock", "f466859ead1932d743d622cb74fc058882e8648a",
|
||||
"js", "testdata/empty.js")
|
||||
geth.expect(`
|
||||
gubiq.expect(`
|
||||
Unlocking account f466859ead1932d743d622cb74fc058882e8648a | Attempt 1/3
|
||||
!! Unsupported terminal, password will be echoed.
|
||||
Passphrase: {{.InputLine "foobar"}}
|
||||
`)
|
||||
geth.expectExit()
|
||||
gubiq.expectExit()
|
||||
|
||||
wantMessages := []string{
|
||||
"Unlocked account f466859ead1932d743d622cb74fc058882e8648a",
|
||||
}
|
||||
for _, m := range wantMessages {
|
||||
if strings.Index(geth.stderrText(), m) == -1 {
|
||||
if strings.Index(gubiq.stderrText(), m) == -1 {
|
||||
t.Errorf("stderr text does not contain %q", m)
|
||||
}
|
||||
}
|
||||
|
|
@ -156,11 +156,11 @@ Passphrase: {{.InputLine "foobar"}}
|
|||
|
||||
func TestUnlockFlagWrongPassword(t *testing.T) {
|
||||
datadir := tmpDatadirWithKeystore(t)
|
||||
geth := runGeth(t,
|
||||
gubiq := runGubiq(t,
|
||||
"--datadir", datadir, "--nat", "none", "--nodiscover", "--dev",
|
||||
"--unlock", "f466859ead1932d743d622cb74fc058882e8648a")
|
||||
defer geth.expectExit()
|
||||
geth.expect(`
|
||||
defer gubiq.expectExit()
|
||||
gubiq.expect(`
|
||||
Unlocking account f466859ead1932d743d622cb74fc058882e8648a | Attempt 1/3
|
||||
!! Unsupported terminal, password will be echoed.
|
||||
Passphrase: {{.InputLine "wrong1"}}
|
||||
|
|
@ -175,25 +175,25 @@ Fatal: Failed to unlock account f466859ead1932d743d622cb74fc058882e8648a (could
|
|||
// https://github.com/ubiq/go-ubiq/issues/1785
|
||||
func TestUnlockFlagMultiIndex(t *testing.T) {
|
||||
datadir := tmpDatadirWithKeystore(t)
|
||||
geth := runGeth(t,
|
||||
gubiq := runGubiq(t,
|
||||
"--datadir", datadir, "--nat", "none", "--nodiscover", "--dev",
|
||||
"--unlock", "0,2",
|
||||
"js", "testdata/empty.js")
|
||||
geth.expect(`
|
||||
gubiq.expect(`
|
||||
Unlocking account 0 | Attempt 1/3
|
||||
!! Unsupported terminal, password will be echoed.
|
||||
Passphrase: {{.InputLine "foobar"}}
|
||||
Unlocking account 2 | Attempt 1/3
|
||||
Passphrase: {{.InputLine "foobar"}}
|
||||
`)
|
||||
geth.expectExit()
|
||||
gubiq.expectExit()
|
||||
|
||||
wantMessages := []string{
|
||||
"Unlocked account 7ef5a6135f1fd6a02593eedc869c6d41d934aef8",
|
||||
"Unlocked account 289d485d9771714cce91d3393d764e1311907acc",
|
||||
}
|
||||
for _, m := range wantMessages {
|
||||
if strings.Index(geth.stderrText(), m) == -1 {
|
||||
if strings.Index(gubiq.stderrText(), m) == -1 {
|
||||
t.Errorf("stderr text does not contain %q", m)
|
||||
}
|
||||
}
|
||||
|
|
@ -201,18 +201,18 @@ Passphrase: {{.InputLine "foobar"}}
|
|||
|
||||
func TestUnlockFlagPasswordFile(t *testing.T) {
|
||||
datadir := tmpDatadirWithKeystore(t)
|
||||
geth := runGeth(t,
|
||||
gubiq := runGubiq(t,
|
||||
"--datadir", datadir, "--nat", "none", "--nodiscover", "--dev",
|
||||
"--password", "testdata/passwords.txt", "--unlock", "0,2",
|
||||
"js", "testdata/empty.js")
|
||||
geth.expectExit()
|
||||
gubiq.expectExit()
|
||||
|
||||
wantMessages := []string{
|
||||
"Unlocked account 7ef5a6135f1fd6a02593eedc869c6d41d934aef8",
|
||||
"Unlocked account 289d485d9771714cce91d3393d764e1311907acc",
|
||||
}
|
||||
for _, m := range wantMessages {
|
||||
if strings.Index(geth.stderrText(), m) == -1 {
|
||||
if strings.Index(gubiq.stderrText(), m) == -1 {
|
||||
t.Errorf("stderr text does not contain %q", m)
|
||||
}
|
||||
}
|
||||
|
|
@ -220,29 +220,29 @@ func TestUnlockFlagPasswordFile(t *testing.T) {
|
|||
|
||||
func TestUnlockFlagPasswordFileWrongPassword(t *testing.T) {
|
||||
datadir := tmpDatadirWithKeystore(t)
|
||||
geth := runGeth(t,
|
||||
gubiq := runGubiq(t,
|
||||
"--datadir", datadir, "--nat", "none", "--nodiscover", "--dev",
|
||||
"--password", "testdata/wrong-passwords.txt", "--unlock", "0,2")
|
||||
defer geth.expectExit()
|
||||
geth.expect(`
|
||||
defer gubiq.expectExit()
|
||||
gubiq.expect(`
|
||||
Fatal: Failed to unlock account 0 (could not decrypt key with given passphrase)
|
||||
`)
|
||||
}
|
||||
|
||||
func TestUnlockFlagAmbiguous(t *testing.T) {
|
||||
store := filepath.Join("..", "..", "accounts", "testdata", "dupes")
|
||||
geth := runGeth(t,
|
||||
gubiq := runGubiq(t,
|
||||
"--keystore", store, "--nat", "none", "--nodiscover", "--dev",
|
||||
"--unlock", "f466859ead1932d743d622cb74fc058882e8648a",
|
||||
"js", "testdata/empty.js")
|
||||
defer geth.expectExit()
|
||||
defer gubiq.expectExit()
|
||||
|
||||
// Helper for the expect template, returns absolute keystore path.
|
||||
geth.setTemplateFunc("keypath", func(file string) string {
|
||||
gubiq.setTemplateFunc("keypath", func(file string) string {
|
||||
abs, _ := filepath.Abs(filepath.Join(store, file))
|
||||
return abs
|
||||
})
|
||||
geth.expect(`
|
||||
gubiq.expect(`
|
||||
Unlocking account f466859ead1932d743d622cb74fc058882e8648a | Attempt 1/3
|
||||
!! Unsupported terminal, password will be echoed.
|
||||
Passphrase: {{.InputLine "foobar"}}
|
||||
|
|
@ -254,13 +254,13 @@ Your passphrase unlocked {{keypath "1"}}
|
|||
In order to avoid this warning, you need to remove the following duplicate key files:
|
||||
{{keypath "2"}}
|
||||
`)
|
||||
geth.expectExit()
|
||||
gubiq.expectExit()
|
||||
|
||||
wantMessages := []string{
|
||||
"Unlocked account f466859ead1932d743d622cb74fc058882e8648a",
|
||||
}
|
||||
for _, m := range wantMessages {
|
||||
if strings.Index(geth.stderrText(), m) == -1 {
|
||||
if strings.Index(gubiq.stderrText(), m) == -1 {
|
||||
t.Errorf("stderr text does not contain %q", m)
|
||||
}
|
||||
}
|
||||
|
|
@ -268,17 +268,17 @@ In order to avoid this warning, you need to remove the following duplicate key f
|
|||
|
||||
func TestUnlockFlagAmbiguousWrongPassword(t *testing.T) {
|
||||
store := filepath.Join("..", "..", "accounts", "testdata", "dupes")
|
||||
geth := runGeth(t,
|
||||
gubiq := runGubiq(t,
|
||||
"--keystore", store, "--nat", "none", "--nodiscover", "--dev",
|
||||
"--unlock", "f466859ead1932d743d622cb74fc058882e8648a")
|
||||
defer geth.expectExit()
|
||||
defer gubiq.expectExit()
|
||||
|
||||
// Helper for the expect template, returns absolute keystore path.
|
||||
geth.setTemplateFunc("keypath", func(file string) string {
|
||||
gubiq.setTemplateFunc("keypath", func(file string) string {
|
||||
abs, _ := filepath.Abs(filepath.Join(store, file))
|
||||
return abs
|
||||
})
|
||||
geth.expect(`
|
||||
gubiq.expect(`
|
||||
Unlocking account f466859ead1932d743d622cb74fc058882e8648a | Attempt 1/3
|
||||
!! Unsupported terminal, password will be echoed.
|
||||
Passphrase: {{.InputLine "wrong"}}
|
||||
|
|
@ -288,5 +288,5 @@ Multiple key files exist for address f466859ead1932d743d622cb74fc058882e8648a:
|
|||
Testing your passphrase against all of them...
|
||||
Fatal: None of the listed files could be unlocked.
|
||||
`)
|
||||
geth.expectExit()
|
||||
gubiq.expectExit()
|
||||
}
|
||||
|
|
@ -36,7 +36,7 @@ var (
|
|||
ArgsUsage: "", // TODO: Write this!
|
||||
Category: "CONSOLE COMMANDS",
|
||||
Description: `
|
||||
The Geth console is an interactive shell for the JavaScript runtime environment
|
||||
The Gubiq console is an interactive shell for the JavaScript runtime environment
|
||||
which exposes a node admin interface as well as the Ðapp JavaScript API.
|
||||
See https://github.com/ubiq/go-ubiq/wiki/Javascipt-Console
|
||||
`,
|
||||
|
|
@ -48,10 +48,10 @@ See https://github.com/ubiq/go-ubiq/wiki/Javascipt-Console
|
|||
ArgsUsage: "", // TODO: Write this!
|
||||
Category: "CONSOLE COMMANDS",
|
||||
Description: `
|
||||
The Geth console is an interactive shell for the JavaScript runtime environment
|
||||
The Gubiq console is an interactive shell for the JavaScript runtime environment
|
||||
which exposes a node admin interface as well as the Ðapp JavaScript API.
|
||||
See https://github.com/ubiq/go-ubiq/wiki/Javascipt-Console.
|
||||
This command allows to open a console on a running geth node.
|
||||
This command allows to open a console on a running gubiq node.
|
||||
`,
|
||||
}
|
||||
javascriptCommand = cli.Command{
|
||||
|
|
@ -67,7 +67,7 @@ JavaScript API. See https://github.com/ubiq/go-ubiq/wiki/Javascipt-Console
|
|||
}
|
||||
)
|
||||
|
||||
// localConsole starts a new geth node, attaching a JavaScript console to it at the
|
||||
// localConsole starts a new gubiq node, attaching a JavaScript console to it at the
|
||||
// same time.
|
||||
func localConsole(ctx *cli.Context) error {
|
||||
// Create and start the node based on the CLI flags
|
||||
|
|
@ -78,7 +78,7 @@ func localConsole(ctx *cli.Context) error {
|
|||
// Attach to the newly started node and start the JavaScript console
|
||||
client, err := node.Attach()
|
||||
if err != nil {
|
||||
utils.Fatalf("Failed to attach to the inproc geth: %v", err)
|
||||
utils.Fatalf("Failed to attach to the inproc gubiq: %v", err)
|
||||
}
|
||||
config := console.Config{
|
||||
DataDir: node.DataDir(),
|
||||
|
|
@ -104,13 +104,13 @@ func localConsole(ctx *cli.Context) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// remoteConsole will connect to a remote geth instance, attaching a JavaScript
|
||||
// remoteConsole will connect to a remote gubiq instance, attaching a JavaScript
|
||||
// console to it.
|
||||
func remoteConsole(ctx *cli.Context) error {
|
||||
// Attach to a remotely running geth instance and start the JavaScript console
|
||||
// Attach to a remotely running gubiq instance and start the JavaScript console
|
||||
client, err := dialRPC(ctx.Args().First())
|
||||
if err != nil {
|
||||
utils.Fatalf("Unable to attach to remote geth: %v", err)
|
||||
utils.Fatalf("Unable to attach to remote gubiq: %v", err)
|
||||
}
|
||||
config := console.Config{
|
||||
DataDir: utils.MakeDataDir(ctx),
|
||||
|
|
@ -138,19 +138,19 @@ func remoteConsole(ctx *cli.Context) error {
|
|||
|
||||
// dialRPC returns a RPC client which connects to the given endpoint.
|
||||
// The check for empty endpoint implements the defaulting logic
|
||||
// for "geth attach" and "geth monitor" with no argument.
|
||||
// for "gubiq attach" and "gubiq monitor" with no argument.
|
||||
func dialRPC(endpoint string) (*rpc.Client, error) {
|
||||
if endpoint == "" {
|
||||
endpoint = node.DefaultIPCEndpoint(clientIdentifier)
|
||||
} else if strings.HasPrefix(endpoint, "rpc:") || strings.HasPrefix(endpoint, "ipc:") {
|
||||
// Backwards compatibility with geth < 1.5 which required
|
||||
// Backwards compatibility with gubiq < 1.5 which required
|
||||
// these prefixes.
|
||||
endpoint = endpoint[4:]
|
||||
}
|
||||
return rpc.Dial(endpoint)
|
||||
}
|
||||
|
||||
// ephemeralConsole starts a new geth node, attaches an ephemeral JavaScript
|
||||
// ephemeralConsole starts a new gubiq node, attaches an ephemeral JavaScript
|
||||
// console to it, and each of the files specified as arguments and tears the
|
||||
// everything down.
|
||||
func ephemeralConsole(ctx *cli.Context) error {
|
||||
|
|
@ -162,7 +162,7 @@ func ephemeralConsole(ctx *cli.Context) error {
|
|||
// Attach to the newly started node and start the JavaScript console
|
||||
client, err := node.Attach()
|
||||
if err != nil {
|
||||
utils.Fatalf("Failed to attach to the inproc geth: %v", err)
|
||||
utils.Fatalf("Failed to attach to the inproc gubiq: %v", err)
|
||||
}
|
||||
config := console.Config{
|
||||
DataDir: node.DataDir(),
|
||||
|
|
@ -37,28 +37,28 @@ import (
|
|||
func TestConsoleWelcome(t *testing.T) {
|
||||
coinbase := "0x8605cdbbdb6d264aa742e77020dcbc58fcdce182"
|
||||
|
||||
// Start a geth console, make sure it's cleaned up and terminate the console
|
||||
geth := runGeth(t,
|
||||
// Start a gubiq console, make sure it's cleaned up and terminate the console
|
||||
gubiq := runGubiq(t,
|
||||
"--port", "0", "--maxpeers", "0", "--nodiscover", "--nat", "none",
|
||||
"--etherbase", coinbase, "--shh",
|
||||
"console")
|
||||
|
||||
// Gather all the infos the welcome message needs to contain
|
||||
geth.setTemplateFunc("goos", func() string { return runtime.GOOS })
|
||||
geth.setTemplateFunc("gover", runtime.Version)
|
||||
geth.setTemplateFunc("gethver", func() string { return utils.Version })
|
||||
geth.setTemplateFunc("niltime", func() string { return time.Unix(0, 0).Format(time.RFC1123) })
|
||||
geth.setTemplateFunc("apis", func() []string {
|
||||
gubiq.setTemplateFunc("goos", func() string { return runtime.GOOS })
|
||||
gubiq.setTemplateFunc("gover", runtime.Version)
|
||||
gubiq.setTemplateFunc("gubiqver", func() string { return utils.Version })
|
||||
gubiq.setTemplateFunc("niltime", func() string { return time.Unix(0, 0).Format(time.RFC1123) })
|
||||
gubiq.setTemplateFunc("apis", func() []string {
|
||||
apis := append(strings.Split(rpc.DefaultIPCApis, ","), rpc.MetadataApi)
|
||||
sort.Strings(apis)
|
||||
return apis
|
||||
})
|
||||
|
||||
// Verify the actual welcome message to the required template
|
||||
geth.expect(`
|
||||
Welcome to the Geth JavaScript console!
|
||||
gubiq.expect(`
|
||||
Welcome to the Gubiq JavaScript console!
|
||||
|
||||
instance: Geth/v{{gethver}}/{{goos}}/{{gover}}
|
||||
instance: Gubiq/v{{gubiqver}}/{{goos}}/{{gover}}
|
||||
coinbase: {{.Etherbase}}
|
||||
at block: 0 ({{niltime}})
|
||||
datadir: {{.Datadir}}
|
||||
|
|
@ -66,7 +66,7 @@ at block: 0 ({{niltime}})
|
|||
|
||||
> {{.InputLine "exit"}}
|
||||
`)
|
||||
geth.expectExit()
|
||||
gubiq.expectExit()
|
||||
}
|
||||
|
||||
// Tests that a console can be attached to a running node via various means.
|
||||
|
|
@ -75,7 +75,7 @@ func TestIPCAttachWelcome(t *testing.T) {
|
|||
coinbase := "0x8605cdbbdb6d264aa742e77020dcbc58fcdce182"
|
||||
var ipc string
|
||||
if runtime.GOOS == "windows" {
|
||||
ipc = `\\.\pipe\geth` + strconv.Itoa(trulyRandInt(100000, 999999))
|
||||
ipc = `\\.\pipe\gubiq` + strconv.Itoa(trulyRandInt(100000, 999999))
|
||||
} else {
|
||||
ws := tmpdir(t)
|
||||
defer os.RemoveAll(ws)
|
||||
|
|
@ -83,60 +83,60 @@ func TestIPCAttachWelcome(t *testing.T) {
|
|||
}
|
||||
// Note: we need --shh because testAttachWelcome checks for default
|
||||
// list of ipc modules and shh is included there.
|
||||
geth := runGeth(t,
|
||||
gubiq := runGubiq(t,
|
||||
"--port", "0", "--maxpeers", "0", "--nodiscover", "--nat", "none",
|
||||
"--etherbase", coinbase, "--shh", "--ipcpath", ipc)
|
||||
|
||||
time.Sleep(2 * time.Second) // Simple way to wait for the RPC endpoint to open
|
||||
testAttachWelcome(t, geth, "ipc:"+ipc)
|
||||
testAttachWelcome(t, gubiq, "ipc:"+ipc)
|
||||
|
||||
geth.interrupt()
|
||||
geth.expectExit()
|
||||
gubiq.interrupt()
|
||||
gubiq.expectExit()
|
||||
}
|
||||
|
||||
func TestHTTPAttachWelcome(t *testing.T) {
|
||||
coinbase := "0x8605cdbbdb6d264aa742e77020dcbc58fcdce182"
|
||||
port := strconv.Itoa(trulyRandInt(1024, 65536)) // Yeah, sometimes this will fail, sorry :P
|
||||
geth := runGeth(t,
|
||||
gubiq := runGubiq(t,
|
||||
"--port", "0", "--maxpeers", "0", "--nodiscover", "--nat", "none",
|
||||
"--etherbase", coinbase, "--rpc", "--rpcport", port)
|
||||
|
||||
time.Sleep(2 * time.Second) // Simple way to wait for the RPC endpoint to open
|
||||
testAttachWelcome(t, geth, "http://localhost:"+port)
|
||||
testAttachWelcome(t, gubiq, "http://localhost:"+port)
|
||||
|
||||
geth.interrupt()
|
||||
geth.expectExit()
|
||||
gubiq.interrupt()
|
||||
gubiq.expectExit()
|
||||
}
|
||||
|
||||
func TestWSAttachWelcome(t *testing.T) {
|
||||
coinbase := "0x8605cdbbdb6d264aa742e77020dcbc58fcdce182"
|
||||
port := strconv.Itoa(trulyRandInt(1024, 65536)) // Yeah, sometimes this will fail, sorry :P
|
||||
|
||||
geth := runGeth(t,
|
||||
gubiq := runGubiq(t,
|
||||
"--port", "0", "--maxpeers", "0", "--nodiscover", "--nat", "none",
|
||||
"--etherbase", coinbase, "--ws", "--wsport", port)
|
||||
|
||||
time.Sleep(2 * time.Second) // Simple way to wait for the RPC endpoint to open
|
||||
testAttachWelcome(t, geth, "ws://localhost:"+port)
|
||||
testAttachWelcome(t, gubiq, "ws://localhost:"+port)
|
||||
|
||||
geth.interrupt()
|
||||
geth.expectExit()
|
||||
gubiq.interrupt()
|
||||
gubiq.expectExit()
|
||||
}
|
||||
|
||||
func testAttachWelcome(t *testing.T, geth *testgeth, endpoint string) {
|
||||
// Attach to a running geth note and terminate immediately
|
||||
attach := runGeth(t, "attach", endpoint)
|
||||
func testAttachWelcome(t *testing.T, gubiq *testgubiq, endpoint string) {
|
||||
// Attach to a running gubiq note and terminate immediately
|
||||
attach := runGubiq(t, "attach", endpoint)
|
||||
defer attach.expectExit()
|
||||
attach.stdin.Close()
|
||||
|
||||
// Gather all the infos the welcome message needs to contain
|
||||
attach.setTemplateFunc("goos", func() string { return runtime.GOOS })
|
||||
attach.setTemplateFunc("gover", runtime.Version)
|
||||
attach.setTemplateFunc("gethver", func() string { return utils.Version })
|
||||
attach.setTemplateFunc("etherbase", func() string { return geth.Etherbase })
|
||||
attach.setTemplateFunc("gubiqver", func() string { return utils.Version })
|
||||
attach.setTemplateFunc("etherbase", func() string { return gubiq.Etherbase })
|
||||
attach.setTemplateFunc("niltime", func() string { return time.Unix(0, 0).Format(time.RFC1123) })
|
||||
attach.setTemplateFunc("ipc", func() bool { return strings.HasPrefix(endpoint, "ipc") })
|
||||
attach.setTemplateFunc("datadir", func() string { return geth.Datadir })
|
||||
attach.setTemplateFunc("datadir", func() string { return gubiq.Datadir })
|
||||
attach.setTemplateFunc("apis", func() []string {
|
||||
var apis []string
|
||||
if strings.HasPrefix(endpoint, "ipc") {
|
||||
|
|
@ -150,9 +150,9 @@ func testAttachWelcome(t *testing.T, geth *testgeth, endpoint string) {
|
|||
|
||||
// Verify the actual welcome message to the required template
|
||||
attach.expect(`
|
||||
Welcome to the Geth JavaScript console!
|
||||
Welcome to the Gubiq JavaScript console!
|
||||
|
||||
instance: Geth/v{{gethver}}/{{goos}}/{{gover}}
|
||||
instance: Gubiq/v{{gubiqver}}/{{goos}}/{{gover}}
|
||||
coinbase: {{etherbase}}
|
||||
at block: 0 ({{niltime}}){{if ipc}}
|
||||
datadir: {{datadir}}{{end}}
|
||||
|
|
@ -156,13 +156,13 @@ func testDAOForkBlockNewChain(t *testing.T, testnet bool, genesis string, votes
|
|||
datadir := tmpdir(t)
|
||||
defer os.RemoveAll(datadir)
|
||||
|
||||
// Start a Geth instance with the requested flags set and immediately terminate
|
||||
// Start a Gubiq instance with the requested flags set and immediately terminate
|
||||
if genesis != "" {
|
||||
json := filepath.Join(datadir, "genesis.json")
|
||||
if err := ioutil.WriteFile(json, []byte(genesis), 0600); err != nil {
|
||||
t.Fatalf("failed to write genesis file: %v", err)
|
||||
}
|
||||
runGeth(t, "--datadir", datadir, "init", json).cmd.Wait()
|
||||
runGubiq(t, "--datadir", datadir, "init", json).cmd.Wait()
|
||||
}
|
||||
for _, vote := range votes {
|
||||
args := []string{"--port", "0", "--maxpeers", "0", "--nodiscover", "--nat", "none", "--ipcdisable", "--datadir", datadir}
|
||||
|
|
@ -175,13 +175,13 @@ func testDAOForkBlockNewChain(t *testing.T, testnet bool, genesis string, votes
|
|||
if vote[1] {
|
||||
args = append(args, "--oppose-dao-fork")
|
||||
}
|
||||
geth := runGeth(t, append(args, []string{"--exec", "2+2", "console"}...)...)
|
||||
geth.cmd.Wait()
|
||||
gubiq := runGubiq(t, append(args, []string{"--exec", "2+2", "console"}...)...)
|
||||
gubiq.cmd.Wait()
|
||||
}
|
||||
// Retrieve the DAO config flag from the database
|
||||
path := filepath.Join(datadir, "geth", "chaindata")
|
||||
path := filepath.Join(datadir, "gubiq", "chaindata")
|
||||
if testnet && genesis == "" {
|
||||
path = filepath.Join(datadir, "testnet", "geth", "chaindata")
|
||||
path = filepath.Join(datadir, "testnet", "gubiq", "chaindata")
|
||||
}
|
||||
db, err := ethdb.NewLDBDatabase(path, 0, 0)
|
||||
if err != nil {
|
||||
|
|
@ -84,7 +84,7 @@ var customGenesisTests = []struct {
|
|||
},
|
||||
}
|
||||
|
||||
// Tests that initializing Geth with a custom genesis block and chain definitions
|
||||
// Tests that initializing Gubiq with a custom genesis block and chain definitions
|
||||
// work properly.
|
||||
func TestCustomGenesis(t *testing.T) {
|
||||
for i, tt := range customGenesisTests {
|
||||
|
|
@ -97,14 +97,14 @@ func TestCustomGenesis(t *testing.T) {
|
|||
if err := ioutil.WriteFile(json, []byte(tt.genesis), 0600); err != nil {
|
||||
t.Fatalf("test %d: failed to write genesis file: %v", i, err)
|
||||
}
|
||||
runGeth(t, "--datadir", datadir, "init", json).cmd.Wait()
|
||||
runGubiq(t, "--datadir", datadir, "init", json).cmd.Wait()
|
||||
|
||||
// Query the custom genesis block
|
||||
geth := runGeth(t,
|
||||
gubiq := runGubiq(t,
|
||||
"--datadir", datadir, "--maxpeers", "0", "--port", "0",
|
||||
"--nodiscover", "--nat", "none", "--ipcdisable",
|
||||
"--exec", tt.query, "console")
|
||||
geth.expectRegexp(tt.result)
|
||||
geth.expectExit()
|
||||
gubiq.expectRegexp(tt.result)
|
||||
gubiq.expectExit()
|
||||
}
|
||||
}
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
// You should have received a copy of the GNU General Public License
|
||||
// along with go-ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// Contains a simple library definition to allow creating a Geth instance from
|
||||
// Contains a simple library definition to allow creating a Gubiq instance from
|
||||
// straight C code.
|
||||
|
||||
package main
|
||||
|
|
@ -37,8 +37,8 @@ import (
|
|||
|
||||
//export doRun
|
||||
func doRun(args *C.char) C.int {
|
||||
// This is equivalent to geth.main, just modified to handle the function arg passing
|
||||
if err := app.Run(strings.Split("geth "+C.GoString(args), " ")); err != nil {
|
||||
// This is equivalent to gubiq.main, just modified to handle the function arg passing
|
||||
if err := app.Run(strings.Split("gubiq "+C.GoString(args), " ")); err != nil {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
return -1
|
||||
}
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
// You should have received a copy of the GNU General Public License
|
||||
// along with go-ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// Contains specialized code for running Geth on Android.
|
||||
// Contains specialized code for running Gubiq on Android.
|
||||
|
||||
package main
|
||||
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
// You should have received a copy of the GNU General Public License
|
||||
// along with go-ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// geth is the official command-line client for Ethereum.
|
||||
// gubiq is the official command-line client for Ethereum.
|
||||
package main
|
||||
|
||||
import (
|
||||
|
|
@ -45,21 +45,21 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
clientIdentifier = "geth" // Client identifier to advertise over the network
|
||||
clientIdentifier = "gubiq" // Client identifier to advertise over the network
|
||||
)
|
||||
|
||||
var (
|
||||
// Git SHA1 commit hash of the release (set via linker flags)
|
||||
gitCommit = ""
|
||||
// Ethereum address of the Geth release oracle.
|
||||
// Ethereum address of the Gubiq release oracle.
|
||||
relOracle = common.HexToAddress("0xfa7b9770ca4cb04296cac84f37736d4041251cdf")
|
||||
// The app that holds all commands and flags.
|
||||
app = utils.NewApp(gitCommit, "the go-ethereum command line interface")
|
||||
)
|
||||
|
||||
func init() {
|
||||
// Initialize the CLI app and start Geth
|
||||
app.Action = geth
|
||||
// Initialize the CLI app and start Gubiq
|
||||
app.Action = gubiq
|
||||
app.HideVersion = true // we have a command to print the version
|
||||
app.Copyright = "Copyright 2013-2016 The go-ethereum Authors"
|
||||
app.Commands = []cli.Command{
|
||||
|
|
@ -219,10 +219,10 @@ func main() {
|
|||
}
|
||||
}
|
||||
|
||||
// geth is the main entry point into the system if no special subcommand is ran.
|
||||
// gubiq is the main entry point into the system if no special subcommand is ran.
|
||||
// It creates a default node based on the command line arguments and runs it in
|
||||
// blocking mode, waiting for it to be shut down.
|
||||
func geth(ctx *cli.Context) error {
|
||||
func gubiq(ctx *cli.Context) error {
|
||||
node := makeFullNode(ctx)
|
||||
startNode(ctx, node)
|
||||
node.Wait()
|
||||
|
|
@ -280,7 +280,7 @@ func makeFullNode(ctx *cli.Context) *node.Node {
|
|||
copy(config.Commit[:], commit)
|
||||
return release.NewReleaseService(ctx, config)
|
||||
}); err != nil {
|
||||
utils.Fatalf("Failed to register the Geth release oracle service: %v", err)
|
||||
utils.Fatalf("Failed to register the Gubiq release oracle service: %v", err)
|
||||
}
|
||||
|
||||
return stack
|
||||
|
|
@ -317,7 +317,7 @@ func startNode(ctx *cli.Context, stack *node.Node) {
|
|||
func makedag(ctx *cli.Context) error {
|
||||
args := ctx.Args()
|
||||
wrongArgs := func() {
|
||||
utils.Fatalf(`Usage: geth makedag <block number> <outputdir>`)
|
||||
utils.Fatalf(`Usage: gubiq makedag <block number> <outputdir>`)
|
||||
}
|
||||
switch {
|
||||
case len(args) == 2:
|
||||
|
|
@ -360,18 +360,18 @@ func version(ctx *cli.Context) error {
|
|||
}
|
||||
|
||||
func license(_ *cli.Context) error {
|
||||
fmt.Println(`Geth is free software: you can redistribute it and/or modify
|
||||
fmt.Println(`Gubiq is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Geth is distributed in the hope that it will be useful,
|
||||
Gubiq is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with geth. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with gubiq. If not, see <http://www.gnu.org/licenses/>.
|
||||
`)
|
||||
return nil
|
||||
}
|
||||
|
|
@ -55,7 +55,7 @@ var (
|
|||
ArgsUsage: " ",
|
||||
Category: "MONITOR COMMANDS",
|
||||
Description: `
|
||||
The Geth monitor is a tool to collect and visualize various internal metrics
|
||||
The Gubiq monitor is a tool to collect and visualize various internal metrics
|
||||
gathered by the node, supporting different chart types as well as the capacity
|
||||
to display multiple metrics simultaneously.
|
||||
`,
|
||||
|
|
@ -76,7 +76,7 @@ func monitor(ctx *cli.Context) error {
|
|||
// Attach to an Ethereum node over IPC or RPC
|
||||
endpoint := ctx.String(monitorCommandAttachFlag.Name)
|
||||
if client, err = dialRPC(endpoint); err != nil {
|
||||
utils.Fatalf("Unable to attach to geth node: %v", err)
|
||||
utils.Fatalf("Unable to attach to gubiq node: %v", err)
|
||||
}
|
||||
defer client.Close()
|
||||
|
||||
|
|
@ -93,7 +93,7 @@ func monitor(ctx *cli.Context) error {
|
|||
if len(list) > 0 {
|
||||
utils.Fatalf("No metrics specified.\n\nAvailable:\n - %s", strings.Join(list, "\n - "))
|
||||
} else {
|
||||
utils.Fatalf("No metrics collected by geth (--%s).\n", utils.MetricsEnabledFlag.Name)
|
||||
utils.Fatalf("No metrics collected by gubiq (--%s).\n", utils.MetricsEnabledFlag.Name)
|
||||
}
|
||||
}
|
||||
sort.Strings(monitored)
|
||||
|
|
@ -158,7 +158,7 @@ func monitor(ctx *cli.Context) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// retrieveMetrics contacts the attached geth node and retrieves the entire set
|
||||
// retrieveMetrics contacts the attached gubiq node and retrieves the entire set
|
||||
// of collected system metrics.
|
||||
func retrieveMetrics(client *rpc.Client) (map[string]interface{}, error) {
|
||||
var metrics map[string]interface{}
|
||||
|
|
@ -32,14 +32,14 @@ import (
|
|||
)
|
||||
|
||||
func tmpdir(t *testing.T) string {
|
||||
dir, err := ioutil.TempDir("", "geth-test")
|
||||
dir, err := ioutil.TempDir("", "gubiq-test")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
return dir
|
||||
}
|
||||
|
||||
type testgeth struct {
|
||||
type testgubiq struct {
|
||||
// For total convenience, all testing methods are available.
|
||||
*testing.T
|
||||
// template variables for expect
|
||||
|
|
@ -56,7 +56,7 @@ type testgeth struct {
|
|||
}
|
||||
|
||||
func init() {
|
||||
// Run the app if we're the child process for runGeth.
|
||||
// Run the app if we're the child process for runGubiq.
|
||||
if os.Getenv("GETH_TEST_CHILD") != "" {
|
||||
if err := app.Run(os.Args); err != nil {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
|
|
@ -66,10 +66,10 @@ func init() {
|
|||
}
|
||||
}
|
||||
|
||||
// spawns geth with the given command line args. If the args don't set --datadir, the
|
||||
// spawns gubiq with the given command line args. If the args don't set --datadir, the
|
||||
// child g gets a temporary data directory.
|
||||
func runGeth(t *testing.T, args ...string) *testgeth {
|
||||
tt := &testgeth{T: t, Executable: os.Args[0]}
|
||||
func runGubiq(t *testing.T, args ...string) *testgubiq {
|
||||
tt := &testgubiq{T: t, Executable: os.Args[0]}
|
||||
for i, arg := range args {
|
||||
switch {
|
||||
case arg == "-datadir" || arg == "--datadir":
|
||||
|
|
@ -94,7 +94,7 @@ func runGeth(t *testing.T, args ...string) *testgeth {
|
|||
}()
|
||||
}
|
||||
|
||||
// Boot "geth". This actually runs the test binary but the init function
|
||||
// Boot "gubiq". This actually runs the test binary but the init function
|
||||
// will prevent any tests from running.
|
||||
tt.stderr = &testlogger{t: t}
|
||||
tt.cmd = exec.Command(os.Args[0], args...)
|
||||
|
|
@ -117,13 +117,13 @@ func runGeth(t *testing.T, args ...string) *testgeth {
|
|||
// InputLine writes the given text to the childs stdin.
|
||||
// This method can also be called from an expect template, e.g.:
|
||||
//
|
||||
// geth.expect(`Passphrase: {{.InputLine "password"}}`)
|
||||
func (tt *testgeth) InputLine(s string) string {
|
||||
// gubiq.expect(`Passphrase: {{.InputLine "password"}}`)
|
||||
func (tt *testgubiq) InputLine(s string) string {
|
||||
io.WriteString(tt.stdin, s+"\n")
|
||||
return ""
|
||||
}
|
||||
|
||||
func (tt *testgeth) setTemplateFunc(name string, fn interface{}) {
|
||||
func (tt *testgubiq) setTemplateFunc(name string, fn interface{}) {
|
||||
if tt.Func == nil {
|
||||
tt.Func = make(map[string]interface{})
|
||||
}
|
||||
|
|
@ -135,7 +135,7 @@ func (tt *testgeth) setTemplateFunc(name string, fn interface{}) {
|
|||
//
|
||||
// If the template starts with a newline, the newline is removed
|
||||
// before matching.
|
||||
func (tt *testgeth) expect(tplsource string) {
|
||||
func (tt *testgubiq) expect(tplsource string) {
|
||||
// Generate the expected output by running the template.
|
||||
tpl := template.Must(template.New("").Funcs(tt.Func).Parse(tplsource))
|
||||
wantbuf := new(bytes.Buffer)
|
||||
|
|
@ -151,7 +151,7 @@ func (tt *testgeth) expect(tplsource string) {
|
|||
tt.Logf("Matched stdout text:\n%s", want)
|
||||
}
|
||||
|
||||
func (tt *testgeth) matchExactOutput(want []byte) error {
|
||||
func (tt *testgubiq) matchExactOutput(want []byte) error {
|
||||
buf := make([]byte, len(want))
|
||||
n := 0
|
||||
tt.withKillTimeout(func() { n, _ = io.ReadFull(tt.stdout, buf) })
|
||||
|
|
@ -182,7 +182,7 @@ func (tt *testgeth) matchExactOutput(want []byte) error {
|
|||
// Note that an arbitrary amount of output may be consumed by the
|
||||
// regular expression. This usually means that expect cannot be used
|
||||
// after expectRegexp.
|
||||
func (tt *testgeth) expectRegexp(resource string) (*regexp.Regexp, []string) {
|
||||
func (tt *testgubiq) expectRegexp(resource string) (*regexp.Regexp, []string) {
|
||||
var (
|
||||
re = regexp.MustCompile(resource)
|
||||
rtee = &runeTee{in: tt.stdout}
|
||||
|
|
@ -205,7 +205,7 @@ func (tt *testgeth) expectRegexp(resource string) (*regexp.Regexp, []string) {
|
|||
|
||||
// expectExit expects the child process to exit within 5s without
|
||||
// printing any additional text on stdout.
|
||||
func (tt *testgeth) expectExit() {
|
||||
func (tt *testgubiq) expectExit() {
|
||||
var output []byte
|
||||
tt.withKillTimeout(func() {
|
||||
output, _ = ioutil.ReadAll(tt.stdout)
|
||||
|
|
@ -219,20 +219,20 @@ func (tt *testgeth) expectExit() {
|
|||
}
|
||||
}
|
||||
|
||||
func (tt *testgeth) interrupt() {
|
||||
func (tt *testgubiq) interrupt() {
|
||||
tt.cmd.Process.Signal(os.Interrupt)
|
||||
}
|
||||
|
||||
// stderrText returns any stderr output written so far.
|
||||
// The returned text holds all log lines after expectExit has
|
||||
// returned.
|
||||
func (tt *testgeth) stderrText() string {
|
||||
func (tt *testgubiq) stderrText() string {
|
||||
tt.stderr.mu.Lock()
|
||||
defer tt.stderr.mu.Unlock()
|
||||
return tt.stderr.buf.String()
|
||||
}
|
||||
|
||||
func (tt *testgeth) withKillTimeout(fn func()) {
|
||||
func (tt *testgubiq) withKillTimeout(fn func()) {
|
||||
timeout := time.AfterFunc(5*time.Second, func() {
|
||||
tt.Log("killing the child process (timeout)")
|
||||
tt.cmd.Process.Kill()
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
// You should have received a copy of the GNU General Public License
|
||||
// along with go-ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// Contains the geth command usage template and generator.
|
||||
// Contains the gubiq command usage template and generator.
|
||||
|
||||
package main
|
||||
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
// You should have received a copy of the GNU General Public License
|
||||
// along with go-ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// gethrpctest is a command to run the external RPC tests.
|
||||
// gubiqrpctest is a command to run the external RPC tests.
|
||||
package main
|
||||
|
||||
import (
|
||||
|
|
@ -575,7 +575,7 @@ func MakeWSRpcHost(ctx *cli.Context) string {
|
|||
}
|
||||
|
||||
// MakeDatabaseHandles raises out the number of allowed file handles per process
|
||||
// for Geth and returns half of the allowance to assign to the database.
|
||||
// for Gubiq and returns half of the allowance to assign to the database.
|
||||
func MakeDatabaseHandles() int {
|
||||
if err := raiseFdLimit(2048); err != nil {
|
||||
Fatalf("Failed to raise file descriptor allowance: %v", err)
|
||||
|
|
@ -841,7 +841,7 @@ func MakeChainConfigFromDb(ctx *cli.Context, db ethdb.Database) *params.ChainCon
|
|||
config.ChainId = new(big.Int)
|
||||
}
|
||||
// Check whether we are allowed to set default config params or not:
|
||||
// - If no genesis is set, we're running either mainnet or testnet (private nets use `geth init`)
|
||||
// - If no genesis is set, we're running either mainnet or testnet (private nets use `gubiq init`)
|
||||
// - If a genesis is already set, ensure we have a configuration for it (mainnet or testnet)
|
||||
defaults := genesis == nil ||
|
||||
(genesis.Hash() == params.MainNetGenesisHash && !ctx.GlobalBool(TestNetFlag.Name)) ||
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ func CompileSolidityString(solc, source string) (map[string]*Contract, error) {
|
|||
}
|
||||
// Write source to a temporary file. Compiling stdin used to be supported
|
||||
// but seems to produce an exception with solc 0.3.5.
|
||||
infile, err := ioutil.TempFile("", "geth-compile-solidity")
|
||||
infile, err := ioutil.TempFile("", "gubiq-compile-solidity")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -244,11 +244,11 @@ func (c *Console) AutoCompleteInput(line string, pos int) (string, []string, str
|
|||
return line[:start], c.jsre.CompleteKeywords(line[start:pos]), line[pos:]
|
||||
}
|
||||
|
||||
// Welcome show summary of current Geth instance and some metadata about the
|
||||
// Welcome show summary of current Gubiq instance and some metadata about the
|
||||
// console's available modules.
|
||||
func (c *Console) Welcome() {
|
||||
// Print some generic Geth metadata
|
||||
fmt.Fprintf(c.printer, "Welcome to the Geth JavaScript console!\n\n")
|
||||
// Print some generic Gubiq metadata
|
||||
fmt.Fprintf(c.printer, "Welcome to the Gubiq JavaScript console!\n\n")
|
||||
c.jsre.Run(`
|
||||
console.log("instance: " + web3.version.node);
|
||||
console.log("coinbase: " + eth.coinbase);
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@ FROM alpine:3.4
|
|||
RUN \
|
||||
apk add --update go git make gcc musl-dev && \
|
||||
git clone --depth 1 https://github.com/ubiq/go-ubiq && \
|
||||
(cd go-ethereum && make geth) && \
|
||||
cp go-ethereum/build/bin/geth /geth && \
|
||||
(cd go-ethereum && make gubiq) && \
|
||||
cp go-ethereum/build/bin/gubiq /gubiq && \
|
||||
apk del go git make gcc musl-dev && \
|
||||
rm -rf /go-ethereum && rm -rf /var/cache/apk/*
|
||||
|
||||
EXPOSE 8588
|
||||
EXPOSE 30303
|
||||
|
||||
ENTRYPOINT ["/geth"]
|
||||
ENTRYPOINT ["/gubiq"]
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@ RUN apt-get update && \
|
|||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 923F6CA9 && \
|
||||
echo "deb http://ppa.launchpad.net/ethereum/ethereum-dev/ubuntu wily main" | tee -a /etc/apt/sources.list.d/ethereum.list && \
|
||||
apt-get update && \
|
||||
apt-get install -q -y geth
|
||||
apt-get install -q -y gubiq
|
||||
|
||||
EXPOSE 8588
|
||||
EXPOSE 30303
|
||||
|
||||
ENTRYPOINT ["/usr/bin/geth"]
|
||||
ENTRYPOINT ["/usr/bin/gubiq"]
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@ FROM alpine:3.4
|
|||
RUN \
|
||||
apk add --update go git make gcc musl-dev && \
|
||||
git clone --depth 1 --branch release/1.5 https://github.com/ubiq/go-ubiq && \
|
||||
(cd go-ethereum && make geth) && \
|
||||
cp go-ethereum/build/bin/geth /geth && \
|
||||
(cd go-ethereum && make gubiq) && \
|
||||
cp go-ethereum/build/bin/gubiq /gubiq && \
|
||||
apk del go git make gcc musl-dev && \
|
||||
rm -rf /go-ethereum && rm -rf /var/cache/apk/*
|
||||
|
||||
EXPOSE 8588
|
||||
EXPOSE 30303
|
||||
|
||||
ENTRYPOINT ["/geth"]
|
||||
ENTRYPOINT ["/gubiq"]
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@ RUN apt-get update && \
|
|||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 923F6CA9 && \
|
||||
echo "deb http://ppa.launchpad.net/ethereum/ethereum/ubuntu wily main" | tee -a /etc/apt/sources.list.d/ethereum.list && \
|
||||
apt-get update && \
|
||||
apt-get install -q -y geth
|
||||
apt-get install -q -y gubiq
|
||||
|
||||
EXPOSE 8588
|
||||
EXPOSE 30303
|
||||
|
||||
ENTRYPOINT ["/usr/bin/geth"]
|
||||
ENTRYPOINT ["/usr/bin/gubiq"]
|
||||
|
|
|
|||
|
|
@ -15,12 +15,12 @@
|
|||
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// ReleaseOracle is an Ethereum contract to store the current and previous
|
||||
// versions of the go-ethereum implementation. Its goal is to allow Geth to
|
||||
// versions of the go-ethereum implementation. Its goal is to allow Gubiq to
|
||||
// check for new releases automatically without the need to consult a central
|
||||
// repository.
|
||||
//
|
||||
// The contract takes a vote based approach on both assigning authorised signers
|
||||
// as well as signing off on new Geth releases.
|
||||
// as well as signing off on new Gubiq releases.
|
||||
//
|
||||
// Note, when a signer is demoted, the currently pending release is auto-nuked.
|
||||
// The reason is to prevent suprises where a demotion actually tilts the votes
|
||||
|
|
@ -33,7 +33,7 @@ contract ReleaseOracle {
|
|||
address[] fail; // List of signers voting to fail a proposal
|
||||
}
|
||||
|
||||
// Version is the version details of a particular Geth release
|
||||
// Version is the version details of a particular Gubiq release
|
||||
struct Version {
|
||||
uint32 major; // Major version component of the release
|
||||
uint32 minor; // Minor version component of the release
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) {
|
|||
if !config.SkipBcVersionCheck {
|
||||
bcVersion := core.GetBlockChainVersion(chainDb)
|
||||
if bcVersion != core.BlockChainVersion && bcVersion != 0 {
|
||||
return nil, fmt.Errorf("Blockchain DB version mismatch (%d / %d). Run geth upgradedb.\n", bcVersion, core.BlockChainVersion)
|
||||
return nil, fmt.Errorf("Blockchain DB version mismatch (%d / %d). Run gubiq upgradedb.\n", bcVersion, core.BlockChainVersion)
|
||||
}
|
||||
core.WriteBlockChainVersion(chainDb, core.BlockChainVersion)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1826,7 +1826,7 @@ var ETH_UNITS = [
|
|||
'ether',
|
||||
'grand',
|
||||
'Mether',
|
||||
'Gether',
|
||||
'Gubiqer',
|
||||
'Tether',
|
||||
'Pether',
|
||||
'Eether',
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// package web3ext contains geth specific web3.js extensions.
|
||||
// package web3ext contains gubiq specific web3.js extensions.
|
||||
package web3ext
|
||||
|
||||
var Modules = map[string]string{
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
// Contains all the wrappers from the accounts package to support client side key
|
||||
// management on mobile platforms.
|
||||
|
||||
package geth
|
||||
package gubiq
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
// Contains all the wrappers from the accounts package to support client side key
|
||||
// management on mobile platforms.
|
||||
|
||||
package geth
|
||||
package gubiq
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
|
|
@ -40,14 +40,14 @@ package go;
|
|||
import android.test.InstrumentationTestCase;
|
||||
import android.test.MoreAsserts;
|
||||
|
||||
import org.ethereum.geth.*;
|
||||
import org.ethereum.gubiq.*;
|
||||
|
||||
public class AndroidTest extends InstrumentationTestCase {
|
||||
public AndroidTest() {}
|
||||
|
||||
public void testAccountManagement() {
|
||||
try {
|
||||
AccountManager am = new AccountManager(getInstrumentation().getContext().getFilesDir() + "/keystore", Geth.LightScryptN, Geth.LightScryptP);
|
||||
AccountManager am = new AccountManager(getInstrumentation().getContext().getFilesDir() + "/keystore", Gubiq.LightScryptN, Gubiq.LightScryptP);
|
||||
|
||||
Account newAcc = am.newAccount("Creation password");
|
||||
byte[] jsonAcc = am.exportKey(newAcc, "Creation password", "Export password");
|
||||
|
|
@ -121,7 +121,7 @@ func TestAndroid(t *testing.T) {
|
|||
t.Logf("initialization took %v", time.Since(start))
|
||||
}
|
||||
// Create and switch to a temporary workspace
|
||||
workspace, err := ioutil.TempDir("", "geth-android-")
|
||||
workspace, err := ioutil.TempDir("", "gubiq-android-")
|
||||
if err != nil {
|
||||
t.Fatalf("failed to create temporary workspace: %v", err)
|
||||
}
|
||||
|
|
@ -137,21 +137,21 @@ func TestAndroid(t *testing.T) {
|
|||
defer os.Chdir(pwd)
|
||||
|
||||
// Create the skeleton of the Android project
|
||||
for _, dir := range []string{"src/main", "src/androidTest/java/org/ethereum/gethtest", "libs"} {
|
||||
for _, dir := range []string{"src/main", "src/androidTest/java/org/ethereum/gubiqtest", "libs"} {
|
||||
err = os.MkdirAll(dir, os.ModePerm)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
// Generate the mobile bindings for Geth and add the tester class
|
||||
// Generate the mobile bindings for Gubiq and add the tester class
|
||||
gobind := exec.Command("gomobile", "bind", "-javapkg", "org.ethereum", "github.com/ubiq/go-ubiq/mobile")
|
||||
if output, err := gobind.CombinedOutput(); err != nil {
|
||||
t.Logf("%s", output)
|
||||
t.Fatalf("failed to run gomobile bind: %v", err)
|
||||
}
|
||||
build.CopyFile(filepath.Join("libs", "geth.aar"), "geth.aar", os.ModePerm)
|
||||
build.CopyFile(filepath.Join("libs", "gubiq.aar"), "gubiq.aar", os.ModePerm)
|
||||
|
||||
if err = ioutil.WriteFile(filepath.Join("src", "androidTest", "java", "org", "ethereum", "gethtest", "AndroidTest.java"), []byte(androidTestClass), os.ModePerm); err != nil {
|
||||
if err = ioutil.WriteFile(filepath.Join("src", "androidTest", "java", "org", "ethereum", "gubiqtest", "AndroidTest.java"), []byte(androidTestClass), os.ModePerm); err != nil {
|
||||
t.Fatalf("failed to write Android test class: %v", err)
|
||||
}
|
||||
// Finish creating the project and run the tests via gradle
|
||||
|
|
@ -169,7 +169,7 @@ func TestAndroid(t *testing.T) {
|
|||
|
||||
const androidManifest = `<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.ethereum.gethtest"
|
||||
package="org.ethereum.gubiqtest"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
|
||||
|
|
@ -198,6 +198,6 @@ repositories {
|
|||
}
|
||||
dependencies {
|
||||
compile 'com.android.support:appcompat-v7:19.0.0'
|
||||
compile(name: "geth", ext: "aar")
|
||||
compile(name: "gubiq", ext: "aar")
|
||||
}
|
||||
`
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
// Contains all the wrappers from the math/big package.
|
||||
|
||||
package geth
|
||||
package gubiq
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
// +build go1.7
|
||||
|
||||
package geth
|
||||
package gubiq
|
||||
|
||||
// GetString returns the value of x as a formatted string in some number base.
|
||||
func (bi *BigInt) GetString(base int) string {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
// Contains all the wrappers from the bind package.
|
||||
|
||||
package geth
|
||||
package gubiq
|
||||
|
||||
import (
|
||||
"math/big"
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
// Contains all the wrappers from the common package.
|
||||
|
||||
package geth
|
||||
package gubiq
|
||||
|
||||
import (
|
||||
"encoding/hex"
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
// Contains all the wrappers from the golang.org/x/net/context package to support
|
||||
// client side context management on mobile platforms.
|
||||
|
||||
package geth
|
||||
package gubiq
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
// Contains all the wrappers from the accounts package to support client side enode
|
||||
// management on mobile platforms.
|
||||
|
||||
package geth
|
||||
package gubiq
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// Package geth contains the simplified mobile APIs to go-ethereum.
|
||||
// Package gubiq contains the simplified mobile APIs to go-ethereum.
|
||||
//
|
||||
// The scope of this package is *not* to allow writing a custom Ethereun client
|
||||
// with pieces plucked from go-ethereum, rather to allow writing native dapps on
|
||||
|
|
@ -54,4 +54,4 @@
|
|||
// Note, a panic *cannot* cross over language boundaries, instead will result in
|
||||
// an undebuggable SEGFAULT in the process. For error handling only ever use error
|
||||
// returns, which may be the only or the second return.
|
||||
package geth
|
||||
package gubiq
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
// Contains a wrapper for the Ethereum client.
|
||||
|
||||
package geth
|
||||
package gubiq
|
||||
|
||||
import (
|
||||
"math/big"
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
// Contains all the wrappers from the go-ethereum root package.
|
||||
|
||||
package geth
|
||||
package gubiq
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
// Contains all the wrappers from the node package to support client side node
|
||||
// management on mobile platforms.
|
||||
|
||||
package geth
|
||||
package gubiq
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
|
@ -36,7 +36,7 @@ import (
|
|||
"github.com/ubiq/go-ubiq/whisper/whisperv2"
|
||||
)
|
||||
|
||||
// NodeConfig represents the collection of configuration values to fine tune the Geth
|
||||
// NodeConfig represents the collection of configuration values to fine tune the Gubiq
|
||||
// node embedded into a mobile process. The available values are a subset of the
|
||||
// entire API provided by go-ethereum to reduce the maintenance surface and dev
|
||||
// complexity.
|
||||
|
|
@ -92,12 +92,12 @@ func NewNodeConfig() *NodeConfig {
|
|||
return &config
|
||||
}
|
||||
|
||||
// Node represents a Geth Ethereum node instance.
|
||||
// Node represents a Gubiq Ethereum node instance.
|
||||
type Node struct {
|
||||
node *node.Node
|
||||
}
|
||||
|
||||
// NewNode creates and configures a new Geth node.
|
||||
// NewNode creates and configures a new Gubiq node.
|
||||
func NewNode(datadir string, config *NodeConfig) (*Node, error) {
|
||||
// If no or partial configurations were specified, use defaults
|
||||
if config == nil {
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
// +build android
|
||||
|
||||
package geth
|
||||
package gubiq
|
||||
|
||||
// clientIdentifier is a hard coded identifier to report into the network.
|
||||
var clientIdentifier = "GethDroid"
|
||||
var clientIdentifier = "GubiqDroid"
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
// +build ios
|
||||
|
||||
package geth
|
||||
package gubiq
|
||||
|
||||
// clientIdentifier is a hard coded identifier to report into the network.
|
||||
var clientIdentifier = "iGeth"
|
||||
var clientIdentifier = "iGubiq"
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
// +build !android,!ios
|
||||
|
||||
package geth
|
||||
package gubiq
|
||||
|
||||
// clientIdentifier is a hard coded identifier to report into the network.
|
||||
var clientIdentifier = "GethMobile"
|
||||
var clientIdentifier = "GubiqMobile"
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
// Contains initialization code for the mbile library.
|
||||
|
||||
package geth
|
||||
package gubiq
|
||||
|
||||
import (
|
||||
"runtime"
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
// Contains perverted wrappers to allow crossing over empty interfaces.
|
||||
|
||||
package geth
|
||||
package gubiq
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
// Contains wrappers for the p2p package.
|
||||
|
||||
package geth
|
||||
package gubiq
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
// Contains all the wrappers from the params package.
|
||||
|
||||
package geth
|
||||
package gubiq
|
||||
|
||||
import (
|
||||
"github.com/ubiq/go-ubiq/core"
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
// Contains various wrappers for primitive types.
|
||||
|
||||
package geth
|
||||
package gubiq
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
// Contains all the wrappers from the core/types package.
|
||||
|
||||
package geth
|
||||
package gubiq
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
// Contains all the wrappers from the core/types package.
|
||||
|
||||
package geth
|
||||
package gubiq
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ var (
|
|||
// all registered services.
|
||||
type Config struct {
|
||||
// Name sets the instance name of the node. It must not contain the / character and is
|
||||
// used in the devp2p node identifier. The instance name of geth is "geth". If no
|
||||
// used in the devp2p node identifier. The instance name of gubiq is "gubiq". If no
|
||||
// value is specified, the basename of the current executable is used.
|
||||
Name string
|
||||
|
||||
|
|
@ -250,9 +250,9 @@ func DefaultWSEndpoint() string {
|
|||
// NodeName returns the devp2p node identifier.
|
||||
func (c *Config) NodeName() string {
|
||||
name := c.name()
|
||||
// Backwards compatibility: previous versions used title-cased "Geth", keep that.
|
||||
if name == "geth" || name == "geth-testnet" {
|
||||
name = "Geth"
|
||||
// Backwards compatibility: previous versions used title-cased "Gubiq", keep that.
|
||||
if name == "gubiq" || name == "gubiq-testnet" {
|
||||
name = "Gubiq"
|
||||
}
|
||||
if c.UserIdent != "" {
|
||||
name += "/" + c.UserIdent
|
||||
|
|
@ -276,8 +276,8 @@ func (c *Config) name() string {
|
|||
return c.Name
|
||||
}
|
||||
|
||||
// These resources are resolved differently for "geth" instances.
|
||||
var isOldGethResource = map[string]bool{
|
||||
// These resources are resolved differently for "gubiq" instances.
|
||||
var isOldGubiqResource = map[string]bool{
|
||||
"chaindata": true,
|
||||
"nodes": true,
|
||||
"nodekey": true,
|
||||
|
|
@ -294,10 +294,10 @@ func (c *Config) resolvePath(path string) string {
|
|||
return ""
|
||||
}
|
||||
// Backwards-compatibility: ensure that data directory files created
|
||||
// by geth 1.4 are used if they exist.
|
||||
if c.name() == "geth" && isOldGethResource[path] {
|
||||
// by gubiq 1.4 are used if they exist.
|
||||
if c.name() == "gubiq" && isOldGubiqResource[path] {
|
||||
oldpath := ""
|
||||
if c.Name == "geth" {
|
||||
if c.Name == "gubiq" {
|
||||
oldpath = filepath.Join(c.DataDir, path)
|
||||
}
|
||||
if oldpath != "" && common.FileExist(oldpath) {
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ func New(conf *Config) (*Node, error) {
|
|||
return nil, errors.New(`Config.Name cannot end in ".ipc"`)
|
||||
}
|
||||
// Ensure that the AccountManager method works before the node has started.
|
||||
// We rely on this in cmd/geth.
|
||||
// We rely on this in cmd/gubiq.
|
||||
am, ephemeralKeystore, err := makeAccountManager(conf)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
|
|||
2
vendor/golang.org/x/sys/unix/syscall_bsd.go
generated
vendored
2
vendor/golang.org/x/sys/unix/syscall_bsd.go
generated
vendored
|
|
@ -607,7 +607,7 @@ func Futimes(fd int, tv []Timeval) error {
|
|||
|
||||
// TODO: wrap
|
||||
// Acct(name nil-string) (err error)
|
||||
// Gethostuuid(uuid *byte, timeout *Timespec) (err error)
|
||||
// Gubiqostuuid(uuid *byte, timeout *Timespec) (err error)
|
||||
// Madvise(addr *byte, len int, behav int) (err error)
|
||||
// Mprotect(addr *byte, len int, prot int) (err error)
|
||||
// Msync(addr *byte, len int, flags int) (err error)
|
||||
|
|
|
|||
2
vendor/golang.org/x/sys/unix/syscall_solaris.go
generated
vendored
2
vendor/golang.org/x/sys/unix/syscall_solaris.go
generated
vendored
|
|
@ -288,7 +288,7 @@ func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (int, erro
|
|||
|
||||
//sys gethostname(buf []byte) (n int, err error)
|
||||
|
||||
func Gethostname() (name string, err error) {
|
||||
func Gubiqostname() (name string, err error) {
|
||||
var buf [MaxHostNameLen]byte
|
||||
n, err := gethostname(buf[:])
|
||||
if n != 0 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue