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 default multisig broker server #5520

Merged
merged 2 commits into from
Oct 9, 2024

Conversation

hughy
Copy link
Contributor

@hughy hughy commented Oct 8, 2024

Summary

changes '--server' to boolean flag in 'wallet:multisig:sign' and 'wallet:multisig:dkg:create'

adds '--hostname' and '--port' flags in place of previous '--server' flag to supply server hostname and port

defaults 'hostname' to 'multisig.ironfish.network' and 'port' to 9035

adds support for connection strings with '--connection' flag

adds util function to parse all connection options from flags

prints connection string to console after starting session

Closes IFL-3043

Testing Plan

? Enter a name for the multisig account: test0
? Enter the ID of a multisig session to join, or press enter to start a new session: 
? Enter the passphrase for the multisig session: test
? Enter the total number of participants: 2
? Enter the number of minimum signers: 2

Started new DKG session:
91b68c04-87ea-42c6-9f7a-4f9723f1e045

DKG session connection string:
tcp://91b68c04-87ea-42c6-9f7a-4f9723f1e045:test@multisig.ironfish.network:9035

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

changes '--server' to boolean flag in 'wallet:multisig:sign' and
'wallet:multisig:dkg:create'

adds '--hostname' and '--port' flags in place of previous '--server' flag to
supply server hostname and port

defaults 'hostname' to 'multisig.ironfish.network' and 'port' to 9035

adds support for connection strings with '--connection' flag

adds util function to parse all connection options from flags

prints connection string to console after starting session
@hughy hughy requested a review from a team as a code owner October 8, 2024 23:57
Copy link
Contributor

@mat-if mat-if left a comment

Choose a reason for hiding this comment

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

Some observations:

  • sessionId depends on server, so you cant do wallet:multisig:dkg:create --sessionId .... This made sense prior, but now, I wonder if a better experience would be to assume connection to a server if given a session id. I think this logic holds for passphrase as well.
  • The various permutations of the connection string appear to work (omitted session, and also omitted password on subsequent tries and it worked as expected) which was 👌
  • I alllllmost feel like we can do away with --server altogether, or combine server and host or something. Especially if all of the other flags imply server=true. I need to think through it more

@hughy
Copy link
Contributor Author

hughy commented Oct 9, 2024

* sessionId depends on server, so you cant do `wallet:multisig:dkg:create --sessionId ...`. This made sense prior, but now, I wonder if a better experience would be to assume connection to a server if given a session id. I think this logic holds for passphrase as well.

I'll update so that sessionId and passphrase don't depend on server and so that they imply server == true

* The various permutations of the connection string appear to work (omitted session, and also omitted password on subsequent tries and it worked as expected) which was 👌

👌👌

* I alllllmost feel like we can do away with `--server` altogether, or combine server and host or something. Especially if all of the other flags imply server=true. I need to think through it more

The only reason I can think of to keep --server is if you want to use a server, but you want to enter sessionId and passphrase through prompts 🤷

if a users sets the sessionId or passphrase flag in 'multisig:sign' or
'dkg:create', the commands will now interpret these flags as intent to use a
broker server
@hughy hughy merged commit 04d5cdb into staging Oct 9, 2024
9 checks passed
@hughy hughy deleted the feat/hughy/multisig-server-default branch October 9, 2024 22:05
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