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

rejects client messages if client not in session #5566

Closed
wants to merge 1 commit into from

Conversation

hughy
Copy link
Contributor

@hughy hughy commented Oct 18, 2024

Summary

updates the multisig broker server to reject data submissions from clients that haven't joined the session

does not return session status if client not in session

sends an error message for 'NON_SESSION_CLIENT'

consolidates session validation logic to reduce repeated code

Closes IFL-3087

Testing Plan

  1. apply the diff below to forgo adding a client to the dkg session that it starts:
diff --git a/ironfish-cli/src/multisigBroker/server.ts b/ironfish-cli/src/multisigBroker/server.ts
index d5fdb00dc..4625ad0bd 100644
--- a/ironfish-cli/src/multisigBroker/server.ts
+++ b/ironfish-cli/src/multisigBroker/server.ts
@@ -480,7 +480,7 @@ export class MultisigServer {
     this.logger.debug(`Client ${client.id} started dkg session ${message.sessionId}`)
 
     client.identity = body.result.identity
-    this.addClientToSession(client, sessionId)
+    //this.addClientToSession(client, sessionId)
 
     this.send(client.socket, 'joined_session', message.sessionId, {
       challenge: session.challenge,
  1. start a multisig server
  2. start a dkg session in verbose mode
  3. see error messages from client not being in session

Documentation

Does this change require any updates to the Iron Fish Docs (ex. the RPC API
Reference
)? If yes, link a
related documentation pull request for the website.

[ ] Yes

Breaking Change

Is this a breaking change? If yes, add notes below on why this is breaking and label it with breaking-change-rpc or breaking-change-sdk.

[ ] Yes

updates the multisig broker server to reject data submissions from clients that
haven't joined the session

does not return session status if client not in session

sends an error message for 'NON_SESSION_CLIENT'

consolidates session validation logic to reduce repeated code
@hughy hughy requested a review from a team as a code owner October 18, 2024 23:17
@hughy hughy closed this Oct 21, 2024
@hughy hughy reopened this Oct 22, 2024
@hughy hughy closed this Oct 22, 2024
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.

1 participant