707221954f
This change adds adds an ability to use different source of time for whisper: when envelope is created it is used to set expiry to track when envelope needs to be expired This time is then used to check validity of the envelope when it is received. Currently If we receive an envelope that is sent from future - peer will get disconnected. If envelope that was received has an expiry less then now it will be simply dropped, if expiry is less than now + 10*2 seconds peer will get dropped. So, it is clear that whisper depends on time. And any time we get a skew with peers that is > 20s reliability will be grealy reduced. In this change another source of time for whisper will be used. This time source will use ntp servers from pool.ntp.org to compute offset. When whisper queries time - this offset will be added/substracted from current time. Query is executed every 2 mins, queries 5 different servers, cut offs min and max and the computes mean value. pool.ntp.org is resolved to different servers and according to documentation you will rarely hit the same. Closes: #687 |
||
---|---|---|
.. | ||
0000-accounts-hd-keys.patch | ||
0010-geth-17-fix-npe-in-filter-system.patch | ||
0014-whisperv6-notifications.patch | ||
0015-whisperv6-envelopes-tracing.patch | ||
0016-fix-leveldb-issue.patch | ||
0020-discv5-metrics.patch | ||
0021-backends-simulated-chain-signer.patch | ||
0022-node-attach-public.patch | ||
0023-extract-personal-sign-api.patch | ||
0025-whisper-confirmations.patch | ||
0026-ethdb-error-deadlock.patch | ||
0027-whisper-time-source.patch | ||
README.md |
README.md
Status Patches 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 vendor folder.
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.
Creating patches
Instructions for creating a patch from the command line:
- Enter the command line at the go-ethereum dependency root in vendor folder.
- Create the patch:
- If you already have a commit that represents the change, find its SHA1 (e.g.
$COMMIT_SHA1
) and dogit diff $COMMIT_SHA1 > file.patch
- If the files are staged, do
git diff --cached > file.patch
- If you already have a commit that represents the change, find its SHA1 (e.g.
Updating patches
- Tweak the patch file.
- Run
make dep-ensure
to re-apply patches.
Removing patches
- Remove the patch file
- Remove the link from [this README] (./README.md)
- Run
make dep-ensure
to re-apply patches.
Updating
When a new stable release of go-ethereum
comes out, we need to upgrade our vendored copy. We use dep
for vendoring, so for upgrading:
- Change target branch for
go-ethereum
inGopkg.toml
. dep ensure -update github.com/ethereum/go-ethereum
make dep-ensure
This will ensure that dependency is upgraded and fully patched. Upon success, you can do make vendor-check
after committing all the changes, in order to ensure that all changes are valid.