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

Add timestamp calculation to all block responses #5470

Conversation

jferrant
Copy link
Collaborator

@jferrant jferrant commented Nov 16, 2024

First pass. Haven't tested this at all and this was just first thoughts. EDIT: Initially way over-complicating things and assumed that we should respond to a block proposal based on who the current sortition winner is. However, if a miner proposes a block proposal that does not link to the correct consensus hash (odds are it will be rejected first off), it does not actually really matter. We will simply let the proposing miner know that the tenure extend for that timestamp has passed or not. It only matters that a valid sortition winner knows this for a valid proposal/valid attempt to tenure change. This simplified things a lot as I could just respond to every block proposal based on its provided consensus hash.

Signed-off-by: Jacinta Ferrant <jacinta@trustmachines.co>
@jferrant jferrant requested review from a team as code owners November 16, 2024 00:29
@jferrant jferrant marked this pull request as draft November 16, 2024 00:32
stacks-signer/src/config.rs Outdated Show resolved Hide resolved
stacks-signer/src/signerdb.rs Outdated Show resolved Hide resolved
stacks-signer/src/signerdb.rs Outdated Show resolved Hide resolved
@aldur
Copy link
Contributor

aldur commented Nov 18, 2024

Links to #5467

…tart

Signed-off-by: Jacinta Ferrant <jacinta@trustmachines.co>
Signed-off-by: Jacinta Ferrant <jacinta@trustmachines.co>
@jferrant jferrant requested a review from obycode November 18, 2024 18:53
…tamp

Signed-off-by: Jacinta Ferrant <jacinta@trustmachines.co>
@jferrant jferrant changed the base branch from chore/add-timestamp-to-block-response to feat/time-based-tenure-extend November 18, 2024 18:56
Signed-off-by: Jacinta Ferrant <jacinta@trustmachines.co>
@jferrant jferrant marked this pull request as ready for review November 18, 2024 18:59
@jferrant jferrant force-pushed the chore/calc-tenure-idle-timestamp-with-config branch from 6f6b4b6 to 32d7808 Compare November 18, 2024 20:13
Signed-off-by: Jacinta Ferrant <jacinta@trustmachines.co>
Copy link
Contributor

@hstove hstove 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 merged commit e138c37 into feat/time-based-tenure-extend Nov 18, 2024
11 checks 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 26, 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.

5 participants