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

Signer should control which stackers can delegate to the signer #4247

Closed
friedger opened this issue Jan 16, 2024 · 14 comments · Fixed by #4277
Closed

Signer should control which stackers can delegate to the signer #4247

friedger opened this issue Jan 16, 2024 · 14 comments · Fixed by #4277

Comments

@friedger
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
For legal or other reasons, signers might not want to accept signing duties for some stackers who want to delegate signing to them.

Describe the solution you'd like

Describe alternatives you've considered

Additional context
@MarvinJanssen mentioned the issue first I think

@jcnelson
Copy link
Member

Stacking transactions would require a signature over the stacking function's arguments from the signing private key. The stacking function would authenticate the signature in order to validate the signing public key.

@kantai
Copy link
Member

kantai commented Jan 16, 2024

There's two possible ways to handle this:

  1. Require a signature from the public key. The public key would sign something like a serialization of the tx-sender and the current reward cycle.

  2. Require a public key allowance -- i.e., track which public key can be used by a tx-sender in a Clarity Map.

The advantage of (1) is that it simplifies the PoX contract. The advantage of (2) is that it doesn't require the signer to actually use their signing key before the stacking cycle starts.

@jcnelson
Copy link
Member

Another advantage of (1) is that you can change your key in the same transaction as you stack, so you don't have to worry about mempool congestion preventing you from rotating your signing key.

@hstove
Copy link
Contributor

hstove commented Jan 22, 2024

@saralab to assign me (hoping I can get added to the repo/org so I can add myself)

@diwakergupta
Copy link
Member

@saralab to assign me (hoping I can get added to the repo/org so I can add myself)

igotchu

@hstove hstove moved this from Status: 📋 Backlog to Status: 💻 In Progress in Stacks Core Eng Jan 23, 2024
@friedger
Copy link
Collaborator Author

Currently, Fast pool accepts any stacker as pool member. It is a self-service pool.
With the requirement to provide a signature the pool's self-service feature will break.

@hstove
Copy link
Contributor

hstove commented Jan 24, 2024

@friedger yes, but you should be able to build tooling to automatically generate signatures for anyone who wants to join.

@hstove hstove moved this from Status: 💻 In Progress to Status: In Review in Stacks Core Eng Jan 25, 2024
@hstove hstove moved this from Status: In Review to Status: 💻 In Progress in Stacks Core Eng Jan 26, 2024
@hstove hstove moved this from Status: 💻 In Progress to Status: In Review in Stacks Core Eng Jan 29, 2024
@MarvinJanssen
Copy link
Member

Per discussion during one of the engineering calls: does it make sense to an allow/deny mode for pools that are fine accepting anyone? Then if it is set to allow, no signatures are required. To me it really feels like an undue and risky burden to require pool operators to run a service exposed to the internet that produces these signatures.

I also want to challenge the framing of this problem. It is pretty easy for a blocked stacker to create a new address to stack from. How can a signer properly vet this in the end? I feel like forcing these signatures will bring little benefit but a lot of extra infrastructure cost.

Tagging the PR to create a reference to this issue: #4277

@hstove
Copy link
Contributor

hstove commented Jan 30, 2024

@MarvinJanssen, now that the signer key is only provided at stack-aggregation-commit, is this still really an issue? Stackers don't need the key or signature during their transactions, nor do pools need the key/sig for delegate-stack-stx etc. And because the signature is only needed on stack-agg-commit, it can be generated only occasionally and from a secure setup.

@MarvinJanssen
Copy link
Member

That's true. It would only remain for solo stacking which is a specific use-case. Nonetheless, the problem would remain there.

@friedger
Copy link
Collaborator Author

How does this work for solo stackers stacking for 12 cycles? Which key do they need to use as the signing key changes every cycle?

@hstove
Copy link
Contributor

hstove commented Feb 1, 2024

@friedger I don't think you need to rotate your signer key every cycle anymore - it only changes with -extend.

@friedger
Copy link
Collaborator Author

friedger commented Feb 1, 2024

If half of the stackers are solo stackers for 12 cycles and the other for 6. Then the first 6 cycles the aggregate public key is the same.
Thereafter, some stackers extend and the new key is created using the data from 6 cycles ago for the other stackers?

@saralab saralab moved this from Status: In Review to Status: ✅ Done in Stacks Core Eng Feb 8, 2024
@saralab saralab closed this as completed Feb 8, 2024
@blockstack-devops
Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@stacks-network stacks-network locked as resolved and limited conversation to collaborators Oct 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.