Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client: add WebRTC transport #1

Closed
wants to merge 26 commits into from
Closed

Commits on Oct 10, 2022

  1. Dont ignore errors in pallet benchmarking (paritytech#12449)

    Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
    
    Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
    ggwpez authored Oct 10, 2022
    Configuration menu
    Copy the full SHA
    df81976 View commit details
    Browse the repository at this point in the history
  2. Update UI tests for Rust 1.64 (paritytech#12440)

    * Update UI tests for Rust 1.64
    
    * Test with the staging image
    
    * Switch back to production
    rcny authored Oct 10, 2022
    Configuration menu
    Copy the full SHA
    9672c36 View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2022

  1. rpc: Implement transaction RPC API (paritytech#12328)

    * rpc/tx: Add transaction structures for serialization
    
    Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
    
    * rpc/tx: Add public facing `TransactionEvent`
    
    To circumvent the fact that serde does not allow mixing
    `#[serde(tag = "event")]` with
    `#[serde(tag = "event", content = "block")]`
    the public facing subscription structure is serialized
    and deserialized to an intermmediate representation.
    
    Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
    
    * rpc/tx: Add trait for the `transaction` API
    
    Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
    
    * rpc/tx: Convert RPC errors to transaction events
    
    Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
    
    * rpc/tx: Implement `transaction` RPC methods
    
    Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
    
    * tx-pool: Propagate tx index to events
    
    Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
    
    * tx-pool: Adjust testing to reflect tx index in events
    
    Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
    
    * rpc/tx: Convert tx-pool events for the new RPC spec
    
    Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
    
    * rpc/tx: Convert tx-pool `FinalityTimeout` event to `Dropped`
    
    Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
    
    * service: Enable the `transaction` API
    
    Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
    
    * rpc/tx: Add tests for tx event encoding and decoding
    
    Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
    
    * tx: Add indentation for subscriptions
    
    Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
    
    * rpc/tx: Fix documentation
    
    Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
    
    * rpc/tx: Serialize usize to hex
    
    Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
    
    * tx-pool: Rename closure parameters
    
    Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
    
    * service: Separate RPC spec versions
    
    Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
    
    * rpc/tx: Use `H256` for testing block's hash
    
    Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
    
    * rpc/tx: Serialize numbers as string
    
    Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
    
    * tx-pool: Backward compatibility with RPC v1
    
    Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
    
    * Update client/rpc-spec-v2/src/transaction/transaction.rs
    
    Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
    
    * rpc/tx: Remove comment about serde clone
    
    Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
    
    * rpc/tx: Use RPC custom error code for invalid tx format
    
    Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
    
    * Update client/rpc-spec-v2/src/transaction/event.rs
    
    Co-authored-by: James Wilson <james@jsdw.me>
    
    * rpc/tx: Adjust internal structures for serialization/deserialization
    
    Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
    
    Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
    Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
    Co-authored-by: James Wilson <james@jsdw.me>
    3 people authored Oct 11, 2022
    Configuration menu
    Copy the full SHA
    488fc24 View commit details
    Browse the repository at this point in the history
  2. Remove the unused light client requests (paritytech#12470)

    * Remove the unused light client requests
    
    * Add comment about new ids
    tomaka authored Oct 11, 2022
    Configuration menu
    Copy the full SHA
    60be7b8 View commit details
    Browse the repository at this point in the history
  3. Fix flaky service test (paritytech#12472)

    Sometimes `NotificationStreamOpenened` would be received for the
    other protocol before `SyncConnected` was received so when the
    connection was closed, an incorrect event was read from the event
    stream.
    altonen authored Oct 11, 2022
    Configuration menu
    Copy the full SHA
    6072b90 View commit details
    Browse the repository at this point in the history
  4. Rename from_components to from_parts (paritytech#12473)

    * Rename `from_components` to `from_parts`
    
    * Fixes
    
    * Spelling
    KiChjang authored Oct 11, 2022
    Configuration menu
    Copy the full SHA
    1bf2e6d View commit details
    Browse the repository at this point in the history
  5. Avoid Unstable Sort (paritytech#12455)

    * dont use unstable sort
    
    * remove comment
    
    * add clippy rule
    shawntabrizi authored Oct 11, 2022
    Configuration menu
    Copy the full SHA
    ccc8f6c View commit details
    Browse the repository at this point in the history
  6. Finalized block event triggers tx maintanance (paritytech#12305)

    * finalized block event triggers tx maintanance
    
    * tx-pool: enactment helper introduced
    
    * tx-pool: ChainApi: added tree_route method
    
    * enactment logic implemented + tests
    
    Signed-off-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
    
    * Some additional tests
    
    * minor improvements
    
    * trigger CI job
    
    * fix compilation errors
    
    ChainApi::tree_route return type changed to Result<Option<..>>, as some
    implementations (tests) are not required to provide this tree route.
    
    * formatting
    
    * trait removed
    
    * implementation slightly simplified
    
    (thanks to @koute)
    
    * get rid of Arc<> in EnactmentState return value
    
    * minor improvement
    
    * Apply suggestions from code review
    
    Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
    
    * Apply suggestions from code review
    
    * comment updated + formatting
    
    * Apply suggestions from code review
    
    Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
    Co-authored-by: Davide Galassi <davxy@datawok.net>
    
    * formatting
    
    * finalization notification bug fix
    
    + new test case
    + log::warn message when finalized block is being retracted by new event
    
    * added error message on tree_route failure
    
    * Apply suggestions from code review
    
    Co-authored-by: Bastian Köcher <git@kchr.de>
    
    * use provided tree_route in Finalized event
    
    * Option removed from ChainApi::tree_route
    
    * doc added, test and logs improved
    
    * handle_enactment aligned with original implementation
    
    * use async-await
    
    * Apply suggestions from code review
    
    Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
    
    * Apply suggestions from code review
    
    Co-authored-by: Bastian Köcher <git@kchr.de>
    
    * formatting + warn->debug
    
    * compilation error fix
    
    * enactment_state initializers added
    
    * enactment_state: Option removed
    
    * manual-seal: compilation & tests fix
    
    * manual-seal: tests fixed
    
    * tests cleanup
    
    * another compilation error fixed
    
    * TreeRoute::new added
    
    * get rid of pub hack
    
    * one more test added
    
    * formatting
    
    * TreeRoute::new doc added + formatting
    
    * Apply suggestions from code review
    
    Co-authored-by: Davide Galassi <davxy@datawok.net>
    
    * (bool,Option) simplified to Option
    
    * log message improved
    
    * yet another review suggestions applied
    
    * get rid of hash in handle_enactment
    
    * Apply suggestions from code review
    
    Co-authored-by: Bastian Köcher <git@kchr.de>
    
    * Update client/transaction-pool/src/lib.rs
    
    Co-authored-by: Bastian Köcher <git@kchr.de>
    
    * minor corrections
    
    * EnactmentState moved to new file
    
    * File header corrected
    
    * error formatting aligned with codebase
    
    * Apply suggestions from code review
    
    Co-authored-by: Bastian Köcher <git@kchr.de>
    
    * remove commented code
    
    * small nits
    
    Signed-off-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
    Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
    Co-authored-by: Davide Galassi <davxy@datawok.net>
    Co-authored-by: Bastian Köcher <git@kchr.de>
    Co-authored-by: André Silva <andrerfosilva@gmail.com>
    5 people authored Oct 11, 2022
    Configuration menu
    Copy the full SHA
    94b731c View commit details
    Browse the repository at this point in the history

Commits on Oct 12, 2022

  1. Configuration menu
    Copy the full SHA
    88db102 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    06a9f0a View commit details
    Browse the repository at this point in the history
  3. BlockId::Number refactor: trivial changes to BlockId::Hash (paritytec…

    …h#12471)
    
    * Trivial BlockId::Number => Hash
    
    * missed BlockId::Hash added
    michalkucharczyk authored Oct 12, 2022
    Configuration menu
    Copy the full SHA
    f8a0b7a View commit details
    Browse the repository at this point in the history
  4. Dont use benchmark range on constant functions (paritytech#12456)

    * dont use benchmark range on constant function
    
    * update weights
    
    * fix
    
    * new weights
    
    * Update frame/examples/basic/src/benchmarking.rs
    
    Co-authored-by: parity-processbot <>
    shawntabrizi authored Oct 12, 2022
    Configuration menu
    Copy the full SHA
    b324e51 View commit details
    Browse the repository at this point in the history

Commits on Oct 13, 2022

  1. Punish peers for duplicate GRANDPA neighbor messages (paritytech#12462)

    * Decrease peer reputation for duplicate GRANDPA neighbor messages.
    
    * Fix comparison
    
    * Fix update_peer_state() validity condition
    
    * Add negative test
    
    * Rework update_peer_state() validity condition, add tests
    
    * update_peer_state() validity condition: invert comparison
    
    * Split InvalidViewChange and DuplicateNeighborMessage misbehaviors
    
    * Enforce rate-limiting of duplicate GRANDPA neighbor packets
    
    * Update client/finality-grandpa/src/communication/gossip.rs
    
    Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
    
    * Make rolling clock back in a test safer
    
    Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
    dmitry-markin and andresilva authored Oct 13, 2022
    Configuration menu
    Copy the full SHA
    94941a8 View commit details
    Browse the repository at this point in the history
  2. Introduce mockable ChainSync object for testing (paritytech#12480)

    * Introduce mockable `ChainSync` object for testing
    
    `mockall` allows to mock `ChainSync` and to verify that the calls made
    to `ChaiSync` are firstly executed at all, that they're executed in
    correct order and with correct parameters.
    
    This allows to verify, e.g., that delegating calls directly to
    `ChainSync` from `NetworkService` still calls the correct functions with
    correct arguments even if `Protocol` middleman is removed.
    
    * Add Cargo.lock
    
    * Fix tests
    
    * Update client/network/Cargo.toml
    
    Co-authored-by: Bastian Köcher <git@kchr.de>
    
    * Update Cargo.lock
    
    * Fix clippy and documentation
    
    Co-authored-by: Bastian Köcher <git@kchr.de>
    Co-authored-by: parity-processbot <>
    altonen and bkchr authored Oct 13, 2022
    Configuration menu
    Copy the full SHA
    983b6b0 View commit details
    Browse the repository at this point in the history
  3. pallet-mmr: RPC API and Runtime API work with block numbers (parityte…

    …ch#12345)
    
    * pallet-mmr: RPC API works with block_numbers
    
    * fixes
    
    * update rpc
    
    * fmt
    
    * final touches in the rpc
    
    * temporary fix
    
    * fix
    
    * fmt
    
    * docs
    
    * Update lib.rs
    
    * use NumberFor
    
    * validate input
    
    * update runtime
    
    * convert block_number to u64
    
    * small edit
    
    * update runtime api
    
    * test fix
    
    * runtime fix
    
    * update test function
    
    * fmt
    
    * fix nits
    
    * remove block_num_to_leaf_index from runtime api
    
    * Update frame/merkle-mountain-range/src/lib.rs
    
    Co-authored-by: Robert Hambrock <roberthambrock@gmail.com>
    
    * fix tests
    
    * get the code to compile after merge
    
    * get the tests to compile
    
    * fix in tests?
    
    * fix test
    
    * Update frame/merkle-mountain-range/src/tests.rs
    
    Co-authored-by: Adrian Catangiu <adrian@parity.io>
    
    * Update frame/merkle-mountain-range/src/lib.rs
    
    Co-authored-by: Adrian Catangiu <adrian@parity.io>
    
    * Update primitives/merkle-mountain-range/src/lib.rs
    
    Co-authored-by: Adrian Catangiu <adrian@parity.io>
    
    * fix errors & nits
    
    * change block_num_to_leaf_index
    
    * don't make any assumptions
    
    * Update frame/merkle-mountain-range/src/tests.rs
    
    Co-authored-by: Adrian Catangiu <adrian@parity.io>
    
    * Update frame/merkle-mountain-range/src/tests.rs
    
    Co-authored-by: Adrian Catangiu <adrian@parity.io>
    
    * Update frame/merkle-mountain-range/src/tests.rs
    
    Co-authored-by: Adrian Catangiu <adrian@parity.io>
    
    * fix
    
    * small fix
    
    * use best_known_block_number
    
    * best_known_block_number instead of leaves_count
    
    * more readable?
    
    * remove warning
    
    * Update frame/merkle-mountain-range/src/lib.rs
    
    Co-authored-by: Robert Hambrock <roberthambrock@gmail.com>
    
    * simplify
    
    * update docs
    
    * nits
    
    * fmt & fix
    
    * merge fixes
    
    * fix
    
    * small fix
    
    * docs & nit fixes
    
    * Nit fixes
    
    * remove leaf_indices_to_block_numbers()
    
    * fmt
    
    Co-authored-by: Robert Hambrock <roberthambrock@gmail.com>
    Co-authored-by: Adrian Catangiu <adrian@parity.io>
    3 people authored Oct 13, 2022
    Configuration menu
    Copy the full SHA
    1f39c90 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    fd00b14 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6e04e48 View commit details
    Browse the repository at this point in the history

Commits on Oct 14, 2022

  1. BlockId removal: refactor: Backend::state_at (paritytech#12488)

    * Minor naming improved
    
    * BlockId removal refactor: Backend::state_at
    
    * formatting
    michalkucharczyk authored Oct 14, 2022
    Configuration menu
    Copy the full SHA
    f313987 View commit details
    Browse the repository at this point in the history
  2. Try-runtime CLI fix weight parsing (paritytech#12491)

    Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
    
    Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
    ggwpez authored Oct 14, 2022
    Configuration menu
    Copy the full SHA
    0ee0327 View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2022

  1. Export fn code_hash (paritytech#12479)

    Co-authored-by: parity-processbot <>
    kvinwang authored Oct 17, 2022
    Configuration menu
    Copy the full SHA
    6f453b5 View commit details
    Browse the repository at this point in the history
  2. Introduce ChainSyncInterface (paritytech#12489)

    * Introduce `ChainSyncInterface`
    
    `ChainSyncInterface` provides an asynchronous interface for other
    subsystems to submit calls to `ChainSync`. This allows `NetworkService`
    to delegate calls to `ChainSync` while still providing the same API
    for other subsystems (for now). This makes it possible to move the
    syncing code in piecemeal fashion out of `protocol.rs` as the calls
    are just forwarded to `ChainSync`.
    
    * Apply review comments
    
    * Fix tests
    altonen authored Oct 17, 2022
    Configuration menu
    Copy the full SHA
    30a7a5b View commit details
    Browse the repository at this point in the history
  3. sp-api: Remove invalid unsafe trait bounds (paritytech#12502)

    The runtime api implementation contained invalid unsafe trait bounds. `Sync` was never correct there
    and `Send` should have not been "force implemented".
    bkchr authored Oct 17, 2022
    Configuration menu
    Copy the full SHA
    951f075 View commit details
    Browse the repository at this point in the history
  4. pallet-mmr: fix offchain db for sync from zero (paritytech#12498)

    * pallet-mmr: cosmetic improvements
    
    * pallet-mmr: fix offchain storage for initial sync
    
    * address review comments
    
    * pallet-mmr: change offchain fork-resistant key to `(prefix, pos, parent_hash)`
    
    Do this so that both canon and fork-resitant keys have the same
    `(prefix, pos).encode()` prefix. Might be useful in the future if we'd
    be able to to "get" offchain db entries using key prefixes as well.
    
    Signed-off-by: acatangiu <adrian@parity.io>
    
    Signed-off-by: acatangiu <adrian@parity.io>
    acatangiu authored Oct 17, 2022
    Configuration menu
    Copy the full SHA
    273e264 View commit details
    Browse the repository at this point in the history
  5. Fix: typo (paritytech#12505)

    Fix: typo
    omahs authored Oct 17, 2022
    Configuration menu
    Copy the full SHA
    acacb53 View commit details
    Browse the repository at this point in the history
  6. Upgrade libp2p to 0.49.0 (paritytech#12256)

    * cargo upgrade libp2p
    
    * Get rid of `NetworkBehaviourEventProcess` in handling of `CustomMessageOutcome`
    
    * Get rid of `NetworkBehaviourEventProcess` in handling of `request_responses::Event`
    
    * Get rid of `NetworkBehaviourEventProcess` in handling of `peer_info::PeerInfoEvent`
    
    * Get rid of `NetworkBehaviourEventProcess` in handling of `DiscoveryOut`
    
    * Get rid of `poll()` method in `Bahaviour`
    
    * minor: comments
    
    * Upgrade libp2p to 0.49.0 (unreleased)
    
    * Support multiple Kad protocol names
    
    * Make borrow checker happy
    
    * minor: wording
    
    * Make substrate build with libp2p-0.49.0
    
    * rustfmt
    
    * Get rid of MdnsWrapper
    
    * Resolve deprecation warnings
    
    * Fix documentation
    
    * Apply suggestions from code review: fix typos
    
    Co-authored-by: Aaro Altonen <48052676+altonen@users.noreply.github.com>
    
    * Apply suggestion: simplify kad protocol name matching
    
    Co-authored-by: Aaro Altonen <48052676+altonen@users.noreply.github.com>
    dmitry-markin and altonen authored Oct 17, 2022
    Configuration menu
    Copy the full SHA
    444cf9d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    fb707c8 View commit details
    Browse the repository at this point in the history