1. Nov 27, 2020
  2. Nov 26, 2020
    • Bastian Köcher's avatar
      Inform sync explicitly about new best block (#7604) · d698d013
      Bastian Köcher authored
      * Inform sync explicitly about new best block
      
      Instead of "fishing" the new best block out of the processed blocks, we
      now tell sync directly that there is a new best block. It also makes
      sure that we update the corresponding sync handshake to the new best
      block. This is required for parachains as they first import blocks and
      declare the new best block after being made aware of it by the relay chain.
      
      * Adds test
      
      * Make sure async stuff had time to run
      d698d013
  3. Nov 25, 2020
  4. Nov 24, 2020
    • Max Inden's avatar
      */Cargo.toml: Remove unused dependencies (#7590) · e3608da5
      Max Inden authored
      * */Cargo.toml: Remove unused dependencies
      
      Using cargo-udeps to detect unused dependencies.
      
      * client/network/Cargo: Revert dependency removal
      
      * Cargo.lock: Update
      e3608da5
    • Alexander Theißen's avatar
      contracts: Add `salt` argument to contract instantiation (#7482) · c3ca78fa
      Alexander Theißen authored
      
      
      * pallet-contracts: Fix seal_restore_to to output proper module errors
      
      Those errors where part of the decl_error for some time but where
      never actually returned. This allows proper debugging of failed
      restorations. Previously, any error did return the misleading
      `ContractTrapped`.
      
      * Bind UncheckedFrom<T::Hash> + AsRef<[u8]> everywhere
      
      This allows us to make assumptions about the AccoutId
      that are necessary for testing and in order to benchmark
      the module properly.
      
      This also groups free standing functions into inherent functions
      in order to minimize the places where the new bounds need to
      be specified.
      
      * Rework contract address determination
      
      * Do not allow override by runtime author
      * Instantiate gained a new parameter "salt"
      
      This change is done now in expecation of the upcoming code rent
      which needs to change the instantiation dispatchable and
      host function anyways.
      
      The situation in where we have only something that is like CREATE2
      makes it impossible for UIs to help the user to create an arbitrary
      amount of instantiations from the same code.
      
      With this change we have the same functionality as ethereum with
      a CREATE and CREATE2 instantation semantic.
      
      * Remove TrieIdGenerator
      
      The new trait bounds allows us to remove this workaround
      from the configuration trait.
      
      * Remove default parameters for config trait
      
      It should be solely the responsiblity to determine proper values for
      these parameter. As a matter of fact most runtime weren't using these
      values anyways.
      
      * Fix tests for new account id type
      
      Because of the new bounds on the trait tests can't get away by using
      u64 as accound id. Replacing the 8 byte value by a 32 byte value
      creates out quite a bit of code churn.
      
      * Fix benchmarks
      
      The benchmarks need adaption to the new instantiate semantics.
      
      * Fix compile errors caused by adding new trait bounds
      * Fix compile errors caused by renaming storage and rent functions
      * Adapt host functions and dispatchables to the new salt
      * Add tests for instantiate host functions (was not possible before)
      
      * Add benchmark results
      
      * Adapt to the new WeightInfo
      
      The new benchmarks add a new parameter for salt "s" to the instantiate weights
      that needs to be applied.
      
      * Fix deploying_wasm_contract_should_work integration test
      
      This test is adapted to use the new instantiate signature.
      
      * Break overlong line
      
      * Break more long lines
      
      Co-authored-by: default avatarParity Benchmarking Bot <[email protected]>
      c3ca78fa
    • dependabot[bot]'s avatar
    • Bastian Köcher's avatar
      Wasm-builder 3.0 (#7532) · 923cb8ee
      Bastian Köcher authored
      
      
      * Build every wasm crate in its own project with wasm-builder
      
      Building all wasm crates in one workspace was a nice idea, however it
      just introduced problems:
      
      1. We needed to prune old members, but this didn't worked for old git
      deps.
      2. We locked the whole wasm workspace while building one crate. This
      could lead to infinitely locking the workspace on a crash.
      
      Now we just build every crate in its own project, this means we will
      build the dependencies multiple times. While building the dependencies
      multiple times, we still decrease the build time by around 30 seconds
      for Polkadot and Substrate because of the new parallelism ;)
      
      * Remove the requirement on wasm-builder-runner
      
      This removes the requirement on wasm-builder-runner by using the new
      `build_dep` feature of cargo. We use nightly anyway and that enables us
      to use this feature. This solves the problem of not mixing
      build/proc-macro deps with normal deps. By doing this we get rid off
      this complicated project structure and can depend directly on
      `wasm-builder`. This also removes all the code from wasm-builder-runner
      and mentions that it is deprecated.
      
      * Copy the `Cargo.lock` to the correct folder
      
      * Remove wasm-builder-runner
      
      * Update docs
      
      * Fix deterministic check
      
      Modified-by: default avatarBastian Köcher <[email protected]>
      
      * Try to make the ui test happy
      
      * Switch to `SKIP_WASM_BUILD`
      
      * Rename `SKIP_WASM_BINARY` to the correct name...
      
      * Update utils/wasm-builder/src/builder.rs
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      
      * Update utils/wasm-builder/src/builder.rs
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      923cb8ee
  5. Nov 23, 2020
  6. Nov 22, 2020
  7. Nov 20, 2020
  8. Nov 19, 2020
    • Shawn Tabrizi's avatar
      More Extensible Multiaddress Format (#7380) · 4637100a
      Shawn Tabrizi authored
      * More extensible multiaddress format
      
      * update name
      
      * Don't depend on indices to define multiaddress type
      
      * Use MultiAddress in Node Template too!
      
      * reduce traits, fix build
      
      * support multiple `StaticLookup`
      
      * bump tx version
      
      * feedback
      4637100a
  9. Nov 18, 2020
  10. Nov 16, 2020
    • Andrew Plaza's avatar
      make ClientConfig public (#7544) · 4040eb08
      Andrew Plaza authored
      4040eb08
    • Max Inden's avatar
      *: Update to libp2p v0.30.0 (#7508) · 75e365a5
      Max Inden authored
      * *: Update to libp2p v0.30.0
      
      * Cargo.lock: Update
      
      * *: Update to libp2p v0.30.1
      75e365a5
    • Pierre Krieger's avatar
      Use inbound peerslot slots when a substream is received, rather than a connection (#7464) · 80a74acd
      Pierre Krieger authored
      
      
      * Use inbound peerslot slots when a substream is received, rather than a connection
      
      * Refactor PeerState
      
      * Some bugfixes
      
      * Fix warnings so that CI runs, gmlrlblbl
      
      * Bugfixes
      
      * Update docs
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarRoman Borschel <[email protected]>
      
      * Clean up Banned state
      
      * Refactor connections state
      
      * Fix possibility of Enabled with no Opening or Open connection
      
      * Line width
      
      * Add some debug_asserts! and fix TODO
      
      * Refactor legacy handler
      
      * Rewrite group.rs entirely [part 1]
      
      * Rewrite group.rs entirely [part 2]
      
      * Remove faulty assertion
      
      Because of the asynchronous nature of the behaviour <-> handler communications, it is possible to receive notifications while in the Closing state
      
      * Don't poll the legacy substream is not Open
      
      * Tolerate when not all substreams are accepted
      
      * Remove TODOs
      
      * Dummy commit to make CI log interesting things
      
      * Try race condition fix
      
      * Revert "Try race condition fix"
      
      This reverts commit 0675c659d06195c30f8c5bc13e2d88141d57a3ba.
      
      * Correctly rebuild pending_opening
      
      * Minor tweaks
      
      * Printlns for CI debugging
      
      * Revert "Printlns for CI debugging"
      
      This reverts commit e7852a231f4fc418898767aaa27c9a4358e12e8b.
      
      * Revert "Dummy commit to make CI log interesting things"
      
      This reverts commit 259ddd74088e53e7c6a9b0a62a8d1573a0063ce3.
      
      * mv group.rs ../handler.rs
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarMax Inden <[email protected]>
      
      * Banned => Backoff
      
      * Mention the actual PeerStates
      
      * OpenDesired -> OpenDesiredByRemote
      
      * OpeningThenClosing
      
      * Add doc links to PeerState
      
      * Simplify increment logic
      
      * One more debug_assert
      
      * debug_assert!
      
      * OpenDesiredByRemote
      
      * Update client/network/src/protocol/generic_proto/behaviour.rs
      
      Co-authored-by: default avatarMax Inden <[email protected]>
      
      Co-authored-by: default avatarRoman Borschel <[email protected]>
      Co-authored-by: default avatarMax Inden <[email protected]>
      80a74acd
    • Bastian Köcher's avatar
      Fix some weirdness in `offchain_worker` (#7541) · 2f5f4fe8
      Bastian Köcher authored
      We call `offchain_worker` with the state of the imported block and pass
      the header of this block. However in the runtime we call all
      `offchain_worker` functions with the number of the parent block. Besides
      that we also pass all digests and not only the pre runtime digests. In
      the context where the offchain worker is executed we have all digests, so
      there is no real reason to only pass pre runtime digests. Another fix is
      that we also insert the hash of the current header into the block hash map.
      2f5f4fe8
    • Andrew Plaza's avatar
      make LocalCallExecutor public (#7528) · 32be2645
      Andrew Plaza authored
      32be2645