-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Conversation
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will add it once the operational stuff is merged in.
srml/executive/src/lib.rs
Outdated
@@ -435,12 +429,17 @@ mod tests { | |||
} | |||
} | |||
|
|||
type SignedExtra = (system::CheckNonce<Runtime>, balances::TakeFees<Runtime>); | |||
type SignedExtra = node_runtime::SignedExtra<Runtime>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
node/cli/src/factory_impl.rs
Outdated
@@ -51,6 +51,16 @@ pub struct FactoryState<N> { | |||
|
|||
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> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
* 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.
* 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 <[email protected]> * Scale weights by 1000. * Bump. * Fix decl_storage test.
To be mixed with #3102.