1. Feb 19, 2021
  2. Feb 18, 2021
  3. Feb 17, 2021
    • Cecile Tonglet's avatar
      Fix telemetry span not entering properly attempt 3 (#8043) · 27274c42
      Cecile Tonglet authored
      
      
      * Fix tracing tests (#8022)
      
      * Fix tracing tests
      
      The tests were not working properly.
      
      1. Some test was setting a global subscriber, this could lead to racy
      conditions with other tests.
      
      2. A logging test called `process::exit` which is completly wrong.
      
      * Update client/tracing/src/lib.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * Review comments
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * Fix tracing spans are not being forwarded to spawned task (#8009)
      
      * Fix tracing spans are not being forwarded to spawned task
      
      There is a bug that tracing spans are not forwarded to spawned task. The
      problem was that only the telemetry span was forwarded. The solution to
      this is to use the tracing provided `in_current_span` to capture the
      current active span and pass the telemetry span explictely. We will now
      always enter the span when the future is polled. This is essentially the
      same strategy as tracing is doing with its `Instrumented`, but now
      extended for our use case with having multiple spans active.
      
      * More tests
      
      * Proper test for telemetry and prefix span
      
      * WIP
      
      * Fix test (need to create & enter the span at the same time)
      
      * WIP
      
      * Remove telemtry_span from sc_service config
      
      * CLEANUP
      
      * Update comment
      
      * Incorrect indent
      
      * More meaningful name
      
      * Dedent
      
      * Naming XD
      
      * Attempt to make a more complete test
      
      * lint
      
      * Missing licenses
      
      * Remove user data
      
      * CLEANUP
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * CLEANUP
      
      * Apply suggestion
      
      * Update bin/node/cli/tests/telemetry.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * Wrapping lines
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: default avatarDavid <[email protected]>
      27274c42
  4. Feb 16, 2021
    • thiolliere's avatar
      Remove inherent in pallet-babe (#8124) · f35a27cc
      thiolliere authored
      f35a27cc
    • thiolliere's avatar
      fix deprecated usage of panic (#8134) · f49aae65
      thiolliere authored
      f49aae65
    • Gavin Wood's avatar
      Move dust collection hook to outside of account mutate (#8087) · ed9c08dd
      Gavin Wood authored
      
      
      * Move dust collection hook to outside of account mutate
      
      * Fix dust cleanup in nested mutates.
      
      * Fixes
      
      * Fixes
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * dust removal reentrancy test case integration (#8133)
      
      * dust removal reentrancy test case integration
      
      * Update frame/balances/src/tests_reentrancy.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Update frame/balances/src/tests_reentrancy.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Update frame/balances/src/tests_reentrancy.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Update frame/balances/src/tests_reentrancy.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Update frame/balances/src/tests_reentrancy.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * dust removal reentrancy test case integration | removed dependency on tests.rs
      
      * dust removal reentrancy test case integration | formatt correction
      
      * dust removal reentrancy test case integration | formatt correction
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      Co-authored-by: default avatarRK <[email protected]>
      Co-authored-by: default avatarKian Paimani <[email protected]>
      ed9c08dd
    • Peter Goodspeed-Niklaus's avatar
      Create a macro which automates creation of benchmark test suites. (#8104) · 44d5aba8
      Peter Goodspeed-Niklaus authored
      
      
      * Create a macro which automates creation of benchmark test suites.
      
      * bump impl_version
      
      * allow unused on test_bench_by_name
      
      * use proper doctest ignore attribute
      
      * Explicitly hand the Module to the test suite
      
      Much better practice than depending on it showing up implicitly in
      the namespace.
      
      * explicitly import what we need into `mod tests`
      
      * bench_module is `ident` not `tt`
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * allow end users to specify arguments for new_test_ext
      
      This turned out to be surprisingly easy. On reflection, it turns out
      that of course the compiler can't eagerly evaluate the function call,
      but needs to paste it in everywhere desired.
      
      * enable explicitly specifying the path to the benchmarks invocation
      
      also enable optional trailing commas
      
      * Revert "bump impl_version"
      
      This reverts commit 0209e4de33fd43873f8cfc6875815d0fd6151e63.
      
      * list failing benchmark tests and the errors which caused the failure
      
      * harden benchmark tests against internal panics
      
      * suppress warning about ignored profiles
      
      unfortunately, setting the profile here doesn't do anything; we'd
      need to set it in every leaf package anyway. However, as this was
      just making the default explicit anyway, I think it's safe enough
      to remove entirely.
      
      * impl_benchmark_test_suite for assets
      
      * impl_benchmark_test_suite for balances
      
      * impl_benchmark_test_suite for bounties
      
      * impl_benchmark_test_suite for Collective
      
      * impl_benchmark_test_suite for Contracts
      
      * impl_benchmark_test_suite for Democracy
      
      * don't impl_benchmark_test_suite for Elections-Phragmen
      
      * impl_benchmark_test_suite for Identity
      
      Note that Identity tests currently fail. They failed in an identical
      way before this change, so as far as I'm concerned, the status quo is
      good enough for now.
      
      * impl_benchmark_test_suite for ImOnline
      
      * impl_benchmark_test_suite for indices
      
      For this crate also, the test suite fails identically with and without
      this change, so we can say that this change is not the cause of the
      tests' failure to compile.
      
      * impl_benchmark_test_suite for lottery
      
      * impl_benchmark_test_suite for merkle-mountain-range
      
      * impl_benchmark_test_suite for Multisig
      
      These tests fail identically with and without the change, so the change
      seems unlikely to be the origin of the failures.
      
      * impl_benchmark_test_suite for offences
      
      * impl_benchmark_test_suite for Proxy
      
      Fails identically with and without this change.
      
      * impl_benchmark_test_suite for scheduler
      
      * impl_benchmark_test_suite for session
      
      It turns out to be important to be able to exclude items marked
      `#[extra]` sometimes. Who knew?
      
      * impl_benchmark_test_suite for staking
      
      * impl_benchmark_test_suite for system
      
      * impl_benchmark_test_suite for timestamp
      
      * impl_benchmark_test_suite for tips
      
      * impl_benchmark_test_suite for treasury
      
      * impl_benchmark_test_suite for utility
      
      Note that benchmark tests fail identically before and after this change.
      
      * impl_benchmark_test_suite for vesting
      
      * fix wrong module name in impl_benchmark_test_suite in Offences
      
      * address line length nits
      
      * enable optional keyword argument: exec_name
      
      Took a _lot_ of macro-wrangling to get the functionality that I want,
      but now you have the option to pass in
      
      ```rust
      impl_benchmark_test_suite!(
      	Elections,
      	crate::tests::ExtBuilder::default().desired_members(13).desired_runners_up(7),
      	crate::tests::Test,
      	exec_name = build_and_execute,
      );
      ```
      
      and have it expand out properly. A selected fragment of the expansion:
      
      ```rust
              fn test_benchmarks() {
                  crate::tests::ExtBuilder::default()
                      .desired_members(13)
                      .desired_runners_up(7)
                      .build_and_execute(|| {
      ```
      
      * get rid of dead code
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      44d5aba8
  5. Feb 15, 2021
  6. Feb 12, 2021
  7. Feb 11, 2021
  8. Feb 10, 2021
  9. Feb 09, 2021
  10. Feb 08, 2021
  11. Feb 06, 2021