Commit Graph

53 Commits

Author SHA1 Message Date
Renjie Cai 65ad10b715 support https and wss core url in shard's ws client (#488)
* support https and wss core url in shard's ws client

* fmt

* small fix
2022-08-04 17:01:32 +01:00
Ivan 5bff41d0c1 Add geoip db (#477)
* Use geoip for ipv4 city lookup

Signed-off-by: i1i1 <vanyarybin1@live.ru>

* Add support for ipv6

Signed-off-by: i1i1 <vanyarybin1@live.ru>

* Wrap locator into a blocking task

* Dummy change to try and trigger CI pipeline.

Co-authored-by: James Wilson <james@jsdw.me>
2022-07-19 22:06:07 +01:00
James Wilson b4b128f9fe Tidy up stale connections. (#406)
* If messageId changes and network ID doesn't, remove 'old' message_id

* Boot nodes/connection when no recent messages received for it

* Separate task needed for soketto recv to avoid cancel-safety issues with new interval

* Wee tidy up

* cargo fmt

* Add some logging around node adding/removing

* Another log info msg

* a bit of tidy up

* bump stale node timeout to 60s
2021-09-21 15:49:42 +01:00
James Wilson 2932075783 Avoid using flume::Receiver::into_stream() to avoid memory leaks until the issue is resolved upstream (#394)
* Tweak rolling_total test to also confirm capacity doesn't go nuts

* Use Jemalloc

* Avoid flume's into_stream and use a workaround for now

* cargo fmt

* Improve comments now that there's an issue to point to
2021-09-03 08:40:43 +01:00
James Wilson ec5db0fbbf Bump tokio to 1.10 and add a test to confirm memory usage of rolling_total (#392) 2021-08-31 20:18:46 +02:00
James Wilson bd7a21ec39 Flumify everything 2021-08-12 16:01:17 +01:00
James Wilson 703a9ddc4e use flume throughout telemetry_core 2021-08-12 16:01:14 +01:00
James Wilson 74cf55174e Use rayon to speed up subscribe message serializing 2021-08-06 17:42:03 +01:00
James Wilson 0788270756 Add 'subscribe' benchmark 2021-08-06 14:22:01 +01:00
James Wilson 759d28b1a2 add --num-cpus option 2021-08-05 11:11:23 +01:00
James Wilson 5d81128e74 create more realistic soak test so that we can see a more representative UI in action 2021-08-03 15:40:20 +01:00
James Wilson 61fd903f55 Remove benchmark things for now and no need for release mode on a test 2021-07-27 14:28:27 +01:00
James Wilson cf0e424803 Adapt shard to use hyper+soketto instead 2021-07-23 17:07:29 +01:00
James Wilson 0eff32d10e Migrate telemetry_core to Hyper+Soketto 2021-07-23 15:57:50 +01:00
James Wilson 999d8ff0bd debounce feed polling a little to reduce CPU load when lots of messages are being sent out 2021-07-21 12:06:22 +01:00
James Wilson cca1df2e21 use ws_client in shard, too, and make it better at handling core disconnecting 2021-07-20 13:04:10 +01:00
James Wilson fd79b3e85b Add some tests, and add a configurable soak test 2021-07-15 17:18:58 +01:00
James Wilson e34da5761f move tests around and add (non working) benchmark 2021-07-14 15:05:09 +01:00
James Wilson c6c262c9c5 tidyup, add more e2e tests, fix (and test a little) feed msg decoding, supporting bits 2021-07-12 13:17:24 +01:00
James Wilson 28be68e65f Get a basic first test working, and lots of changes to supporting code to facilitate this 2021-07-09 19:41:53 +01:00
James Wilson c043393e28 Write some basic test utils to get going; time to start trying them 2021-07-09 19:41:51 +01:00
James Wilson f2adead2e9 rename binaries for clarity, and first pass of connect_to_servers test util 2021-07-09 19:41:47 +01:00
James Wilson 8bf412cad9 Begin writing the core utils that we'll use for testing things 2021-07-09 19:41:36 +01:00
James Wilson 47c12ce210 Lots more refactoring, finish add node (and almost the location updating) 2021-06-23 18:03:11 +01:00
James Wilson 2db2677217 bimap to store global ID mappings: we'll assign them in node state 2021-06-23 10:12:50 +01:00
James Wilson 63283195ad WIP filling in core aggregator match arms and various other tweaks 2021-06-23 09:34:56 +01:00
James Wilson dfe016597e Rework: Shard working, Telemetry Core needs logic filling in 2021-06-21 10:45:31 +01:00
James Wilson 8e25b4fbdf Split msg into JSON and internal variant, and other bits 2021-06-16 11:08:33 +01:00
James Wilson c276c2065a rename shared to common to disambiguate from 'shard' 2021-06-14 10:57:06 +01:00
Maciej Hirsz 8db384bed3 Squashed diff from mh-backend-shard 2021-06-08 12:17:00 +02:00
Maciej Hirsz e1daa07c51 Re-commit "Preparing backend to receive data from shards (#337)"
This reverts commit 87e3c52b35.
2021-06-04 09:40:37 +02:00
Maciej Hirsz 87e3c52b35 Revert "Preparing backend to receive data from shards (#337)"
This reverts commit f8b7128dca.
2021-05-21 12:39:35 +02:00
Maciej Hirsz f8b7128dca Preparing backend to receive data from shards (#337)
* Move backend to backend/core

* Ported shard receiver WIP

* Remove dead code
2021-05-21 11:20:39 +02:00
Maciej Hirsz 05b0afefd3 Bucket nodes by genesis hash (#335)
* Send unwrapped Payload to Chain + cargo fmt

* Read genesis_hash when connecting

* Group chains by genesis hashes

* Fix typo

Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>

* Fix grumbles

* Link up `Hash` for docs

* `hashes` -> `genesis_hashes`

* Typo :)

Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>

* Added a doc comment link

* Add comment about why H256 is not used

Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
2021-04-27 13:05:58 +02:00
David Palm 7069856da9 Merge branch 'master' into dp-add-changelog 2021-03-29 22:15:33 +02:00
David Palm 7bb4a410bf Merge branch 'master' into dp-mute-node-connector-when-denied-or-overquota 2021-03-29 22:03:25 +02:00
David Palm bbfe118965 Use ctor instead of lazy_static 2021-03-27 23:00:36 +01:00
David Palm 1c0ba7c3b1 lockfile 2021-03-26 11:22:35 +01:00
David Palm 927c365993 Merge branch 'master' into dp-add-changelog 2021-03-26 07:45:33 +01:00
David Palm 3978085a38 Upgrade actix to v4.0.0-beta.4 (and associated fall-out) 2021-03-25 17:13:25 +01:00
David Palm 9403d31cbe Proper version number 2021-03-25 14:27:13 +01:00
David Palm a6713ea37e Set max_nodes in ChainEntry
Only add a new node if the current number of connected nodes is below the max
Define "first party networks" to be: Polkadot, Kusama, Westend and Rococo. All other networks are capped to 500 nodes
2021-03-25 11:05:34 +01:00
Maciej Hirsz 98cd3cfa12 Fix a panic in actix-web normalize middleware (#294)
* Fix a panic in actix-web normalize middleware

* Cleanup dependencies
2020-10-29 19:46:11 +01:00
Maciej Hirsz 0ff63abf35 Bump dependencies (#293) 2020-10-26 19:57:51 +01:00
Maciej Hirsz a4c34d4a6c Simplify routes 2020-10-01 15:47:16 +02:00
Maciej Hirsz 8bf1020c16 Finally working 2020-09-29 19:16:28 +02:00
Maciej Hirsz 4a5bafcd41 WIP 2020-09-25 14:03:35 +02:00
Maciej Hirsz 793c759728 Update Rust dependencies 2020-07-29 12:09:27 +02:00
Maciej Hirsz 4b29a2afa2 Pin merged Polkadot chain (#272) 2020-07-21 17:39:38 +02:00
Chevdor 2c8e8ed7d3 Add clap support (#247)
* Add clap support

* Version bump

* Switch to using a single SokectAddr
2020-04-06 16:54:07 +02:00