Skip to content

simplify store mappings#436

Merged
tcoratger merged 1 commit intoleanEthereum:mainfrom
anshalshukla:refactor-store
Mar 9, 2026
Merged

simplify store mappings#436
tcoratger merged 1 commit intoleanEthereum:mainfrom
anshalshukla:refactor-store

Conversation

@anshalshukla
Copy link
Collaborator

🗒️ Description

  • Refactors store to update signatures and payloads mappings
  • Removes attestation_data_by_root mapping as with the modified mappings this is not required
  • Simplifies the overall block building / pruning process
  • These maps were originally designed when naive signature aggregation was performed, so each validator_id/ att_data was more convenient design, with leanVm the proposed design is more intuitive
  • This should simplify the devnet-4 PR (can be treated as a phased PR for devnet-4 although this should not break devnet-3 compatibility)

🔗 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.

@tcoratger tcoratger merged commit ab5e8ce into leanEthereum:main Mar 9, 2026
12 checks passed
zclawz pushed a commit to blockblaz/zeam that referenced this pull request Mar 10, 2026
…nstead of SignatureKey (closes #636)

Implements leanEthereum/leanSpec#436:
- Replace SignatureKey(validator_id, data_root) -> StoredSignature map with
  AttestationData -> HashMap(ValidatorIndex, StoredSignature) (SignaturesMap)
- Replace SignatureKey -> AggregatedPayloadsList map with
  AttestationData -> AggregatedPayloadsList (AggregatedPayloadsMap)
- Remove attestation_data_by_root reverse-lookup map (no longer needed)
- Remove SignatureKey type (replaced by AttestationData as key)
- Update computeAggregatedSignatures Phase 1 to look up by AttestationData
- Update computeAggregatedSignatures Phase 2 greedy set-cover to use per-data
  candidate list instead of per-validator lookup
- Update pruneStaleAttestationData to iterate gossip_signatures directly and
  prune by target.slot (renamed to prunePayloadMapBySlot)
- Update all call sites: forkchoice.zig, fork_choice_runner.zig, mock.zig,
  block_signatures_testing.zig
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