mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-15 16:33:47 +00:00
Merge pull request #6 from maticnetwork/repackage
MAT-373 Repackage to bor
This commit is contained in:
commit
455b93aca7
600 changed files with 2750 additions and 2920 deletions
4
.github/CONTRIBUTING.md
vendored
4
.github/CONTRIBUTING.md
vendored
|
|
@ -30,11 +30,11 @@ Please make sure your contributions adhere to our coding guidelines:
|
||||||
Before you submit a feature request, please check and make sure that it isn't
|
Before you submit a feature request, please check and make sure that it isn't
|
||||||
possible through some other means. The JavaScript-enabled console is a powerful
|
possible through some other means. The JavaScript-enabled console is a powerful
|
||||||
feature in the right hands. Please check our
|
feature in the right hands. Please check our
|
||||||
[Wiki page](https://github.com/ethereum/go-ethereum/wiki) for more info
|
[Wiki page](https://github.com/maticnetwork/bor/wiki) for more info
|
||||||
and help.
|
and help.
|
||||||
|
|
||||||
## Configuration, dependencies, and tests
|
## Configuration, dependencies, and tests
|
||||||
|
|
||||||
Please see the [Developers' Guide](https://github.com/ethereum/go-ethereum/wiki/Developers'-Guide)
|
Please see the [Developers' Guide](https://github.com/maticnetwork/bor/wiki/Developers'-Guide)
|
||||||
for more details on configuring your environment, managing project dependencies
|
for more details on configuring your environment, managing project dependencies
|
||||||
and testing procedures.
|
and testing procedures.
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
language: go
|
language: go
|
||||||
go_import_path: github.com/ethereum/go-ethereum
|
go_import_path: github.com/maticnetwork/bor
|
||||||
sudo: false
|
sudo: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
|
@ -169,7 +169,7 @@ matrix:
|
||||||
- mv android-ndk-r19b $ANDROID_HOME/ndk-bundle
|
- mv android-ndk-r19b $ANDROID_HOME/ndk-bundle
|
||||||
|
|
||||||
- mkdir -p $GOPATH/src/github.com/ethereum
|
- mkdir -p $GOPATH/src/github.com/ethereum
|
||||||
- ln -s `pwd` $GOPATH/src/github.com/ethereum/go-ethereum
|
- ln -s `pwd` $GOPATH/src/github.com/maticnetwork/bor
|
||||||
- go run build/ci.go aar -signer ANDROID_SIGNING_KEY -deploy https://oss.sonatype.org -upload gethstore/builds
|
- go run build/ci.go aar -signer ANDROID_SIGNING_KEY -deploy https://oss.sonatype.org -upload gethstore/builds
|
||||||
|
|
||||||
# This builder does the OSX Azure, iOS CocoaPods and iOS Azure uploads
|
# This builder does the OSX Azure, iOS CocoaPods and iOS Azure uploads
|
||||||
|
|
|
||||||
124
Makefile
124
Makefile
|
|
@ -2,19 +2,19 @@
|
||||||
# with Go source code. If you know what GOPATH is then you probably
|
# with Go source code. If you know what GOPATH is then you probably
|
||||||
# don't need to bother with make.
|
# don't need to bother with make.
|
||||||
|
|
||||||
.PHONY: geth android ios geth-cross evm all test clean
|
.PHONY: bor android ios bor-cross evm all test clean
|
||||||
.PHONY: geth-linux geth-linux-386 geth-linux-amd64 geth-linux-mips64 geth-linux-mips64le
|
.PHONY: bor-linux bor-linux-386 bor-linux-amd64 bor-linux-mips64 bor-linux-mips64le
|
||||||
.PHONY: geth-linux-arm geth-linux-arm-5 geth-linux-arm-6 geth-linux-arm-7 geth-linux-arm64
|
.PHONY: bor-linux-arm bor-linux-arm-5 bor-linux-arm-6 bor-linux-arm-7 bor-linux-arm64
|
||||||
.PHONY: geth-darwin geth-darwin-386 geth-darwin-amd64
|
.PHONY: bor-darwin bor-darwin-386 bor-darwin-amd64
|
||||||
.PHONY: geth-windows geth-windows-386 geth-windows-amd64
|
.PHONY: bor-windows bor-windows-386 bor-windows-amd64
|
||||||
|
|
||||||
GOBIN = $(shell pwd)/build/bin
|
GOBIN = $(shell pwd)/build/bin
|
||||||
GO ?= latest
|
GO ?= latest
|
||||||
|
|
||||||
geth:
|
bor:
|
||||||
build/env.sh go run build/ci.go install ./cmd/geth
|
build/env.sh go run build/ci.go install ./cmd/bor
|
||||||
@echo "Done building."
|
@echo "Done building."
|
||||||
@echo "Run \"$(GOBIN)/geth\" to launch geth."
|
@echo "Run \"$(GOBIN)/bor\" to launch bor."
|
||||||
|
|
||||||
all:
|
all:
|
||||||
build/env.sh go run build/ci.go install
|
build/env.sh go run build/ci.go install
|
||||||
|
|
@ -22,12 +22,12 @@ all:
|
||||||
android:
|
android:
|
||||||
build/env.sh go run build/ci.go aar --local
|
build/env.sh go run build/ci.go aar --local
|
||||||
@echo "Done building."
|
@echo "Done building."
|
||||||
@echo "Import \"$(GOBIN)/geth.aar\" to use the library."
|
@echo "Import \"$(GOBIN)/bor.aar\" to use the library."
|
||||||
|
|
||||||
ios:
|
ios:
|
||||||
build/env.sh go run build/ci.go xcode --local
|
build/env.sh go run build/ci.go xcode --local
|
||||||
@echo "Done building."
|
@echo "Done building."
|
||||||
@echo "Import \"$(GOBIN)/Geth.framework\" to use the library."
|
@echo "Import \"$(GOBIN)/bor.framework\" to use the library."
|
||||||
|
|
||||||
test: all
|
test: all
|
||||||
build/env.sh go run build/ci.go test
|
build/env.sh go run build/ci.go test
|
||||||
|
|
@ -54,92 +54,92 @@ devtools:
|
||||||
|
|
||||||
# Cross Compilation Targets (xgo)
|
# Cross Compilation Targets (xgo)
|
||||||
|
|
||||||
geth-cross: geth-linux geth-darwin geth-windows geth-android geth-ios
|
bor-cross: bor-linux bor-darwin bor-windows bor-android bor-ios
|
||||||
@echo "Full cross compilation done:"
|
@echo "Full cross compilation done:"
|
||||||
@ls -ld $(GOBIN)/geth-*
|
@ls -ld $(GOBIN)/bor-*
|
||||||
|
|
||||||
geth-linux: geth-linux-386 geth-linux-amd64 geth-linux-arm geth-linux-mips64 geth-linux-mips64le
|
bor-linux: bor-linux-386 bor-linux-amd64 bor-linux-arm bor-linux-mips64 bor-linux-mips64le
|
||||||
@echo "Linux cross compilation done:"
|
@echo "Linux cross compilation done:"
|
||||||
@ls -ld $(GOBIN)/geth-linux-*
|
@ls -ld $(GOBIN)/bor-linux-*
|
||||||
|
|
||||||
geth-linux-386:
|
bor-linux-386:
|
||||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/386 -v ./cmd/geth
|
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/386 -v ./cmd/bor
|
||||||
@echo "Linux 386 cross compilation done:"
|
@echo "Linux 386 cross compilation done:"
|
||||||
@ls -ld $(GOBIN)/geth-linux-* | grep 386
|
@ls -ld $(GOBIN)/bor-linux-* | grep 386
|
||||||
|
|
||||||
geth-linux-amd64:
|
bor-linux-amd64:
|
||||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/amd64 -v ./cmd/geth
|
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/amd64 -v ./cmd/bor
|
||||||
@echo "Linux amd64 cross compilation done:"
|
@echo "Linux amd64 cross compilation done:"
|
||||||
@ls -ld $(GOBIN)/geth-linux-* | grep amd64
|
@ls -ld $(GOBIN)/bor-linux-* | grep amd64
|
||||||
|
|
||||||
geth-linux-arm: geth-linux-arm-5 geth-linux-arm-6 geth-linux-arm-7 geth-linux-arm64
|
bor-linux-arm: bor-linux-arm-5 bor-linux-arm-6 bor-linux-arm-7 bor-linux-arm64
|
||||||
@echo "Linux ARM cross compilation done:"
|
@echo "Linux ARM cross compilation done:"
|
||||||
@ls -ld $(GOBIN)/geth-linux-* | grep arm
|
@ls -ld $(GOBIN)/bor-linux-* | grep arm
|
||||||
|
|
||||||
geth-linux-arm-5:
|
bor-linux-arm-5:
|
||||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/arm-5 -v ./cmd/geth
|
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/arm-5 -v ./cmd/bor
|
||||||
@echo "Linux ARMv5 cross compilation done:"
|
@echo "Linux ARMv5 cross compilation done:"
|
||||||
@ls -ld $(GOBIN)/geth-linux-* | grep arm-5
|
@ls -ld $(GOBIN)/bor-linux-* | grep arm-5
|
||||||
|
|
||||||
geth-linux-arm-6:
|
bor-linux-arm-6:
|
||||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/arm-6 -v ./cmd/geth
|
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/arm-6 -v ./cmd/bor
|
||||||
@echo "Linux ARMv6 cross compilation done:"
|
@echo "Linux ARMv6 cross compilation done:"
|
||||||
@ls -ld $(GOBIN)/geth-linux-* | grep arm-6
|
@ls -ld $(GOBIN)/bor-linux-* | grep arm-6
|
||||||
|
|
||||||
geth-linux-arm-7:
|
bor-linux-arm-7:
|
||||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/arm-7 -v ./cmd/geth
|
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/arm-7 -v ./cmd/bor
|
||||||
@echo "Linux ARMv7 cross compilation done:"
|
@echo "Linux ARMv7 cross compilation done:"
|
||||||
@ls -ld $(GOBIN)/geth-linux-* | grep arm-7
|
@ls -ld $(GOBIN)/bor-linux-* | grep arm-7
|
||||||
|
|
||||||
geth-linux-arm64:
|
bor-linux-arm64:
|
||||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/arm64 -v ./cmd/geth
|
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/arm64 -v ./cmd/bor
|
||||||
@echo "Linux ARM64 cross compilation done:"
|
@echo "Linux ARM64 cross compilation done:"
|
||||||
@ls -ld $(GOBIN)/geth-linux-* | grep arm64
|
@ls -ld $(GOBIN)/bor-linux-* | grep arm64
|
||||||
|
|
||||||
geth-linux-mips:
|
bor-linux-mips:
|
||||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mips --ldflags '-extldflags "-static"' -v ./cmd/geth
|
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mips --ldflags '-extldflags "-static"' -v ./cmd/bor
|
||||||
@echo "Linux MIPS cross compilation done:"
|
@echo "Linux MIPS cross compilation done:"
|
||||||
@ls -ld $(GOBIN)/geth-linux-* | grep mips
|
@ls -ld $(GOBIN)/bor-linux-* | grep mips
|
||||||
|
|
||||||
geth-linux-mipsle:
|
bor-linux-mipsle:
|
||||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mipsle --ldflags '-extldflags "-static"' -v ./cmd/geth
|
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mipsle --ldflags '-extldflags "-static"' -v ./cmd/bor
|
||||||
@echo "Linux MIPSle cross compilation done:"
|
@echo "Linux MIPSle cross compilation done:"
|
||||||
@ls -ld $(GOBIN)/geth-linux-* | grep mipsle
|
@ls -ld $(GOBIN)/bor-linux-* | grep mipsle
|
||||||
|
|
||||||
geth-linux-mips64:
|
bor-linux-mips64:
|
||||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mips64 --ldflags '-extldflags "-static"' -v ./cmd/geth
|
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mips64 --ldflags '-extldflags "-static"' -v ./cmd/bor
|
||||||
@echo "Linux MIPS64 cross compilation done:"
|
@echo "Linux MIPS64 cross compilation done:"
|
||||||
@ls -ld $(GOBIN)/geth-linux-* | grep mips64
|
@ls -ld $(GOBIN)/bor-linux-* | grep mips64
|
||||||
|
|
||||||
geth-linux-mips64le:
|
bor-linux-mips64le:
|
||||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mips64le --ldflags '-extldflags "-static"' -v ./cmd/geth
|
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mips64le --ldflags '-extldflags "-static"' -v ./cmd/bor
|
||||||
@echo "Linux MIPS64le cross compilation done:"
|
@echo "Linux MIPS64le cross compilation done:"
|
||||||
@ls -ld $(GOBIN)/geth-linux-* | grep mips64le
|
@ls -ld $(GOBIN)/bor-linux-* | grep mips64le
|
||||||
|
|
||||||
geth-darwin: geth-darwin-386 geth-darwin-amd64
|
bor-darwin: bor-darwin-386 bor-darwin-amd64
|
||||||
@echo "Darwin cross compilation done:"
|
@echo "Darwin cross compilation done:"
|
||||||
@ls -ld $(GOBIN)/geth-darwin-*
|
@ls -ld $(GOBIN)/bor-darwin-*
|
||||||
|
|
||||||
geth-darwin-386:
|
bor-darwin-386:
|
||||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=darwin/386 -v ./cmd/geth
|
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=darwin/386 -v ./cmd/bor
|
||||||
@echo "Darwin 386 cross compilation done:"
|
@echo "Darwin 386 cross compilation done:"
|
||||||
@ls -ld $(GOBIN)/geth-darwin-* | grep 386
|
@ls -ld $(GOBIN)/bor-darwin-* | grep 386
|
||||||
|
|
||||||
geth-darwin-amd64:
|
bor-darwin-amd64:
|
||||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=darwin/amd64 -v ./cmd/geth
|
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=darwin/amd64 -v ./cmd/bor
|
||||||
@echo "Darwin amd64 cross compilation done:"
|
@echo "Darwin amd64 cross compilation done:"
|
||||||
@ls -ld $(GOBIN)/geth-darwin-* | grep amd64
|
@ls -ld $(GOBIN)/bor-darwin-* | grep amd64
|
||||||
|
|
||||||
geth-windows: geth-windows-386 geth-windows-amd64
|
bor-windows: bor-windows-386 bor-windows-amd64
|
||||||
@echo "Windows cross compilation done:"
|
@echo "Windows cross compilation done:"
|
||||||
@ls -ld $(GOBIN)/geth-windows-*
|
@ls -ld $(GOBIN)/bor-windows-*
|
||||||
|
|
||||||
geth-windows-386:
|
bor-windows-386:
|
||||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=windows/386 -v ./cmd/geth
|
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=windows/386 -v ./cmd/bor
|
||||||
@echo "Windows 386 cross compilation done:"
|
@echo "Windows 386 cross compilation done:"
|
||||||
@ls -ld $(GOBIN)/geth-windows-* | grep 386
|
@ls -ld $(GOBIN)/bor-windows-* | grep 386
|
||||||
|
|
||||||
geth-windows-amd64:
|
bor-windows-amd64:
|
||||||
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=windows/amd64 -v ./cmd/geth
|
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=windows/amd64 -v ./cmd/bor
|
||||||
@echo "Windows amd64 cross compilation done:"
|
@echo "Windows amd64 cross compilation done:"
|
||||||
@ls -ld $(GOBIN)/geth-windows-* | grep amd64
|
@ls -ld $(GOBIN)/bor-windows-* | grep amd64
|
||||||
|
|
|
||||||
286
README.md
286
README.md
|
|
@ -2,10 +2,8 @@
|
||||||
|
|
||||||
Official Golang implementation of the Ethereum protocol.
|
Official Golang implementation of the Ethereum protocol.
|
||||||
|
|
||||||
[](https://godoc.org/github.com/maticnetwork/bor)
|
||||||
https://camo.githubusercontent.com/915b7be44ada53c290eb157634330494ebe3e30a/68747470733a2f2f676f646f632e6f72672f6769746875622e636f6d2f676f6c616e672f6764646f3f7374617475732e737667
|
[](https://goreportcard.com/report/github.com/maticnetwork/bor)
|
||||||
)](https://godoc.org/github.com/ethereum/go-ethereum)
|
|
||||||
[](https://goreportcard.com/report/github.com/ethereum/go-ethereum)
|
|
||||||
[](https://travis-ci.org/ethereum/go-ethereum)
|
[](https://travis-ci.org/ethereum/go-ethereum)
|
||||||
[](https://discord.gg/nthXNEv)
|
[](https://discord.gg/nthXNEv)
|
||||||
|
|
||||||
|
|
@ -14,13 +12,13 @@ archives are published at https://geth.ethereum.org/downloads/.
|
||||||
|
|
||||||
## Building the source
|
## Building the source
|
||||||
|
|
||||||
For prerequisites and detailed build instructions please read the [Installation Instructions](https://github.com/ethereum/go-ethereum/wiki/Building-Ethereum) on the wiki.
|
For prerequisites and detailed build instructions please read the [Installation Instructions](https://github.com/maticnetwork/bor/wiki/Building-Ethereum) on the wiki.
|
||||||
|
|
||||||
Building `geth` requires both a Go (version 1.10 or later) and a C compiler. You can install
|
Building `bor` requires both a Go (version 1.10 or later) and a C compiler. You can install
|
||||||
them using your favourite package manager. Once the dependencies are installed, run
|
them using your favourite package manager. Once the dependencies are installed, run
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
make geth
|
make bor
|
||||||
```
|
```
|
||||||
|
|
||||||
or, to build the full suite of utilities:
|
or, to build the full suite of utilities:
|
||||||
|
|
@ -34,22 +32,22 @@ make all
|
||||||
The go-ethereum project comes with several wrappers/executables found in the `cmd`
|
The go-ethereum project comes with several wrappers/executables found in the `cmd`
|
||||||
directory.
|
directory.
|
||||||
|
|
||||||
| Command | Description |
|
| Command | Description |
|
||||||
| :-----------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| :-----------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||||
| **`geth`** | Our main Ethereum CLI client. It is the entry point into the Ethereum network (main-, test- or private net), capable of running as a full node (default), archive node (retaining all historical state) or a light node (retrieving data live). It can be used by other processes as a gateway into the Ethereum network via JSON RPC endpoints exposed on top of HTTP, WebSocket and/or IPC transports. `geth --help` and the [CLI Wiki page](https://github.com/ethereum/go-ethereum/wiki/Command-Line-Options) for command line options. |
|
| **`bor`** | 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/maticnetwork/bor/wiki/Command-Line-Options) for command line options. |
|
||||||
| `abigen` | Source code generator to convert Ethereum contract definitions into easy to use, compile-time type-safe Go packages. It operates on plain [Ethereum contract ABIs](https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI) with expanded functionality if the contract bytecode is also available. However, it also accepts Solidity source files, making development much more streamlined. Please see our [Native DApps](https://github.com/ethereum/go-ethereum/wiki/Native-DApps:-Go-bindings-to-Ethereum-contracts) wiki page for details. |
|
| `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/maticnetwork/bor/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. |
|
| `bootnode` | Stripped down version of our Ethereum client implementation that only takes part in the network node discovery protocol, but does not run any of the higher level application protocols. It can be used as a lightweight bootstrap node to aid in finding peers in private networks. |
|
||||||
| `evm` | Developer utility version of the EVM (Ethereum Virtual Machine) that is capable of running bytecode snippets within a configurable environment and execution mode. Its purpose is to allow isolated, fine-grained debugging of EVM opcodes (e.g. `evm --code 60ff60ff --debug`). |
|
| `evm` | Developer utility version of the EVM (Ethereum Virtual Machine) that is capable of running bytecode snippets within a configurable environment and execution mode. Its purpose is to allow isolated, fine-grained debugging of EVM opcodes (e.g. `evm --code 60ff60ff --debug`). |
|
||||||
| `gethrpctest` | Developer utility tool to support our [ethereum/rpc-test](https://github.com/ethereum/rpc-tests) test suite which validates baseline conformity to the [Ethereum JSON RPC](https://github.com/ethereum/wiki/wiki/JSON-RPC) specs. Please see the [test suite's readme](https://github.com/ethereum/rpc-tests/blob/master/README.md) for details. |
|
| `gethrpctest` | Developer utility tool to support our [ethereum/rpc-test](https://github.com/ethereum/rpc-tests) test suite which validates baseline conformity to the [Ethereum JSON RPC](https://github.com/ethereum/wiki/wiki/JSON-RPC) specs. Please see the [test suite's readme](https://github.com/ethereum/rpc-tests/blob/master/README.md) for details. |
|
||||||
| `rlpdump` | Developer utility tool to convert binary RLP ([Recursive Length Prefix](https://github.com/ethereum/wiki/wiki/RLP)) dumps (data encoding used by the Ethereum protocol both network as well as consensus wise) to user-friendlier hierarchical representation (e.g. `rlpdump --hex CE0183FFFFFFC4C304050583616263`). |
|
| `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`). |
|
||||||
| `puppeth` | a CLI wizard that aids in creating a new Ethereum network. |
|
| `puppeth` | a CLI wizard that aids in creating a new Ethereum network. |
|
||||||
|
|
||||||
## Running `geth`
|
## Running `bor`
|
||||||
|
|
||||||
Going through all the possible command line flags is out of scope here (please consult our
|
Going through all the possible command line flags is out of scope here (please consult our
|
||||||
[CLI Wiki page](https://github.com/ethereum/go-ethereum/wiki/Command-Line-Options)),
|
[CLI Wiki page](https://github.com/ethereum/go-ethereum/wiki/Command-Line-Options)),
|
||||||
but we've enumerated a few common parameter combos to get you up to speed quickly
|
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.
|
on how you can run your own `bor` instance.
|
||||||
|
|
||||||
### Full node on the main Ethereum network
|
### Full node on the main Ethereum network
|
||||||
|
|
||||||
|
|
@ -63,14 +61,15 @@ $ geth console
|
||||||
```
|
```
|
||||||
|
|
||||||
This command will:
|
This command will:
|
||||||
* Start `geth` in fast sync mode (default, can be changed with the `--syncmode` flag),
|
|
||||||
causing it to download more data in exchange for avoiding processing the entire history
|
- Start `geth` in fast sync mode (default, can be changed with the `--syncmode` flag),
|
||||||
of the Ethereum network, which is very CPU intensive.
|
causing it to download more data in exchange for avoiding processing the entire history
|
||||||
* Start up `geth`'s built-in interactive [JavaScript console](https://github.com/ethereum/go-ethereum/wiki/JavaScript-Console),
|
of the Ethereum network, which is very CPU intensive.
|
||||||
(via the trailing `console` subcommand) through which you can invoke all official [`web3` methods](https://github.com/ethereum/wiki/wiki/JavaScript-API)
|
- Start up `geth`'s built-in interactive [JavaScript console](https://github.com/ethereum/go-ethereum/wiki/JavaScript-Console),
|
||||||
as well as `geth`'s own [management APIs](https://github.com/ethereum/go-ethereum/wiki/Management-APIs).
|
(via the trailing `console` subcommand) through which you can invoke all official [`web3` methods](https://github.com/ethereum/wiki/wiki/JavaScript-API)
|
||||||
This tool is optional and if you leave it out you can always attach to an already running
|
as well as `geth`'s own [management APIs](https://github.com/ethereum/go-ethereum/wiki/Management-APIs).
|
||||||
`geth` instance with `geth attach`.
|
This tool is optional and if you leave it out you can always attach to an already running
|
||||||
|
`geth` instance with `geth attach`.
|
||||||
|
|
||||||
### A Full node on the Ethereum test network
|
### A Full node on the Ethereum test network
|
||||||
|
|
||||||
|
|
@ -89,79 +88,46 @@ useful on the testnet too. Please see above for their explanations if you've ski
|
||||||
|
|
||||||
Specifying the `--testnet` flag, however, will reconfigure your `geth` instance a bit:
|
Specifying the `--testnet` flag, however, will reconfigure your `geth` instance a bit:
|
||||||
|
|
||||||
* Instead of using the default data directory (`~/.ethereum` on Linux for example), `geth`
|
- Instead of using the default data directory (`~/.ethereum` on Linux for example), `geth`
|
||||||
will nest itself one level deeper into a `testnet` subfolder (`~/.ethereum/testnet` on
|
will nest itself one level deeper into a `testnet` subfolder (`~/.ethereum/testnet` on
|
||||||
Linux). Note, on OSX and Linux this also means that attaching to a running testnet node
|
Linux). Note, on OSX and Linux this also means that attaching to a running testnet node
|
||||||
requires the use of a custom endpoint since `geth attach` will try to attach to a
|
requires the use of a custom endpoint since `geth attach` will try to attach to a
|
||||||
production node endpoint by default. E.g.
|
production node endpoint by default. E.g.
|
||||||
`geth attach <datadir>/testnet/geth.ipc`. Windows users are not affected by
|
`geth attach <datadir>/testnet/bor.ipc`. Windows users are not affected by
|
||||||
this.
|
this.
|
||||||
* Instead of connecting the main Ethereum network, the client will connect to the test
|
- 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.
|
network, which uses different P2P bootnodes, different network IDs and genesis states.
|
||||||
|
|
||||||
*Note: Although there are some internal protective measures to prevent transactions from
|
_Note: Although there are some internal protective measures to prevent transactions from
|
||||||
crossing over between the main network and test network, you should make sure to always
|
crossing over between the main network and test network, you should make sure to always
|
||||||
use separate accounts for play-money and real-money. Unless you manually move
|
use separate accounts for play-money and real-money. Unless you manually move
|
||||||
accounts, `geth` will by default correctly separate the two networks and will not make any
|
accounts, `geth` will by default correctly separate the two networks and will not make any
|
||||||
accounts available between them.*
|
accounts available between them._
|
||||||
|
|
||||||
### Full node on the Rinkeby test network
|
|
||||||
|
|
||||||
The above test network is a cross-client one based on the ethash proof-of-work consensus
|
|
||||||
algorithm. As such, it has certain extra overhead and is more susceptible to reorganization
|
|
||||||
attacks due to the network's low difficulty/security. Go Ethereum also supports connecting
|
|
||||||
to a proof-of-authority based test network called [*Rinkeby*](https://www.rinkeby.io)
|
|
||||||
(operated by members of the community). This network is lighter, more secure, but is only
|
|
||||||
supported by go-ethereum.
|
|
||||||
|
|
||||||
```shell
|
|
||||||
$ geth --rinkeby console
|
|
||||||
```
|
|
||||||
|
|
||||||
### Configuration
|
### Configuration
|
||||||
|
|
||||||
As an alternative to passing the numerous flags to the `geth` binary, you can also pass a
|
As an alternative to passing the numerous flags to the `bor` binary, you can also pass a
|
||||||
configuration file via:
|
configuration file via:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ geth --config /path/to/your_config.toml
|
$ bor --config /path/to/your_config.toml
|
||||||
```
|
```
|
||||||
|
|
||||||
To get an idea how the file should look like you can use the `dumpconfig` subcommand to
|
To get an idea how the file should look like you can use the `dumpconfig` subcommand to
|
||||||
export your existing configuration:
|
export your existing configuration:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ geth --your-favourite-flags dumpconfig
|
$ bor --your-favourite-flags dumpconfig
|
||||||
```
|
```
|
||||||
|
|
||||||
*Note: This works only with `geth` v1.6.0 and above.*
|
_Note: This works only with `geth` v1.6.0 and above._
|
||||||
|
|
||||||
#### Docker quick start
|
### Programmatically interfacing `bor` nodes
|
||||||
|
|
||||||
One of the quickest ways to get Ethereum up and running on your machine is by using
|
|
||||||
Docker:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
docker run -d --name ethereum-node -v /Users/alice/ethereum:/root \
|
|
||||||
-p 8545:8545 -p 30303:30303 \
|
|
||||||
ethereum/client-go
|
|
||||||
```
|
|
||||||
|
|
||||||
This will start `geth` in fast-sync mode with a DB memory allowance of 1GB just as the
|
|
||||||
above command does. It will also create a persistent volume in your home directory for
|
|
||||||
saving your blockchain as well as map the default ports. There is also an `alpine` tag
|
|
||||||
available for a slim version of the image.
|
|
||||||
|
|
||||||
Do not forget `--rpcaddr 0.0.0.0`, if you want to access RPC from other containers
|
|
||||||
and/or hosts. By default, `geth` binds to the local interface and RPC endpoints is not
|
|
||||||
accessible from the outside.
|
|
||||||
|
|
||||||
### Programmatically interfacing `geth` nodes
|
|
||||||
|
|
||||||
As a developer, sooner rather than later you'll want to start interacting with `geth` and the
|
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
|
Ethereum network via your own programs and not manually through the console. To aid
|
||||||
this, `geth` has built-in support for a JSON-RPC based APIs ([standard APIs](https://github.com/ethereum/wiki/wiki/JSON-RPC)
|
this, `geth` has built-in support for a JSON-RPC based APIs ([standard APIs](https://github.com/ethereum/wiki/wiki/JSON-RPC)
|
||||||
and [`geth` specific APIs](https://github.com/ethereum/go-ethereum/wiki/Management-APIs)).
|
and [`bor` specific APIs](https://github.com/maticnetwork/bor/wiki/Management-APIs)).
|
||||||
These can be exposed via HTTP, WebSockets and IPC (UNIX sockets on UNIX based
|
These can be exposed via HTTP, WebSockets and IPC (UNIX sockets on UNIX based
|
||||||
platforms, and named pipes on Windows).
|
platforms, and named pipes on Windows).
|
||||||
|
|
||||||
|
|
@ -172,19 +138,19 @@ you'd expect.
|
||||||
|
|
||||||
HTTP based JSON-RPC API options:
|
HTTP based JSON-RPC API options:
|
||||||
|
|
||||||
* `--rpc` Enable the HTTP-RPC server
|
- `--rpc` Enable the HTTP-RPC server
|
||||||
* `--rpcaddr` HTTP-RPC server listening interface (default: `localhost`)
|
- `--rpcaddr` HTTP-RPC server listening interface (default: `localhost`)
|
||||||
* `--rpcport` HTTP-RPC server listening port (default: `8545`)
|
- `--rpcport` HTTP-RPC server listening port (default: `8545`)
|
||||||
* `--rpcapi` API's offered over the HTTP-RPC interface (default: `eth,net,web3`)
|
- `--rpcapi` API's offered over the HTTP-RPC interface (default: `eth,net,web3`)
|
||||||
* `--rpccorsdomain` Comma separated list of domains from which to accept cross origin requests (browser enforced)
|
- `--rpccorsdomain` Comma separated list of domains from which to accept cross origin requests (browser enforced)
|
||||||
* `--ws` Enable the WS-RPC server
|
- `--ws` Enable the WS-RPC server
|
||||||
* `--wsaddr` WS-RPC server listening interface (default: `localhost`)
|
- `--wsaddr` WS-RPC server listening interface (default: `localhost`)
|
||||||
* `--wsport` WS-RPC server listening port (default: `8546`)
|
- `--wsport` WS-RPC server listening port (default: `8546`)
|
||||||
* `--wsapi` API's offered over the WS-RPC interface (default: `eth,net,web3`)
|
- `--wsapi` API's offered over the WS-RPC interface (default: `eth,net,web3`)
|
||||||
* `--wsorigins` Origins from which to accept websockets requests
|
- `--wsorigins` Origins from which to accept websockets requests
|
||||||
* `--ipcdisable` Disable the IPC-RPC server
|
- `--ipcdisable` Disable the IPC-RPC server
|
||||||
* `--ipcapi` API's offered over the IPC-RPC interface (default: `admin,debug,eth,miner,net,personal,shh,txpool,web3`)
|
- `--ipcapi` API's offered over the IPC-RPC interface (default: `admin,debug,eth,miner,net,personal,shh,txpool,web3`)
|
||||||
* `--ipcpath` Filename for IPC socket/pipe within the datadir (explicit paths escape it)
|
- `--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
|
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
|
connect via HTTP, WS or IPC to a `geth` node configured with the above flags and you'll
|
||||||
|
|
@ -197,148 +163,12 @@ Ethereum nodes with exposed APIs! Further, all browser tabs can access locally
|
||||||
running web servers, so malicious web pages could try to subvert locally available
|
running web servers, so malicious web pages could try to subvert locally available
|
||||||
APIs!**
|
APIs!**
|
||||||
|
|
||||||
### Operating a private network
|
|
||||||
|
|
||||||
Maintaining your own private network is more involved as a lot of configurations taken for
|
|
||||||
granted in the official networks need to be manually set up.
|
|
||||||
|
|
||||||
#### Defining the private genesis state
|
|
||||||
|
|
||||||
First, you'll need to create the genesis state of your networks, which all nodes need to be
|
|
||||||
aware of and agree upon. This consists of a small JSON file (e.g. call it `genesis.json`):
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"config": {
|
|
||||||
"chainId": 0,
|
|
||||||
"homesteadBlock": 0,
|
|
||||||
"eip155Block": 0,
|
|
||||||
"eip158Block": 0
|
|
||||||
},
|
|
||||||
"alloc": {},
|
|
||||||
"coinbase": "0x0000000000000000000000000000000000000000",
|
|
||||||
"difficulty": "0x20000",
|
|
||||||
"extraData": "",
|
|
||||||
"gasLimit": "0x2fefd8",
|
|
||||||
"nonce": "0x0000000000000042",
|
|
||||||
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
|
||||||
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
|
||||||
"timestamp": "0x00"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
The above fields should be fine for most purposes, although we'd recommend changing
|
|
||||||
the `nonce` to some random value so you prevent unknown remote nodes from being able
|
|
||||||
to connect to you. If you'd like to pre-fund some accounts for easier testing, you can
|
|
||||||
populate the `alloc` field with account configs:
|
|
||||||
|
|
||||||
```json
|
|
||||||
"alloc": {
|
|
||||||
"0x0000000000000000000000000000000000000001": {
|
|
||||||
"balance": "111111111"
|
|
||||||
},
|
|
||||||
"0x0000000000000000000000000000000000000002": {
|
|
||||||
"balance": "222222222"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
With the genesis state defined in the above JSON file, you'll need to initialize **every**
|
|
||||||
`geth` node with it prior to starting it up to ensure all blockchain parameters are correctly
|
|
||||||
set:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
$ geth init path/to/genesis.json
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Creating the rendezvous point
|
|
||||||
|
|
||||||
With all nodes that you want to run initialized to the desired genesis state, you'll need to
|
|
||||||
start a bootstrap node that others can use to find each other in your network and/or over
|
|
||||||
the internet. The clean way is to configure and run a dedicated bootnode:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
$ bootnode --genkey=boot.key
|
|
||||||
$ bootnode --nodekey=boot.key
|
|
||||||
```
|
|
||||||
|
|
||||||
With the bootnode online, it will display an [`enode` URL](https://github.com/ethereum/wiki/wiki/enode-url-format)
|
|
||||||
that other nodes can use to connect to it and exchange peer information. Make sure to
|
|
||||||
replace the 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.*
|
|
||||||
|
|
||||||
#### 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 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.
|
|
||||||
|
|
||||||
```shell
|
|
||||||
$ geth --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 need to configure a miner to process transactions and create new blocks for you.*
|
|
||||||
|
|
||||||
#### Running a private miner
|
|
||||||
|
|
||||||
Mining on the public Ethereum network is a complex task as it's only feasible using GPUs,
|
|
||||||
requiring an OpenCL or CUDA enabled `ethminer` instance. For information on such a
|
|
||||||
setup, please consult the [EtherMining subreddit](https://www.reddit.com/r/EtherMining/)
|
|
||||||
and the [Genoil miner](https://github.com/Genoil/cpp-ethereum) 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` instance for mining, run it with all your usual flags, extended
|
|
||||||
by:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
$ geth <usual-flags> --mine --minerthreads=1 --etherbase=0x0000000000000000000000000000000000000000
|
|
||||||
```
|
|
||||||
|
|
||||||
Which will start mining blocks and transactions on a single CPU thread, crediting all
|
|
||||||
proceedings to the account specified by `--etherbase`. You can further tune the mining
|
|
||||||
by changing the default gas limit blocks converge to (`--targetgaslimit`) and the price
|
|
||||||
transactions are accepted at (`--gasprice`).
|
|
||||||
|
|
||||||
## Contribution
|
|
||||||
|
|
||||||
Thank you for considering to help out with the source code! We welcome contributions
|
|
||||||
from anyone on the internet, and are grateful for even the smallest of fixes!
|
|
||||||
|
|
||||||
If you'd like to contribute to go-ethereum, please fork, fix, commit and send a pull request
|
|
||||||
for the maintainers to review and merge into the main code base. If you wish to submit
|
|
||||||
more complex changes though, please check up with the core devs first on [our gitter channel](https://gitter.im/ethereum/go-ethereum)
|
|
||||||
to ensure those changes are in line with the general philosophy of the project and/or get
|
|
||||||
some early feedback which can make both your efforts much lighter as well as our review
|
|
||||||
and merge procedures quick and simple.
|
|
||||||
|
|
||||||
Please make sure your contributions adhere to our coding guidelines:
|
|
||||||
|
|
||||||
* Code must adhere to the official Go [formatting](https://golang.org/doc/effective_go.html#formatting)
|
|
||||||
guidelines (i.e. uses [gofmt](https://golang.org/cmd/gofmt/)).
|
|
||||||
* Code must be documented adhering to the official Go [commentary](https://golang.org/doc/effective_go.html#commentary)
|
|
||||||
guidelines.
|
|
||||||
* Pull requests need to be based on and opened against the `master` branch.
|
|
||||||
* Commit messages should be prefixed with the package(s) they modify.
|
|
||||||
* E.g. "eth, rpc: make trace configs optional"
|
|
||||||
|
|
||||||
Please see the [Developers' Guide](https://github.com/ethereum/go-ethereum/wiki/Developers'-Guide)
|
|
||||||
for more details on configuring your environment, managing project dependencies, and
|
|
||||||
testing procedures.
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
The go-ethereum library (i.e. all code outside of the `cmd` directory) is licensed under the
|
The bor library (i.e. all code outside of the `cmd` directory) is licensed under the
|
||||||
[GNU Lesser General Public License v3.0](https://www.gnu.org/licenses/lgpl-3.0.en.html),
|
[GNU Lesser General Public License v3.0](https://www.gnu.org/licenses/lgpl-3.0.en.html),
|
||||||
also included in our repository in the `COPYING.LESSER` file.
|
also included in our repository in the `COPYING.LESSER` file.
|
||||||
|
|
||||||
The go-ethereum binaries (i.e. all code inside of the `cmd` directory) is licensed under the
|
The bor binaries (i.e. all code inside of the `cmd` directory) is licensed under the
|
||||||
[GNU General Public License v3.0](https://www.gnu.org/licenses/gpl-3.0.en.html), also
|
[GNU General Public License v3.0](https://www.gnu.org/licenses/gpl-3.0.en.html), also
|
||||||
included in our repository in the `COPYING` file.
|
included in our repository in the `COPYING` file.
|
||||||
|
|
|
||||||
|
|
@ -6,13 +6,13 @@ Please see Releases. We recommend to use the most recent released version.
|
||||||
|
|
||||||
## Audit reports
|
## Audit reports
|
||||||
|
|
||||||
Audit reports are published in the `docs` folder: https://github.com/ethereum/go-ethereum/tree/master/docs/audits
|
Audit reports are published in the `docs` folder: https://github.com/maticnetwork/bor/tree/master/docs/audits
|
||||||
|
|
||||||
|
|
||||||
| Scope | Date | Report Link |
|
| Scope | Date | Report Link |
|
||||||
| ------- | ------- | ----------- |
|
| ------- | ------- | ----------- |
|
||||||
| `geth` | 20170425 | [pdf](https://github.com/ethereum/go-ethereum/blob/master/docs/audits/2017-04-25_Geth-audit_Truesec.pdf) |
|
| `geth` | 20170425 | [pdf](https://github.com/maticnetwork/bor/blob/master/docs/audits/2017-04-25_Geth-audit_Truesec.pdf) |
|
||||||
| `clef` | 20180914 | [pdf](https://github.com/ethereum/go-ethereum/blob/master/docs/audits/2018-09-14_Clef-audit_NCC.pdf) |
|
| `clef` | 20180914 | [pdf](https://github.com/maticnetwork/bor/blob/master/docs/audits/2018-09-14_Clef-audit_NCC.pdf) |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
// The ABI holds information about a contract's context and available
|
// The ABI holds information about a contract's context and available
|
||||||
|
|
|
||||||
|
|
@ -26,8 +26,8 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/maticnetwork/bor/crypto"
|
||||||
)
|
)
|
||||||
|
|
||||||
const jsondata = `
|
const jsondata = `
|
||||||
|
|
|
||||||
|
|
@ -22,12 +22,12 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/accounts"
|
"github.com/maticnetwork/bor/accounts"
|
||||||
"github.com/ethereum/go-ethereum/accounts/external"
|
"github.com/maticnetwork/bor/accounts/external"
|
||||||
"github.com/ethereum/go-ethereum/accounts/keystore"
|
"github.com/maticnetwork/bor/accounts/keystore"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
"github.com/ethereum/go-ethereum/core/types"
|
"github.com/maticnetwork/bor/core/types"
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/maticnetwork/bor/crypto"
|
||||||
)
|
)
|
||||||
|
|
||||||
// NewTransactor is a utility method to easily create a transaction signer from
|
// NewTransactor is a utility method to easily create a transaction signer from
|
||||||
|
|
|
||||||
|
|
@ -21,9 +21,9 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum"
|
"github.com/maticnetwork/bor"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
"github.com/ethereum/go-ethereum/core/types"
|
"github.com/maticnetwork/bor/core/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
||||||
|
|
@ -24,22 +24,22 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum"
|
"github.com/maticnetwork/bor"
|
||||||
"github.com/ethereum/go-ethereum/accounts/abi/bind"
|
"github.com/maticnetwork/bor/accounts/abi/bind"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
"github.com/ethereum/go-ethereum/common/math"
|
"github.com/maticnetwork/bor/common/math"
|
||||||
"github.com/ethereum/go-ethereum/consensus/ethash"
|
"github.com/maticnetwork/bor/consensus/ethash"
|
||||||
"github.com/ethereum/go-ethereum/core"
|
"github.com/maticnetwork/bor/core"
|
||||||
"github.com/ethereum/go-ethereum/core/bloombits"
|
"github.com/maticnetwork/bor/core/bloombits"
|
||||||
"github.com/ethereum/go-ethereum/core/rawdb"
|
"github.com/maticnetwork/bor/core/rawdb"
|
||||||
"github.com/ethereum/go-ethereum/core/state"
|
"github.com/maticnetwork/bor/core/state"
|
||||||
"github.com/ethereum/go-ethereum/core/types"
|
"github.com/maticnetwork/bor/core/types"
|
||||||
"github.com/ethereum/go-ethereum/core/vm"
|
"github.com/maticnetwork/bor/core/vm"
|
||||||
"github.com/ethereum/go-ethereum/eth/filters"
|
"github.com/maticnetwork/bor/eth/filters"
|
||||||
"github.com/ethereum/go-ethereum/ethdb"
|
"github.com/maticnetwork/bor/ethdb"
|
||||||
"github.com/ethereum/go-ethereum/event"
|
"github.com/maticnetwork/bor/event"
|
||||||
"github.com/ethereum/go-ethereum/params"
|
"github.com/maticnetwork/bor/params"
|
||||||
"github.com/ethereum/go-ethereum/rpc"
|
"github.com/maticnetwork/bor/rpc"
|
||||||
)
|
)
|
||||||
|
|
||||||
// This nil assignment ensures compile time that SimulatedBackend implements bind.ContractBackend.
|
// This nil assignment ensures compile time that SimulatedBackend implements bind.ContractBackend.
|
||||||
|
|
|
||||||
|
|
@ -21,13 +21,13 @@ import (
|
||||||
"math/big"
|
"math/big"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
ethereum "github.com/ethereum/go-ethereum"
|
ethereum "github.com/maticnetwork/bor"
|
||||||
"github.com/ethereum/go-ethereum/accounts/abi/bind"
|
"github.com/maticnetwork/bor/accounts/abi/bind"
|
||||||
"github.com/ethereum/go-ethereum/accounts/abi/bind/backends"
|
"github.com/maticnetwork/bor/accounts/abi/bind/backends"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
"github.com/ethereum/go-ethereum/core"
|
"github.com/maticnetwork/bor/core"
|
||||||
"github.com/ethereum/go-ethereum/core/types"
|
"github.com/maticnetwork/bor/core/types"
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/maticnetwork/bor/crypto"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSimulatedBackend(t *testing.T) {
|
func TestSimulatedBackend(t *testing.T) {
|
||||||
|
|
|
||||||
|
|
@ -22,12 +22,12 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum"
|
"github.com/maticnetwork/bor"
|
||||||
"github.com/ethereum/go-ethereum/accounts/abi"
|
"github.com/maticnetwork/bor/accounts/abi"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
"github.com/ethereum/go-ethereum/core/types"
|
"github.com/maticnetwork/bor/core/types"
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/maticnetwork/bor/crypto"
|
||||||
"github.com/ethereum/go-ethereum/event"
|
"github.com/maticnetwork/bor/event"
|
||||||
)
|
)
|
||||||
|
|
||||||
// SignerFn is a signer function callback when a contract requires a method to
|
// SignerFn is a signer function callback when a contract requires a method to
|
||||||
|
|
|
||||||
|
|
@ -23,14 +23,14 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum"
|
"github.com/maticnetwork/bor"
|
||||||
"github.com/ethereum/go-ethereum/accounts/abi"
|
"github.com/maticnetwork/bor/accounts/abi"
|
||||||
"github.com/ethereum/go-ethereum/accounts/abi/bind"
|
"github.com/maticnetwork/bor/accounts/abi/bind"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
"github.com/ethereum/go-ethereum/common/hexutil"
|
"github.com/maticnetwork/bor/common/hexutil"
|
||||||
"github.com/ethereum/go-ethereum/core/types"
|
"github.com/maticnetwork/bor/core/types"
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/maticnetwork/bor/crypto"
|
||||||
"github.com/ethereum/go-ethereum/rlp"
|
"github.com/maticnetwork/bor/rlp"
|
||||||
)
|
)
|
||||||
|
|
||||||
type mockCaller struct {
|
type mockCaller struct {
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
// Package bind generates Ethereum contract Go bindings.
|
// Package bind generates Ethereum contract Go bindings.
|
||||||
//
|
//
|
||||||
// Detailed usage document and tutorial available on the go-ethereum Wiki page:
|
// Detailed usage document and tutorial available on the go-ethereum Wiki page:
|
||||||
// https://github.com/ethereum/go-ethereum/wiki/Native-DApps:-Go-bindings-to-Ethereum-contracts
|
// https://github.com/maticnetwork/bor/wiki/Native-DApps:-Go-bindings-to-Ethereum-contracts
|
||||||
package bind
|
package bind
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
@ -30,8 +30,8 @@ import (
|
||||||
"text/template"
|
"text/template"
|
||||||
"unicode"
|
"unicode"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/accounts/abi"
|
"github.com/maticnetwork/bor/accounts/abi"
|
||||||
"github.com/ethereum/go-ethereum/log"
|
"github.com/maticnetwork/bor/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Lang is a target programming language selector to generate bindings for.
|
// Lang is a target programming language selector to generate bindings for.
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
package bind
|
package bind
|
||||||
|
|
||||||
import "github.com/ethereum/go-ethereum/accounts/abi"
|
import "github.com/maticnetwork/bor/accounts/abi"
|
||||||
|
|
||||||
// tmplData is the data structure required to fill the binding template.
|
// tmplData is the data structure required to fill the binding template.
|
||||||
type tmplData struct {
|
type tmplData struct {
|
||||||
|
|
@ -88,12 +88,12 @@ import (
|
||||||
"math/big"
|
"math/big"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
ethereum "github.com/ethereum/go-ethereum"
|
ethereum "github.com/maticnetwork/bor"
|
||||||
"github.com/ethereum/go-ethereum/accounts/abi"
|
"github.com/maticnetwork/bor/accounts/abi"
|
||||||
"github.com/ethereum/go-ethereum/accounts/abi/bind"
|
"github.com/maticnetwork/bor/accounts/abi/bind"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
"github.com/ethereum/go-ethereum/core/types"
|
"github.com/maticnetwork/bor/core/types"
|
||||||
"github.com/ethereum/go-ethereum/event"
|
"github.com/maticnetwork/bor/event"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
|
|
|
||||||
|
|
@ -23,9 +23,9 @@ import (
|
||||||
"math/big"
|
"math/big"
|
||||||
"reflect"
|
"reflect"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/accounts/abi"
|
"github.com/maticnetwork/bor/accounts/abi"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/maticnetwork/bor/crypto"
|
||||||
)
|
)
|
||||||
|
|
||||||
// makeTopics converts a filter query argument list into a filter topic set.
|
// makeTopics converts a filter query argument list into a filter topic set.
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,8 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/accounts/abi"
|
"github.com/maticnetwork/bor/accounts/abi"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestMakeTopics(t *testing.T) {
|
func TestMakeTopics(t *testing.T) {
|
||||||
|
|
|
||||||
|
|
@ -21,9 +21,9 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
"github.com/ethereum/go-ethereum/core/types"
|
"github.com/maticnetwork/bor/core/types"
|
||||||
"github.com/ethereum/go-ethereum/log"
|
"github.com/maticnetwork/bor/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
// WaitMined waits for tx to be mined on the blockchain.
|
// WaitMined waits for tx to be mined on the blockchain.
|
||||||
|
|
|
||||||
|
|
@ -22,12 +22,12 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/accounts/abi/bind"
|
"github.com/maticnetwork/bor/accounts/abi/bind"
|
||||||
"github.com/ethereum/go-ethereum/accounts/abi/bind/backends"
|
"github.com/maticnetwork/bor/accounts/abi/bind/backends"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
"github.com/ethereum/go-ethereum/core"
|
"github.com/maticnetwork/bor/core"
|
||||||
"github.com/ethereum/go-ethereum/core/types"
|
"github.com/maticnetwork/bor/core/types"
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/maticnetwork/bor/crypto"
|
||||||
)
|
)
|
||||||
|
|
||||||
var testKey, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291")
|
var testKey, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291")
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,8 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/maticnetwork/bor/crypto"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Event is an event potentially triggered by the EVM's LOG mechanism. The Event
|
// Event is an event potentially triggered by the EVM's LOG mechanism. The Event
|
||||||
|
|
|
||||||
|
|
@ -25,8 +25,8 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/maticnetwork/bor/crypto"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
@ -356,7 +356,7 @@ func unpackTestEventData(dest interface{}, hexData string, jsonEvent []byte, ass
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Taken from
|
Taken from
|
||||||
https://github.com/ethereum/go-ethereum/pull/15568
|
https://github.com/maticnetwork/bor/pull/15568
|
||||||
*/
|
*/
|
||||||
|
|
||||||
type testResult struct {
|
type testResult struct {
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/maticnetwork/bor/crypto"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Method represents a callable given a `Name` and whether the method is a constant.
|
// Method represents a callable given a `Name` and whether the method is a constant.
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,8 @@ import (
|
||||||
"math/big"
|
"math/big"
|
||||||
"reflect"
|
"reflect"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
"github.com/ethereum/go-ethereum/common/math"
|
"github.com/maticnetwork/bor/common/math"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,8 @@ import (
|
||||||
"math/big"
|
"math/big"
|
||||||
"reflect"
|
"reflect"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
"github.com/ethereum/go-ethereum/common/math"
|
"github.com/maticnetwork/bor/common/math"
|
||||||
)
|
)
|
||||||
|
|
||||||
// packBytesSlice packs the given bytes as [L, V] as the canonical representation
|
// packBytesSlice packs the given bytes as [L, V] as the canonical representation
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestPack(t *testing.T) {
|
func TestPack(t *testing.T) {
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/davecgh/go-spew/spew"
|
"github.com/davecgh/go-spew/spew"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
// typeWithoutStringer is a alias for the Type type which simply doesn't implement
|
// typeWithoutStringer is a alias for the Type type which simply doesn't implement
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ import (
|
||||||
"math/big"
|
"math/big"
|
||||||
"reflect"
|
"reflect"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,10 +21,10 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
ethereum "github.com/ethereum/go-ethereum"
|
ethereum "github.com/maticnetwork/bor"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
"github.com/ethereum/go-ethereum/core/types"
|
"github.com/maticnetwork/bor/core/types"
|
||||||
"github.com/ethereum/go-ethereum/event"
|
"github.com/maticnetwork/bor/event"
|
||||||
"golang.org/x/crypto/sha3"
|
"golang.org/x/crypto/sha3"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common/hexutil"
|
"github.com/maticnetwork/bor/common/hexutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestTextHash(t *testing.T) {
|
func TestTextHash(t *testing.T) {
|
||||||
|
|
|
||||||
20
accounts/external/backend.go
vendored
20
accounts/external/backend.go
vendored
|
|
@ -21,16 +21,16 @@ import (
|
||||||
"math/big"
|
"math/big"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum"
|
"github.com/maticnetwork/bor"
|
||||||
"github.com/ethereum/go-ethereum/accounts"
|
"github.com/maticnetwork/bor/accounts"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
"github.com/ethereum/go-ethereum/common/hexutil"
|
"github.com/maticnetwork/bor/common/hexutil"
|
||||||
"github.com/ethereum/go-ethereum/core/types"
|
"github.com/maticnetwork/bor/core/types"
|
||||||
"github.com/ethereum/go-ethereum/event"
|
"github.com/maticnetwork/bor/event"
|
||||||
"github.com/ethereum/go-ethereum/internal/ethapi"
|
"github.com/maticnetwork/bor/internal/ethapi"
|
||||||
"github.com/ethereum/go-ethereum/log"
|
"github.com/maticnetwork/bor/log"
|
||||||
"github.com/ethereum/go-ethereum/rpc"
|
"github.com/maticnetwork/bor/rpc"
|
||||||
"github.com/ethereum/go-ethereum/signer/core"
|
"github.com/maticnetwork/bor/signer/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ExternalBackend struct {
|
type ExternalBackend struct {
|
||||||
|
|
|
||||||
|
|
@ -28,9 +28,9 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
mapset "github.com/deckarep/golang-set"
|
mapset "github.com/deckarep/golang-set"
|
||||||
"github.com/ethereum/go-ethereum/accounts"
|
"github.com/maticnetwork/bor/accounts"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
"github.com/ethereum/go-ethereum/log"
|
"github.com/maticnetwork/bor/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Minimum amount of time between cache reloads. This limit applies if the platform does
|
// Minimum amount of time between cache reloads. This limit applies if the platform does
|
||||||
|
|
|
||||||
|
|
@ -29,8 +29,8 @@ import (
|
||||||
|
|
||||||
"github.com/cespare/cp"
|
"github.com/cespare/cp"
|
||||||
"github.com/davecgh/go-spew/spew"
|
"github.com/davecgh/go-spew/spew"
|
||||||
"github.com/ethereum/go-ethereum/accounts"
|
"github.com/maticnetwork/bor/accounts"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
mapset "github.com/deckarep/golang-set"
|
mapset "github.com/deckarep/golang-set"
|
||||||
"github.com/ethereum/go-ethereum/log"
|
"github.com/maticnetwork/bor/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
// fileCache is a cache of files seen during scan of keystore.
|
// fileCache is a cache of files seen during scan of keystore.
|
||||||
|
|
|
||||||
|
|
@ -29,9 +29,9 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/accounts"
|
"github.com/maticnetwork/bor/accounts"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/maticnetwork/bor/crypto"
|
||||||
"github.com/pborman/uuid"
|
"github.com/pborman/uuid"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,11 +33,11 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/accounts"
|
"github.com/maticnetwork/bor/accounts"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
"github.com/ethereum/go-ethereum/core/types"
|
"github.com/maticnetwork/bor/core/types"
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/maticnetwork/bor/crypto"
|
||||||
"github.com/ethereum/go-ethereum/event"
|
"github.com/maticnetwork/bor/event"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
||||||
|
|
@ -26,9 +26,9 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/accounts"
|
"github.com/maticnetwork/bor/accounts"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
"github.com/ethereum/go-ethereum/event"
|
"github.com/maticnetwork/bor/event"
|
||||||
)
|
)
|
||||||
|
|
||||||
var testSigData = make([]byte, 32)
|
var testSigData = make([]byte, 32)
|
||||||
|
|
|
||||||
|
|
@ -38,10 +38,10 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/accounts"
|
"github.com/maticnetwork/bor/accounts"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
"github.com/ethereum/go-ethereum/common/math"
|
"github.com/maticnetwork/bor/common/math"
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/maticnetwork/bor/crypto"
|
||||||
"github.com/pborman/uuid"
|
"github.com/pborman/uuid"
|
||||||
"golang.org/x/crypto/pbkdf2"
|
"golang.org/x/crypto/pbkdf2"
|
||||||
"golang.org/x/crypto/scrypt"
|
"golang.org/x/crypto/scrypt"
|
||||||
|
|
@ -121,7 +121,7 @@ func (ks keyStorePassphrase) StoreKey(filename string, key *Key, auth string) er
|
||||||
"This indicates that the keystore is corrupted. \n" +
|
"This indicates that the keystore is corrupted. \n" +
|
||||||
"The corrupted file is stored at \n%v\n" +
|
"The corrupted file is stored at \n%v\n" +
|
||||||
"Please file a ticket at:\n\n" +
|
"Please file a ticket at:\n\n" +
|
||||||
"https://github.com/ethereum/go-ethereum/issues." +
|
"https://github.com/maticnetwork/bor/issues." +
|
||||||
"The error was : %s"
|
"The error was : %s"
|
||||||
return fmt.Errorf(msg, tmpName, err)
|
return fmt.Errorf(msg, tmpName, err)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ import (
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type keyStorePlain struct {
|
type keyStorePlain struct {
|
||||||
|
|
|
||||||
|
|
@ -27,8 +27,8 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/maticnetwork/bor/crypto"
|
||||||
)
|
)
|
||||||
|
|
||||||
func tmpKeyStoreIface(t *testing.T, encrypted bool) (dir string, ks keyStore) {
|
func tmpKeyStoreIface(t *testing.T, encrypted bool) (dir string, ks keyStore) {
|
||||||
|
|
|
||||||
|
|
@ -25,8 +25,8 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/accounts"
|
"github.com/maticnetwork/bor/accounts"
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/maticnetwork/bor/crypto"
|
||||||
"github.com/pborman/uuid"
|
"github.com/pborman/uuid"
|
||||||
"golang.org/x/crypto/pbkdf2"
|
"golang.org/x/crypto/pbkdf2"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -19,10 +19,10 @@ package keystore
|
||||||
import (
|
import (
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
ethereum "github.com/ethereum/go-ethereum"
|
ethereum "github.com/maticnetwork/bor"
|
||||||
"github.com/ethereum/go-ethereum/accounts"
|
"github.com/maticnetwork/bor/accounts"
|
||||||
"github.com/ethereum/go-ethereum/core/types"
|
"github.com/maticnetwork/bor/core/types"
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/maticnetwork/bor/crypto"
|
||||||
)
|
)
|
||||||
|
|
||||||
// keystoreWallet implements the accounts.Wallet interface for the original
|
// keystoreWallet implements the accounts.Wallet interface for the original
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ package keystore
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/log"
|
"github.com/maticnetwork/bor/log"
|
||||||
"github.com/rjeczalik/notify"
|
"github.com/rjeczalik/notify"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ import (
|
||||||
"sort"
|
"sort"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/event"
|
"github.com/maticnetwork/bor/event"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Config contains the settings of the global account manager.
|
// Config contains the settings of the global account manager.
|
||||||
|
|
|
||||||
|
|
@ -41,10 +41,10 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/accounts"
|
"github.com/maticnetwork/bor/accounts"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
"github.com/ethereum/go-ethereum/event"
|
"github.com/maticnetwork/bor/event"
|
||||||
"github.com/ethereum/go-ethereum/log"
|
"github.com/maticnetwork/bor/log"
|
||||||
pcsc "github.com/gballet/go-libpcsclite"
|
pcsc "github.com/gballet/go-libpcsclite"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ import (
|
||||||
"crypto/sha512"
|
"crypto/sha512"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/maticnetwork/bor/crypto"
|
||||||
pcsc "github.com/gballet/go-libpcsclite"
|
pcsc "github.com/gballet/go-libpcsclite"
|
||||||
"github.com/wsddn/go-ecdh"
|
"github.com/wsddn/go-ecdh"
|
||||||
"golang.org/x/crypto/pbkdf2"
|
"golang.org/x/crypto/pbkdf2"
|
||||||
|
|
|
||||||
|
|
@ -33,12 +33,12 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
ethereum "github.com/ethereum/go-ethereum"
|
ethereum "github.com/maticnetwork/bor"
|
||||||
"github.com/ethereum/go-ethereum/accounts"
|
"github.com/maticnetwork/bor/accounts"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
"github.com/ethereum/go-ethereum/core/types"
|
"github.com/maticnetwork/bor/core/types"
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/maticnetwork/bor/crypto"
|
||||||
"github.com/ethereum/go-ethereum/log"
|
"github.com/maticnetwork/bor/log"
|
||||||
pcsc "github.com/gballet/go-libpcsclite"
|
pcsc "github.com/gballet/go-libpcsclite"
|
||||||
"github.com/status-im/keycard-go/derivationpath"
|
"github.com/status-im/keycard-go/derivationpath"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -23,9 +23,9 @@ import (
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/accounts"
|
"github.com/maticnetwork/bor/accounts"
|
||||||
"github.com/ethereum/go-ethereum/event"
|
"github.com/maticnetwork/bor/event"
|
||||||
"github.com/ethereum/go-ethereum/log"
|
"github.com/maticnetwork/bor/log"
|
||||||
"github.com/karalabe/usb"
|
"github.com/karalabe/usb"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,12 +28,12 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/accounts"
|
"github.com/maticnetwork/bor/accounts"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
"github.com/ethereum/go-ethereum/common/hexutil"
|
"github.com/maticnetwork/bor/common/hexutil"
|
||||||
"github.com/ethereum/go-ethereum/core/types"
|
"github.com/maticnetwork/bor/core/types"
|
||||||
"github.com/ethereum/go-ethereum/log"
|
"github.com/maticnetwork/bor/log"
|
||||||
"github.com/ethereum/go-ethereum/rlp"
|
"github.com/maticnetwork/bor/rlp"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ledgerOpcode is an enumeration encoding the supported Ledger opcodes.
|
// ledgerOpcode is an enumeration encoding the supported Ledger opcodes.
|
||||||
|
|
|
||||||
|
|
@ -27,12 +27,12 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/accounts"
|
"github.com/maticnetwork/bor/accounts"
|
||||||
"github.com/ethereum/go-ethereum/accounts/usbwallet/trezor"
|
"github.com/maticnetwork/bor/accounts/usbwallet/trezor"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
"github.com/ethereum/go-ethereum/common/hexutil"
|
"github.com/maticnetwork/bor/common/hexutil"
|
||||||
"github.com/ethereum/go-ethereum/core/types"
|
"github.com/maticnetwork/bor/core/types"
|
||||||
"github.com/ethereum/go-ethereum/log"
|
"github.com/maticnetwork/bor/log"
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,12 +25,12 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
ethereum "github.com/ethereum/go-ethereum"
|
ethereum "github.com/maticnetwork/bor"
|
||||||
"github.com/ethereum/go-ethereum/accounts"
|
"github.com/maticnetwork/bor/accounts"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
"github.com/ethereum/go-ethereum/core/types"
|
"github.com/maticnetwork/bor/core/types"
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/maticnetwork/bor/crypto"
|
||||||
"github.com/ethereum/go-ethereum/log"
|
"github.com/maticnetwork/bor/log"
|
||||||
"github.com/karalabe/usb"
|
"github.com/karalabe/usb"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
14
build/ci.go
14
build/ci.go
|
|
@ -58,15 +58,15 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/internal/build"
|
"github.com/maticnetwork/bor/internal/build"
|
||||||
"github.com/ethereum/go-ethereum/params"
|
"github.com/maticnetwork/bor/params"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
// Files that end up in the geth*.zip archive.
|
// Files that end up in the geth*.zip archive.
|
||||||
gethArchiveFiles = []string{
|
gethArchiveFiles = []string{
|
||||||
"COPYING",
|
"COPYING",
|
||||||
executablePath("geth"),
|
executablePath("bor"),
|
||||||
}
|
}
|
||||||
|
|
||||||
// Files that end up in the geth-alltools*.zip archive.
|
// Files that end up in the geth-alltools*.zip archive.
|
||||||
|
|
@ -75,7 +75,7 @@ var (
|
||||||
executablePath("abigen"),
|
executablePath("abigen"),
|
||||||
executablePath("bootnode"),
|
executablePath("bootnode"),
|
||||||
executablePath("evm"),
|
executablePath("evm"),
|
||||||
executablePath("geth"),
|
executablePath("bor"),
|
||||||
executablePath("puppeth"),
|
executablePath("puppeth"),
|
||||||
executablePath("rlpdump"),
|
executablePath("rlpdump"),
|
||||||
executablePath("wnode"),
|
executablePath("wnode"),
|
||||||
|
|
@ -97,7 +97,7 @@ var (
|
||||||
Description: "Developer utility version of the EVM (Ethereum Virtual Machine) that is capable of running bytecode snippets within a configurable environment and execution mode.",
|
Description: "Developer utility version of the EVM (Ethereum Virtual Machine) that is capable of running bytecode snippets within a configurable environment and execution mode.",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
BinaryName: "geth",
|
BinaryName: "bor",
|
||||||
Description: "Ethereum CLI client.",
|
Description: "Ethereum CLI client.",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -778,7 +778,7 @@ func doAndroidArchive(cmdline []string) {
|
||||||
}
|
}
|
||||||
// Build the Android archive and Maven resources
|
// Build the Android archive and Maven resources
|
||||||
build.MustRun(goTool("get", "golang.org/x/mobile/cmd/gomobile", "golang.org/x/mobile/cmd/gobind"))
|
build.MustRun(goTool("get", "golang.org/x/mobile/cmd/gomobile", "golang.org/x/mobile/cmd/gobind"))
|
||||||
build.MustRun(gomobileTool("bind", "-ldflags", "-s -w", "--target", "android", "--javapkg", "org.ethereum", "-v", "github.com/ethereum/go-ethereum/mobile"))
|
build.MustRun(gomobileTool("bind", "-ldflags", "-s -w", "--target", "android", "--javapkg", "org.ethereum", "-v", "github.com/maticnetwork/bor/mobile"))
|
||||||
|
|
||||||
if *local {
|
if *local {
|
||||||
// If we're building locally, copy bundle to build dir and skip Maven
|
// If we're building locally, copy bundle to build dir and skip Maven
|
||||||
|
|
@ -899,7 +899,7 @@ func doXCodeFramework(cmdline []string) {
|
||||||
// Build the iOS XCode framework
|
// Build the iOS XCode framework
|
||||||
build.MustRun(goTool("get", "golang.org/x/mobile/cmd/gomobile", "golang.org/x/mobile/cmd/gobind"))
|
build.MustRun(goTool("get", "golang.org/x/mobile/cmd/gomobile", "golang.org/x/mobile/cmd/gobind"))
|
||||||
build.MustRun(gomobileTool("init"))
|
build.MustRun(gomobileTool("init"))
|
||||||
bind := gomobileTool("bind", "-ldflags", "-s -w", "--target", "ios", "--tags", "ios", "-v", "github.com/ethereum/go-ethereum/mobile")
|
bind := gomobileTool("bind", "-ldflags", "-s -w", "--target", "ios", "--tags", "ios", "-v", "github.com/maticnetwork/bor/mobile")
|
||||||
|
|
||||||
if *local {
|
if *local {
|
||||||
// If we're building locally, use the build folder and stop afterwards
|
// If we're building locally, use the build folder and stop afterwards
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@ Maintainer: {{.Author}}
|
||||||
Build-Depends: debhelper (>= 8.0.0), golang-1.11
|
Build-Depends: debhelper (>= 8.0.0), golang-1.11
|
||||||
Standards-Version: 3.9.5
|
Standards-Version: 3.9.5
|
||||||
Homepage: https://ethereum.org
|
Homepage: https://ethereum.org
|
||||||
Vcs-Git: git://github.com/ethereum/go-ethereum.git
|
Vcs-Git: git://github.com/maticnetwork/bor.git
|
||||||
Vcs-Browser: https://github.com/ethereum/go-ethereum
|
Vcs-Browser: https://github.com/maticnetwork/bor
|
||||||
|
|
||||||
Package: {{.Name}}
|
Package: {{.Name}}
|
||||||
Architecture: any
|
Architecture: any
|
||||||
|
|
|
||||||
10
build/env.sh
10
build/env.sh
|
|
@ -10,11 +10,11 @@ fi
|
||||||
# Create fake Go workspace if it doesn't exist yet.
|
# Create fake Go workspace if it doesn't exist yet.
|
||||||
workspace="$PWD/build/_workspace"
|
workspace="$PWD/build/_workspace"
|
||||||
root="$PWD"
|
root="$PWD"
|
||||||
ethdir="$workspace/src/github.com/ethereum"
|
ethdir="$workspace/src/github.com/maticnetwork"
|
||||||
if [ ! -L "$ethdir/go-ethereum" ]; then
|
if [ ! -L "$ethdir/bor" ]; then
|
||||||
mkdir -p "$ethdir"
|
mkdir -p "$ethdir"
|
||||||
cd "$ethdir"
|
cd "$ethdir"
|
||||||
ln -s ../../../../../. go-ethereum
|
ln -s ../../../../../. bor
|
||||||
cd "$root"
|
cd "$root"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -23,8 +23,8 @@ GOPATH="$workspace"
|
||||||
export GOPATH
|
export GOPATH
|
||||||
|
|
||||||
# Run the command inside the workspace.
|
# Run the command inside the workspace.
|
||||||
cd "$ethdir/go-ethereum"
|
cd "$ethdir/bor"
|
||||||
PWD="$ethdir/go-ethereum"
|
PWD="$ethdir/bor"
|
||||||
|
|
||||||
# Launch the arguments with the configured environment.
|
# Launch the arguments with the configured environment.
|
||||||
exec "$@"
|
exec "$@"
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
<name>Android Ethereum Client</name>
|
<name>Android Ethereum Client</name>
|
||||||
<description>Android port of the go-ethereum libraries and node</description>
|
<description>Android port of the go-ethereum libraries and node</description>
|
||||||
<url>https://github.com/ethereum/go-ethereum</url>
|
<url>https://github.com/maticnetwork/bor</url>
|
||||||
<inceptionYear>2015</inceptionYear>
|
<inceptionYear>2015</inceptionYear>
|
||||||
|
|
||||||
<licenses>
|
<licenses>
|
||||||
|
|
@ -48,10 +48,10 @@
|
||||||
|
|
||||||
<issueManagement>
|
<issueManagement>
|
||||||
<system>GitHub Issues</system>
|
<system>GitHub Issues</system>
|
||||||
<url>https://github.com/ethereum/go-ethereum/issues/</url>
|
<url>https://github.com/maticnetwork/bor/issues/</url>
|
||||||
</issueManagement>
|
</issueManagement>
|
||||||
|
|
||||||
<scm>
|
<scm>
|
||||||
<url>https://github.com/ethereum/go-ethereum</url>
|
<url>https://github.com/maticnetwork/bor</url>
|
||||||
</scm>
|
</scm>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,9 @@ InstallDir "$InstDir"
|
||||||
OutFile "${OUTPUTFILE}" # set through command line arguments
|
OutFile "${OUTPUTFILE}" # set through command line arguments
|
||||||
|
|
||||||
# Links for "Add/Remove Programs"
|
# Links for "Add/Remove Programs"
|
||||||
!define HELPURL "https://github.com/ethereum/go-ethereum/issues"
|
!define HELPURL "https://github.com/maticnetwork/bor/issues"
|
||||||
!define UPDATEURL "https://github.com/ethereum/go-ethereum/releases"
|
!define UPDATEURL "https://github.com/maticnetwork/bor/releases"
|
||||||
!define ABOUTURL "https://github.com/ethereum/go-ethereum#ethereum-go"
|
!define ABOUTURL "https://github.com/maticnetwork/bor#ethereum-go"
|
||||||
!define /date NOW "%Y%m%d"
|
!define /date NOW "%Y%m%d"
|
||||||
|
|
||||||
PageEx license
|
PageEx license
|
||||||
|
|
@ -34,8 +34,8 @@ Section "Geth" GETH_IDX
|
||||||
SimpleFC::AdvAddRule "Geth UDP discovery (UDP:30303)" "" 17 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 "" ""
|
||||||
|
|
||||||
# Set default IPC endpoint (https://github.com/ethereum/EIPs/issues/147)
|
# Set default IPC endpoint (https://github.com/ethereum/EIPs/issues/147)
|
||||||
${EnvVarUpdate} $0 "ETHEREUM_SOCKET" "R" "HKLM" "\\.\pipe\geth.ipc"
|
${EnvVarUpdate} $0 "ETHEREUM_SOCKET" "R" "HKLM" "\\.\pipe\bor.ipc"
|
||||||
${EnvVarUpdate} $0 "ETHEREUM_SOCKET" "A" "HKLM" "\\.\pipe\geth.ipc"
|
${EnvVarUpdate} $0 "ETHEREUM_SOCKET" "A" "HKLM" "\\.\pipe\bor.ipc"
|
||||||
|
|
||||||
# Add instdir to PATH
|
# Add instdir to PATH
|
||||||
Push "$INSTDIR"
|
Push "$INSTDIR"
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ Section "Uninstall"
|
||||||
SimpleFC::AdvRemoveRule "Geth UDP discovery (UDP:30303)"
|
SimpleFC::AdvRemoveRule "Geth UDP discovery (UDP:30303)"
|
||||||
|
|
||||||
# Remove IPC endpoint (https://github.com/ethereum/EIPs/issues/147)
|
# Remove IPC endpoint (https://github.com/ethereum/EIPs/issues/147)
|
||||||
${un.EnvVarUpdate} $0 "ETHEREUM_SOCKET" "R" "HKLM" "\\.\pipe\geth.ipc"
|
${un.EnvVarUpdate} $0 "ETHEREUM_SOCKET" "R" "HKLM" "\\.\pipe\bor.ipc"
|
||||||
|
|
||||||
# Remove install directory from PATH
|
# Remove install directory from PATH
|
||||||
Push "$INSTDIR"
|
Push "$INSTDIR"
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,12 @@ Pod::Spec.new do |spec|
|
||||||
spec.name = 'Geth'
|
spec.name = 'Geth'
|
||||||
spec.version = '{{.Version}}'
|
spec.version = '{{.Version}}'
|
||||||
spec.license = { :type => 'GNU Lesser General Public License, Version 3.0' }
|
spec.license = { :type => 'GNU Lesser General Public License, Version 3.0' }
|
||||||
spec.homepage = 'https://github.com/ethereum/go-ethereum'
|
spec.homepage = 'https://github.com/maticnetwork/bor'
|
||||||
spec.authors = { {{range .Contributors}}
|
spec.authors = { {{range .Contributors}}
|
||||||
'{{.Name}}' => '{{.Email}}',{{end}}
|
'{{.Name}}' => '{{.Email}}',{{end}}
|
||||||
}
|
}
|
||||||
spec.summary = 'iOS Ethereum Client'
|
spec.summary = 'iOS Ethereum Client'
|
||||||
spec.source = { :git => 'https://github.com/ethereum/go-ethereum.git', :commit => '{{.Commit}}' }
|
spec.source = { :git => 'https://github.com/maticnetwork/bor.git', :commit => '{{.Commit}}' }
|
||||||
|
|
||||||
spec.platform = :ios
|
spec.platform = :ios
|
||||||
spec.ios.deployment_target = '9.0'
|
spec.ios.deployment_target = '9.0'
|
||||||
|
|
|
||||||
|
|
@ -23,11 +23,11 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/accounts/abi/bind"
|
"github.com/maticnetwork/bor/accounts/abi/bind"
|
||||||
"github.com/ethereum/go-ethereum/cmd/utils"
|
"github.com/maticnetwork/bor/cmd/utils"
|
||||||
"github.com/ethereum/go-ethereum/common/compiler"
|
"github.com/maticnetwork/bor/common/compiler"
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/maticnetwork/bor/crypto"
|
||||||
"github.com/ethereum/go-ethereum/log"
|
"github.com/maticnetwork/bor/log"
|
||||||
"gopkg.in/urfave/cli.v1"
|
"gopkg.in/urfave/cli.v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,14 +24,14 @@ import (
|
||||||
"net"
|
"net"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/cmd/utils"
|
"github.com/maticnetwork/bor/cmd/utils"
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/maticnetwork/bor/crypto"
|
||||||
"github.com/ethereum/go-ethereum/log"
|
"github.com/maticnetwork/bor/log"
|
||||||
"github.com/ethereum/go-ethereum/p2p/discover"
|
"github.com/maticnetwork/bor/p2p/discover"
|
||||||
"github.com/ethereum/go-ethereum/p2p/discv5"
|
"github.com/maticnetwork/bor/p2p/discv5"
|
||||||
"github.com/ethereum/go-ethereum/p2p/enode"
|
"github.com/maticnetwork/bor/p2p/enode"
|
||||||
"github.com/ethereum/go-ethereum/p2p/nat"
|
"github.com/maticnetwork/bor/p2p/nat"
|
||||||
"github.com/ethereum/go-ethereum/p2p/netutil"
|
"github.com/maticnetwork/bor/p2p/netutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
|
||||||
|
|
@ -20,12 +20,12 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/accounts"
|
"github.com/maticnetwork/bor/accounts"
|
||||||
"github.com/ethereum/go-ethereum/accounts/keystore"
|
"github.com/maticnetwork/bor/accounts/keystore"
|
||||||
"github.com/ethereum/go-ethereum/cmd/utils"
|
"github.com/maticnetwork/bor/cmd/utils"
|
||||||
"github.com/ethereum/go-ethereum/console"
|
"github.com/maticnetwork/bor/console"
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/maticnetwork/bor/crypto"
|
||||||
"github.com/ethereum/go-ethereum/log"
|
"github.com/maticnetwork/bor/log"
|
||||||
"gopkg.in/urfave/cli.v1"
|
"gopkg.in/urfave/cli.v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -183,7 +183,7 @@ Fatal: Failed to unlock account f466859ead1932d743d622cb74fc058882e8648a (could
|
||||||
`)
|
`)
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://github.com/ethereum/go-ethereum/issues/1785
|
// https://github.com/maticnetwork/bor/issues/1785
|
||||||
func TestUnlockFlagMultiIndex(t *testing.T) {
|
func TestUnlockFlagMultiIndex(t *testing.T) {
|
||||||
datadir := tmpDatadirWithKeystore(t)
|
datadir := tmpDatadirWithKeystore(t)
|
||||||
geth := runGeth(t,
|
geth := runGeth(t,
|
||||||
|
|
@ -26,17 +26,17 @@ import (
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/cmd/utils"
|
"github.com/maticnetwork/bor/cmd/utils"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
"github.com/ethereum/go-ethereum/console"
|
"github.com/maticnetwork/bor/console"
|
||||||
"github.com/ethereum/go-ethereum/core"
|
"github.com/maticnetwork/bor/core"
|
||||||
"github.com/ethereum/go-ethereum/core/rawdb"
|
"github.com/maticnetwork/bor/core/rawdb"
|
||||||
"github.com/ethereum/go-ethereum/core/state"
|
"github.com/maticnetwork/bor/core/state"
|
||||||
"github.com/ethereum/go-ethereum/core/types"
|
"github.com/maticnetwork/bor/core/types"
|
||||||
"github.com/ethereum/go-ethereum/eth/downloader"
|
"github.com/maticnetwork/bor/eth/downloader"
|
||||||
"github.com/ethereum/go-ethereum/event"
|
"github.com/maticnetwork/bor/event"
|
||||||
"github.com/ethereum/go-ethereum/log"
|
"github.com/maticnetwork/bor/log"
|
||||||
"github.com/ethereum/go-ethereum/trie"
|
"github.com/maticnetwork/bor/trie"
|
||||||
"gopkg.in/urfave/cli.v1"
|
"gopkg.in/urfave/cli.v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -26,12 +26,12 @@ import (
|
||||||
|
|
||||||
cli "gopkg.in/urfave/cli.v1"
|
cli "gopkg.in/urfave/cli.v1"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/cmd/utils"
|
"github.com/maticnetwork/bor/cmd/utils"
|
||||||
"github.com/ethereum/go-ethereum/dashboard"
|
"github.com/maticnetwork/bor/dashboard"
|
||||||
"github.com/ethereum/go-ethereum/eth"
|
"github.com/maticnetwork/bor/eth"
|
||||||
"github.com/ethereum/go-ethereum/node"
|
"github.com/maticnetwork/bor/node"
|
||||||
"github.com/ethereum/go-ethereum/params"
|
"github.com/maticnetwork/bor/params"
|
||||||
whisper "github.com/ethereum/go-ethereum/whisper/whisperv6"
|
whisper "github.com/maticnetwork/bor/whisper/whisperv6"
|
||||||
"github.com/naoina/toml"
|
"github.com/naoina/toml"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -102,7 +102,7 @@ func defaultNodeConfig() node.Config {
|
||||||
cfg.Version = params.VersionWithCommit(gitCommit, gitDate)
|
cfg.Version = params.VersionWithCommit(gitCommit, gitDate)
|
||||||
cfg.HTTPModules = append(cfg.HTTPModules, "eth", "shh")
|
cfg.HTTPModules = append(cfg.HTTPModules, "eth", "shh")
|
||||||
cfg.WSModules = append(cfg.WSModules, "eth", "shh")
|
cfg.WSModules = append(cfg.WSModules, "eth", "shh")
|
||||||
cfg.IPCPath = "geth.ipc"
|
cfg.IPCPath = "bor.ipc"
|
||||||
return cfg
|
return cfg
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -24,10 +24,10 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/cmd/utils"
|
"github.com/maticnetwork/bor/cmd/utils"
|
||||||
"github.com/ethereum/go-ethereum/console"
|
"github.com/maticnetwork/bor/console"
|
||||||
"github.com/ethereum/go-ethereum/node"
|
"github.com/maticnetwork/bor/node"
|
||||||
"github.com/ethereum/go-ethereum/rpc"
|
"github.com/maticnetwork/bor/rpc"
|
||||||
"gopkg.in/urfave/cli.v1"
|
"gopkg.in/urfave/cli.v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -43,7 +43,7 @@ var (
|
||||||
Description: `
|
Description: `
|
||||||
The Geth console is an interactive shell for the JavaScript runtime environment
|
The Geth console is an interactive shell for the JavaScript runtime environment
|
||||||
which exposes a node admin interface as well as the Ðapp JavaScript API.
|
which exposes a node admin interface as well as the Ðapp JavaScript API.
|
||||||
See https://github.com/ethereum/go-ethereum/wiki/JavaScript-Console.`,
|
See https://github.com/maticnetwork/bor/wiki/JavaScript-Console.`,
|
||||||
}
|
}
|
||||||
|
|
||||||
attachCommand = cli.Command{
|
attachCommand = cli.Command{
|
||||||
|
|
@ -56,7 +56,7 @@ See https://github.com/ethereum/go-ethereum/wiki/JavaScript-Console.`,
|
||||||
Description: `
|
Description: `
|
||||||
The Geth console is an interactive shell for the JavaScript runtime environment
|
The Geth console is an interactive shell for the JavaScript runtime environment
|
||||||
which exposes a node admin interface as well as the Ðapp JavaScript API.
|
which exposes a node admin interface as well as the Ðapp JavaScript API.
|
||||||
See https://github.com/ethereum/go-ethereum/wiki/JavaScript-Console.
|
See https://github.com/maticnetwork/bor/wiki/JavaScript-Console.
|
||||||
This command allows to open a console on a running geth node.`,
|
This command allows to open a console on a running geth node.`,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -69,7 +69,7 @@ This command allows to open a console on a running geth node.`,
|
||||||
Category: "CONSOLE COMMANDS",
|
Category: "CONSOLE COMMANDS",
|
||||||
Description: `
|
Description: `
|
||||||
The JavaScript VM exposes a node admin interface as well as the Ðapp
|
The JavaScript VM exposes a node admin interface as well as the Ðapp
|
||||||
JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/JavaScript-Console`,
|
JavaScript API. See https://github.com/maticnetwork/bor/wiki/JavaScript-Console`,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -128,7 +128,7 @@ func remoteConsole(ctx *cli.Context) error {
|
||||||
path = filepath.Join(path, "rinkeby")
|
path = filepath.Join(path, "rinkeby")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
endpoint = fmt.Sprintf("%s/geth.ipc", path)
|
endpoint = fmt.Sprintf("%s/bor.ipc", path)
|
||||||
}
|
}
|
||||||
client, err := dialRPC(endpoint)
|
client, err := dialRPC(endpoint)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -27,7 +27,7 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/params"
|
"github.com/maticnetwork/bor/params"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
@ -79,7 +79,7 @@ func TestIPCAttachWelcome(t *testing.T) {
|
||||||
} else {
|
} else {
|
||||||
ws := tmpdir(t)
|
ws := tmpdir(t)
|
||||||
defer os.RemoveAll(ws)
|
defer os.RemoveAll(ws)
|
||||||
ipc = filepath.Join(ws, "geth.ipc")
|
ipc = filepath.Join(ws, "bor.ipc")
|
||||||
}
|
}
|
||||||
// Note: we need --shh because testAttachWelcome checks for default
|
// Note: we need --shh because testAttachWelcome checks for default
|
||||||
// list of ipc modules and shh is included there.
|
// list of ipc modules and shh is included there.
|
||||||
|
|
@ -23,9 +23,9 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
"github.com/ethereum/go-ethereum/core/rawdb"
|
"github.com/maticnetwork/bor/core/rawdb"
|
||||||
"github.com/ethereum/go-ethereum/params"
|
"github.com/maticnetwork/bor/params"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Genesis block for nodes which don't care about the DAO fork (i.e. not configured)
|
// Genesis block for nodes which don't care about the DAO fork (i.e. not configured)
|
||||||
|
|
@ -29,24 +29,24 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/elastic/gosigar"
|
"github.com/elastic/gosigar"
|
||||||
"github.com/ethereum/go-ethereum/accounts"
|
"github.com/maticnetwork/bor/accounts"
|
||||||
"github.com/ethereum/go-ethereum/accounts/keystore"
|
"github.com/maticnetwork/bor/accounts/keystore"
|
||||||
"github.com/ethereum/go-ethereum/cmd/utils"
|
"github.com/maticnetwork/bor/cmd/utils"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
"github.com/ethereum/go-ethereum/console"
|
"github.com/maticnetwork/bor/console"
|
||||||
"github.com/ethereum/go-ethereum/eth"
|
"github.com/maticnetwork/bor/eth"
|
||||||
"github.com/ethereum/go-ethereum/eth/downloader"
|
"github.com/maticnetwork/bor/eth/downloader"
|
||||||
"github.com/ethereum/go-ethereum/ethclient"
|
"github.com/maticnetwork/bor/ethclient"
|
||||||
"github.com/ethereum/go-ethereum/internal/debug"
|
"github.com/maticnetwork/bor/internal/debug"
|
||||||
"github.com/ethereum/go-ethereum/les"
|
"github.com/maticnetwork/bor/les"
|
||||||
"github.com/ethereum/go-ethereum/log"
|
"github.com/maticnetwork/bor/log"
|
||||||
"github.com/ethereum/go-ethereum/metrics"
|
"github.com/maticnetwork/bor/metrics"
|
||||||
"github.com/ethereum/go-ethereum/node"
|
"github.com/maticnetwork/bor/node"
|
||||||
cli "gopkg.in/urfave/cli.v1"
|
cli "gopkg.in/urfave/cli.v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
clientIdentifier = "geth" // Client identifier to advertise over the network
|
clientIdentifier = "bor" // Client identifier to advertise over the network
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
@ -23,10 +23,10 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/cmd/utils"
|
"github.com/maticnetwork/bor/cmd/utils"
|
||||||
"github.com/ethereum/go-ethereum/consensus/ethash"
|
"github.com/maticnetwork/bor/consensus/ethash"
|
||||||
"github.com/ethereum/go-ethereum/eth"
|
"github.com/maticnetwork/bor/eth"
|
||||||
"github.com/ethereum/go-ethereum/params"
|
"github.com/maticnetwork/bor/params"
|
||||||
"gopkg.in/urfave/cli.v1"
|
"gopkg.in/urfave/cli.v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -26,26 +26,26 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/cmd/utils"
|
"github.com/maticnetwork/bor/cmd/utils"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
"github.com/ethereum/go-ethereum/common/hexutil"
|
"github.com/maticnetwork/bor/common/hexutil"
|
||||||
"github.com/ethereum/go-ethereum/common/math"
|
"github.com/maticnetwork/bor/common/math"
|
||||||
"github.com/ethereum/go-ethereum/consensus"
|
"github.com/maticnetwork/bor/consensus"
|
||||||
"github.com/ethereum/go-ethereum/consensus/ethash"
|
"github.com/maticnetwork/bor/consensus/ethash"
|
||||||
"github.com/ethereum/go-ethereum/consensus/misc"
|
"github.com/maticnetwork/bor/consensus/misc"
|
||||||
"github.com/ethereum/go-ethereum/core"
|
"github.com/maticnetwork/bor/core"
|
||||||
"github.com/ethereum/go-ethereum/core/rawdb"
|
"github.com/maticnetwork/bor/core/rawdb"
|
||||||
"github.com/ethereum/go-ethereum/core/state"
|
"github.com/maticnetwork/bor/core/state"
|
||||||
"github.com/ethereum/go-ethereum/core/types"
|
"github.com/maticnetwork/bor/core/types"
|
||||||
"github.com/ethereum/go-ethereum/core/vm"
|
"github.com/maticnetwork/bor/core/vm"
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/maticnetwork/bor/crypto"
|
||||||
"github.com/ethereum/go-ethereum/ethdb"
|
"github.com/maticnetwork/bor/ethdb"
|
||||||
"github.com/ethereum/go-ethereum/log"
|
"github.com/maticnetwork/bor/log"
|
||||||
"github.com/ethereum/go-ethereum/node"
|
"github.com/maticnetwork/bor/node"
|
||||||
"github.com/ethereum/go-ethereum/params"
|
"github.com/maticnetwork/bor/params"
|
||||||
"github.com/ethereum/go-ethereum/rlp"
|
"github.com/maticnetwork/bor/rlp"
|
||||||
"github.com/ethereum/go-ethereum/rpc"
|
"github.com/maticnetwork/bor/rpc"
|
||||||
"github.com/ethereum/go-ethereum/trie"
|
"github.com/maticnetwork/bor/trie"
|
||||||
|
|
||||||
cli "gopkg.in/urfave/cli.v1"
|
cli "gopkg.in/urfave/cli.v1"
|
||||||
)
|
)
|
||||||
|
|
@ -19,9 +19,9 @@ package main
|
||||||
import (
|
import (
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
"github.com/ethereum/go-ethereum/common/hexutil"
|
"github.com/maticnetwork/bor/common/hexutil"
|
||||||
"github.com/ethereum/go-ethereum/core/types"
|
"github.com/maticnetwork/bor/core/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
// RPCTransaction represents a transaction that will serialize to the RPC representation of a transaction
|
// RPCTransaction represents a transaction that will serialize to the RPC representation of a transaction
|
||||||
|
|
@ -23,7 +23,7 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/docker/docker/pkg/reexec"
|
"github.com/docker/docker/pkg/reexec"
|
||||||
"github.com/ethereum/go-ethereum/internal/cmdtest"
|
"github.com/maticnetwork/bor/internal/cmdtest"
|
||||||
)
|
)
|
||||||
|
|
||||||
func tmpdir(t *testing.T) string {
|
func tmpdir(t *testing.T) string {
|
||||||
|
|
@ -24,8 +24,8 @@ import (
|
||||||
|
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/cmd/utils"
|
"github.com/maticnetwork/bor/cmd/utils"
|
||||||
"github.com/ethereum/go-ethereum/internal/debug"
|
"github.com/maticnetwork/bor/internal/debug"
|
||||||
cli "gopkg.in/urfave/cli.v1"
|
cli "gopkg.in/urfave/cli.v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -19,15 +19,15 @@ package main
|
||||||
import (
|
import (
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/accounts"
|
"github.com/maticnetwork/bor/accounts"
|
||||||
"github.com/ethereum/go-ethereum/accounts/abi/bind"
|
"github.com/maticnetwork/bor/accounts/abi/bind"
|
||||||
"github.com/ethereum/go-ethereum/accounts/external"
|
"github.com/maticnetwork/bor/accounts/external"
|
||||||
"github.com/ethereum/go-ethereum/cmd/utils"
|
"github.com/maticnetwork/bor/cmd/utils"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
"github.com/ethereum/go-ethereum/contracts/checkpointoracle"
|
"github.com/maticnetwork/bor/contracts/checkpointoracle"
|
||||||
"github.com/ethereum/go-ethereum/ethclient"
|
"github.com/maticnetwork/bor/ethclient"
|
||||||
"github.com/ethereum/go-ethereum/params"
|
"github.com/maticnetwork/bor/params"
|
||||||
"github.com/ethereum/go-ethereum/rpc"
|
"github.com/maticnetwork/bor/rpc"
|
||||||
"gopkg.in/urfave/cli.v1"
|
"gopkg.in/urfave/cli.v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,17 +25,17 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/accounts"
|
"github.com/maticnetwork/bor/accounts"
|
||||||
"github.com/ethereum/go-ethereum/cmd/utils"
|
"github.com/maticnetwork/bor/cmd/utils"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
"github.com/ethereum/go-ethereum/common/hexutil"
|
"github.com/maticnetwork/bor/common/hexutil"
|
||||||
"github.com/ethereum/go-ethereum/contracts/checkpointoracle"
|
"github.com/maticnetwork/bor/contracts/checkpointoracle"
|
||||||
"github.com/ethereum/go-ethereum/contracts/checkpointoracle/contract"
|
"github.com/maticnetwork/bor/contracts/checkpointoracle/contract"
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/maticnetwork/bor/crypto"
|
||||||
"github.com/ethereum/go-ethereum/ethclient"
|
"github.com/maticnetwork/bor/ethclient"
|
||||||
"github.com/ethereum/go-ethereum/log"
|
"github.com/maticnetwork/bor/log"
|
||||||
"github.com/ethereum/go-ethereum/params"
|
"github.com/maticnetwork/bor/params"
|
||||||
"github.com/ethereum/go-ethereum/rpc"
|
"github.com/maticnetwork/bor/rpc"
|
||||||
"gopkg.in/urfave/cli.v1"
|
"gopkg.in/urfave/cli.v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,9 +22,9 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/cmd/utils"
|
"github.com/maticnetwork/bor/cmd/utils"
|
||||||
"github.com/ethereum/go-ethereum/common/fdlimit"
|
"github.com/maticnetwork/bor/common/fdlimit"
|
||||||
"github.com/ethereum/go-ethereum/log"
|
"github.com/maticnetwork/bor/log"
|
||||||
"gopkg.in/urfave/cli.v1"
|
"gopkg.in/urfave/cli.v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,8 @@ package main
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/cmd/utils"
|
"github.com/maticnetwork/bor/cmd/utils"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
"gopkg.in/urfave/cli.v1"
|
"gopkg.in/urfave/cli.v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,24 +35,24 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/accounts"
|
"github.com/maticnetwork/bor/accounts"
|
||||||
"github.com/ethereum/go-ethereum/accounts/keystore"
|
"github.com/maticnetwork/bor/accounts/keystore"
|
||||||
"github.com/ethereum/go-ethereum/cmd/utils"
|
"github.com/maticnetwork/bor/cmd/utils"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
"github.com/ethereum/go-ethereum/common/hexutil"
|
"github.com/maticnetwork/bor/common/hexutil"
|
||||||
"github.com/ethereum/go-ethereum/console"
|
"github.com/maticnetwork/bor/console"
|
||||||
"github.com/ethereum/go-ethereum/core/types"
|
"github.com/maticnetwork/bor/core/types"
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/maticnetwork/bor/crypto"
|
||||||
"github.com/ethereum/go-ethereum/internal/ethapi"
|
"github.com/maticnetwork/bor/internal/ethapi"
|
||||||
"github.com/ethereum/go-ethereum/log"
|
"github.com/maticnetwork/bor/log"
|
||||||
"github.com/ethereum/go-ethereum/node"
|
"github.com/maticnetwork/bor/node"
|
||||||
"github.com/ethereum/go-ethereum/params"
|
"github.com/maticnetwork/bor/params"
|
||||||
"github.com/ethereum/go-ethereum/rlp"
|
"github.com/maticnetwork/bor/rlp"
|
||||||
"github.com/ethereum/go-ethereum/rpc"
|
"github.com/maticnetwork/bor/rpc"
|
||||||
"github.com/ethereum/go-ethereum/signer/core"
|
"github.com/maticnetwork/bor/signer/core"
|
||||||
"github.com/ethereum/go-ethereum/signer/fourbyte"
|
"github.com/maticnetwork/bor/signer/fourbyte"
|
||||||
"github.com/ethereum/go-ethereum/signer/rules"
|
"github.com/maticnetwork/bor/signer/rules"
|
||||||
"github.com/ethereum/go-ethereum/signer/storage"
|
"github.com/maticnetwork/bor/signer/storage"
|
||||||
"gopkg.in/urfave/cli.v1"
|
"gopkg.in/urfave/cli.v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -100,9 +100,9 @@ or
|
||||||
{"jsonrpc":"2.0","id":1,"error":{"code":-32000,"message":"Request denied"}}
|
{"jsonrpc":"2.0","id":1,"error":{"code":-32000,"message":"Request denied"}}
|
||||||
```
|
```
|
||||||
|
|
||||||
Apart from listing accounts, you can also *request* creating a new account; signing transactions and data; and recovering signatures. You can find the available methods in the Clef [External API Spec](https://github.com/ethereum/go-ethereum/tree/master/cmd/clef#external-api-1) and the [External API Changelog](https://github.com/ethereum/go-ethereum/blob/master/cmd/clef/extapi_changelog.md).
|
Apart from listing accounts, you can also *request* creating a new account; signing transactions and data; and recovering signatures. You can find the available methods in the Clef [External API Spec](https://github.com/maticnetwork/bor/tree/master/cmd/clef#external-api-1) and the [External API Changelog](https://github.com/maticnetwork/bor/blob/master/cmd/clef/extapi_changelog.md).
|
||||||
|
|
||||||
*Note, the number of things you can do from the External API is deliberately small, since we want to limit the power of remote calls by as much as possible! Clef has an [Internal API](https://github.com/ethereum/go-ethereum/tree/master/cmd/clef#ui-api-1) too for the UI (User Interface) which is much richer and can support custom interfaces on top. But that's out of scope here.*
|
*Note, the number of things you can do from the External API is deliberately small, since we want to limit the power of remote calls by as much as possible! Clef has an [Internal API](https://github.com/maticnetwork/bor/tree/master/cmd/clef#ui-api-1) too for the UI (User Interface) which is much richer and can support custom interfaces on top. But that's out of scope here.*
|
||||||
|
|
||||||
## Automatic rules
|
## Automatic rules
|
||||||
|
|
||||||
|
|
@ -288,7 +288,7 @@ t=2019-07-01T15:52:23+0300 lvl=info msg=SignData api=signer type=request meta
|
||||||
t=2019-07-01T15:52:23+0300 lvl=info msg=SignData api=signer type=response data= error="Request denied"
|
t=2019-07-01T15:52:23+0300 lvl=info msg=SignData api=signer type=response data= error="Request denied"
|
||||||
```
|
```
|
||||||
|
|
||||||
For more details on writing automatic rules, please see the [rules spec](https://github.com/ethereum/go-ethereum/blob/master/cmd/clef/rules.md).
|
For more details on writing automatic rules, please see the [rules spec](https://github.com/maticnetwork/bor/blob/master/cmd/clef/rules.md).
|
||||||
|
|
||||||
## Geth integration
|
## Geth integration
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,10 +23,10 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/maticnetwork/bor/crypto"
|
||||||
"github.com/ethereum/go-ethereum/p2p/discover"
|
"github.com/maticnetwork/bor/p2p/discover"
|
||||||
"github.com/ethereum/go-ethereum/p2p/enode"
|
"github.com/maticnetwork/bor/p2p/enode"
|
||||||
"github.com/ethereum/go-ethereum/params"
|
"github.com/maticnetwork/bor/params"
|
||||||
"gopkg.in/urfave/cli.v1"
|
"gopkg.in/urfave/cli.v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,9 +27,9 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/p2p/enode"
|
"github.com/maticnetwork/bor/p2p/enode"
|
||||||
"github.com/ethereum/go-ethereum/p2p/enr"
|
"github.com/maticnetwork/bor/p2p/enr"
|
||||||
"github.com/ethereum/go-ethereum/rlp"
|
"github.com/maticnetwork/bor/rlp"
|
||||||
"gopkg.in/urfave/cli.v1"
|
"gopkg.in/urfave/cli.v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,8 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/internal/debug"
|
"github.com/maticnetwork/bor/internal/debug"
|
||||||
"github.com/ethereum/go-ethereum/params"
|
"github.com/maticnetwork/bor/params"
|
||||||
"gopkg.in/urfave/cli.v1"
|
"gopkg.in/urfave/cli.v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@ import (
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/accounts/keystore"
|
"github.com/maticnetwork/bor/accounts/keystore"
|
||||||
"github.com/ethereum/go-ethereum/cmd/utils"
|
"github.com/maticnetwork/bor/cmd/utils"
|
||||||
"gopkg.in/urfave/cli.v1"
|
"gopkg.in/urfave/cli.v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,9 +23,9 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/accounts/keystore"
|
"github.com/maticnetwork/bor/accounts/keystore"
|
||||||
"github.com/ethereum/go-ethereum/cmd/utils"
|
"github.com/maticnetwork/bor/cmd/utils"
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/maticnetwork/bor/crypto"
|
||||||
"github.com/pborman/uuid"
|
"github.com/pborman/uuid"
|
||||||
"gopkg.in/urfave/cli.v1"
|
"gopkg.in/urfave/cli.v1"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -21,9 +21,9 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/accounts/keystore"
|
"github.com/maticnetwork/bor/accounts/keystore"
|
||||||
"github.com/ethereum/go-ethereum/cmd/utils"
|
"github.com/maticnetwork/bor/cmd/utils"
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/maticnetwork/bor/crypto"
|
||||||
"gopkg.in/urfave/cli.v1"
|
"gopkg.in/urfave/cli.v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/cmd/utils"
|
"github.com/maticnetwork/bor/cmd/utils"
|
||||||
"gopkg.in/urfave/cli.v1"
|
"gopkg.in/urfave/cli.v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,10 +21,10 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/accounts/keystore"
|
"github.com/maticnetwork/bor/accounts/keystore"
|
||||||
"github.com/ethereum/go-ethereum/cmd/utils"
|
"github.com/maticnetwork/bor/cmd/utils"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/maticnetwork/bor/common"
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/maticnetwork/bor/crypto"
|
||||||
"gopkg.in/urfave/cli.v1"
|
"gopkg.in/urfave/cli.v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/docker/docker/pkg/reexec"
|
"github.com/docker/docker/pkg/reexec"
|
||||||
"github.com/ethereum/go-ethereum/internal/cmdtest"
|
"github.com/maticnetwork/bor/internal/cmdtest"
|
||||||
)
|
)
|
||||||
|
|
||||||
type testEthkey struct {
|
type testEthkey struct {
|
||||||
|
|
|
||||||
|
|
@ -22,9 +22,9 @@ import (
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/cmd/utils"
|
"github.com/maticnetwork/bor/cmd/utils"
|
||||||
"github.com/ethereum/go-ethereum/console"
|
"github.com/maticnetwork/bor/console"
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/maticnetwork/bor/crypto"
|
||||||
"gopkg.in/urfave/cli.v1"
|
"gopkg.in/urfave/cli.v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/cmd/evm/internal/compiler"
|
"github.com/maticnetwork/bor/cmd/evm/internal/compiler"
|
||||||
|
|
||||||
cli "gopkg.in/urfave/cli.v1"
|
cli "gopkg.in/urfave/cli.v1"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ import (
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/core/asm"
|
"github.com/maticnetwork/bor/core/asm"
|
||||||
cli "gopkg.in/urfave/cli.v1"
|
cli "gopkg.in/urfave/cli.v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/core/asm"
|
"github.com/maticnetwork/bor/core/asm"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Compile(fn string, src []byte, debug bool) (string, error) {
|
func Compile(fn string, src []byte, debug bool) (string, error) {
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ import (
|
||||||
"math/big"
|
"math/big"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/cmd/utils"
|
"github.com/maticnetwork/bor/cmd/utils"
|
||||||
"gopkg.in/urfave/cli.v1"
|
"gopkg.in/urfave/cli.v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue