1. May 15, 2020
  2. May 12, 2020
    • Bastian Köcher's avatar
      Optimize `decode_len` (#5975) · 22db788c
      Bastian Köcher authored
      
      
      * Optimize `decode_len`
      
      Instead of reading the full storage value into the runtime, we only read
      at maximum `5bytes` from the storage into the runtime. Furthermore this
      drops any handling with regards to set default values in
      `decl_storage!`. If the value does not exists or the decoding of the
      length fails, it will return `None`. To prevent people from messing
      stuff up, this feature relies on the `StorageDecodeLength` trait that is
      sealed by `frame-support` (aka only implementable inside this crate).
      
      * Some clean ups
      
      * Update frame/support/src/storage/mod.rs
      
      Co-authored-by: default avatarAlexander Popiak <[email protected]>
      
      Co-authored-by: default avatarAlexander Popiak <[email protected]>
      22db788c
  3. May 11, 2020
  4. May 06, 2020
    • Tomasz Drwięga's avatar
      Benchmarks for offences pallet. (#5851) · 66c02fe6
      Tomasz Drwięga authored
      
      
      * really rough mock runtime
      
      * start to work on offences
      
      * Make sure to start the session.
      
      * Update to latest master.
      
      * Add verify.
      
      * Fix on_initialize benchmark.
      
      * Add grandpa offence.
      
      * Add Babe offence benchmarking.
      
      * Enable babe test.
      
      * Address review grumbles.
      
      * Address review grumbles.
      
      * Address review grumbles part 1/2
      
      * use currency trait
      
      * features
      
      * Check events explicitly.
      
      * Auto-impl tuple converter.
      
      * Removed dead code.
      
      * add test feature flag
      
      * dont use std
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      66c02fe6
  5. May 05, 2020
  6. May 03, 2020
    • Shawn Tabrizi's avatar
      Remove Old Migration Code (#5870) · 92d0c0b7
      Shawn Tabrizi authored
      * remove old migration code
      
      * Remove old staking
      
      * Remove indices migration
      
      * Remove upgrade test in transaction-payment
      
      * oops
      
      * Revert "Remove old staking"
      
      This reverts commit 95262b1ac43c9b5bcf49d2ae80800feabcbbbaa0.
      
      * remove migration test in staking
      
      * fix warnings
      92d0c0b7
  7. Apr 28, 2020
  8. Apr 27, 2020
    • Kian Paimani's avatar
      Enable Offchain Equalise (#5683) · ee54eff4
      Kian Paimani authored
      * Master.into()
      
      * Remove debug stuff
      
      * Better license
      
      * Migrate away from SimpleDispatchInfo
      
      * Fix test
      
      * Revert "Migrate away from SimpleDispatchInfo"
      
      This reverts commit dbdd27fa19948f16bd17defdc01d3dd32986df11.
      
      * Move to offchain randomness
      
      * Fix tests
      
      * Fix tests more
      ee54eff4
  9. Apr 25, 2020
    • Shawn Tabrizi's avatar
      Introduce `BlockExecutionWeight` and `ExtrinsicBaseWeight` (#5722) · 8a33c297
      Shawn Tabrizi authored
      
      
      * Introduce `BlockExectionWeight` and `ExtrinsicBaseWeight`
      
      * Add new traits everywhere
      
      * Missed one update
      
      * fix tests
      
      * Update `check_weight` logic
      
      * introduce `max_extrinsic_weight` function
      
      * fix + add tests
      
      * format nits
      
      * remove println
      
      * make test a bit more clear
      
      * Remove minimum weight
      
      * newlines left over from find/replace
      
      * Fix test, improve clarity
      
      * Fix executor tests
      
      * Extrinsic base weight same as old `MINIMUM_WEIGHT`
      
      * fix example test
      
      * Expose constants
      
      * Add test for full block with operational and normal
      
      * Initiate test environment with `BlockExecutionWeight` weight
      
      * format nit
      
      * Update frame/system/src/lib.rs
      
      Co-Authored-By: default avatarKian Paimani <[email protected]>
      
      * Replace `TransactionBaseFee` with `ExtrinsicBaseWeight` (#5761)
      
      * Replace `TransactionBaseFee` with `ExtrinsicBaseFee`
      
      * Fix stuff
      
      * Fix and make tests better
      
      * Forgot to update this test
      
      * Fix priority number in test
      
      * Remove minimum weight from merge
      
      * Fix weight in contracts
      
      * remove `TransactionBaseFee` from contract tests
      
      * Let `register_extra_weight_unchecked` go past `MaximumBlockWeight`
      
      * address feedback
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      8a33c297
  10. Apr 24, 2020
  11. Apr 23, 2020
  12. Apr 22, 2020
  13. Apr 21, 2020
    • Rakan Alhneiti's avatar
      Offchain signing (#5182) · 25751c05
      Rakan Alhneiti authored
      
      
      * New approach to offchain signing.
      
      * Use in im-online
      
      * Rewrite to use Account<T>
      
      * DRY signing.
      
      * Implement send_raw_unsigned_transaction
      
      * WiP
      
      * Expunge LocalCall
      
      * Expunge LocalCall
      
      * Fix compilation.
      
      * Solve call.
      
      * Make it compile again.
      
      * Finalize implementation.
      
      * Change CreateTransaction
      
      * Clear CreateTransaction.
      
      * Add price payload
      
      * Send raw transaction
      
      * Submit signed payload / unsigned transaction (WIP)
      
      * Supertrait requirements on T::Signature
      
      * Validate signature of payload on an unsigned transaction
      
      * Fix encoding - part 1
      
      * Make it compile.
      
      * Fix compilation of unsigned validator.
      
      * Pass price payload to the transaction
      
      * Make block number part of the signed payload
      
      * Send signed transaction
      
      * Implement all_accounts, any_account
      
      * Fix formatting
      
      * Implement submit_transaction
      
      * Submit signed transaction (ForAll, ForAny)
      
      * Fix formatting
      
      * Implement CreateSignedTransaction
      
      * Move sign and verify to AppCrypto
      
      * Sign transaction
      
      * Call `use_encoded`
      
      * Remove SubmitAndSignTransaction
      
      * Implement runtime using new SigningTypes
      
      * Adapt offchain example to changes
      
      * Fix im-online pallet
      
      * Quick fix: rename AuthorityId2
      
      * Fix offchain example tests
      
      * Add a comment on why keystore is required in unsigned transaction test
      
      * Use UintAuthorityId instead of u64
      
      * WIP
      
      * Remove IdentifyAccount from UintAuthorityId
      
      * Implement PublicWrapper type
      
      * Fix im-online tests
      
      * Fix runtime test
      
      * Bump spec version
      
      * Fix executor tests
      
      * Rename ImOnlineAuthId -> ImOnlineAuthorityId and formatting
      
      * Fix merge
      
      * Documentation
      
      * Revert u64 -> UintAuthorityId conversion
      
      * Fix string errors
      
      * Document public members in offchain module
      
      * Introduce SubmitTransaction
      
      * Update pallets to use SubmitTransaction
      
      * WIP
      
      * Use SubmitTransaction in offchain
      
      * Use `submit_unsigned_transaction`
      
      * Fix tests
      
      * Update docs
      
      * Remove SigningTypes requirement from `SendTransactionTypes`
      
      * Fix tests
      
      * Update frame/system/src/offchain.rs
      
      Co-Authored-By: default avatarKian Paimani <[email protected]>
      
      * Update frame/system/src/offchain.rs
      
      Co-Authored-By: default avatarKian Paimani <[email protected]>
      
      * Update frame/example-offchain-worker/src/tests.rs
      
      Co-Authored-By: default avatarKian Paimani <[email protected]>
      
      * Update frame/system/src/offchain.rs
      
      Co-Authored-By: default avatarKian Paimani <[email protected]>
      
      * Update frame/system/src/offchain.rs
      
      Co-Authored-By: default avatarKian Paimani <[email protected]>
      
      * Remove leftover from previous iterations
      
      * Change enum to struct
      
      * Remove public
      
      * Move mock to node/executor/tests
      
      * Cleanup test-helpers
      
      * Make `application-crypto` `std` feature internal
      
      The macros should not generate code that requires that the calling crate
      has a feature with the name `std` defined.
      
      * Revert cargo lock update
      
      * Use TestAuthorityId from common
      
      * Restore members of account to public
      
      * Tidy up imports
      
      * Fix benchmarking pallet
      
      * Add tests demonstrating ForAll, ForAny on signer
      
      * Move definition of AppCrypto
      
      in example-offchain-worker
      from tests to mod::crypto
      
      * Cleanup stray comment
      
      * Fix ValidTransaction
      
      * Re-fix CreateSignedTransaction
      
      * Address PR feedback
      
      * Add can_sign method to signer
      
      * Propagate error
      
      * Improve documentation
      
      * Fix vec! macro not available
      
      * Document SendTransactiontypes
      
      * Add some docs.
      
      * Split signing examples
      
      * Add tests for signing examples
      
      * WIP can_sign - PR feedback
      
      * WIP
      
      * Split for_any / for_all into different calls
      
      * Verify payload and signature in test
      
      * Fix can_sign implementation
      
      * Fix impl_version
      
      * Import Box from sp_std
      
      * Create issues for TODOs
      
      * Ignore doctest.
      
      * Add test directly to system. Adjust UintTypes.
      
      * Add some tests to account filtering.
      
      * Remove code samples and point to example offchain worker
      
      * Fix doc links
      
      * Fix im-online tests using signatures.
      
      Co-authored-by: default avatarTomasz Drwięga <[email protected]>
      Co-authored-by: default avatarKian Paimani <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      25751c05
  14. Apr 20, 2020
  15. Apr 17, 2020
    • Kian Paimani's avatar
      Clean Phragmén Equlise API (#5452) · 762c741c
      Kian Paimani authored
      
      
      * Clean phragmen API and equalise()
      
      * Stabilize new api
      
      * Fix phragmen fuzzers
      
      * More fixes
      
      * Make fuzzers reproducible
      
      * improvements
      
      * Make equalize update assignments as well.
      
      * total function for staked_assignment.
      
      * Fix fuzzer build
      
      * remvoe TODO
      
      * Fix a bunch more.
      
      * clean stray debug stuff
      
      * Update primitives/phragmen/src/lib.rs
      
      Co-Authored-By: default avatarthiolliere <[email protected]>
      
      * fix range function
      
      * fix number generator
      
      Co-authored-by: default avatarthiolliere <[email protected]>
      762c741c
  16. Apr 16, 2020
  17. Apr 15, 2020
  18. Apr 14, 2020
  19. Apr 11, 2020
  20. Apr 09, 2020
  21. Apr 08, 2020
  22. Apr 07, 2020
    • Marcio Diaz's avatar
      Benchmark Offences Pallet (#5411) · fb9bbf30
      Marcio Diaz authored
      * Add initial report_ofence bench.
      
      * Remove unused imports
      
      * Style nit
      
      * Add nominators
      
      * Remove logs.
      
      * Nits.
      
      * Add nominators param.
      
      * Reorg, comment.
      
      * Remove whitespaces.
      
      * Apply review suggestion: move benchmark to own crate.
      
      * Remove import.
      
      * Remove line.
      
      * Add feature flag.
      
      * Pass can_report.
      
      * Cleaning up.
      
      * More cleaning
      fb9bbf30
    • Shawn Tabrizi's avatar
      Generate Unit Tests for Benchmarks (#5527) · d3cc0514
      Shawn Tabrizi authored
      * Update to latest staking
      
      * generate tests for benchmarking
      
      * add tests, fix warnings
      
      * starting on democracy
      
      * impl_benchmark_tests
      
      * Way more readable
      
      * add test feature flag (does this work?)
      
      * Fix `successful_origin` impl
      
      * democracry benchmark tests
      
      * Fix example benchmarks, add tests
      
      * identity benchmark tests
      
      * Update im-online benchmark tests
      
      * try to add session benchmarking tests (problem with mock)
      
      * staking and timestamp
      
      * add test for treasury, issue with dynamic contains
      
      * utility
      
      * Vesting
      
      * test instead of check
      
      * hide until we figure out what is wrong
      
      * add docs
      
      * close code
      
      * Create custom mock for session-pallet-benchmarking
      
      * Use refcell pattern
      
      * make un-pub
      
      * test-linux-stable includes `runtime-benchmarks` feature
      
      * Revert "test-linux-stable includes `runtime-benchmarks` feature"
      
      This reverts commit a2dab38abd18ac3eb8a6220e4a00e687740bd38c.
      
      * run tests in `--release`
      
      * undo balance change
      
      * build wasm
      d3cc0514
  23. Apr 05, 2020
  24. Apr 04, 2020
    • Shawn Tabrizi's avatar
      Simple Staking Payouts (#5406) · 6847f845
      Shawn Tabrizi authored
      
      
      * Simple Payouts
      
      * explicit test for out of order claiming
      
      * Add `payout_all` benchmark
      
      * Fix merge
      
      * add docs
      
      * change event to controller
      
      * Fix timestamp test warnings
      
      * Revert "change event to controller"
      
      This reverts commit 5d4a97832d47fe1273602d5410774d5421940c4e.
      
      * Update Reward event doc
      
      * Add "non-production" test
      
      * add unlock chunk to test
      
      * fix merge
      
      * End payout early if no reward points
      
      * payout_validator -> payout_stakers
      
      * bring back payout nominator/validator, but limit their use to before migration era
      
      * Add test for before migration
      
      * New payout works for the era that we migrate
      
      * Fix logic, check that migration era works
      
      * Migrate Era tests (copypasta)
      
      * Move comment
      
      * Add mock back to external functions
      
      * Fixes based on review from gui
      
      * Update Cargo.lock
      
      * Update Cargo.lock
      
      * small docs update
      
      Co-authored-by: default avatarjoepetrowski <[email protected]>
      6847f845
    • Gavin Wood's avatar
      EnsureOrigin is a frame abstraction - it should be in frame_support (#5521) · 7c0fa837
      Gavin Wood authored
      * EnsureOrigin is a frame abstraction - it should be in frame_support
      
      * Fixes
      7c0fa837
  25. Apr 03, 2020
  26. Mar 31, 2020
  27. Mar 30, 2020
  28. Mar 28, 2020
  29. Mar 27, 2020