Skip to content

256-bit custody atoms for better alignment with rest of the spec and greater efficiency#1705

Merged
dankrad merged 53 commits into
devfrom
dankrad-custody-256bit
Jun 16, 2020
Merged

256-bit custody atoms for better alignment with rest of the spec and greater efficiency#1705
dankrad merged 53 commits into
devfrom
dankrad-custody-256bit

Conversation

@dankrad

@dankrad dankrad commented Apr 5, 2020

Copy link
Copy Markdown
Contributor

We previously chose 48 byte custody atoms because of the sizes of field elements in BLS signatures. However, this misalignment is not pretty when compared to the rest of the spec, and will also cause significant overhead as 48 byte integers are more expensive to handle than 32 bytes.

In comparison, the switch to 32 bytes will only require one secret re-sharing (from one prime to another prime) every nine days, so it will add only very minor overhead for MPC validators.

Comment thread specs/phase1/beacon-chain.md
Comment thread specs/phase1/beacon-chain.md Outdated
Comment thread specs/phase1/custody-game.md Outdated
Comment thread tests/core/pyspec/eth2spec/test/helpers/phase1/attestations.py Outdated
@dankrad

dankrad commented Apr 30, 2020

Copy link
Copy Markdown
Contributor Author

This should be ready for review, though I will probably go through the old tests again to make sure I haven't missed anything.

@hwwhww

hwwhww commented May 5, 2020

Copy link
Copy Markdown
Contributor

@dankrad FYI I fixed the conflicts from #1703

@djrtwo djrtwo force-pushed the dankrad-custody-256bit branch from 77fc50e to de03ebb Compare May 19, 2020 15:58
@hwwhww hwwhww force-pushed the dankrad-custody-256bit branch from bda206b to 8697b30 Compare June 15, 2020 07:30
Comment thread tests/core/pyspec/eth2spec/test/helpers/custody.py Outdated
Comment thread specs/phase1/beacon-chain.md
Comment thread specs/phase1/custody-game.md Outdated
Comment thread specs/phase1/custody-game.md Outdated
Comment thread specs/phase1/custody-game.md Outdated
@hwwhww hwwhww mentioned this pull request Jun 15, 2020
23 tasks

@hwwhww hwwhww left a comment

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.

Great work and great test coverage!
Good to merge soon as it's blocking other pending PRs. :shipit:

Comment thread specs/phase1/custody-game.md
@dankrad dankrad merged commit 6b750df into dev Jun 16, 2020
@djrtwo djrtwo deleted the dankrad-custody-256bit branch June 16, 2020 18:09
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.

4 participants