Skip to content

Custom MCMS Proposal duration#20577

Merged
vyzaldysanchez merged 3 commits intodevelopfrom
task/CRE-1486/custom-mcms-proposal-timeout
Dec 10, 2025
Merged

Custom MCMS Proposal duration#20577
vyzaldysanchez merged 3 commits intodevelopfrom
task/CRE-1486/custom-mcms-proposal-timeout

Conversation

@vyzaldysanchez
Copy link
Contributor

@vyzaldysanchez vyzaldysanchez commented Dec 10, 2025

This addresses CRE-1486 by extending the MCMS Config struct to receive a ValidUntil value which allows the caller to set any proposal duration, aside from the default of 72 hrs.

Requires

Supports

@vyzaldysanchez vyzaldysanchez changed the title Adds custom proposal valid until Custom MCMS Proposal duration Dec 10, 2025
@trunk-io
Copy link

trunk-io bot commented Dec 10, 2025

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

MCMSAction types.TimelockAction `json:"mcmsAction"`
OverrideRoot bool `json:"overrideRoot"` // if true, override the previous root with the new one.
TimelockQualifierPerChain map[uint64]string `json:"timelockQualifierPerChain,omitempty"` // optional qualifier to fetch timelock address from datastore
ValidUntil *time.Duration `json:"validUntil" yaml:"validUntil"`
Copy link
Contributor

Choose a reason for hiding this comment

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

nit/ name should be ValidDuration

validUntil reads like a user can set a date and time

@vyzaldysanchez vyzaldysanchez marked this pull request as ready for review December 10, 2025 15:49
@vyzaldysanchez vyzaldysanchez requested review from a team as code owners December 10, 2025 15:49
Copilot AI review requested due to automatic review settings December 10, 2025 15:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for custom proposal durations in MCMS configurations by introducing a ValidDuration field. Previously, all proposals used a fixed 72-hour duration; now callers can specify any duration they need.

  • Added ValidDuration field to TimelockConfig struct to allow custom proposal durations
  • Updated proposal building logic to use custom duration when provided, falling back to default when not
  • Added test coverage to verify custom duration functionality

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
deployment/cre/contracts/contracts.go Reorganized imports (formatting only)
deployment/cre/common/strategies/mcms_transaction_test.go Added test case for custom ValidDuration behavior
deployment/common/proposalutils/propose.go Added ValidDuration field and updated proposal building to use custom duration

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

MCMSAction types.TimelockAction `json:"mcmsAction"`
OverrideRoot bool `json:"overrideRoot"` // if true, override the previous root with the new one.
TimelockQualifierPerChain map[uint64]string `json:"timelockQualifierPerChain,omitempty"` // optional qualifier to fetch timelock address from datastore
ValidDuration *time.Duration `json:"validDuration" yaml:"validDuration"`
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe rename to validUntil to match the name of the attribute in the proposal itself?

Copy link
Contributor

Choose a reason for hiding this comment

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

oh, nevermind. I see the semantic is different. It's a duration, not a timestamp.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think this should be the case. The proposal field contains the full duration (NOW seconds + whatever time duration we set), and the config we are adding just contains the extra time we are adding to the NOW seconds.

So each one has its own meaning.

@cl-sonarqube-production
Copy link

@vyzaldysanchez vyzaldysanchez added this pull request to the merge queue Dec 10, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 10, 2025
@vyzaldysanchez vyzaldysanchez added this pull request to the merge queue Dec 10, 2025
Merged via the queue into develop with commit 9911544 Dec 10, 2025
277 of 279 checks passed
@vyzaldysanchez vyzaldysanchez deleted the task/CRE-1486/custom-mcms-proposal-timeout branch December 10, 2025 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants