HackMD
    • Sharing Link copied
    • /edit
    • View mode
      • Edit mode
      • View mode
      • Book mode
      • Slide mode
      Edit mode View mode Book mode Slide mode
    • Note Permission
    • Read
      • Only me
      • Signed-in users
      • Everyone
      Only me Signed-in users Everyone
    • Write
      • Only me
      • Signed-in users
      • Everyone
      Only me Signed-in users Everyone
    • More (Comment, Invitee)
    • Publishing
    • Commenting Enable
      Disabled Forbidden Owners Signed-in users Everyone
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Invitee
    • No invitee
    • Options
    • Versions and GitHub Sync
    • Transfer ownership
    • Delete this note
    • Template
    • Save as template
    • Insert from template
    • Export
    • Google Drive Export to Google Drive
    • Gist
    • Import
    • Google Drive Import from Google Drive
    • Gist
    • Clipboard
    • Download
    • Markdown
    • HTML
    • Raw HTML
Menu Sharing Help
Menu
Options
Versions and GitHub Sync Transfer ownership Delete this note
Export
Google Drive Export to Google Drive Gist
Import
Google Drive Import from Google Drive Gist Clipboard
Download
Markdown HTML Raw HTML
Back
Sharing
Sharing Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
More (Comment, Invitee)
Publishing
More (Comment, Invitee)
Commenting Enable
Disabled Forbidden Owners Signed-in users Everyone
Permission
Owners
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Invitee
No invitee
   owned this note    owned this note      
Published Linked with GitHub
Like BookmarkBookmarked
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
# Heuristically Partitioned Attestation Aggregation Attestation: - bitfield of N bits, 1 per validator of the committee attesting - a BLS signature, an aggregate of the validator signatures corresponding to the set bitfield bits. ## Goal Sign an attestation as validator, put it on the network, and have it be aggregated with all the other sigs. ## Problem BLS is linear and we only use a bitfield: everyone should only aggregate an attestation into the signature once: if the corresponding bit is still 0. Gossiped attestations may have overlapping aggregate bitfields; they cannot be aggregated. ## Idea Aggregate attestations fit together like dominoes: some aggregate constructions align better with other aggregate forms than others. As an heuristic, if certain classes of "shapes" are prioritized over others, aggregates with a bigger chance to overlap can be avoided all together. And with a sufficient amount of validators sharing common heuristics, a herd immunity against badly shaped aggregates may arise. The basic highly desired form of aggregation (as Handel works towards with strong but privacy-breaking routing/grouping) is to think of the bitfield as a binary tree: ``` .^ .^ .^ <- etc. .^ .^ .^ .^ <- pairs of pairs .^.^.^.^.^.^.^.^ <- pairs ???????????????? <- bits ``` Instead, a bitfield with a friendly shape can be prioritized over one with an unfriendly one: ``` Good, fit towards a subtree: .^ .^ .^ .^ .^ .^ .^ .^.^.^.^.^.^.^.^ 1010111100000000 Good, fit towards a subtree: .^ .^ .^ .^ .^ .^ .^ .^.^.^.^.^.^.^.^ 0000000011101011 Bad, not fitted towards a subtree: .^ .^ .^ .^ .^ .^ .^ .^.^.^.^.^.^.^.^ 0100100010101001 ``` Aggregates that are fitted to subtrees can be aggregated with aggregates of similar size but complementing subtrees. Of course, if only considering 1 subtree for this preference, we effectively have binary merging like Handel, but with inefficient routing. To improve on that, the cost function that tells what is good and bad should also reward multiple well-filled subtrees, e.g.: ``` Reasonable, fit towards two equal size subtrees: .^ .^ .^ .^ .^ .^ .^ .^.^.^.^.^.^.^.^ 0000110100001011 ``` This still has a good chance of being aggregated to a fuller tree by combination of smaller reasonably filled subtrees, or aggregates of these subtrees. ### Cost function To implement this, a cost-function should be formalized that: - Prefers bitfields with bits aligned to subtrees: - Smart partitioning - Prefers subtrees to be fuller: - Optimal partition use - Prefers bitfields with not too many of these partitions: - Improve chances of large-partition merges - Dislikes bitfields with stray bits outside of partitions: - Partition merges of similar size are better - Prefers bitfields with subtrees of equal size to be all left hand, or all right hand. - Increase the chances of complementing bitfields, even if they contain multiple subtrees. ### Gossiping Based on the cost-function, aggregates can be dropped, or expedited to propagate on gossipsub. Dropping is important, as otherwise it will just forward everything to everyone, and we could just as well aggregate from individual signatures locally. ### Aggregation itself To get these heuristic aggregates, a node should buffer attestations and decide on how to aggregate them, if at all, based on the cost-function. ### Intermediates Carl suggested that during aggregation, multiple levels of fullness, but each high-valued (e.g. smaller and bigger full subtrees) may be achieved. In this case it may be favorable to gossip some of these intermediates: the smaller but high-valued aggregates may fit in other complements well, and improve on the total aggregate. ### Worst case If nothing is dropped, and yet no partitions are made, we have status quo: local aggregation, `O(n**2)` on the network. ### Best case If every step in the way results in a full bigger partition, we have the (unrealisitc) dream aggregation, `O(n*log(N))` on the network. (Note: better could be achieved, but requires serial routing) ### Average case The exact cost-function is not formalized yet, and with many different realisitc and less realistic network topologies it is hard to estimate now. However, if a big enough portion of the network maintains this heuristic aggregation, and the network is a reasonably random mesh, I think we may get to `O(n*log(N))`, some constant factor over the best case. ## Extensions ### Shuffling Any heuristic that prefers certain groups of bits to aggregate together has a problem with luck: a validator may end up with bad peers, and repeatedly fails to be part of a smaller aggregation because of this. To work around this, the mapping of the bitfield bits to the validator indices can be shuffled each slot (or other time frame): the heuristics do not change, but the validators get to work construct the smaller aggregations with different peers each time, so they will depend on the same validators as much.

Import from clipboard

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lost their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.


Upgrade

All
  • All
  • Team
No template.

Create a template


Upgrade

Delete template

Do you really want to delete this template?

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Sign in via SAML

or

Sign in via GitHub

Help

  • English
  • 中文
  • 日本語

Documents

Tutorials

Book Mode Tutorial

Slide Example

YAML Metadata

Resources

Releases

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions

Versions and GitHub Sync

Sign in to link this note to GitHub Learn more
This note is not linked with GitHub Learn more
 
Add badge Pull Push GitHub Link Settings
Upgrade now

Version named by    

More Less
  • Edit
  • Delete

Note content is identical to the latest version.
Compare with
    Choose a version
    No search result
    Version not found

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub

      Please sign in to GitHub and install the HackMD app on your GitHub repo. Learn more

       Sign in to GitHub

      HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Available push count

      Upgrade

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Upgrade

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully