Skip to content
  1. Mar 31, 2020
    • Gavin Wood's avatar
      Batch benchmarks together with `*` notation. (#5436) · b472d60a
      Gavin Wood authored
      
      
      * Batch benchmarks together with `*` notation.
      
      * Fix short structopt conflict
      
      * Return error if `batches` is empty
      
      * Move fast benchmarks macro into `frame_benchmarking` (#5445)
      
      * Move macro into `frame_benchmarking`
      
      * Update docs
      
      * Extra line
      
      * Return error if `batches` is empty
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      b472d60a
    • Bastian Köcher's avatar
      Implements mocking of runtime apis (#5448) · 954dca68
      Bastian Köcher authored
      
      
      * Implements mocking of runtime apis
      
      This pr adds support for easily mock runtime api implementations for
      tests by using the `mock_impl_runtime_apis!` macro. The syntax is
      similar to `impl_runtime_apis!`. The mocked implementation automatically
      implements `ApiExt`, `ApiErrorExt` and `Core` as these are required by
      the runtime api traits, but not required in tests or only a subset of them.
      
      * Fix warnings
      
      * Update primitives/api/proc-macro/src/utils.rs
      
      Co-Authored-By: default avatarNikolay Volf <[email protected]>
      
      * Review feedback
      
      Co-authored-by: default avatarNikolay Volf <[email protected]>
      954dca68
    • Nikolay Volf's avatar
      And one more fix to flaky tests (#5467) · b4d83a4b
      Nikolay Volf authored
      * imporoved intervallier version
      
      * remove extra event
      
      * use version 0.3.1
      
      * fix warning
      b4d83a4b
    • Cecile Tonglet's avatar
      Allow changing the behavior for imported blocks (#5236) · 439887a7
      Cecile Tonglet authored
      * Added option to disable default block announce
      
      * Added on_block_imported on NetworkService
      
      * Revert "Added on_block_imported on NetworkService"
      
      This reverts commit ba360cad96e0cb041d7047af30df2a35eb112449.
      
      * Do not announce block if set to not announce block
      
      * Revert fix
      
      * Moving default announce block to NetworkConfig
      
      * WIP
      
      Forked at: ad90ab7e
      Parent branch: origin/master
      
      * WIP
      
      Forked at: ad90ab7e
      Parent branch: origin/master
      
      * Removing boolean in favor of explicit call
      
      * Fixing tests
      
      * WIP
      
      Forked at: ad90ab7e
      Parent branch: origin/master
      
      * WIP
      
      Forked at: ad90ab7e
      Parent branch: origin/master
      
      * increase spec_version
      
      * increase spec_version
      
      * Fixed test
      
      * Fixing test
      
      * Renamed should_announce_imported_blocks to announce_imported_blocks
      
      * Updated assert_cmd
      439887a7
    • gabriel klawitter's avatar
      Ci check companion (#5419) · b8eb094c
      gabriel klawitter authored
      * add post-build-test stage
      
      * check status
      
      * fix busybox shell
      
      * renaming for consistency
      b8eb094c
  2. Mar 30, 2020
    • yanganto's avatar
      Show network id/version in subkey (#5457) · 77b9771b
      yanganto authored
      
      
      * Show network id/version in subkey
      
      - show network id/version when creating
      - show network id/version when inspecting
      
      * Update bin/utils/subkey/src/main.rs
      
      use `unwrap_or_default` for more clean syntax
      
      Co-Authored-By: default avatarBastian Köcher <[email protected]>
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      77b9771b
    • Stanislav Tkach's avatar
    • Max Inden's avatar
      src/service/src/builder: Fix memory metric exposed in bytes not KiB (#5459) · c3c8552a
      Max Inden authored
      The library `sysinfo` exposes process memory as kibibytes and not bytes,
      thus the value needs to be multiplied by 1024 to comply with the metric
      name and the Prometheus base units [1].
      
      [1] https://prometheus.io/docs/practices/naming/#base-units
      c3c8552a
    • Nikolay Volf's avatar
      pub instead of remove (#5451) · d82a2bf4
      Nikolay Volf authored
      d82a2bf4
    • Pierre Krieger's avatar
      Fix tried to send handshake twice (#5413) · dbba4f89
      Pierre Krieger authored
      * Fix tried to send handshake twice
      
      * Fix wrong boolean
      
      * Change to debug
      dbba4f89
    • Rakan Alhneiti's avatar
      Introduce `sign_with` method in keystore (#4925) · e17a23e9
      Rakan Alhneiti authored
      
      
      * Add KEY_KIND_ID to the public trait
      
      This change is being introduced for the purpose of identifying a public
      key with it's identifier and algorithm "kind".
      
      * Use `sign_with` as implemented in BareCryptoStore
      
      * Implement `sign_with` in sc_keystore
      
      * Fix inconsistencies, use *_KIND_ID in sp_core testing
      
      * Rename KeyKindId to CryptoTypeId
      
      * Remove pair-returning functions from BareCryptoStore trait
      
      * Define CryptoTypeId in app-crypto macros
      
      * Add functions to get keys supported by keystore
      
      * Fix sign_with signature to include CryptoTypePublicPair
      
      * Add `sign_with_any` and `sign_with_all`
      
      * Use keystore.sign_with in auth_discovery
      
      * Rename get_supported_keys -> supported_keys
      
      * Added headers to function docstrings
      
      * Use chain instead of extending a temp vector
      
      * Fixed some code formatting
      
      * Restrict size of CryptoTypeId
      
      This is to be able to use Encode/Decode derives and the overcome having
      the size being unknown at compile-time.
      
      * Implement sign_with in the trait itself
      
      * Remove whitespace
      
      * Use key_type also as a CryptoTypeId in app_crypto macros
      
      * Rename `get_keys` to `keys` in BareCryptoStore
      
      * Remove usage of key_pair funcs in tests
      
      * Adjust docstring for *_CYPTO_ID constants
      
      * Fix failures
      
      * Simplify mapping on keys
      
      * Remove one let
      
      * Fixed typo
      
      * PR feedback
      
      * remove whitespace
      
      * Zip keys and signatures
      
      * Use into_iter & remove cloned
      
      * Pass index to MissingSignature
      
      * Use typed errors instead of strings for BareCryptoStore
      
      * Implement Debug for trait error
      
      * Use hashsets for better performance for supported_keys
      
      * Make sure keys are inserted into the keystore
      
      * Make sign_with_all return type consistent with `sign_with`
      
      * Rename Error to BareCryptoStoreError
      
      * Rename CRYPT_TYPE_ID -> CRYPTO_ID
      
      * Remove unnecessary CRYPTO_ID declaration in Public trait
      
      * Convert pub key to CryptoTypePublicPair
      
      * Fix use
      
      * Fix code style
      
      * Implement From on CryptoTypePublicPair in app_crypto macros
      
      * Change CryptoTypePublicPair to a struct
      
      * Implement Display on CryptoTypePublicPair
      
      * Pass CryptoTypePublicPair to MissingSignature error
      
      * Adjust docs according to function signature
      
      * Unify keys implementation
      
      * Fix RPC author tests
      
      * Fix stackoverflow
      
      * Tabify spaces
      
      * Pass KeyTypeId to error for easier debugging
      
      * Fix asserts
      
      * Use ToHex to format public key
      
      * Use constants from sp_core
      
      * Rename testing KeyTypeId constants
      
      * Please compiler
      
      * Restore KeyTypeId names
      
      apparently, they're not only used in tests
      
      * Use BareCryptoStoreError instead of String
      
      * Document return value
      
      * Fix borrow check
      
      * Convert to hashset internally
      
      * WIP - iter_keys
      
      * Return raw_public_keys
      
      * Address PR feedback
      
      * Address PR Feedback
      
      * Fix hexdisplay import error
      
      * Update primitives/core/src/traits.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      e17a23e9
    • Pierre Krieger's avatar
      Make transactions and block announces use notifications substre… (#5360) · 462eaa3f
      Pierre Krieger authored
      * Make transactions and block announces use notifications
      
      * Add documentation
      462eaa3f
    • pscott's avatar
      Build for only one target for docs.rs (#5427) · 408455f8
      pscott authored
      * Add docs.rs metadata to all cargo.toml files
      
      * Remove docs.rs metada in substrate's cargo.toml
      408455f8
  3. Mar 29, 2020
    • Bastian Köcher's avatar
      Add method to `sc-cli` to reset the `SIGPIPE` signal handler (#5447) · ab0366a0
      Bastian Köcher authored
      The signal handler will be reset to the default system one. This means
      the program will be exited instead of panicking. This is required to
      support piping in the console.
      ab0366a0
    • Joseph Mark's avatar
      Extend PerThing + Saturating (#5281) · e8835d64
      Joseph Mark authored
      
      
      * Extend PerThing + Saturating
      
      * Add saturating_pow to Saturating
      * Add saturating_truncating_mul to PerThing (rounding-down mul)
      * Add saturating_reciprocal_mul to PerThing (divide x by perthing)
      * Provide default methods where possible
      
      * Restore const functions
      
      * Fix test
      
      * Update primitives/arithmetic/src/per_things.rs
      
      Co-Authored-By: default avatarKian Paimani <[email protected]>
      
      * Add comment and test verifying no overflow
      
      * Formatting
      
      * Fix possible overflow and change type constraint
      
      * Use overflow pruning for all mul
      
      * Formatting and comments
      
      * Improve comments and names
      
      * Comments in `rational_mul_correction` explain overflow aversion.
      
      * Test rational_mul_correction
      
      * Formatting
      
      * Docs and formatting
      
      * Add new trait methods to Perthing type impl
      
      * Fix signature
      
      * saturating_pow for Delegations
      
      * Add missing trait method to impl
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      e8835d64
    • Nikolay Volf's avatar
      don't use delays in tests (#5404) · d7ffef43
      Nikolay Volf authored
      d7ffef43
  4. Mar 28, 2020
  5. Mar 27, 2020
  6. Mar 26, 2020
    • gabriel klawitter's avatar
    • Web3 Philosopher's avatar
      Adds state_queryStorageAt (#5362) · ab0f7d21
      Web3 Philosopher authored
      
      
      * adds state_queryStorageAt
      
      * make at param for query_storage_at optional
      
      * Update client/rpc/src/state/state_full.rs
      
      Co-Authored-By: default avatarTomasz Drwięga <[email protected]>
      
      * adds query_storage_at to StateBackend
      
      Co-authored-by: default avatarTomasz Drwięga <[email protected]>
      ab0f7d21
    • Kian Paimani's avatar
      Offchain Phragmén BREAKING. (#4517) · 970c5f94
      Kian Paimani authored
      * Initial skeleton for offchain phragmen
      
      * Basic compact encoding decoding for results
      
      * add compact files
      
      * Bring back Self::ensure_storage_upgraded();
      
      * Make staking use compact stuff.
      
      * First seemingly working version of reduce, full of todos
      
      * Everything phragmen related works again.
      
      * Signing made easier, still issues.
      
      * Signing from offchain compile fine 😎
      
      * make compact work with staked asssignment
      
      * Evaluation basics are in place.
      
      * Move reduce into crate. Document stuff
      
      * move reduce into no_std
      
      * Add files
      
      * Remove other std deps. Runtime compiles
      
      * Seemingly it is al stable; cycle implemented but not integrated.
      
      * Add fuzzing code.
      
      * Cleanup reduce a bit more.
      
      * a metric ton of tests for staking; wip 🔨
      
      * Implement a lot more of the tests.
      
      * wip getting the unsigned stuff to work
      
      * A bit gleanup for unsigned debug
      
      * Clean and finalize compact code.
      
      * Document reduce.
      
      * Still problems with signing
      
      * We officaly duct taped the transaction submission stuff. 🤓
      
      * Deadlock with keys again
      
      * Runtime builds
      
      * Unsigned test works 🙌
      
      * Some cleanups
      
      * Make all the tests compile and stuff
      
      * Minor cleanup
      
      * fix more merge stuff
      
      * Most tests work again.
      
      * a very nasty bug in reduce
      
      * Fix all integrations
      
      * Fix more todos
      
      * Revamp everything and everything
      
      * Remove bogus test
      
      * Some review grumbles.
      
      * Some fixes
      
      * Fix doc test
      
      * loop for submission
      
      * Fix cli, keyring etc.
      
      * some cleanup
      
      * Fix staking tests again
      
      * fix per-things; bring patches from benchmarking
      
      * better score prediction
      
      * Add fuzzer, more patches.
      
      * Some fixes
      
      * More docs
      
      * Remove unused generics
      
      * Remove max-nominator footgun
      
      * Better fuzzer
      
      * Disable it 
      
      
      
      * Bump.
      
      * Another round of self-review
      
      * Refactor a lot
      
      * More major fixes in perThing
      
      * Add new fuzz file
      
      * Update lock
      
      * fix fuzzing code.
      
      * Fix nominator retain test
      
      * Add slashing check
      
      * Update frame/staking/src/tests.rs
      
      Co-Authored-By: default avatarJoshy Orndorff <[email protected]>
      
      * Some formatting nits
      
      * Review comments.
      
      * Fix cargo file
      
      * Almost all tests work again
      
      * Update frame/staking/src/tests.rs
      
      Co-Authored-By: default avatarthiolliere <[email protected]>
      
      * Fix review comments
      
      * More review stuff
      
      * Some nits
      
      * Fix new staking / session / babe relation
      
      * Update primitives/phragmen/src/lib.rs
      
      Co-Authored-By: default avatarthiolliere <[email protected]>
      
      * Update primitives/phragmen/src/lib.rs
      
      Co-Authored-By: default avatarthiolliere <[email protected]>
      
      * Update primitives/phragmen/compact/src/lib.rs
      
      Co-Authored-By: default avatarthiolliere <[email protected]>
      
      * Some doc updates to slashing
      
      * Fix derive
      
      * Remove imports
      
      * Remove unimplemented tests
      
      * nits
      
      * Remove dbg
      
      * Better fuzzing params
      
      * Remove unused pref map
      
      * Deferred Slashing/Offence for offchain Phragmen  (#5151)
      
      * Some boilerplate
      
      * Add test
      
      * One more test
      
      * Review comments
      
      * Fix build
      
      * review comments
      
      * fix more
      
      * fix build
      
      * Some cleanups and self-reviews
      
      * More minor self reviews
      
      * Final nits
      
      * Some merge fixes.
      
      * opt comment
      
      * Fix build
      
      * Fix build again.
      
      * Update frame/staking/fuzz/fuzz_targets/submit_solution.rs
      
      Co-Authored-By: default avatarGavin Wood <[email protected]>
      
      * Update frame/staking/src/slashing.rs
      
      Co-Authored-By: default avatarGavin Wood <[email protected]>
      
      * Update frame/staking/src/offchain_election.rs
      
      Co-Authored-By: default avatarGavin Wood <[email protected]>
      
      * Fix review comments
      
      * fix test
      
      * === 🔑
      
       Revamp without staking key.
      
      * final round of changes.
      
      * Fix cargo-deny
      
      * Update frame/staking/src/lib.rs
      
      Co-Authored-By: default avatarGavin Wood <[email protected]>
      
      Co-authored-by: default avatarJoshy Orndorff <[email protected]>
      Co-authored-by: default avatarthiolliere <[email protected]>
      Co-authored-by: default avatarGavin Wood <[email protected]>
      970c5f94
    • Max Inden's avatar
      client/finality-grandpa/src/until_imported: Refactor schedule_wait (#5386) · 2a67e6c4
      Max Inden authored
      
      
      * client/finality-grandpa/src/until_imported: Refactor schedule_wait
      
      Previously `BlockUntilImported::schedule_wait` took two closures, one to
      report ready items and one to report items to await. None of the implementors of
      `BlockUntilImported` call both closures. From a symantic perspective it
      would as well not make sense to both await something and state that it
      is ready.
      
      Instead with this commit `BlockUntilImported::schedule_wait` simply
      returns whether the given item needs waiting or is ready to be passed
      on.
      
      This reduces complexity by:
      
      - Removing side effects through the two closures.
      
      - Reducing borrowing given that `UntilImported` `ready` and `pending`
      don't need to be borrowed from within the two closures.
      
      - Removes the need for trait bounds for the two closures.
      
      * client/finality-grandpa/src/until_imported: Fix comments
      
      Co-Authored-By: default avatarAndré Silva <[email protected]>
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      2a67e6c4
    • gabriel klawitter's avatar
    • Pierre Krieger's avatar
      Improve sc-network's documentation for network protocols (#5364) · fdbbf14f
      Pierre Krieger authored
      
      
      * Improve sc-network's documentation for network protocols
      
      * Add note about protocol id
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarMax Inden <[email protected]>
      
      Co-authored-by: default avatarMax Inden <[email protected]>
      fdbbf14f
    • Marcio Diaz's avatar
      Benchmark Democracy Pallet (#5257) · 5a48cade
      Marcio Diaz authored
      
      
      * Add origin bounds to benchmark macro.
      
      * Add democracy benchmark.
      
      * Fix tests
      
      * Remove collective from frame/benchmarking, partially use EnsureOrigin.
      
      * Remove collective stuff.
      
      * Make previous benches compile again.
      
      * Remove comments.
      
      * Make prev bench to work again.
      
      * Add remove votes.
      
      * Add new proxy calls.
      
      * Add runtime-benchmarks guard to EnsureOrigin and implementations.
      
      * Refactor.
      
      * Add missing import.
      
      * Remove duplicated import
      
      * Fix features.
      
      * Add some missing features.
      
      * Update frame/collective/Cargo.toml
      
      Co-Authored-By: default avatarKian Paimani <[email protected]>
      
      * Update frame/democracy/src/benchmarking.rs
      
      Co-Authored-By: default avatarKian Paimani <[email protected]>
      
      * Update frame/democracy/src/benchmarking.rs
      
      Co-Authored-By: default avatarKian Paimani <[email protected]>
      
      * Add referendums to state.
      
      * populate vecs before call
      
      * Update weight docs
      
      * More fixes and weight docs
      
      * More updates
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      5a48cade
    • Kian Paimani's avatar
      Mandate weight annotation (#5357) · a0772117
      Kian Paimani authored
      * Disallow default weight
      
      * Fix build and test
      
      * Fix tests
      
      * Fix another beloved ui test.
      
      * fix beloved trybuild tests
      
      * fix treasury?
      
      * Final test fix
      
      * Fix build
      
      * Fix another one
      
      * Fix
      
      * More doctest fix
      a0772117
    • Alexander Theißen's avatar
      contracts: Remove OnKilledAccount implementation (#5397) · 7cbadd73
      Alexander Theißen authored
      * contracts: Remove OnKilledAccount implementation
      
      Contracts now longer rely on this callback to tell them when they
      are removed. Instead, they can only self destruct  using `ext_terminate`.
      
      * Fix account removal test
      
      * Fix account storage removal
      7cbadd73
    • thiolliere's avatar
      Make Staking pallet using a proper Time module. (#4662) · b0d2f4b1
      thiolliere authored
      
      
      * add new trait, still migration to make
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarKian Paimani <[email protected]>
      
      * implement migration
      
      * better naming
      
      * fix test
      
      * no longer require DeprecatedTime
      
      * add test
      
      * fix version
      
      * upgrade only from kusama
      
      * add test
      
      * fix test
      
      * Update frame/timestamp/src/lib.rs
      
      Co-Authored-By: default avatarBastian Köcher <[email protected]>
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      b0d2f4b1
    • Kian Paimani's avatar
      Update CODEOWNERS (#5409) · bc4567e2
      Kian Paimani authored
      bc4567e2
    • Spencer Judge's avatar
      Make AccountId32 hashable (#5405) · 8e10f366
      Spencer Judge authored
      
      
      * Make AccountId32 hashable
      
      * Only implement Hash in std
      
      Co-Authored-By: default avatarNikolay Volf <[email protected]>
      
      Co-authored-by: default avatarNikolay Volf <[email protected]>
      8e10f366
    • Arkadiy Paronyan's avatar
      Allow syncing to peers with finalized common block (#5408) · d474864d
      Arkadiy Paronyan authored
      * Allow syncing to peers with finalized common block
      
      * Added test
      d474864d
    • pscott's avatar
      TelemetryEndpoints must be valid MutliAddr URL (#5069) · 73c99eec
      pscott authored
      
      
      * Check for url validity when creating TelemetryEndpoints
      
      * Update code that used TelemetryEndpoints::new()
      
      * Update commennts that referred to TelemetryEndpoints::new()
      
      * Add tests for telemetry
      
      * Fix typo and fix code in docs
      
      * Return error on failing to override telemetry
      
      * Use expect instead of suppressing errors on must-be-valid telemetry endpoints
      
      * Update telemetry unit tests to use expect instead of unwrap
      
      * Implement custom deserializer for TelemetryEndpoints
      
      * Fix typo
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      73c99eec