Skip to content

SGX to TDX#140

Draft
eladiosch wants to merge 32 commits intohoodi-deploymentfrom
feat/tdx
Draft

SGX to TDX#140
eladiosch wants to merge 32 commits intohoodi-deploymentfrom
feat/tdx

Conversation

@eladiosch
Copy link
Contributor

This PRs modifies GuardianModule to use the new TDX instead of the deprecated SGX

@eladiosch eladiosch requested a review from ksatyarth2 February 3, 2026 11:13
@@ -51,46 +56,29 @@ contract GuardianModule is AccessManaged, IGuardianModule {
*/
uint256 internal _threshold;
Copy link
Contributor

Choose a reason for hiding this comment

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

a better natspec for this variable like _ejectionThreshold

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

import { ALGO_ID_ES256K } from "@automata-network/automata-tee-workload-measurement/types/Constants.sol";

/**
* @title Guardian module
Copy link
Contributor

Choose a reason for hiding this comment

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

change natspec description to remove enclave keys

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

* @notice Thrown if the Commitment does not match the workload verifier
* @dev Signature "0x5054097b"
*/
error CommitmentMismatch();
Copy link
Contributor

Choose a reason for hiding this comment

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

unused error

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed

* @notice Thrown if the GoldenMeasurement is not valid
* @dev Signature "0x69e9d3ba"
*/
error InvalidMeasurement();
Copy link
Contributor

Choose a reason for hiding this comment

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

unsused error

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed

* @notice Thrown if the data is not valid
* @dev Signature "0x5cb045db"
*/
error InvalidData();
Copy link
Contributor

Choose a reason for hiding this comment

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

check for unused errors

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed

* @dev Signature "0x6e41f97e85009a93fbd7a9e9c885b782819739d41a903d21bb4ad7a40d1af83a"
*/
event MrSignerChanged(bytes32 oldMrSigner, bytes32 newMrSigner);
event RotatedGuardianKey(bytes32 ownerFingerprint, address computedAddress);
Copy link
Contributor

Choose a reason for hiding this comment

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

unused event

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed

emit MrSignerChanged(_mrsigner, newMrSigner);
_mrenclave = newMrEnclave;
_mrsigner = newMrSigner;
function setAllowedWorkload(bytes32 workloadId, bool allowed) external restricted {
Copy link
Contributor

Choose a reason for hiding this comment

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

check for workloadId != 0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Check added to code and test

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.

2 participants