1. Jan 06, 2021
    • Peter Goodspeed-Niklaus's avatar
      reinstate randomness for better statistical properties · ea593098
      Peter Goodspeed-Niklaus authored
      This partially reverts commit 0ab8594c.
      
      `oorandom` is much lighter than the previous `rand`-based implementation,
      which makes this easier to work with.
      
      This implementation gives each subsystem and each child RNG a distinct
      increment, which should ensure they produce distinct streams of values.
      ea593098
    • Peter Goodspeed-Niklaus's avatar
      remove randomness in favor of a simpler 1 of N procedure · 0ab8594c
      Peter Goodspeed-Niklaus authored
      This deserves a bit of explanation, as the motivating issue explicitly
      requested randomness. In short, it's hard to get randomness to compile
      for `wasm32-unknown-unknown` because that is explicitly intended to be
      as deterministic as practical. Additionally, even though it would never
      be used for consensus purposes, it still felt offputting to intentionally
      introduce randomness into a node's operations. Except, it wasn't really
      random, either: it was a deterministic PRNG varying only in its state,
      and getting the state to work right for that target would have required
      initializing from a constant.
      
      Given that it was a deterministic sequence anyway, it seemed much simpler
      and more explicit to simply select one of each N messages instead of
      attempting any kind of realistic randomness.
      0ab8594c
    • Peter Goodspeed-Niklaus's avatar
      change rng initialization · f43d9646
      Peter Goodspeed-Niklaus authored
      The previous impl using `from_entropy` depends on the `getrandom`
      crate, which uses the system entropy source, and which does not
      work on `wasm32-unknown-unknown` because it wants to fall back to
      a JS implementation which we can't assume exists.
      
      This impl depends only on `rand::thread_rng`, which has no documentation
      stating that it's similarly limited.
      f43d9646
    • Peter Goodspeed-Niklaus's avatar
    • Peter Goodspeed-Niklaus's avatar
      fix failing test · 9b7c2641
      Peter Goodspeed-Niklaus authored
      9b7c2641
  2. Jan 05, 2021
  3. Jan 04, 2021
    • Bastian Köcher's avatar
      Use correct ROC currency name (#2195) · e8cd587d
      Bastian Köcher authored
      e8cd587d
    • asynchronous rob's avatar
      Improve Network Spans (#2169) · a891884e
      asynchronous rob authored
      * utility functions for erasure-coding threshold
      
      * add candidate-hash tag to candidate jaeger spans
      
      * debug implementation for jaeger span
      
      * add a span to each live candidate in availability dist.
      
      * availability span covers only our piece
      
      * fix tests
      
      * keep span alive slightly longer
      
      * remove spammy bitfield-gossip-received log
      
      * Revert "remove spammy bitfield-gossip-received log"
      
      This reverts commit 831a2db5
      
      .
      
      * add claimed validator to bitfield-gossip span
      
      * add peer-id to handle-incoming span
      
      * add peer-id to availability distribution span
      
      * Update node/network/availability-distribution/src/lib.rs
      
      Co-authored-by: default avatarBernhard Schuster <[email protected]>
      
      * Update erasure-coding/src/lib.rs
      
      Co-authored-by: default avatarBernhard Schuster <[email protected]>
      
      * Update node/subsystem/src/jaeger.rs
      
      Co-authored-by: default avatarBernhard Schuster <[email protected]>
      
      Co-authored-by: default avatarBernhard Schuster <[email protected]>
      a891884e
    • Sergey Pepyakin's avatar
      Add relay storage root to persisted validation data (#2161) · 50538aa5
      Sergey Pepyakin authored
      * Cont.: Implement the state root obtaining during inclusion
      
      During inclusion now we obtain the storage root by passing it through
      the inclusion_inherent.
      
      * Fix tests
      
      * Bump rococo spec version
      
      * Reorder the parent header into the end
      
      of the inclusion inherent.
      
      When the parent header is in the beginning, it shifts the other two
      fields, so that a previous version won't be able to decode that. If
      we put the parent header in the end, the other two fields will stay
      at their positions, thus make it possible to decode with the previous
      version.
      
      That allows us to perform upgrade of rococo runtime without needing of
      simultanuous upgrade of nodes and runtime, or restart of the network.
      
      * Squash a stray tab
      50538aa5
    • Bastian Köcher's avatar
      Improve unbacked span (#2191) · 85932d15
      Bastian Köcher authored
      We need to make sure to drop the import-statement child span before the
      parent span is dropped.
      85932d15
    • Bastian Köcher's avatar
      d975841c
  4. Jan 02, 2021
  5. Dec 30, 2020
    • Alexander Theißen's avatar
      Companion for #7810 (Define ss58 prefix inside the runtime) (#2182) · 2ad8c5cf
      Alexander Theißen authored
      * Companion for #7810
      
      * Added missing trait items for tests
      
      * Add another missing trait item
      
      * fixup
      
      * "Update Substrate"
      
      Co-authored-by: parity-processbot <>
      2ad8c5cf
    • Shawn Tabrizi's avatar
      Migrate Claims Pallet to WeightInfo (#2171) · 4e73c1d3
      Shawn Tabrizi authored
      
      
      * migrate claims to weightinfo
      
      * fix up
      
      * fix benchmark
      
      * cargo run --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=claims --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/
      
      * fix test runtime
      
      * cargo run --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=claims --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/
      
      * Update runtime/kusama/src/weights/claims.rs
      
      * use path for pallet
      
      * Update Cargo.lock
      
      * cargo run --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=runtime_common::claims --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/
      
      * Delete runtime_common::claims.rs
      
      * cargo run --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=runtime_common::claims --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/runtime_common_claims.rs
      
      * cargo run --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_common::claims --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_common_claims.rs
      
      * use full automation file
      
      * patch import
      
      * consolidate benchmark logic
      
      * fix
      
      * cargo run --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_common::claims --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_common_claims.rs
      
      * cargo run --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=runtime_common::claims --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/runtime_common_claims.rs
      
      * update weight comments
      
      Co-authored-by: default avatarParity Benchmarking Bot <[email protected]>
      4e73c1d3
  6. Dec 29, 2020
  7. Dec 28, 2020
  8. Dec 27, 2020
  9. Dec 24, 2020
  10. Dec 21, 2020
    • asynchronous rob's avatar
      bump rococo spec version · 2c6920c4
      asynchronous rob authored
      2c6920c4
    • Sergey Pepyakin's avatar
      Do not use rely on the block initialization when calling runtime APIs (#2123) · e21f5cec
      Sergey Pepyakin authored
      
      
      * Don't initialize block when calling runtime APIs
      
      * Adapt check_validation_outputs
      
      We split the code path for the inclusion and for the commitments checking.
      
      * Slap #[skip_initialize_block] on safe runtime APIs
      
      That is, those that should not be affected by this attribute
      
      * Make `Scheduled` not ephemeral
      
      So that it is persisted in the storage and ready to be inspected
      by the runtime APIs. This is in contrast to what was before, where we
      would remove the storage entry and then rely on the scheduling performed
      by `on_initialize` again.
      
      * Add a big fat comment
      
      * Typos
      
      Co-authored-by: default avatarRobert Habermeier <[email protected]>
      
      * Move session change to the end of the current block
      
      Previously, it was the beginning of the next block. This allows us to
      put #[skip_initialize_block]
      
      * Update tests
      
      * Fix a test in paras registrar
      
      Also refactor it a bit so the next time there are more chances this kind
      of issue is diagnosed quicker.
      
      * Add for_runtime_api to inclusion's check_validation_outputs
      
      Co-authored-by: default avatarRobert Habermeier <[email protected]>
      e21f5cec
  11. Dec 20, 2020
  12. Dec 18, 2020
  13. Dec 17, 2020