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

[Masternode] Offline signing endpoints #526

Open
wants to merge 3 commits into
base: release/1.1.0.0
Choose a base branch
from

Conversation

rowandh
Copy link
Contributor

@rowandh rowandh commented Apr 20, 2021

Add two new endpoints

  • Build the join message for signing
  • Broadcast the join transaction with a signed message

Add verification of the collateral signature

@rowandh rowandh force-pushed the offline-signing branch 2 times, most recently from 994875c to 2a11b18 Compare April 20, 2021 15:21
@fassadlr
Copy link
Contributor

Hi Rowan, what was the requirement for this? (Looks good though)

@rowandh
Copy link
Contributor Author

rowandh commented Apr 26, 2021

Nothing formal AFAIK, just thought it might be more useful to split the method up this way to enable an offline collateral address to join.

@@ -92,16 +72,76 @@ public async Task<PubKey> JoinFederationAsync(JoinFederationRequestModel request
throw new Exception($"The call to sign the join federation request failed: '{err.Message}'.");
}

if (!VerifyCollateralSignature(joinRequest))
Copy link
Collaborator

Choose a reason for hiding this comment

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

You check this inside BroadcastSignedJoinRequestAsync too - as that method gets called in two places it makes sense to keep the if inside it only

/// <summary>
/// Called by a miner wanting to join the federation.
/// </summary>
/// <param name="request">See <see cref="JoinFederationRequestModel"></see>.</param>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy pasted?

/// <summary>
/// Called by a miner wanting to join the federation.
/// </summary>
/// <param name="request">See <see cref="JoinFederationRequestModel"></see>.</param>
Copy link
Collaborator

Choose a reason for hiding this comment

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

JoinFederationRequestWithSignature?

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.

3 participants