stacks-network / stacks-core

The Stacks blockchain implementation
https://docs.stacks.co
GNU General Public License v3.0
3.01k stars 672 forks source link

Add tenure_extend_timestamp to Block Response Accept messages #5466

Closed jferrant closed 3 days ago

jferrant commented 6 days ago

Needed to complete https://github.com/stacks-network/stacks-core/issues/5434

jferrant commented 6 days ago

This needs to be backwards compatible - right now it'll fail if the payload doesn't have the timestamp. I think there's already a unit test with fixtures for backwards compatibility

I mean I can easily make this default fill the timestamp with u64::MAX if not found. Not sure that is considered backwards compatible enough. I don't actually see why this has to be backwards compatible though. It would of course require signers to upgrade, by why does this need to be backwards compatible? (I just assumed not required as we do not back process Block Responses nor do we store them anywhere internally in the signers DB....EDIT: I think I just answered my question though. miners would have issues.)

obycode commented 6 days ago

I don't actually see why this has to be backwards compatible though.

Since we are doing this without a hard fork, miners that upgrade should be able to talk to signers that have not upgraded, and vice versa.

jferrant commented 6 days ago

I don't actually see why this has to be backwards compatible though.

Since we are doing this without a hard fork, miners that upgrade should be able to talk to signers that have not upgraded, and vice versa.

haha I just answered this in my own response to Hank right before I saw this XD

obycode commented 4 days ago

LGTM! Should we merge this into a broader feature branch? This PR itself is probably fine to merge into develop, but with other PRs we'll probably want some other base branch.

Yeah, that's a good point. Let's merge everything into feat/time-based-tenure-extend until we're ready.

I updated the target branch for this PR.