Ensure macro blocks adhere to the block separation time of 1s - #3382
Ensure macro blocks adhere to the block separation time of 1s#3382sisou wants to merge 2 commits into
Conversation
|
Devnet Release Scenario run: https://github.com/nimiq/core-rs-albatross/actions/runs/14704410843 |
jsdanielh
left a comment
There was a problem hiding this comment.
Shouldn't we add a check for this in verify_macro_block_proposal?
|
No that would make it non-backward compatible. The beauty of this change is that old and new nodes will accept it (I think). Adding that check would make it a hard-fork. |
Mmm, then we could check for an acceptable range. Otherwise, we could accept any value there that could make the opposite effect. |
|
Have you tested that this has the desired effect? By what mechanism does this introduce a one second delay? Is it by making the next micro block producer wait two block separation times? Is the macro block not accepted/produced for another second due to this header change? |
|
I have not verified it. Would we worth a private testnet run to see if it works. I believe it produces the macro block directly (there's no waiting loop there like we have for the micro blocks) and then the next micro block waits 2 block times. If that's really how it works, can you please check if there is a limit for what the macro block timestamp can be in a proposal? Can it be set to 1 year in the future? |
2b68635 to
e32d4fc
Compare
|
I was looking into this again, and I believe this to be the actual easiest and smallest addition that can be made to make honest nodes adhere to the 1 second separation time floor.
This is already in effect. Timestamps within
That would be my assessment as well
There is a If there are no objections I will resurrect this PR and add a regression test to it. |
e32d4fc to
8691372
Compare
This fixes #3296.
Pull request checklist
clippyandrustfmtwarnings.