Skip to content

Add onchain committee handoff certs for reconfig#631

Draft
dlukegordon wants to merge 1 commit into
mainfrom
lukegordon/iop-421-add-onchain-guardian-handoff-certs-for-reconfig
Draft

Add onchain committee handoff certs for reconfig#631
dlukegordon wants to merge 1 commit into
mainfrom
lukegordon/iop-421-add-onchain-guardian-handoff-certs-for-reconfig

Conversation

@dlukegordon

Copy link
Copy Markdown
Contributor

No description provided.

@dlukegordon dlukegordon requested a review from bmwill as a code owner June 1, 2026 18:30
@dlukegordon dlukegordon marked this pull request as draft June 1, 2026 18:30
@dlukegordon dlukegordon force-pushed the lukegordon/iop-421-add-onchain-guardian-handoff-certs-for-reconfig branch 3 times, most recently from 19b604f to 877fd9a Compare June 1, 2026 18:43
@dlukegordon dlukegordon force-pushed the lukegordon/iop-421-add-onchain-guardian-handoff-certs-for-reconfig branch from 877fd9a to 2c08766 Compare June 1, 2026 19:07
@dlukegordon dlukegordon changed the title Add onchain guardian handoff certs for reconfig Add onchain committee handoff certs for reconfig Jun 2, 2026
@dlukegordon dlukegordon force-pushed the lukegordon/iop-421-add-onchain-guardian-handoff-certs-for-reconfig branch 3 times, most recently from 19db66d to 8367685 Compare June 8, 2026 15:46
@dlukegordon dlukegordon force-pushed the lukegordon/iop-421-add-onchain-guardian-handoff-certs-for-reconfig branch 2 times, most recently from 2877ad1 to f8eda6d Compare June 12, 2026 19:27
Comment on lines 42 to 47
entry fun end_reconfig(
self: &mut Hashi,
mpc_public_key: vector<u8>,
cert: CommitteeSignature,
mpc_cert: CommitteeSignature,
guardian_handoff_cert: CommitteeSignature,
ctx: &TxContext,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we may want to actually break this up into a pre-step that can run in parallel with the mpc key resharing.

We can have the old committee submit their handoff cert (i would probably just drop the "guardian" from the name) and then store that in pending_epoch_change (we can expand that from being just an Option) and then on end_reconfig we require that to be present (when not doing genesis/dkg) at which point we can store the sig

members: sui::bag::new(ctx),
epoch: 0,
committees: sui::bag::new(ctx),
guardian_handoffs: sui::bag::new(ctx),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

idk if we need to have a whole new bag, we could always just store it the committees bag using a Handoff { epoch } key.

@bmwill

bmwill commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

@Bridgerz can you also take a look at this PR.

@zhouwfang

Copy link
Copy Markdown
Contributor

Is this PR ready for review or still a draft?

@dlukegordon

Copy link
Copy Markdown
Contributor Author

Is this PR ready for review or still a draft?

@zhouwfang It is a draft since I don't think it's ready to merge yet, but I'd like people's opinion on the general approach here.

@dlukegordon dlukegordon force-pushed the lukegordon/iop-421-add-onchain-guardian-handoff-certs-for-reconfig branch from f8eda6d to 114c189 Compare June 17, 2026 18:58
@zhouwfang

zhouwfang commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Is this PR ready for review or still a draft?

@zhouwfang It is a draft since I don't think it's ready to merge yet, but I'd like people's opinion on the general approach here.

I see. My previous understanding of a draft was "work in progress" and not "ready for review" according to github definition:
Screenshot 2026-06-17 at 12 03 33 PM

Happy to take a look.

@dlukegordon

Copy link
Copy Markdown
Contributor Author

Is this PR ready for review or still a draft?

@zhouwfang It is a draft since I don't think it's ready to merge yet, but I'd like people's opinion on the general approach here.

I see. My previous understanding of a draft was "work in progress" and not "ready for review" according github definition: Screenshot 2026-06-17 at 12 03 33 PM

Happy to take a look.

Thank you, yes that is the normal definition and I guess I am being confusing.

self.verify_with_committee(next_committee, message, cert);
self.verify_with_committee(next_committee, message, mpc_cert);

self.verify_with_committee(self.current_committee(), new_committee, guardian_handoff_cert);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Genesis aborts here — current_committee() is committees[epoch()], which is empty at epoch 0 during DKG. This verify need to be skipped when there's no prior committee. The parallel pre-step handles this; flagging it as a concrete blocker regardless of the restructure.

if let Some(new_committee) = pending_committee {
let handoff = super::convert_move_guardian_handoff(
hashi_types::move_types::GuardianCommitteeHandoff {
new_committee: (&new_committee).into(),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This now rebuilds new_committee from the bag and re-serializes. If the round-trip isn't byte-exact with the signed bytes, the cached cert won't verify. What about adding new_committee to the event, or relying on scrape?

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