-
Notifications
You must be signed in to change notification settings - Fork 191
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
make ecdsa optional for certain operations #522
base: master
Are you sure you want to change the base?
Conversation
@@ -117,6 +124,16 @@ func pluginOps(ctx *cli.Context) { | |||
} | |||
} | |||
|
|||
if config.Operation == plugin.OperationListQuorums { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
putting this operation before operator
is initialized since that require us to have private key. I am making minimal changes to make sure we make ecdsa optional here too.
@@ -117,6 +124,21 @@ func pluginOps(ctx *cli.Context) { | |||
} | |||
} | |||
|
|||
if config.Operation == plugin.OperationListQuorums { | |||
operatorAddress, err := tx.OperatorIDToAddress(context.Background(), operatorID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we should just use this to get address for all cases and not rely on private key?
@@ -117,6 +124,21 @@ func pluginOps(ctx *cli.Context) { | |||
} | |||
} | |||
|
|||
if config.Operation == plugin.OperationListQuorums { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why don't we put this block before declaring sk
and privateKey
? Then we don't need the block in L77, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about that but the reason is - this still require transactor
which requires ethConfig
which requires privateKey
- well privateKey
is just passed as config. One way is I create ethConfig
without privateKey and if we get to a point where privateKey
is needed for other ops and we read ecdsa key then I can add that config. would that be better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh but that won't work since transactor
will already be created by then. I don't think we want to create transactor
again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this separation actually make sense? like this is going to be the same binary for both mutation and read-only operations, unless there is use case setting up for only list-quorums
yea why not? I am assuming there are multiple types of operators - one who is probably okay using ecdsa key in this, other might want to just create payloads/ list quorums - which doesn't require ecdsa keys. I don't think so we want diff binary for these use cases as that will probably be more work on their end and having multiple binaries will only create more confusion |
The |
The other way to look at it: if there are more read-only operations to add, the code here will be bloated with a lot such if-else catches to support them. So my view on this is:
|
I still don't like the idea of two binaries per AVS - more binaries will make more effort on us to maintain plus on operators to use, plus other AVS might follow that and it might not be a good idea. Also as a probably a longer term - we should probably re-think nodeplugin - as in it can be just a binary which operators can download instead of docker image. |
What is the subcommand approach? "list-quorums" is separate already from "opt-in"? |
I mean right now it's not needed. but eventually if we add more commands, we might be able to group commands. Right now they are fine. |
Is using "list-quorums" on a separate machine than the one using opt-in/out needed right now? |
It could be - what if operator opts-in using smart contract operator (or other ways where ecdsa key is not in same machine?) and want to list quorums? They should be able to run this without ecdsa key and password |
I don't even see there is a solution for this. If you are also based on speculation, I'd not jump into it before I see this is actually needed. |
wdym by |
You are way over extraplating the point with principles as arguments. That doesn't help the discussion.
|
Why are these changes needed?
list-quorums
Checks