Skip to content

Use configuration value in place of hard coded constants for TEE_UPGRADE_PERIOD #994

@DSharifi

Description

@DSharifi

Background

In proposal.rs we have a hard-coded constant for the duration an old MPC image hash is considered valid during the grace period where it superseded by a new image hash.

const TEE_UPGRADE_PERIOD: BlockHeight = 7 * 24 * 60 * 100; // ~7 days @ block time of 600 ms, e.g. 100 blocks every 60 seconds

We'd like to use a configuration value instead of a hard-coded constant for two reasons:

  • We want to be able to tune the deadline for a graceful upgrade period in production without having to upgrade the whole contract.
  • For test purposes we'd like to be able to tune this graceful upgrade period, such that we can perform system and integration tests of this behavior.

User Story

No response

Acceptance Criteria

The const TEE_UPGRADE_PERIOD is removed and replaced with a runtime configurable value instead.

Resources & Additional Notes

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions