Skip to content

Prepare new control flow around zone signing#499

Merged
bal-e merged 11 commits intomainfrom
signer-flow
Mar 12, 2026
Merged

Prepare new control flow around zone signing#499
bal-e merged 11 commits intomainfrom
signer-flow

Conversation

@bal-e
Copy link
Contributor

@bal-e bal-e commented Mar 3, 2026

This PR introduces src/signer, a module into which the zone signer module should eventually be refactored. It introduces the signer::zone model, which works very similarly to loader::zone; signing and re-signing operations can be enqueued and started when possible.

Signing operations need to be enqueued because the backing zone storage might be busy. I have built the enqueuing logic to account for limiting simultaneous signing operations, but that code was hard to extract from zone_signer.rs. I'll get to it later.

At the moment, none of the new functions are used anywhere. They need to wait until the actual signing code is adapted to use the SignedZoneBuilder, otherwise they risk deadlocking the zone storage state machine. The PR performing the actual integration will deal with that.

@bal-e bal-e requested review from tertsdiepraam and ximon18 March 3, 2026 18:23
@bal-e bal-e self-assigned this Mar 3, 2026
@bal-e
Copy link
Contributor Author

bal-e commented Mar 3, 2026

Hang on, force-pushing to resolve conflicts cleanly.

bal-e added 5 commits March 3, 2026 21:40
Over time, 'units/zone_signer.rs' will be split up into the 'signer'
directory. The first step is to add 'SignerState' for signing-related
per-zone state, and 'SignerZoneHandle' for signer-related operations.
These fields are part of refactoring how sign operations are stored
and enqueued. They also track the necessary 'SignedZoneBuilder's for
integrating with the new zone storage.
This is analogous to 'loader::refresh()'; it will serve as the top-level
signing function. Over time, the implementation in 'zone_signer.rs' will
be moved here and refactored.
Copy link
Member

@ximon18 ximon18 left a comment

Choose a reason for hiding this comment

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

LGTM, I find some names & comments confusing but perhaps that is just a consequence of this work being only part of the changes that are planned and that only the whole makes complete sense?

@ximon18 ximon18 added this to the 0.1.0-beta1 milestone Mar 9, 2026
bal-e added 5 commits March 11, 2026 10:21
- 'SigningTrigger' has been split into re-signing and non-re-signing
  variants, and moved to 'signer/mod.rs'.

- The newly introduced 'ResigningTrigger' specialization now allows
  multiple triggers to be accumulated.

- 'cascade_api::SigningTrigger' has been updated to match.

- All previous uses of 'SigningTrigger' are switched to the new version;
  where possible, 'crate::signer::SigningTrigger' is imported instead of
  'cascade_api::SigningTrigger'.

See <#499 (comment)>.
@bal-e bal-e requested a review from ximon18 March 11, 2026 10:44
"unsigned zone review approved",
SigningTrigger::KeySetModifiedAfterCron =>
"keyset cron modified keyset state",
SigningTrigger::Load => "loading a new instance",
Copy link
Member

Choose a reason for hiding this comment

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

Nit: This block and the block below look identical. Factor them out? I'm fine if you leave it as this is a knock-on effect of changes for prior review feedback and perfect is the enemy of getting this merged ;-)

@bal-e bal-e merged commit 6e8e61e into main Mar 12, 2026
9 checks passed
@bal-e bal-e deleted the signer-flow branch March 12, 2026 11:01
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