Skip to content
  1. Mar 20, 2020
    • 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
    • joe petrowski's avatar
      fix lone txqueue log target (#5331) · eff82f43
      joe petrowski authored
      eff82f43
    • Shawn Tabrizi's avatar
      Benchmark Im Online Pallet (#5318) · 659f8d90
      Shawn Tabrizi authored
      
      
      * Initial benchmarking setup
      
      * Add keystore
      
      * validate unsigned
      
      * Update frame/im-online/src/benchmarking.rs
      
      Co-Authored-By: default avatarMarcio Diaz <[email protected]>
      
      * Fix verify_unsigned benchmark
      
      * add variable for teting the external addresss length
      
      * Update frame/im-online/src/benchmarking.rs
      
      Co-Authored-By: default avatarKian Paimani <[email protected]>
      
      * Update utils/frame/benchmarking-cli/src/lib.rs
      
      Co-Authored-By: default avatarBastian Köcher <[email protected]>
      
      Co-authored-by: default avatarMarcio Diaz <[email protected]>
      Co-authored-by: default avatarKian Paimani <[email protected]>
      Co-authored-by: default avatarBenjamin Kampmann <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      659f8d90
  2. Mar 19, 2020
  3. Mar 18, 2020
  4. Mar 17, 2020
  5. Mar 16, 2020
    • Gavin Wood's avatar
      Refactor away from opaque hashes (#5226) · dd97b147
      Gavin Wood authored
      
      
      * System.BlockHash
      
      * Fix hash
      
      * Introduce K/V iteration in all _concat maps
      
      Also move across:
      - System.Account (blake2_128_concat)
      - Balances.Locks (twox_64_concat)
      - ElectionsPhragmen.VotesOf (twox_64_concat)
      - ElectionsPhragmen.StakeOf (twox_64_concat)
      - Identity.IdentityOf (twox_64_concat)
      - Identity.SubsOf (twox_64_concat)
      - Society.Payouts (twox_64_concat)
      - Session.NextKeys (twox_64_concat)
      - Identity.SuperOf (blake2_128_concat)
      - Session.KeyOwner (blake2_128_concat)
      - Society.SuspendedCandidates (twox_64_concat)
      - Society.SuspendedMembers (twox_64_concat)
      - Society.Vouching (twox_64_concat)
      - Society.Strikes (twox_64_concat)
      - System.EventTopics
      - Balances.Account
      
      * Build fixes
      
      * Ensure migration happens in correct order
      
      * Staking.*
      
      * Vesting.* Offences.*
      
      * Democracy.*
      
      * Babe.* Collective.*
      
      * Grandpa.*
      
      * Assets.* Benchmark.* Contracts.* Elections.* Asset.* Nicks.*
      
      Also introduce real account list
      
      * ImOnline.*
      
      * Treasury.*
      
      * Recovery.*
      
      * Final bits.
      
      * Docs
      
      * Fix one test
      
      * Fix test
      
      * All passing except the UI tests
      
      * Remove linked_map part 1
      
      * Remove linked_map
      
      * Some iterator utils for double maps.
      
      * Remove old migrations
      
      * Introduce tombstone for LinkedMap type
      
      * Migration for genesis hash
      
      * Fix build
      
      * Fix hash
      
      * Rename Map is_linked -> unused, keeping backwards compat (#5256)
      
      * Update frame/balances/src/lib.rs
      
      Co-Authored-By: default avatarShawn Tabrizi <[email protected]>
      
      * Update frame/elections/src/lib.rs
      
      Co-Authored-By: default avatarShawn Tabrizi <[email protected]>
      
      * Remove old migration code.
      
      * Update frame/system/src/lib.rs
      
      Co-Authored-By: default avatarShawn Tabrizi <[email protected]>
      
      * Update bin/node/runtime/src/lib.rs
      
      Co-Authored-By: default avatarShawn Tabrizi <[email protected]>
      
      * Fix hash
      
      * fix session migration
      
      * Fix watning
      
      Co-authored-by: default avatarJaco Greeff <[email protected]>
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      Co-authored-by: default avatarRobert Habermeier <[email protected]>
      dd97b147
    • Wei Tang's avatar
      epoch-changes: separate epoch header with epoch data (#4881) · d299fed3
      Wei Tang authored
      
      
      * fork-tree: prune returns all pruned node data
      
      * epoch-changes: split EpochHeader vs epoch data
      
      * EpochChanges::viable_epoch and add missing comments
      
      * Incoperate the new epoch_changes interface for BABE
      
      * Fix BABE tests
      
      * Fix fork-tree pruning issue
      
      * Fix tests
      
      * Fix pruning algorithm
      
      * fork-tree: implement map function for mapping one value type to another
      
      * Add migration script for new epoch changes scheme
      
      * Update utils/fork-tree/src/lib.rs
      
      Co-Authored-By: default avatarAndré Silva <[email protected]>
      
      * Update client/consensus/slots/src/lib.rs
      
      Co-Authored-By: default avatarAndré Silva <[email protected]>
      
      * Remove authorities_len.is_none check, which is duplicate of unwrap_or(false)
      
      * Update client/consensus/epochs/src/lib.rs
      
      Co-Authored-By: default avatarAndré Silva <[email protected]>
      
      * Update client/consensus/epochs/src/lib.rs
      
      Co-Authored-By: default avatarAndré Silva <[email protected]>
      
      * No trailing ; for return statement
      
      * Use VERSION_KEY for migration
      
      * Fix issues that removed nodes are not properly added into removed list
      
      * Add comments indicating end_slot is non-inclusive
      
      * fork-tree: use &mut F for map type declaration
      
      * Add tests for v0 epoch_changes migration
      
      * Fix babe RPC tests
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      d299fed3
    • gabriel klawitter's avatar
      ca250684
    • Nikolay Volf's avatar
      create parallel tasks extension (#5249) · 0bd9ffac
      Nikolay Volf authored
      0bd9ffac
    • gabriel klawitter's avatar
      199daa3e