Skip to content

Conversation

@ceyonur
Copy link
Collaborator

@ceyonur ceyonur commented Sep 18, 2025

Why this should be merged

Adds the MinBlockDelayExcess to header and relevant places.

Note: this does not properly handle/enforce the verification + build path yet.

Closes: #1231

How this works

Adds the field to header, runs generate tools.

How this was tested

Added the field to existing tests

Need to be documented?

maybe as a part of bigger ACP-226

Need to update RELEASES.md?

updated

@ceyonur ceyonur added acp-226 granite Items related to the granite release. requires-subnet-evm-port labels Sep 18, 2025
@ceyonur ceyonur added this to the Granite milestone Sep 18, 2025
@ceyonur ceyonur changed the title Ceyonur/acp 226 add minblockdelayexcess to header ACP-226: Add MinBlockDelayExcess to header Sep 18, 2025
@ceyonur ceyonur force-pushed the ceyonur/acp-226-add-minblockdelayexcess-to-header branch from e29be64 to fa95632 Compare September 18, 2025 13:01
@ceyonur ceyonur marked this pull request as ready for review September 18, 2025 13:22
@ceyonur ceyonur requested a review from a team as a code owner September 18, 2025 13:22
@powerslider
Copy link
Contributor

Shouldn't the header be added in consensus/miner/worker.go as well:

if chainExtra.IsGranite(header.Time) {
        headerExtra := customtypes.GetHeaderExtra(header)
        headerExtra.TimeMilliseconds = &timestampMS

        // Initialize MinBlockDelayExcess so the field is present in post-Granite headers.
        if headerExtra.MinBlockDelayExcess == nil {
	        *headerExtra.MinBlockDelayExcess = 0
        }
}

@ceyonur
Copy link
Collaborator Author

ceyonur commented Sep 18, 2025

Shouldn't the header be added in consensus/miner/worker.go as well:

if chainExtra.IsGranite(header.Time) {
        headerExtra := customtypes.GetHeaderExtra(header)
        headerExtra.TimeMilliseconds = &timestampMS

        // Initialize MinBlockDelayExcess so the field is present in post-Granite headers.
        if headerExtra.MinBlockDelayExcess == nil {
	        *headerExtra.MinBlockDelayExcess = 0
        }
}

I did not add checks and build path here. This just defines the field and adds to only necessary places to make UT pass. Mainly because we can't properly verify and set it while this PR is still pending ava-labs/avalanchego#4289

@StephenButtolph StephenButtolph changed the title ACP-226: Add MinBlockDelayExcess to header ACP-226: Add MinDelayExcess to header Sep 19, 2025
@ceyonur ceyonur enabled auto-merge September 19, 2025 17:49
@ceyonur ceyonur added this pull request to the merge queue Sep 19, 2025
Merged via the queue into master with commit 44ae56a Sep 19, 2025
9 checks passed
@ceyonur ceyonur deleted the ceyonur/acp-226-add-minblockdelayexcess-to-header branch September 19, 2025 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

acp-226 granite Items related to the granite release. requires-subnet-evm-port

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add min block delay to header

4 participants