status-go/geth-patches
Igor Mandrigin 6728dcf06d
Update `README`s to document `dep`-based workflow. (#606)
2018-02-02 18:44:29 +01:00
..
0000-accounts-hd-keys.patch Upgrade to geth 1.7.3 and add geth patches (#492) 2018-01-15 21:26:41 +01:00
0002-les-api-status.patch Upgrade to geth 1.7.3 and add geth patches (#492) 2018-01-15 21:26:41 +01:00
0003-dockerfiles-wnode-swarm.patch Upgrade to geth 1.7.3 and add geth patches (#492) 2018-01-15 21:26:41 +01:00
0004-whisper-notifications.patch Upgrade to geth 1.7.3 and add geth patches (#492) 2018-01-15 21:26:41 +01:00
0006-latest-cht.patch Upgrade to geth 1.7.3 and add geth patches (#492) 2018-01-15 21:26:41 +01:00
0007-README.patch Upgrade to geth 1.7.3 and add geth patches (#492) 2018-01-15 21:26:41 +01:00
0008-tx-pool-nonce.patch Use single codepath for sending transactions to a local and remote nodes (#527) 2018-01-18 17:55:17 +01:00
0009-whisper-envelopes-tracing.patch Add support for metrics (#558) 2018-01-30 12:51:48 +01:00
0010-geth-17-fix-npe-in-filter-system.patch [#429/partial] Add a patch to fix npe in go-ethereum. (#599) 2018-02-02 13:30:56 +01:00
README.md Update `README`s to document `dep`-based workflow. (#606) 2018-02-02 18:44:29 +01:00

README.md

Status Patches to for geth (go-ethereum)


Status-go uses go-ethereum (upstream) as its dependency. As any other Go dependency go-ethereum code is vendored and stored in vendor/ folder.

However, there are a few changes has been made to the upstream, that are specific to Status and should not be merged to the upstream. We keep those changes as a set of patches, that can be applied upon each next release of go-ethereum. Patched version of go-ethereum is available in the status-im/go-ethereum repo.

We try to minimize number and amount of changes in those patches as much as possible, and whereas possible, to contribute changes into the upstream.

Patches

Updating upstream version

When a new stable release of go-ethereum comes out, we need to upgrade our fork and vendored copy.

Note: The process is completely repeatable, so it's safe to remove current go-ethereum directory, clone latest upstream version and apply patches from scratch.

I. In our fork at /status-im/go-ethereum.

  1. Remove the local develop branch.
git branch -D develop
  1. Pull upstream release branch into develop branch.
git pull git@github.com:ethereum/go-ethereum.git <release_branch>:develop

In our case <release_branch> would be release/1.7 because the current stable version is 1.7.x.

  1. Apply patches
for patch in $GOPATH/src/github.com/status-im/status-go/geth-patches/*.patch;
do
    patch -p1 < $patch;
done

Once patches applied, you might want to inspect changes between current vendored version and newly patched version by this command:

diff -Nru -x "*_test.go" -x "vendor" -x ".git" -x "tests" -x "build" --brief $GOPATH/src/github.com/status-im/go-ethereum $GOPATH/src/github.com/status-im/status-go/vendor/github.com/ethereum/go-ethereum
  1. Push develop branch to our remote, rewriting history
git push -f origin develop

II. In status-go repository

  1. Update vendored go-ethereum (note that we use upstream's address there, we override the download link to our fork address in Gopkg.toml)
dep ensure --update github.com/ethereum/go-ethereum

Gopkg.lock will change and files within vendor/ethereum/go-ethereum.

  1. Run tests
make ci
  1. Commit & push changes, create a PR