1. May 26, 2020
  2. May 25, 2020
  3. May 23, 2020
  4. May 21, 2020
    • Alexander Theißen's avatar
      Allow fee calculation to happen off-chain (#6076) · 9dd21b1e
      Alexander Theißen authored
      
      
      * Emit a PaymentParameters event once per block
      
      This contains per-block paramaters need to calculate
      fees off-chain.
      
      * Add WeightToFee trait
      
      * Add documentation to polynomial types
      
      * Ignore pseudo code snippet for doc tests
      
      * Use `Mul` implementation of Perbill
      
      * Add tests for WeightToFeePolynomial
      
      * Revert "Emit a PaymentParameters event once per block"
      
      This reverts commit 6c4763baff3d8179676a3c1660fe7063fd56a8ca.
      
      Co-authored-by: default avatarGavin Wood <[email protected]>
      9dd21b1e
  5. May 19, 2020
  6. May 18, 2020
  7. May 16, 2020
  8. May 15, 2020
  9. 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
  10. May 11, 2020
  11. May 07, 2020
    • Shawn Tabrizi's avatar
      Extend Schedule Pallet for Root Scheduling/Canceling (#5907) · d8b7520a
      Shawn Tabrizi authored
      * Add root dispatch to scheduler
      
      * Move encode operation upwards
      
      * fix benchmark
      
      * extend extrinsics
      
      * add some clarifying comments
      
      * start to add benchmarking
      
      * finish weights
      
      * remove double encode
      
      * bump spec
      
      * Update weights
      
      * more accurate weights
      
      * bump base weight
      d8b7520a
  12. May 06, 2020
    • Dan Forbes's avatar
      Fix docs (#5928) · 848803ab
      Dan Forbes authored
      
      
      * Fix docs
      
      * Update frame/support/src/dispatch.rs
      
      Prettier link
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Update primitives/runtime/src/traits.rs
      
      Prettier link
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      848803ab
    • Bastian Köcher's avatar
      Make `Digest` support `StorageAppend` (#5922) · 7ee35f29
      Bastian Köcher authored
      
      
      * Make `Digest` support `StorageAppend`
      
      This adds support for `StorageAppend` to `Digest`. Digest is just a
      wrapper around a `Vec` and we abuse the fact that SCALE does not puts
      any special marker into the encoding for structs. So, we can just append
      to the encoded Digest. A test is added that ensures, if the `Digest`
      format ever changes, we remove this optimization.
      
      * Update weight
      
      * Update frame/support/src/storage/mod.rs
      
      Co-authored-by: default avatarAlexander Popiak <[email protected]>
      
      * Update frame/system/src/lib.rs
      
      Co-authored-by: default avatarAlexander Popiak <[email protected]>
      
      Co-authored-by: default avatarAlexander Popiak <[email protected]>
      7ee35f29
    • André Silva's avatar
      grandpa: report equivocations (#3868) · fbd2ac8f
      André Silva authored
      * session: runtime api for generating session membership proofs
      
      * grandpa: add runtime api for creating equivocation report txs
      
      * grandpa: submit signed equivocation report transactions
      
      * grandpa: use proper equivocation report type
      
      * grandpa: report equivocations
      
      * grandpa: validate equivocation proof
      
      * grandpa: update to finality-grandpa 0.9.1
      
      * grandpa: fix encoding of session membership proof
      
      * grandpa: initialize set id session mapping for genesis session
      
      * grandpa: fix bug in set_id session validation
      
      * fix compilation
      
      * cleanup from merge conflicts
      
      * cleanup crate tomls
      
      * grandpa: refactor equivocation handling to separate trait
      
      * node-template: fix compilation
      
      * fix test compilation
      
      * bump finality-grandpa to v0.10.2
      
      * rpc: fix runtime version test
      
      * CHERRY-PICK #4200: Add documentation to SubmitSignedTransaction and actually make it work
      
      Squashed commit of the following:
      
      commit 4f2cb0b1c588a06f2f3b478bb4b28b5cb29d54b9
      Author: Tomasz Drwięga <[email protected]>
      Date:   Tue Dec 3 16:29:33 2019 +0100
      
          Split the method to avoid confusing type error message.
      
      commit c5bf24eeaaf902add89ed1b046b22c4a4aaeb2cd
      Author: Tomasz Drwięga <[email protected]>
      Date:   Tue Dec 3 16:19:55 2019 +0100
      
          Make accounts optional, fix logic.
      
      commit 97db1ef556e023cf6847e5ffdb036c0e3ea6fb0a
      Author: Tomasz Drwięga <[email protected]>
      Date:   Tue Dec 3 10:06:20 2019 +0100
      
          Remove warning.
      
      commit 535f5c116d1a2e826eaf90c3f7e6798e443d61d8
      Merge: 516257217 0f1a5f65
      Author: Tomasz Drwięga <[email protected]>
      Date:   Tue Dec 3 07:08:05 2019 +0100
      
          Merge branch 'master' into td-signed-transactions
      
      commit 516257217bac89fcebd083712f4ea68b7b23b55a
      Merge: ac98248c6 2e68c80c
      Author: Tomasz Drwięga <[email protected]>
      Date:   Mon Dec 2 13:57:25 2019 +0100
      
          Merge branch 'master' into td-signed-transactions
      
      commit ac98248c6c56cff381130645a82a13d29933cf83
      Author: Tomasz Drwięga <[email protected]>
      Date:   Mon Nov 25 17:34:52 2019 +0100
      
          Forgotten import.
      
      commit 67a3c19031506c28e31c6bc4a90fff62d467dd58
      Author: Tomasz Drwięga <[email protected]>
      Date:   Mon Nov 25 17:32:10 2019 +0100
      
          Fix naming and bounds.
      
      commit 93e768ea9df97a4629fca1f9bc4b108fdb33f876
      Author: Tomasz Drwięga <[email protected]>
      Date:   Mon Nov 25 17:01:05 2019 +0100
      
          Add documentation to signed transactions and actually make them work.
      
      * grandpa: skip block initialization on report submission method
      
      * primitives: allow transaction pool access by default for offchain calls
      
      * grandpa: unused parameters
      
      * grandpa: remove unused method
      
      * grandpa: enable equivocation reporting
      
      * grandpa: add workaround for parameter encoding
      
      * grandpa: fix localized_payload calls in tests
      
      * fix submit_report_equivocation_extrinsic in runtimes
      
      * node: fix submit transaction test compilation
      
      * node: bump spec_version
      
      * rpc: fix api version test
      
      * grandpa: allow custom equivocation offence type
      
      * grandpa: add test for authorities::next_change_height
      
      * grandpa: cleanup report_equivocation function
      
      * node: move reporting app crypto to node-primitives
      
      * grandpa: move equivocation traits to own module
      
      * grandpa: rename app-crypto crate import
      
      * grandpa: export equivocation types
      
      * node: bump spec_version
      
      * grandpa: rename EquivocationReport to EquivocationProof
      
      * grandpa: add missing docs to primitives
      
      * grandpa: add missing docs to equivocation
      
      * node: fix compilation
      
      * grandpa: add missing docs to pallet
      
      * node: bump spec_version
      
      * fix whitespace
      
      * grandpa: return error on offence reporting
      
      * grandpa: expose session and validator count in proofs through traits
      
      * grandpa: use strong key in module KeyOwnerProofSystem
      
      * grandpa: move key ownership proof to grandpa runtime api
      
      * grandpa: remove unnecessary cloning when checking equivocation proof
      
      * grandpa: make report_equivocation a method in Environment
      
      * support: implement KeyOwnerProofSystem for ()
      
      * grandpa: move KeyOwnerProofSystem to module trait
      
      * test-utils: fix runtime compilation
      
      * grandpa: fix test compilation
      
      * grandpa: fix test compilation after merge
      
      * grandpa: simplify transaction submission types
      
      * grandpa: validate equivocation report in signed extension
      
      * client: fix test
      
      * node: use ValidateEquivocationReport signed extension
      
      * grandpa: expose key ownership proof under opaque type
      
      * grandpa: better docs on key ownership proofs
      
      * grandpa: add note about signed extension
      
      * grandpa: add ValidateEquivocationReport::new
      
      * grandpa: remove skip_initialize_block from runtime api
      
      * grandpa: use new offchain transaction submission API
      
      * grandpa: take set_id in generate_key_ownership_proof
      
      * grandpa: update to finality-grandpa v0.12.2
      
      * grandpa: cleanup usages of AuthoritySet::current
      
      * grandpa: fix test
      
      * grandpa: add mocking utilities for equivocation reporting
      
      * grandpa: add test for equivocation reporting
      
      * grandpa: move SetIdSession initialization
      
      * grandpa: add more tests
      
      * node: enable historical session manager
      
      * node: bump spec_version
      
      * node: use strong key types in KeyOwnerProofSystem definitions
      
      * grandpa: export GrandpaEquivocationOffence type
      fbd2ac8f
  13. May 05, 2020
  14. May 04, 2020
  15. Apr 29, 2020
    • Wei Tang's avatar
      Add support for modules to require inherent to be present (#5792) · 521f8ff4
      Wei Tang authored
      * Add support for modules to require inherent to be present
      
      * Bump node impl version
      
      * Allow is_inherent_required itself to return error
      
      This handles the case if runtime fails to check the inherent data (if the
      inherent data is invalid, etc).
      
      * typo: &module -> $module
      
      * fix: iter
      521f8ff4
  16. Apr 28, 2020
    • thiolliere's avatar
      Update treasury weights. (#5723) · 8b696093
      thiolliere authored
      * treasury weight formula
      
      * use max tippers count
      
      * doc
      
      * Fix upper bound
      
      * rounding a bit
      
      * remove unused + doc
      
      * as u64 -> as Weight
      
      * 2 significative digits rounded up
      
      * rename ContainsCountUpperBound -> ContainsLengthBound
      
      * add doc
      
      * sender account -> origin account
      
      * fix
      8b696093
  17. Apr 25, 2020
    • Tomasz Drwięga's avatar
      Compute weight only once. (#5780) · ef1c2d06
      Tomasz Drwięga authored
      ef1c2d06
    • 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
  18. Apr 24, 2020
  19. Apr 23, 2020
  20. Apr 22, 2020
  21. Apr 21, 2020
    • Bastian Köcher's avatar
      Require `fn` token in `decl_storage` `get` (#5717) · 20f211a6
      Bastian Köcher authored
      * Require `fn` token in `decl_storage` `get`
      
      The `fn` token was already for quite some time as an optional parameter.
      It was introduced to make these functions better findable. This pr makes
      the `fn` token required.
      
      * Remove `GetterNoFnkeyword`
      20f211a6
  22. Apr 20, 2020
  23. Apr 17, 2020
  24. Apr 16, 2020
  25. Apr 15, 2020