* Use `array-bytes` for All Array/Bytes/Hex Operations
Signed-off-by: Xavier Lau <xavier@inv.cafe>
* Reorder
* Self Review
* Format
* Fix Tests
* Bump `array-bytes`
* Optimize large test res
Signed-off-by: Xavier Lau <xavier@inv.cafe>
Co-authored-by: parity-processbot <>
* Add ProtocolName custom type
* Use new ProtocolName in sc_network_common
* Use new ProtocolName in sc_network
* Use new ProtocolName for BEEFY and GRANDPA
* Use new ProtocolName for notifications
* Use new ProtocolName in sc_network (part 2)
* Use new ProtocolName in sc_network_gossip
* Use new ProtocolName in sc_offchain
* Remove unused imports
* Some more fixes
* Add tests
* Fix minor import issues
* Re-export ProtocolName in sc_network
* Revert "Re-export ProtocolName in sc_network"
This reverts commit 8d8ff71927e7750757f29c9bbd88dc0ba181d214.
* Re-export ProtocolName in sc_network
* Remove dependency on sc-network-common from beefy-gadget
* Move `MultiaddrWithPeerId` and related parsing functions into `sc-network-common`, remove dependency on `sc-network` from `sc-chain-spec`
* Remove dependency on `sc-network` from `sc-offchain`
* Remove dependency on `sc-network` from `sc-network-gossip`
* Extract `NetworkKVProvider` trait in `sc-authority-discovery` and remove unnecessary dependency
* Extract `NetworkSyncForkRequest` trait in `sc-finality-grandpa`
* Relax requirements on `SyncOracle` trait, remove extra native methods from `NetworkService` that are already provided by trait impls
* Move `NetworkSigner` trait from `sc-authority-discovery` into `sc-network-common` and de-duplicate methods on `NetworkService`
* Move `NetworkKVProvider` trait from `sc-authority-discovery` into `sc-network-common` and de-duplicate methods on `NetworkService`
* Minimize `sc-authority-discovery` dependency on `sc-network`
* Move `NetworkSyncForkRequest` trait from `sc-finality-grandpa` to `sc-network-common` and de-duplicate methods in `NetworkService`
* Extract `NetworkStatusProvider` trait and de-duplicate methods on `NetworkService`
* Extract `NetworkPeers` trait and de-duplicate methods on `NetworkService`
* Extract `NetworkEventStream` trait and de-duplicate methods on `NetworkService`
* Move more methods from `NetworkService` into `NetworkPeers` trait
* Move `NetworkStateInfo` trait into `sc-network-common`
* Extract `NetworkNotification` trait and de-duplicate methods on `NetworkService`
* Extract `NetworkRequest` trait and de-duplicate methods on `NetworkService`
* Remove `NetworkService::local_peer_id()`, it is already provided by `NetworkStateInfo` impl
* Extract `NetworkTransaction` trait and de-duplicate methods on `NetworkService`
* Extract `NetworkBlock` trait and de-duplicate methods on `NetworkService`
* Remove dependencies on `NetworkService` from most of the methods of `sc-service`
* Address simple review comments
* Offchain worker: Enable http2 and improve logging
Apparently some webpages now return http2 by default and that silently breaks the offchain http
extension. The solution to this is to enable the `http2` feature of hyper. Besides that, this pr
improves the logging to make it easier to debug such errors.
* FMT
* Adds http2 test
* Offchain-worker: Make it possible to disable http support
If a chain doesn't require http support in its offchain workers, this pr enables them to disable the
http support.
* Switch to bitflags
* Use Capabilities
* Update client/offchain/src/lib.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
* Fix test
* Update client/offchain/src/lib.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
* Run cargo fmt on the whole code base
* Second run
* Add CI check
* Fix compilation
* More unnecessary braces
* Handle weights
* Use --all
* Use correct attributes...
* Fix UI tests
* AHHHHHHHHH
* 🤦
* Docs
* Fix compilation
* 🤷
* Please stop
* 🤦 x 2
* More
* make rustfmt.toml consistent with polkadot
Co-authored-by: André Silva <andrerfosilva@gmail.com>
* Add MMR custom RPC.
* Change RuntimeApi to avoid hardcoding leaf type.
* Properly implement the new RuntimeAPI and wire up RPC.
* Extract Offchain DB as separate execution extension.
* Enable offchain DB access for offchain calls.
* Fix offchain_election tests.
* Skip block initialisation for proof generation.
* Fix integration test setup.
* Fix offchain tests. Not sure how I missed them earlier 🤷.
* Fix long line.
* One more test missing.
* Update mock for multi-phase.
* Address review grumbbles.
* Address review grumbles.
* Fix line width of a comment
* *: Update to libp2p v0.33.0
* client/network: Consistently track request arrival time
With https://github.com/libp2p/rust-libp2p/pull/1886/ one is guaranteed
to receive either a `ResponseSent` or a `InboundFailure` event for each
received inbound request via `RequestResponseEvent::Message`. Given this
guarantee there is no need to track arrival times in a best-effort
manner and thus there is no need to use a LRU cache for arrival times.
* client/offchain: Adjust to PeerId API changes
* init_logger: switch from log-based to tracing-based and add compatibility layer
* Move tracing profiling subscriber related config realization
* sp-tracing: change profiling to be a layer instead of a subscriber
* Enable profiling layer in cli
* Change all test env_logger init to sp_tracing::try_init_simple
* Remove all local env_logger dependency
* Add missing tracing-subscriber dependency
* frame-sudo: fix tests
* frame-support: fix tests
* Fix frame/pallet and executor tests
* Fix the remaining tests
* Use subscriber's try_init as recommended by @davidbarsky
* Be explict that the tracing-log feature is needed
* Set subscriber writer to stderr
* Shorter line width
* Update cargo lock tracing version
* Fix sc_tracing crate compile
* Fix sc_authority_discovery crate test
* unremove default-features
* Leave enabled to default true
* Warn if global default cannot be set
* Fix unused import
* Remove unused PROXY_TARGET
* Change all reference from rc5 to rc6
* Change all reference of rc2 to rc6
* Fix styling
* Fix typo
* make logger init error'ing
* re-fixing the test issue
Co-authored-by: Benjamin Kampmann <ben@parity.io>
* add offchain worker api to set reserved nodes.
* new offchain api to get node public key.
* node public key from converter
* refactor set reserved nodes ocw api.
* new ndoe authorization pallet
* remove unnecessary clone and more.
* more
* tests for node authorization pallet
* remove dependency
* fix build
* more tests.
* refactor
* Update primitives/core/src/offchain/testing.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
* Update frame/node-authorization/src/lib.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
* Update frame/node-authorization/src/lib.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
* Update frame/node-authorization/src/lib.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
* format code
* expose NetworkService
* remove NetworkStateInfo in offchain
* replace NodePublicKey with PeerId.
* set max length of peer id.
* clear more
* use BTreeSet for set of peers.
* decode opaque peer id.
* extract NetworkProvider for client offchain.
* use OpaquePeerId in node authorization pallet.
* fix test
* better documentation
* fix test
* doc
* more fix
* Update primitives/core/src/offchain/mod.rs
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
* Update client/offchain/src/api.rs
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
* derive serialize and deserialize
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
* Fix typo in offchain's docs
* Use Self keyword in AsyncApi::new()
* Move httpclient to be part of OffchainWorkers to optimize block import
* Fix compilation errors for tests
* Add wrapper struct for HyperClient
* Use lazy_static share SharedClient amongst OffchainWorkers. Remove the need to raise the fd limit
* Revert "Use lazy_static share SharedClient amongst OffchainWorkers. Remove the need to raise the fd limit"
This reverts commit 7af97498a2383b5d7405e27823db8fd97245da41.
* Add lazy_static for tests
* feat/offchain/storage: add remove interface method
* feat/offchain/storeage: add remote to StorageValueRef
* feat/offchain/storage: add storage lock
* fix/review: Apply suggestions from code review
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
* refactor/offchain/storage/lock: introduce `Lockable` trait part 1 of 2
* chore/offchain/rename: _remove -> clean
* feat/offchain/storage/lock: add TimeAndBlock based part 2 of 2
* fix/offchain/storage/lock: block and time expiry must be && not ||
* chore/offchain/storage: minor fmt doc comments
* doc/comment: prefer markdown emphasis over CAPS
* doc/comment: rewrap multiline module level docs
* doc/comment: rephrase
* impl sleep_until and use the actual time for the test env
* feat/test: add more tests, ignore some sample impl doctests
* fix/review: Apply suggestions from code review
Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
* doc/comment: better description
* fix/review: Apply suggestions from code review
Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
* chore/storage: lifetime cleanup
* fix/cleanup: trait bounds, cargo-spellcheck + extra explanations
* fix/doc: periods +-
* fix/review: Apply suggestions from code review
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
* cleanup: remove explicit lifetime bound, copy -> clone
* fix/review: make trait Lockable contain only static, try_lock should not return Err(Option<L>),
* chore/lifetimes: remove a couple of lifetime bounds which the compiler can figure out
* refactor: migrate to an instant based
* fix/feedback: fix, reduce, rename, docs update pending
* docs/reword: adjust to changed code
* fix/offchain/testing: timestamp and sleep_until shall not block
* chore/lines: lines must < 100 chars
* fix/docs: add missing pub field doc comments
* refactor/x: try_lock does not need to return an Option<_>
* refactor/simplify: a better way of waiting for a lock to resolve
* docs: consistency
* fix/line: < 100
* fix/doctest/use: avoid crate::
* fix/doctest: *
* fix/review: remove unused trait bound
* fix/review: pretty by const fn
* fix/review: reduce default timeout to 20s
* docs: grammar
* fix/review: add with_block_deadline
* doc: revamp BlockNumberProvider documentation to be less frame centric
* chore: fmt
* docs: add missing doc comment
Co-authored-by: Bernhard Schuster <bernhard@parity.io>
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
* Adding first rough ouline of the repository structure
* Remove old CI stuff
* add title
* formatting fixes
* move node-exits job's script to scripts dir
* Move docs into subdir
* move to bin
* move maintainence scripts, configs and helpers into its own dir
* add .local to ignore
* move core->client
* start up 'test' area
* move test client
* move test runtime
* make test move compile
* Add dependencies rule enforcement.
* Fix indexing.
* Update docs to reflect latest changes
* Moving /srml->/paint
* update docs
* move client/sr-* -> primitives/
* clean old readme
* remove old broken code in rhd
* update lock
* Step 1.
* starting to untangle client
* Fix after merge.
* start splitting out client interfaces
* move children and blockchain interfaces
* Move trie and state-machine to primitives.
* Fix WASM builds.
* fixing broken imports
* more interface moves
* move backend and light to interfaces
* move CallExecutor
* move cli off client
* moving around more interfaces
* re-add consensus crates into the mix
* fix subkey path
* relieve client from executor
* starting to pull out client from grandpa
* move is_decendent_of out of client
* grandpa still depends on client directly
* lemme tests pass
* rename srml->paint
* Make it compile.
* rename interfaces->client-api
* Move keyring to primitives.
* fixup libp2p dep
* fix broken use
* allow dependency enforcement to fail
* move fork-tree
* Moving wasm-builder
* make env
* move build-script-utils
* fixup broken crate depdencies and names
* fix imports for authority discovery
* fix typo
* update cargo.lock
* fixing imports
* Fix paths and add missing crates
* re-add missing crates