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

Moves polkadot/keystore to substrate #221

Merged
merged 3 commits into from
Jun 19, 2018
Merged

Conversation

0x7CFE
Copy link
Contributor

@0x7CFE 0x7CFE commented Jun 18, 2018

Previously keystore crate was part of the Polkadot since it was the only chain using ed25519.
However, Blitz protocol also uses ed25519, so it is useful to move keystore library to the Substrate.

@0x7CFE 0x7CFE added the A0-please_review Pull request needs code review. label Jun 18, 2018
@0x7CFE 0x7CFE self-assigned this Jun 18, 2018
@0x7CFE 0x7CFE requested a review from rphmeier June 18, 2018 15:27
@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
Copy link
Contributor

Choose a reason for hiding this comment

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

update doc comment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could you please clarify, what needs to be updated?

Copy link
Contributor

@rphmeier rphmeier Jun 18, 2018

Choose a reason for hiding this comment

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

it says Polkadot instead of substrate, that's all

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, currently there are a ton of sources in the substrate that mention Polkadot in their headers. So, they simply weren't refactored yet?

Copy link
Contributor

Choose a reason for hiding this comment

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

yep, substrate headers should say Substrate

@@ -1,11 +1,11 @@
[package]
name = "polkadot-keystore"
name = "substrate-keystore"
version = "0.1.0"
authors = ["Parity Technologies <robert@parity.io>"]
Copy link
Contributor

Choose a reason for hiding this comment

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

this one is my bad, sorry -- but we should fix the email to admin@parity.io

@gavofyork gavofyork merged commit d4649d2 into master Jun 19, 2018
@gavofyork gavofyork added A8-looksgood and removed A0-please_review Pull request needs code review. labels Jun 19, 2018
@gavofyork gavofyork deleted the dk-substrate-keystore branch June 19, 2018 09:28
JoshOrndorff pushed a commit to moonbeam-foundation/substrate that referenced this pull request Apr 21, 2021
liuchengxu pushed a commit to chainx-org/substrate that referenced this pull request Aug 23, 2021
* Add params name for deposit rpc(
liuchengxu pushed a commit to chainx-org/substrate that referenced this pull request Aug 23, 2021
1. add revoke_withdraw for XGatewayCommon to support user revoke their withdraw request
2. let `set_withdrawal_state` in XGatewayRecords could set any state and add test
3. add `force_replace_proposal_tx` allow trustee could replace an existed withdrawal tx
liuchengxu pushed a commit to autonomys/substrate that referenced this pull request Jun 3, 2022
Change overseer enablement check to authority role
helin6 pushed a commit to boolnetwork/substrate that referenced this pull request Jul 25, 2023
* Refactor event type decoding hand declartion

Fixes paritytech#196, paritytech#181, paritytech#28

## Dyanmic sized types

Before this change, the event decoder assume all the event types
have fixed sizes. Some counterexamples are: Hashes, AuthorityList.

In this change, instead of decoding by skipping the fixed-length bytes,
we introduce `type_segmenter` registry which decodes the raw event
bytes with the actual scale codec. So variable length types can be
handled correctly.

## New attribute for pallet type definition

In the past, trait associated type is the only way to add types to
the EventsDecoder implementation of a pallet. But in reality it's
common that the events in a pallet references some types not defined
in the trait associated types. Some examples are: `IdentificationTuple`
and `SessionIndex` in Session pallet.

In this change, we introduce more attributes to add the types:

```rust
#[module]
trait Pallet: System {
    #![event_type(SomeType)]
    #![event_alias(TypeNameAlias = SomeType)]
    #![event_alias(SomeOtherAlias = TypeWithAssociatedTypes<T>)]
}
```

## Tested

Compile with `nightly-2020-10-01`; smoke test to sync a full
Phala bockchain.

* Format code

* Make rustfmt::skip an outer attribute

* Ignore the sample code

* Alias the event segmenter closure

* Copy AuthorityList from sp_finality_grandpa

* Remove the unused static event type size

* Make segmenter as a trait, resue grandpa::Public

* Wrap PhantomData in struct TypeMarker
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.

3 participants