* Only check single extrinsics weight limit in validate_transaction.
* Add missing parameter to all pallets.
* Add tests, fix default configuration.
* Bump spec version.
* Use AvailableBlockRation to calculate MaxExtrinsicWeight
* transition treasury to configurable moduleids
* make election module id configurable
* convert runtime and pallet to accept module id config elections-phragmen
* add ModuleId to evm pallet
* change society pallet to configurable module id
* delete commented out module_id
* fix merge residual compile errors
* setup initial mock structure
* establish privelleged function test
* save progress
* first pass new_test_ext
* test sudo to make sure it error when non-root
* add set keys tests
* fix unused result from set_key call
* remove unused imports warnings
* pre master merge
* Expose BlockHashCount on system metadata constants (#5960)
* squash
* fix whitespace
* spelling and whitespace
* a single pesky space
* add logger module to mock
* add logger dispatch to privlleged function
* sub logger in for dummy functions
* create first of several event tests
* first pass at test coverage for events
* comment house keeping
* spell check
* Expose BlockHashCount on system metadata constants (#5960)
* establish privelleged function test
* save progress
* first pass new_test_ext
* test sudo to make sure it error when non-root
* add set keys tests
* fix unused result from set_key call
* remove unused imports warnings
* pre master merge
* squash
* fix whitespace
* spelling and whitespace
* a single pesky space
* add logger module to mock
* add logger dispatch to privlleged function
* sub logger in for dummy functions
* create first of several event tests
* first pass at test coverage for events
* comment house keeping
* implement last_seen_account storage item, event, and, logger function
* create vec account log and use in tests
* allow weight to be passed into account log
* refactor all log dispatchables
* save progress
* complete initial transition to refactored logger
* cleaning
* fix merge residual compile errors
setup initial mock structure
establish privelleged function test
save progress
first pass new_test_ext
test sudo to make sure it error when non-root
add set keys tests
fix unused result from set_key call
parent 5151bd784545ededa6153052a93fcc309f7b3885
author zeke <emostov@middlebury.edu> 1589076740 -0700
committer zeke <emostov@middlebury.edu> 1589350443 -0700
parent 5151bd784545ededa6153052a93fcc309f7b3885
author zeke <emostov@middlebury.edu> 1589076740 -0700
committer zeke <emostov@middlebury.edu> 1589350442 -0700
remove unused imports warnings
fix unused result from set_key call
remove unused imports warnings
pre master merge
Expose BlockHashCount on system metadata constants (#5960)
squash
fix whitespace
spelling and whitespace
a single pesky space
add logger module to mock
add logger dispatch to privlleged function
sub logger in for dummy functions
create first of several event tests
first pass at test coverage for events
comment house keeping
pre master merge
Expose BlockHashCount on system metadata constants (#5960)
Expose BlockHashCount on system metadata constants (#5960)
fix whitespace
spell check
implement last_seen_account storage item, event, and, logger function
create vec account log and use in tests
allow weight to be passed into account log
refactor all log dispatchables
save progress
complete initial transition to refactored logger
cleaning
* clean up
* cleaning
* condense non_privileged logs into 1 fn
* Apply suggestions from code review
Co-authored-by: Jaco Greeff <jacogr@gmail.com>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* Update system weights
* Use maximum block weight for scheduler
* Update offences to use full block
* Move weight inside if statement
* Add one read to offences `on_initialize`
* Delete factory test
* Revert "Delete factory test"
This reverts commit 8f95aacd63a028ef1b415185b45367b4140d86fd.
* Revert "Add one read to offences `on_initialize`"
This reverts commit 7df7ebc73625ed79b14086f13c247d4058ee87d6.
* Revert "Move weight inside if statement"
This reverts commit 87277d07913a7d1868eeee85ef4673f51ee4013b.
* Revert "Update offences to use full block"
This reverts commit 0bbe0ce18e9419b032157f7d37dea6481078cdc0.
* Use scheduler in Sudo
* Apply suggestions from code review
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
* Revert "Use scheduler in Sudo"
This reverts commit 95bd2768dfea100bdf682cf4fe6c0f46e8e1f66e.
* remove max extrinsic weight (it does nothing useful)
* fix tests
* introduce `sudo_unchecked_weight`
* bump spec version
* scheduler 80 percent of maximum
* Update `set_changes_trie_config` weight
* Update bin/node/runtime/src/lib.rs
* Update frame/democracy/src/tests.rs
* Update tests.rs
* update based on feedback
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
* 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: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
* 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: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
* Make Dispatchable return the actual weight consumed
Add PostInfo associated type to Dispatchable and have frame implement
Dispatchable { type PostInfo = PostDispatchInfo } where PostDispatchInfo
contains the actual weight consumed.
* Fix whitespace issues in docs
* Add passthrough weight to Sudo
* Bump spec version
* Passthrough `pays_fee`
* Sudo always pays fee
* Use `FunctionOf`
* Add support for closure in dispatch classification
* Update docs
* Make `decl_error!` errors usable
This pr implements support for returning errors of different pallets in
a pallet. These errors need to be declared with `decl_error!`.
The pr changes the following:
- Each dispatchable function now returns a `DispatchResult` which is an
alias for `Result<(), DispatchError>`.
- `DispatchError` is an enum that has 4 variants:
- `Other`: For storing string error messages
- `CannotLookup`: Variant that is returned when something returns a
`sp_runtime::LookupError`
- `BadOrigin`: Variant that is returned for any kind of bad origin
- `Module`: The error of a specific module. Contains the `index`,
`error` and the `message`. The index is the index of the module in
`construct_runtime!`. `error` is the index of the error in the error
enum declared by `decl_error!`. `message` is the message to the error
variant (this will not be encoded).
- `construct_runtime!` now creates a new struct `ModuleToIndex`. This
struct implements the trait `ModuleToIndex`.
- `frame_system::Trait` has a new associated type: `ModuleToIndex` that
expects the `ModuleToIndex` generated by `construct_runtime!`.
- All error strings returned in any module are being converted now to `DispatchError`.
- `BadOrigin` is the default error returned by any type that implements `EnsureOrigin`.
* Fix frame system benchmarks
* Adding script for rename, could be applicable for nodes on top of it, too
* add stderr and gitlab ci features
* apply script
* fix now minor details in expected stderr
* Update the Cargo.lock
* fix name: sc-transaction -> sc-tracing
* fix rename in script, too