Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Staking Messages #21

Closed
wants to merge 2 commits into from
Closed

Conversation

xlc
Copy link
Contributor

@xlc xlc commented Mar 11, 2021

Closes #11

cc @kianenigma

Copy link
Contributor Author

@xlc xlc left a comment

Choose a reason for hiding this comment

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

I don't want to just mimic the extrinsic of staking pallet and hoping to come out something more friendly in crosschain context. So I have modified the interfaces and dropped the controller concept which I don't think it makes much sense in crosschain staking context.


##### `SetPayee`

- `payee: RewardDestination`: The destination account for payment.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

How are we going to define RewardDestination? Do we want to mimic the Substrate Staking pallet?

Choose a reason for hiding this comment

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

I am not very familiar with XCM: what are the assumptions? That we have two any arbitrary chains talking to each other, or two substrate based chains, or two FRAME-based chains?

If not the former, then the design of this can be reflected on pallet-staking, and we can make sure that things that are noted here will rarely change in pallet-staking.

Although, my guess is that this is totally generic over chain and we can't make an assumption about the existence of pallet-staking

Copy link
Contributor

Choose a reason for hiding this comment

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

Any two arbitrary chains.


##### `Nominate`

- `targets: Vec<MultiLocation>`: Declare the desire to nominate `targets`.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is AccountId on Kusama / Polkadot. Not too sure how we going to define it here. This must be dest chain account type and MultiLocation allow people to enter all kinds of accounts.

Copy link
Contributor

Choose a reason for hiding this comment

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

Think of XCM as a language; there's no need for every sentence to be true or even to make sense. XCM just let's you express ideas in an unambiguous way - it's up to the destination chain to decide what those mean in its context.

In this case, it's perfectly reasonable for a substrate chain to require this MultiLocation to be specifically an AccountId32 type, and to bail on anything else.


Kind: *Instruction*.

##### `Rebond`

Choose a reason for hiding this comment

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

FYI if the goal is to be general: this is assuming the existence of a bonding duration in which you can rebond your tokens. While unlikely, some chains might not have this. Or, if this applies also to the notion of delegators, they usually don't have any bonding duration applied.

Copy link
Contributor

Choose a reason for hiding this comment

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

XCM aims to be general, exhaustive and composable.

- `10`: `HrmpInitOpenChannel`
- `11`: `HrmpAcceptOpenChannel`
- `12`: `HrmpCloseChannel`
- `13`: `Staking`
Copy link
Contributor

Choose a reason for hiding this comment

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

Just put the different message types right in here.

@xlc
Copy link
Contributor Author

xlc commented Mar 11, 2021

This can't be a generic staking format and much more study will be required to build one. Close for now.

@xlc xlc closed this Mar 11, 2021
@xlc xlc deleted the staking branch March 11, 2021 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Staking related message
3 participants