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

Adds Proof of Possession for Node Staking Keys #457

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

joshuahannan
Copy link
Member

Based on #425
Moved to a new branch because of Git issues

Adds a PoP parameter to the addNodeRecord method in the staking contract.
In the NodeRecord init function, PoP is verified against the staking public key.

Also updates the locked tokens contract, staking collection, and all of their transactions to include this parameter

self.stakingCollectionRef = account.storage.borrow<auth(FlowStakingCollection.CollectionOwner) &FlowStakingCollection.StakingCollection>(from: FlowStakingCollection.StakingCollectionStoragePath)
?? panic(FlowStakingCollection.getCollectionMissingError(nil))

if let machineAccount = self.stakingCollectionRef.registerNode(
Copy link
Contributor

Choose a reason for hiding this comment

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

doesn't registerNode expect the PoP parameter? I guess we need registerNodeOld no?

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.

2 participants