-
Notifications
You must be signed in to change notification settings - Fork 312
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
test staking #173
test staking #173
Conversation
…nbeam into amar-staking-tests
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.
I think this looks good and is ready. I left some comments below, but most of them were me learning out loud.
stake: Some(StakeConfig { stakers: vec![] }), | ||
stake: Some(StakeConfig { | ||
stakers: endowed_accounts | ||
.iter() | ||
.cloned() | ||
.map(|k| (k, None, 100_000)) | ||
.collect(), | ||
}), |
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.
So all of the endowed accounts are the initial stakers.
That means when we launch a parachain we have to give a particular CLI flag to include one of those accounts in the author inherent right? Can you give an example of what the collator command would look like?
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.
So all of the endowed accounts are the initial stakers.
Yes, that is correct.
we have to give a particular CLI flag to include one of those accounts in the author inherent right?
I guess presumably just like the node CLI which now has the --account-id
flag.
Can you give an example of what the collator command would look like?
Collator command to do what? To join the collator set or to author blocks?
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.
Imagine a new user hears of moonbeam and wants to try it out. They decide to run a simple standalone node. So the run moonbase-standalone --dev
. But now their chain doesn't work because no blocks meet the author inherent requirement. Doesn't it have to be moonbase-standalone --dev --author-id ???
?
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.
I think this should go with the --dev/alice/bob work
@@ -46,6 +47,7 @@ export async function startMoonbeamNode( | |||
`--no-telemetry`, | |||
`--no-prometheus`, | |||
`--manual-seal`, | |||
`--account-id=${GENESIS_ACCOUNT.substring(2)}`, // Required by author inherent |
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 would be nice to wire up the --dev
--alice
--bob
etc flags to work with the author inherent. I'm okay if that happens later though.
Co-authored-by: Joshy Orndorff <JoshOrndorff@users.noreply.github.com>
Co-authored-by: Joshy Orndorff <JoshOrndorff@users.noreply.github.com>
Co-authored-by: Joshy Orndorff <JoshOrndorff@users.noreply.github.com>
Co-authored-by: Joshy Orndorff <JoshOrndorff@users.noreply.github.com>
Co-authored-by: Joshy Orndorff <JoshOrndorff@users.noreply.github.com>
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.
Awesome work !! 🔥
I left few small comments
It is also missing to include the --author in the scripts and docker images I believe, but I can take care of that in another PR |
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 is really good. I think we identified a few little things to clean up, but I think they should be in followups so we can start experimenting with this work more easily. I support merging.
Remaining TODOs:
|
What does it do?
This is a follow up of #159 that builds on #162 . The primary goal of this PR is to automate calling
set_author
by every block producer when they produce a block so the author is necessarily set before every block is finalized.What important points reviewers should know?
Is there something left for follow-up PRs?
#179
#180
What alternative implementations were considered?
Are there relevant PRs or issues in other repositories (Substrate, Polkadot, Frontier, Cumulus)?
What value does it bring to the blockchain users?
Checklist