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

DRAFT: Update publishkeyshares to publishprivatekey #109

Merged
merged 2 commits into from
Jan 9, 2023

Conversation

knoll3
Copy link
Contributor

@knoll3 knoll3 commented Dec 9, 2022

Do not merge this. I would just like to get some eyes on it.

  • Updated the publishKeyShare function to accept a private key and renamed it to publishPrivateKey.
  • Added some tests for publishPrivateKey.
  • Updated the accuse function to receive signatures.

@@ -36,4 +36,10 @@ library LibTypes {
uint256 freeBond;
uint256 cursedBond;
}

struct Signature {
Copy link
Contributor

Choose a reason for hiding this comment

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

Think we're going to use this struct outside of thirdpartyfacet? If no, let's move it in there

// Recover the archaeologist's address from the signature. Note that the recoverAddress
// function will always return a valid address, even if the message does not match the
// signature.
address accusedArchaeologistAddress = LibUtils.recoverAddress(
Copy link
Contributor

Choose a reason for hiding this comment

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

This is going to recover the address corresponding to the public key the archaeologist has generated for the sarcophagus, but it's not going to be the same as the archaeologist's address.

We'll need to recover the full public key from the signature, then look up the archaeologist address given that public key in the new convenience mapping we're creating (publicKey=>archaeologistAddress)

@gh-23378 gh-23378 merged commit a931017 into main Jan 9, 2023
@sethhrbek sethhrbek deleted the update-publishkeyshares-to-publishprivatekey branch March 30, 2023 13:41
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