Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Conversation

@kianenigma
Copy link
Contributor

@kianenigma kianenigma commented Jul 16, 2019

built on top of #3115 and should be updated with it. Should only be marge after #3115 is merged.

  • Renames the #[weight] to a more generalized #[meta] tag which can carry static information about both weight, priority and basic functions on top of them. (pub type CallDescriptor = (Weight, TransactionPriority);-- okay name?)
  • Consequently refactors some occurrences of weight in the code to the more general structure.

Gist of the change being:

fn validate(
	&self,
	_who: &Self::AccountId,
	info: CallDescriptor,
) -> Result<ValidTransaction, DispatchError> {
	let (weight, priority) = info;
	Self::internal_check_weight(weight)?;
	Ok(ValidTransaction { priority, ..Default::default() })
}

where setting #[meta = WeightedTransaction::Operational()] simply boosts to your priority to infinity and drops your weight to Zero etc.

TODO:

  • allow CallMetadata to define will_cause_full_block() to guarantee operational txs will go through.

I will mark this as in-progress now since reviewing it is moot with the additional commits of #3115.

Also closes #3106

@kianenigma kianenigma added the A3-in_progress Pull request is in progress. No review needed at this stage. label Jul 16, 2019
@kianenigma kianenigma requested a review from gavofyork July 16, 2019 10:29
@gavofyork gavofyork mentioned this pull request Jul 16, 2019
11 tasks
@gavofyork
Copy link
Member

and drops your weight to Zero etc.

why would it do this? wouldn't that make the transaction free? what stops a dos/sybil attack?

@kianenigma
Copy link
Contributor Author

This needs to be started over again.

@kianenigma kianenigma closed this Jul 16, 2019
@kianenigma kianenigma deleted the kiz-port-operational-ext branch August 23, 2019 12:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

A3-in_progress Pull request is in progress. No review needed at this stage.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants