1. Mar 25, 2020
  2. Mar 24, 2020
  3. Mar 23, 2020
  4. Mar 22, 2020
  5. Mar 21, 2020
  6. Mar 20, 2020
    • Benjamin Kampmann's avatar
    • Bastian Köcher's avatar
      Adds new event phase `Initialization` (#5302) · 2c87fe17
      Bastian Köcher authored
      * Adds new event phase `Initialization`
      
      Every event that was deposited inside of `on_initialize` was assigned to
      the `ApplyExtrinsic(0)` phase which wasn't correct. This pr introduces a
      new phase `Initialization`. This is the new phase while initializing
      a block. After initialization we switch to `ApplyExtrinsic(N)` and at
      the end to `Finalization` as before.
      
      * Set `ExecutionPhase` in `initialize`
      
      * Increment `spec_version`
      2c87fe17
    • André Silva's avatar
      grandpa: allow noting same set in gossip with different authorities (#5323) · 7b992673
      André Silva authored
      * grandpa: allow noting same set in gossip with different authorities
      
      * grandpa: add test for note_set behavior
      7b992673
    • Bastian Köcher's avatar
    • Hero Bird's avatar
      Implement ext_ hashes for contracts (issue #5258) (#5326) · bfb6d4dc
      Hero Bird authored
      * Implement ext_ hashes for contracts (issue #5258)
      
      * load cryto hash .wat from raw string literal instead of file
      
      * update .wat contents for testing crypto hashes
      
      * remove unnecessary 'static
      
      * fix bug in input (call_indirect required 1+ at least it seems)
      
      * no longer use scratch buffer for crypto hash functions
      
      * improve doc comments of ext_ hash functions
      
      * remove unnecessary comment in .wat test file
      
      * add return value (const 0) to contract test to hopefully enable result buffer
      
      * fix bug in contract assertion
      
      * implement proper output_len in contract
      
      * implement proper test for crypto hashes
      
      * bump spec_version 238 -> 239
      
      * fix COMPLEXITY description
      
      * remove final invalid instances of scratch buffer from docs
      bfb6d4dc
    • Bastian Köcher's avatar
      Make sure frame examples compile for wasm (#5332) · c4368637
      Bastian Köcher authored
      
      
      * Make sure frame examples compile for wasm
      
      This makes sure that `frame-example` and `frame-example-offchain-worker`
      compile for wasm.
      
      This also fixes compilation for these crates. The offchain worker
      example doesn't use serde-json anymore as that is too heavy and breaks
      `no_std` compilation.
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarNikolay Volf <[email protected]>
      
      Co-authored-by: default avatarNikolay Volf <[email protected]>
      c4368637
    • Pierre Krieger's avatar
      Remove the #[doc(hidden)] reexports of sc_network (#5264) · 0e213ba3
      Pierre Krieger authored
      * Remove the #[doc(hidden)] reexports of sc_network
      
      * Fix tests not building
      0e213ba3
    • Benjamin Kampmann's avatar
    • Shawn Tabrizi's avatar
      Benchmark Treasury Pallet (#5287) · aebb2288
      Shawn Tabrizi authored
      
      
      * Start benchmarks
      
      * try_origin or root
      
      * More benches
      
      * stuck
      
      * Custom trait functions for benchmarks
      
      * finish benchmarks
      
      * Bump impl
      
      * More comments
      
      * Bump spec
      
      * Remove import
      
      * Update frame/elections-phragmen/src/lib.rs
      
      Co-Authored-By: default avatarthiolliere <[email protected]>
      
      * Update frame/support/src/traits.rs
      
      Co-Authored-By: default avatarthiolliere <[email protected]>
      
      * Fix merge
      
      Co-authored-by: default avatarthiolliere <[email protected]>
      aebb2288
    • Peter Goodspeed-Niklaus's avatar
      Factor out can_set_code (#5317) · f546ddb4
      Peter Goodspeed-Niklaus authored
      * Factor out can_set_code
      
      The motivation for this feature is parachain runtime upgrades, which
      happen in two different moments: the initial call, when the checks
      should be performed, and at the actual upgrade block. It's much
      better and more maintainable to just call `can_set_code` in the
      function than to manually copy those checks.
      
      I'm not entirely thrilled with the interface, which requires
      cloning the entire code vector in `set_code`. However, it looks
      like something in `decl_module!` does not play nicely with
      references in its function arguments. If `code` has a lifetime,
      it _must_ be named, which gives us this signature.
      
      ```rust
      pub fn can_set_code<'a>(origin, code: &'a [u8]) {
      ```
      
      Unfortunately, attempting to compile with that signature generates
      a very large and baffling collection of build errors, so I decided
      to abandon that path for now.
      
      * make can_set_code non-dispatchable per PR revew
      
      Not only can we now borrow the `code` slice, but we also no longer
      need to worry about people sending a `can_set_code` transaction because
      of some misunderstanding.
      
      * move into existing impl block
      f546ddb4