This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Weight Check signed extension.#3115
Merged
gavofyork merged 7 commits intogav-extensble-transactionsfrom Jul 16, 2019
Merged
Conversation
gavofyork
reviewed
Jul 15, 2019
gavofyork
reviewed
Jul 15, 2019
srml/system/src/lib.rs
Outdated
|
|
||
| impl<T: Trait + Send + Sync> SignedExtension for CheckWeight<T> { | ||
| type AccountId = T::AccountId; | ||
| // TODO TODO: make sure that this has to be here and not in validate. |
Member
There was a problem hiding this comment.
it should be in both; validate happens on the way from the txq into the authored block, pre_dispatch is when verifying an (already authored) block.
Contributor
Author
There was a problem hiding this comment.
will add it once the operational stuff is merged in.
kianenigma
commented
Jul 15, 2019
kianenigma
commented
Jul 15, 2019
gavofyork
reviewed
Jul 15, 2019
srml/executive/src/lib.rs
Outdated
| } | ||
|
|
||
| type SignedExtra = (system::CheckNonce<Runtime>, balances::TakeFees<Runtime>); | ||
| type SignedExtra = node_runtime::SignedExtra<Runtime>; |
Member
There was a problem hiding this comment.
this shouldn't be pulling in random types/configuration from node_runtime. it should formulate its own SignedExtra type as needed, just as it formulates its own config trait implementations.
kianenigma
commented
Jul 16, 2019
node/cli/src/factory_impl.rs
Outdated
| type Number = <<node_primitives::Block as BlockT>::Header as HeaderT>::Number; | ||
|
|
||
| impl<Number> FactoryState<Number> { | ||
| fn build_extra(index: node_primitives::Index, phase: u64) -> node_runtime::SignedExtra<Runtime> { |
Contributor
Author
There was a problem hiding this comment.
@gavofyork how about this? The factory seems to be an attachment that only works with substrate node and it should be fine to borrow this type.
11 tasks
1 task
gavofyork
reviewed
Jul 16, 2019
gavofyork
reviewed
Jul 16, 2019
gavofyork
reviewed
Jul 16, 2019
gavofyork
approved these changes
Jul 16, 2019
kianenigma
pushed a commit
that referenced
this pull request
Jul 22, 2019
* Make extrinsics extensible. Also Remove old extrinsic types. * Rest of mockup. Add tips. * Fix some build issues * Runtiem builds :) * Substrate builds. * Fix a doc test * Compact encoding * Extract out the era logic into an extension * Weight Check signed extension. (#3115) * Weight signed extension. * Revert a bit + test for check era. * Update Cargo.toml * Update node/cli/src/factory_impl.rs * Update node/executor/src/lib.rs * Update node/executor/src/lib.rs * Don't use len for weight - use data. * Operational Transaction; second attempt (#3138) * working poc added. * some fixes. * Update doc. * Fix all tests + final logic. * more refactoring. * nits. * System block limit in bytes. * Silent the storage macro warnings. * More logic more tests. * Fix import. * Refactor names. * Fix build. * Update srml/balances/src/lib.rs * Final refactor. * Bump transaction version * Fix weight mult test. * Fix more tests and improve doc. * Bump. * Make some tests work again. * Fix subkey. * Remove todos + bump. * Ignore expensive test. * Bump.
bkchr
pushed a commit
that referenced
this pull request
Jul 25, 2019
* Make extrinsics extensible. Also Remove old extrinsic types. * Rest of mockup. Add tips. * Fix some build issues * Runtiem builds :) * Substrate builds. * Fix a doc test * Compact encoding * Extract out the era logic into an extension * Weight Check signed extension. (#3115) * Weight signed extension. * Revert a bit + test for check era. * Update Cargo.toml * Update node/cli/src/factory_impl.rs * Update node/executor/src/lib.rs * Update node/executor/src/lib.rs * Don't use len for weight - use data. * Operational Transaction; second attempt (#3138) * working poc added. * some fixes. * Update doc. * Fix all tests + final logic. * more refactoring. * nits. * System block limit in bytes. * Silent the storage macro warnings. * More logic more tests. * Fix import. * Refactor names. * Fix build. * Update srml/balances/src/lib.rs * Final refactor. * Bump transaction version * Fix weight mult test. * Fix more tests and improve doc. * Bump. * Make some tests work again. * Fix subkey. * Remove todos + bump. * First draft of annotating weights. * Refactor weight to u64. * More refactoring and tests. * New convert for weight to fee * more tests. * remove merge redundancy. * Fix system test. * Bring back subkey stuff. * a few stress tests. * fix some of the grumbles. * Final nits. * Update srml/system/src/lib.rs Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com> * Scale weights by 1000. * Bump. * Fix decl_storage test.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
To be mixed with #3102.