Skip to content

feat(canton): Implement timelock interfaces#636

Merged
rodrigombsoares merged 9 commits intocanton-mainfrom
implement-timelock-interfaces
Feb 27, 2026
Merged

feat(canton): Implement timelock interfaces#636
rodrigombsoares merged 9 commits intocanton-mainfrom
implement-timelock-interfaces

Conversation

@rodrigombsoares
Copy link
Contributor

@rodrigombsoares rodrigombsoares commented Feb 20, 2026

Summary

Implements all the interfaces for timelock on Canton.

This PR is based on #624

Major differences:

  • Using instanceAddress on methods instead of contractID and resolving CID inside the methods
    • This is necessary because CID will change on every step of a proposal execution (setRoot/schedule [each op]/executeBatch)
  • Removed unused cache in sdk/canton/inspector.go

@rodrigombsoares rodrigombsoares requested a review from a team as a code owner February 20, 2026 18:56
@changeset-bot
Copy link

changeset-bot bot commented Feb 20, 2026

⚠️ No Changeset found

Latest commit: 73bed59

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Comment on lines 44 to 45
PreOpCount uint64 `json:"preOpCount"`
PostOpCount uint64 `json:"postOpCount"`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do we use these for anything @RodrigoAD?

// suite.Run(t, new(cantone2e.MCMSExecutorTestSuite))
suite.Run(t, new(cantone2e.TimelockInspectionTestSuite))
suite.Run(t, new(cantone2e.TimelockProposalTestSuite))
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TODO: add canceler tests

TargetInstanceId: targetInstanceId,
FunctionName: functionName,
OperationData: opDataHex,
TargetCid: mcmAddress,
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 think this behavior of setting targetCids is going to fail, IMO the additionalFields should contain the instanceAddresses, not the contractIDs.

Imagine we execute two operations to the same contract in the same proposal, what is going to happen?
The problem with that is that both mcms.ExecuteOp and mcms.ExecuteScheduledBatch calls for CIDs, which are used onChain, how can we batch, for instance, two sequential calls to counter.Increment then?

@rodrigombsoares rodrigombsoares merged commit f8fb559 into canton-main Feb 27, 2026
1 check failed
@rodrigombsoares rodrigombsoares deleted the implement-timelock-interfaces branch February 27, 2026 19:07
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.

1 participant