eth2.0-specs/specs/_features/sharding/beacon-chain.md

416 lines
15 KiB
Markdown
Raw Normal View History

# Sharding -- The Beacon Chain
2019-10-12 03:05:08 +00:00
**Notice**: This document is a work-in-progress for researchers and implementers.
## Table of contents
2021-03-17 23:07:15 +00:00
<!-- TOC -->
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
2020-09-23 20:55:22 +00:00
- [Introduction](#introduction)
- [Glossary](#glossary)
- [Constants](#constants)
2020-12-11 08:10:50 +00:00
- [Misc](#misc)
- [Domain types](#domain-types)
- [Preset](#preset)
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
- [Misc](#misc-1)
- [Time parameters](#time-parameters)
- [Shard blob samples](#shard-blob-samples)
- [Configuration](#configuration)
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
- [Time parameters](#time-parameters-1)
- [Containers](#containers)
- [New Containers](#new-containers)
- [`BuilderBlockBid`](#builderblockbid)
- [`BuilderBlockBidWithRecipientAddress`](#builderblockbidwithrecipientaddress)
- [`ShardedCommitmentsContainer`](#shardedcommitmentscontainer)
- [`ShardSample`](#shardsample)
- [Extended Containers](#extended-containers)
- [`BeaconState`](#beaconstate)
- [`BuilderBlockData`](#builderblockdata)
- [`BeaconBlockBody`](#beaconblockbody)
- [Helper functions](#helper-functions)
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
- [Block processing](#block-processing)
- [`is_builder_block_slot`](#is_builder_block_slot)
2020-12-11 08:10:50 +00:00
- [Beacon state accessors](#beacon-state-accessors)
- [`get_active_shard_count`](#get_active_shard_count)
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
- [Beacon chain state transition function](#beacon-chain-state-transition-function)
- [Block processing](#block-processing-1)
- [`process_block`](#process_block)
- [Block header](#block-header)
- [Builder Block Bid](#builder-block-bid)
- [Sharded data](#sharded-data)
- [Execution payload](#execution-payload)
2019-10-12 03:05:08 +00:00
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
2021-03-17 23:07:15 +00:00
<!-- /TOC -->
2019-10-12 03:05:08 +00:00
## Introduction
2020-12-09 07:29:21 +00:00
This document describes the extensions made to the Phase 0 design of The Beacon Chain to support data sharding,
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
based on the ideas [here](https://notes.ethereum.org/@dankrad/new_sharding) and more broadly [here](https://arxiv.org/abs/1809.09044),
2020-12-09 07:29:21 +00:00
using KZG10 commitments to commit to data to remove any need for fraud proofs (and hence, safety-critical synchrony assumptions) in the design.
### Glossary
- **Data**: A list of KZG points, to translate a byte string into
- **Blob**: Data with commitments and meta-data, like a flattened bundle of L2 transactions.
2019-11-18 23:40:02 +00:00
## Constants
The following values are (non-configurable) constants used throughout the specification.
### Misc
| Name | Value | Notes |
| - | - | - |
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
| `FIELD_ELEMENTS_PER_SAMPLE` | `uint64(2**4)` (= 16) | 31 * 16 = 496 bytes |
### Domain types
| Name | Value |
| - | - |
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
| `DOMAIN_SHARD_SAMPLE` | `DomainType('0x10000000')` |
## Preset
2019-10-12 03:05:08 +00:00
### Misc
2020-12-10 02:21:21 +00:00
| Name | Value | Notes |
| - | - | - |
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
| `MAX_SHARDS` | `uint64(2**12)` (= 4,096) | Theoretical max shard count (used to determine data structure sizes) |
| `ACTIVE_SHARDS` | `uint64(2**8)` (= 256) | Initial shard count |
| `MAX_PROPOSER_BLOCKS_BETWEEN_BUILDER_BLOCKS` | `uint64(2**4)` (= 16) | TODO: Need to define what happens if there were more blocks without builder blocks |
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
### Time parameters
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
With the introduction of builder blocks the number of slots per epoch is doubled (it counts beacon blocks and builder blocks).
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
| Name | Value | Unit | Duration |
| - | - | :-: | :-: |
| `SLOTS_PER_EPOCH` | `uint64(2**6)` (= 64) | slots | 8:32 minutes |
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
### Shard blob samples
2020-12-09 07:29:21 +00:00
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
| Name | Value | Notes |
| - | - | - |
| `SAMPLES_PER_BLOB` | `uint64(2**9)` (= 512) | 248 * 512 = 126,976 bytes |
## Configuration
2020-04-02 22:48:02 +00:00
Note: Some preset variables may become run-time configurable for testnets, but default to a preset while the spec is unstable.
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
E.g. `ACTIVE_SHARDS` and `SAMPLES_PER_BLOB`.
2019-10-12 03:05:08 +00:00
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
### Time parameters
2019-10-12 03:05:08 +00:00
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
| Name | Value | Unit | Duration |
| - | - | :-: | :-: |
| `SECONDS_PER_SLOT` | `uint64(8)` | seconds | 8 seconds |
2019-11-03 20:06:19 +00:00
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
## Containers
2019-10-27 01:01:10 +00:00
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
### New Containers
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
#### `BuilderBlockBid`
2020-12-10 03:47:02 +00:00
```python
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
class BuilderBlockBid(Container):
slot: Slot
parent_block_root: Root
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
execution_payload_root: Root
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
sharded_data_commitment_root: Root # Root of the sharded data (only data, not beacon/builder block commitments)
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
sharded_data_commitment_count: uint64 # Count of sharded data commitments
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
bid: Gwei # Block builder bid paid to proposer
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
validator_index: ValidatorIndex # Validator index for this bid
# Block builders use an Eth1 address -- need signature as
# block bid and data gas base fees will be charged to this address
signature_y_parity: bool
signature_r: uint256
signature_s: uint256
```
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
#### `BuilderBlockBidWithRecipientAddress`
```python
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
class BuilderBlockBidWithRecipientAddress(Container):
builder_block_bid: Union[None, BuilderBlockBid]
recipient_address: ExecutionAddress # Address to receive the block builder bid
```
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
#### `ShardedCommitmentsContainer`
```python
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
class ShardedCommitmentsContainer(Container):
sharded_commitments: List[KZGCommitment, 2 * MAX_SHARDS]
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
# Aggregate degree proof for all sharded_commitments
degree_proof: KZGCommitment
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
# The sizes of the blocks encoded in the commitments (last builder and all beacon blocks since)
included_block_sizes: List[uint64, MAX_PROPOSER_BLOCKS_BETWEEN_BUILDER_BLOCKS + 1]
# Number of commitments that are for sharded data (no blocks)
included_sharded_data_commitments: uint64
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
# Random evaluation of beacon blocks + execution payload (this helps with quick verification)
block_verification_kzg_proof: KZGCommitment
```
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
#### `ShardSample`
```python
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
class ShardSample(Container):
slot: Slot
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
row: uint64
column: uint64
data: Vector[BLSFieldElement, FIELD_ELEMENTS_PER_SAMPLE]
proof: KZGCommitment
builder: ValidatorIndex
signature: BLSSignature
```
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
### Extended Containers
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
#### `BeaconState`
```python
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
class BeaconState(bellatrix.BeaconState):
blocks_since_builder_block: List[BeaconBlock, MAX_PROPOSER_BLOCKS_BETWEEN_BUILDER_BLOCKS]
```
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
#### `BuilderBlockData`
```python
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
class BuilderBlockData(Container):
execution_payload: ExecutionPayload
sharded_commitments_container: ShardedCommitmentsContainer
```
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
#### `BeaconBlockBody`
```python
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
class BeaconBlockBody(altair.BeaconBlockBody):
payload_data: Union[BuilderBlockBid, BuilderBlockData]
```
## Helper functions
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
### Block processing
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
#### `is_builder_block_slot`
```python
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
def is_builder_block_slot(slot: Slot) -> bool:
return slot % 2 == 1
```
### Beacon state accessors
#### `get_active_shard_count`
```python
2020-12-10 03:47:02 +00:00
def get_active_shard_count(state: BeaconState, epoch: Epoch) -> uint64:
2020-08-10 19:02:22 +00:00
"""
Return the number of active shards.
Note that this puts an upper bound on the number of committees per slot.
"""
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
return ACTIVE_SHARDS
```
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
## Beacon chain state transition function
### Block processing
2019-11-06 22:19:00 +00:00
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
#### `process_block`
2019-11-06 22:19:00 +00:00
```python
def process_block(state: BeaconState, block: BeaconBlock) -> None:
process_block_header(state, block)
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
verify_builder_block_bid(state, block)
process_sharded_data(state, block)
if is_execution_enabled(state, block.body):
process_execution_payload(state, block, EXECUTION_ENGINE)
2020-05-28 19:20:36 +00:00
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
if not is_builder_block_slot(block.slot):
process_randao(state, block.body)
2020-05-28 19:20:36 +00:00
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
process_eth1_data(state, block.body)
process_operations(state, block.body)
process_sync_aggregate(state, block.body.sync_aggregate)
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
if is_builder_block_slot(block.slot):
state.blocks_since_builder_block = []
state.blocks_since_builder_block.append(block)
```
#### Block header
```python
def process_block_header(state: BeaconState, block: BeaconBlock) -> None:
# Verify that the slots match
assert block.slot == state.slot
# Verify that the block is newer than latest block header
assert block.slot > state.latest_block_header.slot
# Verify that proposer index is the correct index
if not is_builder_block_slot(block.slot):
assert block.proposer_index == get_beacon_proposer_index(state)
# Verify that the parent matches
assert block.parent_root == hash_tree_root(state.latest_block_header)
# Cache current block as the new latest block
state.latest_block_header = BeaconBlockHeader(
slot=block.slot,
proposer_index=block.proposer_index,
parent_root=block.parent_root,
state_root=Bytes32(), # Overwritten in the next process_slot call
body_root=hash_tree_root(block.body),
)
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
# Verify proposer is not slashed
proposer = state.validators[block.proposer_index]
assert not proposer.slashed
```
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
#### Builder Block Bid
```python
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
def verify_builder_block_bid(state: BeaconState, block: BeaconBlock) -> None:
if is_builder_block_slot(block.slot):
# Get last builder block bid
assert state.blocks_since_builder_block[-1].body.payload_data.selector == 0
builder_block_bid = state.blocks_since_builder_block[-1].body.payload_data.value.builder_block_bid
assert builder_block_bid.slot + 1 == block.slot
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
assert block.body.payload_data.selector == 1 # Verify that builder block does not contain bid
2019-10-12 14:59:51 +00:00
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
builder_block_data = block.body.payload_data.value
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
assert builder_block_bid.execution_payload_root == hash_tree_root(builder_block_data.execution_payload)
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
assert builder_block_bid.sharded_data_commitment_count == builder_block_data.included_sharded_data_commitments
2020-12-09 07:29:21 +00:00
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
assert builder_block_bid.sharded_data_commitment_root == hash_tree_root(builder_block_data.sharded_commitments[-builder_block_bid.included_sharded_data_commitments:])
2020-12-09 07:29:21 +00:00
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
assert builder_block_bid.validator_index == block.proposer_index
WIP implementation of Danksharding (#2792) * Rough structure * Most of the KZG checks in * Fixes suggested by Vitalik * Add low degree check for commitments * Remove -1 check from degree proof (not needed) * Require block builders to be validators to simplify things * remove verify_intermediate_block_bid_commitment * Rename back to process_block * Degree check formula corrections * Updated TOC, bid processing corrections * Link to latest sharding doc * Add shard samples + P2P * Add validator guide for attestations and reconstruction * Update specs/sharding/beacon-chain.md Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Update specs/sharding/beacon-chain.md Co-authored-by: vbuterin <v@buterin.com> * Refactor polynomial operations into separate file * Add missing polynomial functions * Fix polynomial commitment file toc levels * Refactor the payload to make better use of unions * Add reverse bit order convention * Correct inequality in verify_degree_proof * Small fix * Fix polynomial evaluation * Update specs/sharding/beacon-chain.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added * Sample reconstruction estimate * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Fix return value of roots_of_unity() * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/beacon-chain.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Intermediate block -> Builder block * Some small omissions in intermediate -> builder * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Update specs/sharding/polynomial-commitments.md Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> * Z1 -> inf_G1 * Fix degree proof bound * SignedShardSample -> ShardSample * Typo * Don't allow 0 for `next_power_of_two` * Remove unused `ROOT_OF_UNITY` constant * Throwaway variable name * Fix function documentation of `bls_modular_inverse` * Builder block bid increase by at least 1%, no RANDAO processing in builder blocks * Fix tocs * Fix tocs * Fix typo * Update specs/sharding/polynomial-commitments.md Co-authored-by: George Kadianakis <desnacked@riseup.net> Co-authored-by: Danny Ryan <dannyjryan@gmail.com> Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: vbuterin <v@buterin.com> Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 17:20:25 +00:00
else:
assert block.body.payload_data.selector == 0
builder_block_bid = block.body.payload_data.value.builder_block_bid
assert builder_block_bid.slot == block.slot
assert builder_block_bid.parent_block_root == block.parent_root
# We do not check that the builder address exists or has sufficient balance here.
# If it does not have sufficient balance, the block proposer loses out, so it is their
# responsibility to check.
# Check that the builder is a slashable validator. We can probably reduce this requirement and only
# ensure that they have 1 ETH in their account as a DOS protection.
builder = state.validators[builder_block_bid.validator_index]
assert is_slashable_validator(builder, get_current_epoch(state))
```
#### Sharded data
```python
def process_sharded_data(state: BeaconState, block: BeaconBlock) -> None:
if is_builder_block_slot(block.slot):
assert block.body.payload_data.selector == 1
sharded_commitments_container = block.body.payload_data.value.sharded_commitments_container
# Verify not too many commitments
assert len(sharded_commitments_container.sharded_commitments) // 2 <= get_active_shard_count(state, get_current_epoch(state))
# Verify the degree proof
r = hash_to_bls_field(sharded_commitments_container.sharded_commitments, 0)
r_powers = compute_powers(r, len(sharded_commitments_container.sharded_commitments))
combined_commitment = elliptic_curve_lincomb(sharded_commitments_container.sharded_commitments, r_powers)
payload_field_elements_per_blob = SAMPLES_PER_BLOB * FIELD_ELEMENTS_PER_SAMPLE // 2
verify_degree_proof(combined_commitment, payload_field_elements_per_blob, sharded_commitments_container.degree_proof)
# Verify that the 2*N commitments lie on a degree < N polynomial
low_degree_check(sharded_commitments_container.sharded_commitments)
# Verify that blocks since the last builder block have been included
blocks_chunked = [bytes_to_field_elements(ssz_serialize(block)) for block in state.blocks_since_builder_block]
block_vectors = []
for block_chunked in blocks_chunked:
for i in range(0, len(block_chunked), payload_field_elements_per_blob):
block_vectors.append(block_chunked[i:i + payload_field_elements_per_blob])
number_of_blobs = len(block_vectors)
r = hash_to_bls_field(sharded_commitments_container.sharded_commitments[:number_of_blobs], 0)
x = hash_to_bls_field(sharded_commitments_container.sharded_commitments[:number_of_blobs], 1)
r_powers = compute_powers(r, number_of_blobs)
combined_vector = vector_lincomb(block_vectors, r_powers)
combined_commitment = elliptic_curve_lincomb(sharded_commitments_container.sharded_commitments[:number_of_blobs], r_powers)
y = evaluate_polynomial_in_evaluation_form(combined_vector, x)
verify_kzg_proof(combined_commitment, x, y, sharded_commitments_container.block_verification_kzg_proof)
# Verify that number of sharded data commitments is correctly indicated
assert 2 * (number_of_blobs + included_sharded_data_commitments) == len(sharded_commitments_container.sharded_commitments)
```
#### Execution payload
```python
def process_execution_payload(state: BeaconState, block: BeaconBlock, execution_engine: ExecutionEngine) -> None:
if is_builder_block_slot(block.slot):
assert block.body.payload_data.selector == 1
payload = block.body.payload_data.value.execution_payload
# Verify consistency of the parent hash with respect to the previous execution payload header
if is_merge_transition_complete(state):
assert payload.parent_hash == state.latest_execution_payload_header.block_hash
# Verify random
assert payload.random == get_randao_mix(state, get_current_epoch(state))
# Verify timestamp
assert payload.timestamp == compute_timestamp_at_slot(state, state.slot)
# Get sharded data commitments
sharded_commitments_container = block.body.sharded_commitments_container
sharded_data_commitments = sharded_commitments_container.sharded_commitments[-sharded_commitments_container.included_sharded_data_commitments:]
# Get all unprocessed builder block bids
unprocessed_builder_block_bid_with_recipient_addresses = []
for block in state.blocks_since_builder_block[1:]:
unprocessed_builder_block_bid_with_recipient_addresses.append(block.body.builder_block_bid_with_recipient_address.value)
# Verify the execution payload is valid
# The execution engine gets two extra payloads: One for the sharded data commitments (these are needed to verify type 3 transactions)
# and one for all so far unprocessed builder block bids:
# * The execution engine needs to transfer the balance from the bidder to the proposer.
# * The execution engine needs to deduct data gas fees from the bidder balances
assert execution_engine.execute_payload(payload,
sharded_data_commitments,
unprocessed_builder_block_bid_with_recipient_addresses)
# Cache execution payload header
state.latest_execution_payload_header = ExecutionPayloadHeader(
parent_hash=payload.parent_hash,
fee_recipient=payload.fee_recipient,
state_root=payload.state_root,
receipt_root=payload.receipt_root,
logs_bloom=payload.logs_bloom,
random=payload.random,
block_number=payload.block_number,
gas_limit=payload.gas_limit,
gas_used=payload.gas_used,
timestamp=payload.timestamp,
extra_data=payload.extra_data,
base_fee_per_gas=payload.base_fee_per_gas,
block_hash=payload.block_hash,
transactions_root=hash_tree_root(payload.transactions),
)
```