# PQ-signatures P2P aggregation
Kamil Salakhiev
CEO & Engineering manager at <i class="bi bi-globe"></i> qdrvm.io
<style>
.two-column-layout {
column-count: 2; /* Set column number */
column-gap: 20px;
max-width: 100%;
overflow: hidden;
}
/* Media query for mobile devices */
@media (max-width: 768px) {
.two-column-layout {
column-count: 1; /* Switch to single column on small screens */
column-gap: 0; /* Optional: Set gap to 0 for single column */
}
}
.markdown-body, .ui-infobar {
max-width: unset !important;
}
.two-column-layout ul,
.two-column-layout ol {
margin: 0;
padding-left: 20px;
}
.two-column-layout strong {
font-weight: bold;
}
.two-column-layout em {
font-style: italic;
}
.two-column-layout h1,
.two-column-layout h2,
.two-column-layout h3,
.two-column-layout h4,
.two-column-layout h5,
.two-column-layout h6 {
margin-top: 0;
}
</style>
<!-- ---
# Signature aggregation
 -->
<!-- * Validators receive a data for signing (block)
* Each validator generates a pq-signature on the data
* Some portion of validators also aggregate signatures into a SNARK -->
---
| Aspect | BLS-sig | PQ-sig |
| -------- | -------- | -------- |
| Individual Sig Size | 96 bytes | ~3KB |
| Aggregation Size | 96 bytes | ~128KB |
| Aggregation cost | Low | High (SNARK generation) |
| Aggregator Rotation | Every slot | No rotation |
---
# Requirements
* 8k-32k validators
* 4 second slots
<!-- ---
# Roles
* Attesters
* Sign the validity of blocks
* Aggregators
* Sign the validity of the block
* Perform aggregation of PQ-signatures into the SNARK -->
---
# Two-tier approach
<div class="two-column-layout">

###
- Validators are split into local subnets and one global subnet
- Each local subnet issues local aggregate (SNARK1)
- Global aggregators collect local aggregates and issue global aggregate (SNARK2)
</div>
---
# P2P Design space
* Subnet aggregation strategy
* Subnet topology
* Local-global subnet communications
<!-- ---
# Aggregation strategy
<div class="two-column-layout">
###
* **Aggregating N signatures:**
* Verify N signatures
* SNARK-prove verifications
###
* **Updating existing SNARK**:
* Verify old SNARK
* Verify N signatures
* Prove SNARK + N signatures
</div> -->
---
# Subnet topology
* Key questions:
* Are validator/aggregator addresses public?
* Must all validators receive all signatures in the subnet?
* Do validators need subnet-level aggregations?
---
# Direct topology

---
# Gossipsub
<!--  -->

---
# Grid

---
# Direct + GRID

---
# PULL Global aggregation

<!-- * Local aggregators announce bitfields corresponding to SNARKs they produced
* Global aggregators request subnet SNARK only if:
* they miss aggregation for their subnet
* or they observed a better aggregate -->
---
# BEAMSIM
* PQ-signatures DES aggregation:
* Uses NS3 as backend for simulation
* Simulates TCP/UDP transport
* Horizontally scalable with the number of CPU cores
* <img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png " width="35" height="35"> github.com/qdrvm/beamsim
<!-- ---
# Simulation accuracy
 -->
<!-- ---
## Simulation accuracy
* **3sf-mini**: no sophisticated network protocols (TCP)
* **BEAMSIM**: simulates TCP, gossipsub, to analyze pq-signature aggregation
* **EthShadow**: uses real client implementations with replaced network layer
* **Testnet** (e.g., Holesky): uses real client implementations with real network layer
* **Mainnet** -->
---
# DEMO
* run `docker run --rm -p 8080:8080 qdrvm/beamsim:cannes`
* open `http://127.0.0.1:8080/tree` in browser
* open jupyter notebook `beamsim.ipynb`
---
# Thank you!
### Any questions?
📧 [k@qdrvm.io](mailto:k@qdrvm.io)
🐦 [@kamil_abiy](https://twitter.com/kamil_abiy )
{"title":"BEAMSIM slides","description":"View the slide with \"Slide Mode\".","contributors":"[{\"id\":\"8d5903cf-0b12-45b0-aac7-7e9b3364ff74\",\"add\":14920,\"del\":10425}]","slideOptions":"{\"theme\":\"white\"}"}