Commit Graph

37 Commits

Author SHA1 Message Date
Hao Duan
a188a1e150
ethstats: stop report ticker in each loop cycle #21070 (#21071)
Co-authored-by: Hao Duan <duan.hao@hyperchain.cn>
2020-05-13 12:06:19 +03:00
ucwong
37d6357806
ethstats: add missing Ticker.Stop call (#20867) 2020-04-02 16:02:10 +02:00
Felix Lange
04e175b8ec rpc: implement websockets with github.com/gorilla/websocket (#19866)
* rpc: implement websockets with github.com/gorilla/websocket

This change makes package rpc use the github.com/gorilla/websocket
package for WebSockets instead of golang.org/x/net/websocket. The new
library is more robust and supports all WebSocket features including
continuation frames.

There are new tests for two issues with the previously-used library:

  - TestWebsocketClientPing checks handling of Ping frames.
  - TestWebsocketLargeCall checks whether the request size limit is
    applied correctly.

* rpc: raise HTTP/WebSocket request size limit to 5MB

* rpc: remove default origin for client connections

The client used to put the local hostname into the Origin header because
the server wanted an origin to accept the connection, but that's silly:
Origin is for browsers/websites. The nobody would whitelist a particular
hostname.

Now that the server doesn't need Origin anymore, don't bother setting
one for clients. Users who need an origin can use DialWebsocket to
create a client with arbitrary origin if needed.

* vendor: put golang.org/x/net/websocket back

* rpc: don't set Origin header for empty (default) origin

* rpc: add HTTP status code to handshake error

This makes it easier to debug failing connections.

* ethstats: use github.com/gorilla/websocket

* rpc: fix lint
2019-07-22 13:22:39 +03:00
Martin Holst Swende
0b4fe8d192 all: simplify timestamps to uint64 (#19372)
* all: simplify timestamps to uint64

* tests: update definitions

* clef, faucet, mobile: leftover uint64 fixups

* ethash: fix tests

* graphql: update schema for timestamp

* ethash: remove unused variable
2019-04-02 23:28:48 +03:00
kevin.xu
fdfd6d3c39 ethstats: comment minor correction (#17102)
spell correction from `repors` to `reports`
2018-06-29 15:15:38 +03:00
kiel barry
0ad32d3be7 ethstats: fix last golint warning (#16837) 2018-05-30 11:36:02 +03:00
Péter Szilágyi
49719e21bc
core, eth: minor txpool event cleanups 2018-05-18 12:08:24 +03:00
rjl493456442
a2e43d28d0
all: collate new transaction events together 2018-05-18 11:46:44 +03:00
kiel barry
4747aad160 eth: golint fixes to variable names (#16711) 2018-05-09 10:59:00 +03:00
Péter Szilágyi
81ad8f665d
Merge pull request #15869 from Magicking/ethstats-reporting-fix
ethstats: Fix ethstats reporting while syncing
2018-01-15 10:36:43 +02:00
Magicking
90e5744d6f
ethstats: Fix ethstats reporting while syncing 2018-01-12 18:30:38 +01:00
Péter Szilágyi
6f69cdd109
all: switch gas limits from big.Int to uint64 2018-01-03 14:45:35 +02:00
Péter Szilágyi
f7ca03ae87 eth, les, light: expose chain config in les node info too (#15732) 2017-12-28 14:18:34 +01:00
Zach
3da1bf8ca1 all: use gometalinter.v2, fix new gosimple issues (#15650) 2017-12-12 19:05:47 +01:00
Felföldi Zsolt
ca376ead88 les, light: LES/2 protocol version (#14970)
This PR implements the new LES protocol version extensions:

* new and more efficient Merkle proofs reply format (when replying to
  a multiple Merkle proofs request, we just send a single set of trie
  nodes containing all necessary nodes)
* BBT (BloomBitsTrie) works similarly to the existing CHT and contains
  the bloombits search data to speed up log searches
* GetTxStatusMsg returns the inclusion position or the
  pending/queued/unknown state of a transaction referenced by hash
* an optional signature of new block data (number/hash/td) can be
  included in AnnounceMsg to provide an option for "very light
  clients" (mobile/embedded devices) to skip expensive Ethash check
  and accept multiple signatures of somewhat trusted servers (still a
  lot better than trusting a single server completely and retrieving
  everything through RPC). The new client mode is not implemented in
  this PR, just the protocol extension.
2017-10-24 15:19:09 +02:00
Miya Chen
bf1e263128 core, light: send chain events using event.Feed (#14865) 2017-08-18 12:58:36 +02:00
Egon Elbre
3780d0b6f7 ethstats: fix megacheck warnings 2017-08-07 13:32:19 +03:00
Péter Szilágyi
a355b401db
ethstats: reduce ethstats traffic by trottling reports 2017-06-01 00:16:19 +03:00
Péter Szilágyi
09d59da3a1
ethstats: don't report transaction content, only hash 2017-05-30 02:15:40 +03:00
Péter Szilágyi
a2f23ca9b1 cmd, core, eth, miner: remove txpool gas price limits (#14442) 2017-05-16 21:07:27 +02:00
Péter Szilágyi
e61035c5a3
cmd, eth, les, mobile: make networkid uint64 everywhere 2017-04-25 14:53:50 +03:00
Péter Szilágyi
a7b9e484d0 consensus, core, ethstats: use engine specific block beneficiary (#14318)
* consensus, core, ethstats: use engine specific block beneficiary

* core, eth, les, miner: use explicit beneficiary during mining
2017-04-12 16:38:31 +03:00
Péter Szilágyi
fb98a8c6c2
ethstats: cut short unavailable history responses 2017-04-04 11:41:17 +03:00
Péter Szilágyi
96d1a4aee6
ethstats: sanity check ethstats history queries 2017-03-31 15:06:54 +03:00
Péter Szilágyi
db93641941
ethstats: work around weird URL scheme parsing issues 2017-03-30 12:53:50 +03:00
Péter Szilágyi
bb7dca275c ethstats: cleanups, trace logs and "fix" history responses (#3812) 2017-03-24 10:42:40 +01:00
Péter Szilágyi
2ba9374789
ethstats: try both ws:// and wss:// if none specified 2017-03-20 12:45:43 +02:00
Péter Szilágyi
e7030c4bf5
all: update light logs (and a few others) to the new model 2017-03-03 11:41:52 +02:00
Péter Szilágyi
d4fd06c3dc
all: blidly swap out glog to our log15, logs need rework 2017-02-23 12:16:44 +02:00
Felix Lange
f2da6581ba all: fix issues reported by honnef.co/go/simple/cmd/gosimple 2017-01-06 18:18:07 +01:00
Felix Lange
35a7dcb162 all: gofmt -w -s 2017-01-06 15:52:03 +01:00
Péter Szilágyi
b2c226cb7d
ethstats: implement block history retrievals 2016-12-12 14:01:52 +02:00
Péter Szilágyi
13614f4e1c
ethstats: fix timestamps and add custom proto support 2016-12-11 20:16:30 +02:00
Bas van Kervel
56b446190a ethstats: check if received event is valid 2016-11-30 17:47:39 +01:00
Péter Szilágyi
7dfeceb8cc
ethstats: don't drop concurrent head reports (mini forks) 2016-11-29 14:17:20 +02:00
Péter Szilágyi
7625b1a4f4
ethstats: report block miner, gas limit and gas consumption 2016-11-29 11:39:56 +02:00
Péter Szilágyi
4c8c5e2f74 cmd, ethstats, les, mobile, params: native netstats (#3336) 2016-11-25 16:55:06 +01:00