Skip to content

devnet-4, recursive aggregation#426

Open
anshalshukla wants to merge 1 commit intoleanEthereum:mainfrom
anshalshukla:anshalshukla/recursive-agg-sig
Open

devnet-4, recursive aggregation#426
anshalshukla wants to merge 1 commit intoleanEthereum:mainfrom
anshalshukla:anshalshukla/recursive-agg-sig

Conversation

@anshalshukla
Copy link
Collaborator

🗒️ Description

draft PR for devnet-4

  • updates aggregation API to support recursive aggregation

  • adds a temporary dummy flag which will be used to later fix the tests once the design is finalized

  • the bindings cannot be updated due to incompatibility between leanMultisig xmss and leanSig

  • INV_PROOF_SIZE should be a protocol level parameter imo, unlike a aggregator paramater as defined in high level doc

  • changes aggregate_gossip_signatures to aggregate as it will no longer just aggregates gossip signatures but also recursively aggregates children_payloads with them

  • changes aggregate_gossip_signatures to aggregate_committee_signatures_and_payloads, it includes both committee gossip signatures and payloads (no committee) and recursively aggregate them using aggregate

🔗 Related Issues or PRs

✅ Checklist

  • Ran tox checks to avoid unnecessary CI fails:
    uvx tox
  • Considered adding appropriate tests for the changes.
  • Considered updating the online docs in the ./docs/ directory.

if vid in gossip_id_set:
continue
key = SignatureKey(vid, data_root)
if (pls := children_payloads.get(key)) is not None:
Copy link
Contributor

Choose a reason for hiding this comment

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

we need to get the one with the maximum coverage with the remaining validator ids and consume them in the greedy manner

Copy link
Contributor

Choose a reason for hiding this comment

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

infact gossips one should be last to be added

Copy link
Contributor

Choose a reason for hiding this comment

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

infact you should now not store by vid-dataroot key, just store payloads by dataroot key i.e. datarootke => list of payloads , list of validator ids

because its simpler to just take them in a greedy fashion and then pick the non covered validator from validators and then do recursive aggregattion

"""
Aggregate committee signatures for attestations in committee_signatures.
merged = dict(self.latest_known_aggregated_payloads)
for sig_key, proofs in self.latest_new_aggregated_payloads.items():
Copy link
Contributor

Choose a reason for hiding this comment

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

the keys for aggregated payloads should now be just attestattion data right?

@unnawut unnawut added this to the pq-devnet-4 milestone Mar 4, 2026
@unnawut unnawut added the specs Scope: Changes to the specifications label Mar 4, 2026
Copy link
Collaborator

@unnawut unnawut left a comment

Choose a reason for hiding this comment

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

A few small comments and just one substantial comment but I guess it's more for Emile I'll ping him for opinion.

I didn't look at dummy aggregate & verify just yet because that'll be replaced before we finalize devnet-4 specs but please correct me if I'm wrong.

There's also code comment clean up and updating tests, but I assume that'll also be sorted when leanMultisig is ready so I ignore them for now.

Comment on lines +938 to +940
for vid in validator_ids:
if vid in gossip_id_set:
continue
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: Can be collapsed to this. Also more readable:

Suggested change
for vid in validator_ids:
if vid in gossip_id_set:
continue
for vid in set(validator_ids) - set(gossip_ids):

"""SSZ-compliant list of sibling hashes, from bottom to top."""


class BytecodePointOption(SSZUnion):
Copy link
Collaborator

Choose a reason for hiding this comment

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

I remember vaguely that SSZUnion type is quite problematic(?, source needed but I think it was around determinism) and there's been proposals to remove it from specs (ethereum/consensus-specs#4763, ethereum/consensus-specs#3906). So I'm not sure we should consider this before adding SSZUnion type especially if we're trying to be more lean than current beacon specs.

Seeing this match clause in AggregatedXMSS::public_input() and with a bit of AI consultation it looks like replacing the optional with vec![F::ZERO; bytecode_claim_size] or similar could work? cc: @TomWambsgans

Copy link
Collaborator

Choose a reason for hiding this comment

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

Conclusion from pqinterop chat is we keep leanMultisig API the way it is (with Option) but work on leanSpec to avoid SSZUnion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

specs Scope: Changes to the specifications

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants