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

Remove footgun around session keys/handlers #3949

Merged
merged 2 commits into from
Oct 28, 2019
Merged

Conversation

bkchr
Copy link
Member

@bkchr bkchr commented Oct 28, 2019

  • OpaqueKeys now has an associated type KeyTypeIdProviders. This can
    be used in the runtime as input for SessionHandler from the session
    trait.
  • impl_opaque_keys now works with modules and extracts the KeyTypeId
    from the module directly.
  • Added some checks to the session storage initialization that checks
    that the SessionHandler and Keys use the same number of keys and
    that the order is equal.

- `OpaqueKeys` now has an associated type `KeyTypeIdProviders`. This can
be used in the runtime as input for `SessionHandler` from the session
trait.
- `impl_opaque_keys` now works with modules and extracts the `KeyTypeId`
from the module directly.
- Added some checks to the `session` storage initialization that checks
that the `SessionHandler` and `Keys` use the same number of keys and
that the order is equal.
@bkchr bkchr added the A0-please_review Pull request needs code review. label Oct 28, 2019
@@ -979,14 +979,14 @@ pub trait ValidateUnsigned {
fn validate_unsigned(call: &Self::Call) -> TransactionValidity;
}

/// Opaque datatype that may be destructured into a series of raw byte slices (which represent
/// Opaque datatype that may be destructed into a series of raw byte slices (which represent
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Destructured is correct here.

@rphmeier rphmeier added A8-looksgood and removed A0-please_review Pull request needs code review. labels Oct 28, 2019
@bkchr bkchr merged commit 43961e8 into master Oct 28, 2019
@bkchr bkchr deleted the bkchr-session-footgun branch October 28, 2019 23:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants