Bastian Köcher
53be6ec510
Support synching of blocks that are not new_best ( #6508 )
...
* Start
* Remove debug println
* Add tests
2020-06-30 14:44:52 +00:00
Nikolay Volf
36d2eefdc9
change everything to transaction ( #6440 )
2020-06-21 12:34:19 +02:00
Nikolay Volf
6e85555e0b
add network propagated metrics ( #6438 )
2020-06-19 17:40:39 +03:00
Bastian Köcher
7858828d98
Update sync chain info on own block import ( #6424 )
...
Before we only updated the chain info of sync when we have imported
something using the import queue. However, if you import your own
blocks, this is not done using the import queue and so sync is not
updated. If we don't do this, it can lead to sync switching to "major
sync" mode because sync is not informed about new blocks. This
especially happens on Cumulus, where a collator is selected multiple
times to include its block into the relay chain and thus, sync switches
to major sync mode while the node is still building blocks.
2020-06-19 16:00:58 +02:00
Pierre Krieger
dd7830d481
Remove --legacy-network-protocol CLI flag ( #6411 )
2020-06-19 00:23:58 +02:00
arkpar
850ee8b43a
Revert "Block packet size limit"
...
This reverts commit 08e0747d2b .
2020-06-18 10:43:03 +02:00
arkpar
08e0747d2b
Block packet size limit
2020-06-18 10:39:54 +02:00
Pierre Krieger
fec43fe6d7
Remove penalty on duplicate Status message ( #6377 )
2020-06-18 09:34:53 +02:00
Nikolay Volf
65ba701f50
Fix transaction pool & network issues ( #6288 )
...
* fix & tweaks
* address review
* line width
2020-06-08 23:58:08 +02:00
Arkadiy Paronyan
31921c4eb9
Use number of downloaded blocks for test ( #6234 )
2020-06-04 23:41:48 +02:00
Pierre Krieger
717fa95bc7
Restore the empty line after the license ( #6088 )
2020-05-20 13:08:27 +00:00
Arkadiy Paronyan
f275c6ab0b
Detect obsolete block responses ( #6077 )
2020-05-19 17:06:52 +02:00
Pierre Krieger
7536de97b1
Print an error if we discover our own network identity ( #6047 )
...
* Add an error if we discover our own network identity
* Fix tests
2020-05-18 18:42:44 +02:00
Nikolay Volf
d5411969ac
fix whitespace ( #6062 )
2020-05-18 13:51:28 +02:00
Arkadiy Paronyan
cdb7808a0e
Remove on_block_imported ( #6039 )
...
* remove on_block_imported
* Update client/network/src/service.rs
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com >
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com >
2020-05-16 12:59:34 +02:00
Pierre Krieger
6ecdf20a1f
Fix lots of small nits in sc-network ( #6028 )
...
* Fix lots of small nits in sc-network
* Update client/network/src/protocol/sync/blocks.rs
Co-authored-by: Arkadiy Paronyan <arkady.paronyan@gmail.com >
* Fix warning
* Yes. The line width.
Co-authored-by: Arkadiy Paronyan <arkady.paronyan@gmail.com >
2020-05-15 12:58:52 +01:00
Benjamin Kampmann
be8c96adec
Relax substrate licensing scheme ( #5947 )
2020-05-15 13:21:56 +02:00
Pierre Krieger
b4b1293c78
Restore the reputation penalty for timeouts ( #5984 )
2020-05-12 17:08:05 +02:00
Nikolay Volf
679c91e18c
Refactor network transactions handling ( #5939 )
...
* change propagation
* add bound
2020-05-11 10:36:00 +02:00
Bastian Köcher
3d188ef17d
Fix sync logging ( #5879 )
2020-05-04 13:43:08 +02:00
Pierre Krieger
929bd07bef
Move around stuff in sc_network ( #5847 )
2020-04-30 13:08:38 +00:00
Arkadiy Paronyan
fdde90077b
Optimize collecting pending block requests ( #5829 )
...
* Optimized collecting pending block requests
* Make sure request iterator is consumed
2020-04-30 09:50:08 +02:00
Pierre Krieger
6a7e86e677
Use new block requests protocol ( #5760 )
...
* Use new block requests protocol
* Tweak comment
2020-04-24 13:48:22 +02:00
Pierre Krieger
a7f578d63a
Add a protocol that answers finality proofs ( #5718 )
...
* Add a protocol that answers finality proofs
* Fix documentation
* Use Toggle
2020-04-22 10:58:26 +02:00
Pierre Krieger
3ad9f65f11
Send a status message on block announce handshake ( #5726 )
...
* Send a status message on block announce handshake
* Make sure to send the handshake to all handlers
2020-04-22 10:20:52 +02:00
Pierre Krieger
f2578bdc3b
Pass an encoded Roles as the notifications protocols handshakes ( #5665 )
2020-04-21 10:47:37 +02:00
cheme
4ffcf98d8d
Child trie api changes BREAKING ( #4857 )
...
Co-Authored-By: thiolliere <gui.thiolliere@gmail.com >
2020-04-20 15:21:22 +02:00
Pierre Krieger
ca1c60c2cf
Move around definitions in sc_network ( #5701 )
2020-04-20 14:35:17 +02:00
Pierre Krieger
cebd073649
Report local force-closing connections to Prometheus ( #5575 )
...
* Report local force-closing connections to Prometheus
* Also report ping timeouts separately
* Address concerns of #5571
2020-04-09 11:24:01 +02:00
Roman Borschel
f8c8355ac7
libp2p-next ( #5278 )
...
* Adapt to rust-libp2p#1440.
* Further adapt to libp2p/master.
* Update to libp2p-0.17
* Finishing touches.
* Remove stray TODO.
* Incorporate review feedback.
* Remove unused import.
2020-04-08 09:23:21 +02:00
Pierre Krieger
8c03a4fcef
Split the Roles in three types ( #5520 )
...
* Split the Roles bitfield in three
* Forgot to include some changes
* Fix cli test
* More test fixes
* Oh God, merging master broke other tests
* Didn't run the doctests
* Address review
* I'm trying to fix the build blindly because it's taking a good hour to compile on my machine
* Address some review
* Also update the peerset's API to make sense
* Fix peerset tests
* Fix browser node
* client: distinguish between local and network authority
Co-authored-by: André Silva <andre.beat@gmail.com >
2020-04-03 19:08:14 +02:00
Pierre Krieger
e8dfb37aaf
Add a sub_libp2p_notifications_queues_size Prometheus metric ( #5503 )
...
* Add a sub_libp2p_notifications_queues_size Prometheus metric
* Fix network tests
* Address review
2020-04-03 08:43:55 +02:00
Pierre Krieger
a8aedfa16f
Switch to new light client protocol ( #5472 )
...
* Switch to the new protocol
* Oops, forgot to remove light_dispatch.rs
* Fix tests
* Address review
2020-04-01 19:44:42 +02:00
Pierre Krieger
84ff6ef157
Remove DiscoveryNetBehaviour trait ( #5430 )
2020-04-01 16:25:53 +01:00
Cecile Tonglet
439887a773
Allow changing the behavior for imported blocks ( #5236 )
...
* Added option to disable default block announce
* Added on_block_imported on NetworkService
* Revert "Added on_block_imported on NetworkService"
This reverts commit ba360cad96e0cb041d7047af30df2a35eb112449.
* Do not announce block if set to not announce block
* Revert fix
* Moving default announce block to NetworkConfig
* WIP
Forked at: ad90ab7ec9
Parent branch: origin/master
* WIP
Forked at: ad90ab7ec9
Parent branch: origin/master
* Removing boolean in favor of explicit call
* Fixing tests
* WIP
Forked at: ad90ab7ec9
Parent branch: origin/master
* WIP
Forked at: ad90ab7ec9
Parent branch: origin/master
* increase spec_version
* increase spec_version
* Fixed test
* Fixing test
* Renamed should_announce_imported_blocks to announce_imported_blocks
* Updated assert_cmd
2020-03-31 11:02:16 +02:00
Pierre Krieger
462eaa3f41
Make transactions and block announces use notifications substre… ( #5360 )
...
* Make transactions and block announces use notifications
* Add documentation
2020-03-30 10:00:34 +02:00
Bastian Köcher
6beb6acbd5
Print an error when a bootnode is on a different chain ( #5377 )
...
* Print an error when a bootnode is on a different chain
* Fix tests
2020-03-24 14:24:09 +00:00
Stanislav Tkach
4414d00082
Get rid of rustc_hex in favor of hex ( #5370 )
...
* Get rid of rustc_hex in favor of hex
* Use HexDisplay
2020-03-24 11:48:23 +01:00
Arkadiy Paronyan
a66615446d
Fixed a couple of syncing issues ( #5277 )
...
* Don't queue duplicate blocks
* Keep queue_blocks on restart
2020-03-19 14:02:07 +01:00
Max Inden
e91d4be998
client/network/src/protocol: Refactor Prometheus metric logic ( #5266 )
...
* client/network/src/protocol: Start Prometheus metric help with capital
* client/network/src/protocol: Differentiate metric status as label
Prometheus query language is powerful through its multi-dimensional data
model. Metric names are hirarchical whereas labels enable data to become
multi-dimensional.
Exposing the justification of finality-proof status as a label allows
for more powerful queries.
* client/network/src/protocol: Remove 'Total' from non counter metric help
The word 'total' is reserved for accumulating counters. Counters have to
be monotonically increasing. `obsolete_requests` can decrease, thereby
it is defined as a `Gauge` and not a `Counter`.
For more details on metric naming see
https://prometheus.io/docs/practices/naming/
2020-03-17 11:47:55 +01:00
Seun Lanlege
9898fc7e81
removes use of sc_client::Client from sc_network ( #5147 )
...
* removes use of sc_client::Client from sc_network
* rename BlockProvider to BlockBackend
* fix broken test
2020-03-12 14:02:04 +01:00
Pierre Krieger
9c6d53f436
Fix NotificationStreamClosed reported when it shouldn't ( #5160 )
...
* Fix NotificationStreamClosed reported when it shouldn't
* Fix test
* Add test
* Update client/network/src/protocol.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Oops, fix test
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-03-06 21:24:51 +01:00
Gavin Wood
d957220435
Add lots of networking metrics for Prometheus ( #5126 )
...
* Add some metrics
* Address concerns
2020-03-05 21:38:41 +01:00
Gavin Wood
868d8b8252
Add more prometheus metrics to network::Protocol. ( #5145 )
2020-03-05 17:01:24 +01:00
Benjamin Kampmann
99ae5342eb
removes use of sc_client::Client from sc-rpc ( #5063 )
...
* removes use of sc_client::Client from sc-rpc
* remove Client impl from sc-finality-benches
* remove client impl from sc-finality-grandpa
* read_proof accepts iterator
* remove generic Executor param from ExecutorProvider
* fix long ass line
* code style changes
* merge with master
Co-authored-by: Arkadiy Paronyan <arkady.paronyan@gmail.com >
2020-03-05 16:41:10 +01:00
Arkadiy Paronyan
492a820c6c
Sync: validate block responses for required data ( #5052 )
...
* Less verbose state-db logging
* Validate block responses for block bodies
* Update client/network/src/protocol.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Added validation test
* Disconnect on missing header as well
* Typo
Co-Authored-By: André Silva <andre.beat@gmail.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: André Silva <andre.beat@gmail.com >
2020-02-25 22:17:42 +01:00
Robert Habermeier
0090fe979b
Remove NetworkSpecialization ( #4665 )
...
* remove networkspecialization
* Fix most of the fallout
* get all tests compiling
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com >
2020-02-21 14:02:12 +01:00
Pierre Krieger
7a04055814
Open one substream for each notifications protocol ( #4909 )
...
* Open one substream for each notifications protocol
* Fix WASM build
* Apply suggestions from code review
Co-Authored-By: Toralf Wittner <tw@dtex.org >
* Address concerns
* Use unsigned-varint to read the varint
* Use unsigned-varint
* Forgot Cargo.lock
Co-authored-by: Toralf Wittner <tw@dtex.org >
2020-02-21 11:06:24 +01:00
André Silva
9cc650d91c
sync: process empty response for justification requests ( #4957 )
...
* sync: process empty response for justification request
* sync: add test for justification request empty response
* network: remove deprecated comment
2020-02-18 15:11:44 +01:00
Shawn Tabrizi
c7a14db792
Fix various spelling errors ( #4940 )
...
* meaningfull -> meaningful
* initialise -> initialize
* tokans -> tokens
* incentivise -> incentivize
* lenght -> length
* incentivisation -> incentivization
* doesnt't -> doesn't
* overwriten -> overwritten
* lifecycle -> life cycle
* lifecycle -> life cycle
* usefull -> useful
* noone -> no one
* spaming -> spamming
* defered -> deferred
* hieght -> height
* sumation -> summation
* ingore -> ignore
* registed -> registered
* Auxialary -> Auxiliary
* loggin -> logging
* independance -> independence
* trailling -> trailing
* responsability -> responsibility
* trunkated -> truncated
* Weither -> Whether
* informations -> information
* Runtume -> Runtime
* choosen -> chosen
* delcataion -> declaration
* Unchekced -> Unchecked
* defintion -> definition
* scrach -> scratch
* imput -> input
* transfered -> transferred
* endownment -> endowment
* Determinator -> Determiner
* relevent -> relevant
* emited -> emitted
* acocunt -> account
* proprotional -> proportional
* instantiaion -> instantiation
* commited -> committed
* tombstonedead -> tombstone
* uwnrap -> unwrap
* acount -> account
* specialised -> specialized
* existant -> existent
* requried -> required
* Anull -> Annul
* AUTHORITES -> AUTHORITIES
* underyling -> underlying
* recognisable -> recognizable
* Capitalise -> Capitalize
* reportfor -> report for
* hearbeat -> heartbeat
* onlineness -> being online
* creater -> creator
* Bytearray -> Byte array
* Despoit -> Deposit
* substratced -> subtracted
* Curent -> Current
* imbalanes -> imbalances
* countfown -> countdown
* inexisting -> inexistent
* additionaly -> additionally
* substracted -> subtracted
* auxilary -> auxiliary
* parital -> partial
* in't -> isn't
* compatability -> compatibility
* infomation -> information
* etected -> detected
* extrinsiscs -> extrinsics
* reprensentation -> representation
* coonfiguration -> configuration
* primtives -> primitives
* miscelanious -> miscellaneous
* VERISON -> VERSION
* endcoded -> encoded
* Genrates -> Generates
* miliseconds -> milliseconds
* occured -> occurred
* trully -> truely
* truely -> truly
* conjuction -> conjunction
* encouters -> encounters
* customised -> customized
* deterministicly -> deterministically
* finalisation -> finalization
* pluggable -> plugable
* wakeup -> wake-up
* interemdiate -> intermediate
* intepreting -> interpreting
* finalzied -> finalized
* throgh -> through
* extinsic -> extrinsic
* convient -> convenient
* allocater -> allocator
* propagateable -> propagatable
* succesfuly -> successfully
* finalising -> finalizing
* publically -> publicly
* phrasee -> phrase
* substration -> substractions
* substractions -> subtractions
* neccessarily -> necessarily
* Inlucde -> Include
* unefficient -> inefficient
* thay -> they
* funtion -> function
* datastructures -> data structures
* infromation -> information
* propagatable -> propagable
* ecountered -> encountered
* recognise -> recognize
* intergration -> integration
* lastet -> latest
* datatypes -> data types
* datatype -> data type
* Strongarming -> Strong Arming
* avaible -> available
* Commiting -> Committing
* Retreiving -> Retrieving
* shoud -> should
* canonicaliziation -> canonicalization
* comitted -> committed
* clonable -> cloneable
* Uknown -> Unknown
* reponse -> response
* arbitary -> arbitrary
* Capapbilities -> Capabilities
* responsbile -> responsible
* initialisation -> initialization
* cames -> came
* intemediate -> intermediate
* reqeust -> request
* intance -> instance
* explcitly -> explicitly
* neighor -> neighbor
* reolving -> resolving
* untill -> until
* Validte -> Validate
* deserailize -> deserialize
* literaly -> literally
* preceeding -> preceding
* abpve -> above
* chcecked -> checked
* numbet -> number
* Unknow -> Unknown
* halfs -> halves
* gossup -> gossip
* givent -> given
* immediatelly -> immediately
* slicable -> sliceable
* conensus -> consensus
* Mimicks -> Mimics
* acccept -> accept
* serialise -> serialize
* exstrinsics -> extrinsics
* panicks -> panics
* maintaince -> maintenance
* repeatidely -> repeatedly
* anecstor -> ancestor
* becasue -> because
* processer -> processor
* Prunning -> Pruning
* insterested -> interested
* unuseful -> not useful
* yeided -> yielded
* descendfing -> descending
* corresponts -> corresponds
* survivew -> survive
* keps -> keeps
* ligh -> light
* prerequisities -> prerequisites
* positiion -> position
* depedency -> dependency
* extrinisic -> extrinsic
* atomicaly -> atomically
* staticly -> statically
* resul -> result
* timestamb -> timestamp
* Utilites -> Utilities
* ammount -> amount
* pocess -> process
* exteral -> external
* Update client/finality-grandpa/src/tests.rs
* Update primitives/io/src/lib.rs
Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
* Update primitives/blockchain/src/lib.rs
Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
* Update frame/support/src/weights.rs
Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
* Update bin/node/cli/tests/common.rs
Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
* Update client/api/src/execution_extensions.rs
Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
* Update client/cli/src/params.rs
Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
* Update client/executor/common/src/sandbox.rs
Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
* Update client/api/src/execution_extensions.rs
Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
* Update client/finality-grandpa/src/communication/mod.rs
Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
* Update client/state-db/src/pruning.rs
Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
* Update frame/contracts/src/tests.rs
Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
* Update client/api/src/execution_extensions.rs
* bump impl
* timestamb -> timestamp
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
2020-02-17 15:07:24 +01:00