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

Feat/signer track validation submission with config timeout #5409

Merged

Conversation

jferrant
Copy link
Collaborator

@jferrant jferrant commented Oct 30, 2024

Closes #5408

Signed-off-by: Jacinta Ferrant <[email protected]>
stacks-signer/src/config.rs Outdated Show resolved Hide resolved
stacks-signer/src/config.rs Outdated Show resolved Hide resolved
stacks-signer/src/v0/signer.rs Outdated Show resolved Hide resolved
stacks-signer/src/v0/signer.rs Outdated Show resolved Hide resolved
stacks-signer/src/v0/signer.rs Outdated Show resolved Hide resolved
stacks-signer/src/v0/signer.rs Outdated Show resolved Hide resolved
stacks-signer/src/v0/signer.rs Outdated Show resolved Hide resolved
stacks-signer/src/v0/signer.rs Show resolved Hide resolved
stacks-signer/src/v0/signer.rs Show resolved Hide resolved
testnet/stacks-node/src/tests/signer/v0.rs Outdated Show resolved Hide resolved
@jferrant jferrant marked this pull request as ready for review October 31, 2024 16:53
@jferrant jferrant requested review from a team as code owners October 31, 2024 16:53
@jferrant jferrant requested a review from obycode October 31, 2024 16:53
… into feat/signer-track-validation-submission-with-config-timeout
@kantai
Copy link
Member

kantai commented Nov 1, 2024

I'm a little wary of this change -- if the stacks-node is slow to respond to a block proposal, returning a rejection from the signer doesn't necessarily improve performance: the stacks-node is still going to be working on that proposal, and so the signer isn't really free to consider other proposals at that point.

@hstove
Copy link
Contributor

hstove commented Nov 1, 2024

I'm a little wary of this change -- if the stacks-node is slow to respond to a block proposal, returning a rejection from the signer doesn't necessarily improve performance: the stacks-node is still going to be working on that proposal, and so the signer isn't really free to consider other proposals at that point.

Probably a good point - would it be better to have the timeout on the stacks-node?

@obycode
Copy link
Contributor

obycode commented Nov 1, 2024

Probably a good point - would it be better to have the timeout on the stacks-node?

Yeah, that's a good idea. When processing requests, if it sees a block validation request from greater than X seconds ago (may need to add a timestamp in the request), quickly respond with an error code so the node doesn't spend any time doing the validation if the block is already too old.

But should the signer still have some mechanism to timeout if the node never responds? What if the node crashed and restarted and the request was dropped?

@jferrant
Copy link
Collaborator Author

jferrant commented Nov 4, 2024

Probably a good point - would it be better to have the timeout on the stacks-node?

Yeah, that's a good idea. When processing requests, if it sees a block validation request from greater than X seconds ago (may need to add a timestamp in the request), quickly respond with an error code so the node doesn't spend any time doing the validation if the block is already too old.

But should the signer still have some mechanism to timeout if the node never responds? What if the node crashed and restarted and the request was dropped?

I have created a ticket for this #5439

stacks-signer/src/config.rs Outdated Show resolved Hide resolved
stacks-signer/src/config.rs Outdated Show resolved Hide resolved
Signed-off-by: Jacinta Ferrant <[email protected]>
… into feat/signer-track-validation-submission-with-config-timeout
Signed-off-by: Jacinta Ferrant <[email protected]>
… into feat/signer-track-validation-submission-with-config-timeout
… into feat/signer-track-validation-submission-with-config-timeout
Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
… into feat/signer-track-validation-submission-with-config-timeout
Copy link
Contributor

@obycode obycode left a comment

Choose a reason for hiding this comment

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

LGTM

@jferrant jferrant added this pull request to the merge queue Nov 12, 2024
Merged via the queue into develop with commit 6e0bd5a Nov 12, 2024
1 check passed
@blockstack-devops
Copy link
Contributor

This pull request 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 Nov 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants