Fix configs and put domain types to the same table

This commit is contained in:
Hsiao-Wei Wang 2020-06-15 21:15:11 +08:00
parent be607e97f6
commit 458d343497
No known key found for this signature in database
GPG Key ID: 95B070122902DEA4
5 changed files with 12 additions and 22 deletions

View File

@ -46,7 +46,8 @@ DOMAIN_SHARD_PROPOSAL: 0x80000000
DOMAIN_SHARD_COMMITTEE: 0x81000000 DOMAIN_SHARD_COMMITTEE: 0x81000000
DOMAIN_LIGHT_CLIENT: 0x82000000 DOMAIN_LIGHT_CLIENT: 0x82000000
DOMAIN_CUSTODY_BIT_SLASHING: 0x83000000 DOMAIN_CUSTODY_BIT_SLASHING: 0x83000000
DOMAIN_LIGHT_SELECTION_PROOF: 0x84000000
DOMAIN_LIGHT_AGGREGATE_AND_PROOF: 0x85000000
# custody-game # custody-game
# --------------------------------------------------------------- # ---------------------------------------------------------------

View File

@ -48,7 +48,8 @@ DOMAIN_SHARD_PROPOSAL: 0x80000000
DOMAIN_SHARD_COMMITTEE: 0x81000000 DOMAIN_SHARD_COMMITTEE: 0x81000000
DOMAIN_LIGHT_CLIENT: 0x82000000 DOMAIN_LIGHT_CLIENT: 0x82000000
DOMAIN_CUSTODY_BIT_SLASHING: 0x83000000 DOMAIN_CUSTODY_BIT_SLASHING: 0x83000000
DOMAIN_LIGHT_SELECTION_PROOF: 0x84000000
DOMAIN_LIGHT_AGGREGATE_AND_PROOF: 0x85000000
# custody-game # custody-game
# --------------------------------------------------------------- # ---------------------------------------------------------------

View File

@ -141,14 +141,6 @@ Configuration is not namespaced. Instead it is strictly an extension;
| - | - | :-: | :-: | | - | - | :-: | :-: |
| `ONLINE_PERIOD` | `OnlineEpochs(2**3)` (= 8) | online epochs | ~51 mins | | `ONLINE_PERIOD` | `OnlineEpochs(2**3)` (= 8) | online epochs | ~51 mins |
| `LIGHT_CLIENT_COMMITTEE_PERIOD` | `Epoch(2**8)` (= 256) | epochs | ~27 hours | | `LIGHT_CLIENT_COMMITTEE_PERIOD` | `Epoch(2**8)` (= 256) | epochs | ~27 hours |
| `MAX_SHARD_BLOCK_SIZE` | `2**20` (= 1,048,576) | |
| `TARGET_SHARD_BLOCK_SIZE` | `2**18` (= 262,144) | |
| `SHARD_BLOCK_OFFSETS` | `[1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233]` | |
| `MAX_SHARD_BLOCKS_PER_ATTESTATION` | `len(SHARD_BLOCK_OFFSETS)` | |
| `MAX_GASPRICE` | `Gwei(2**14)` (= 16,384) | Gwei | |
| `MIN_GASPRICE` | `Gwei(2**3)` (= 8) | Gwei | |
| `GASPRICE_ADJUSTMENT_COEFFICIENT` | `2**3` (= 8) | |
| `NO_SIGNATURE` | `BLSSignature(b'\x00' * 96)` | |
### Domain types ### Domain types
@ -157,8 +149,9 @@ Configuration is not namespaced. Instead it is strictly an extension;
| `DOMAIN_SHARD_PROPOSAL` | `DomainType('0x80000000')` | | `DOMAIN_SHARD_PROPOSAL` | `DomainType('0x80000000')` |
| `DOMAIN_SHARD_COMMITTEE` | `DomainType('0x81000000')` | | `DOMAIN_SHARD_COMMITTEE` | `DomainType('0x81000000')` |
| `DOMAIN_LIGHT_CLIENT` | `DomainType('0x82000000')` | | `DOMAIN_LIGHT_CLIENT` | `DomainType('0x82000000')` |
| `DOMAIN_LIGHT_SELECTION_PROOF` | `DomainType('0x83000000')` | | `DOMAIN_CUSTODY_BIT_SLASHING` | `DomainType(0x83000000)` |
| `DOMAIN_LIGHT_AGGREGATE_AND_PROOF` | `DomainType('0x84000000')` | | `DOMAIN_LIGHT_SELECTION_PROOF` | `DomainType('0x84000000')` |
| `DOMAIN_LIGHT_AGGREGATE_AND_PROOF` | `DomainType('0x85000000')` |
## Updated containers ## Updated containers

View File

@ -15,7 +15,6 @@
- [Time parameters](#time-parameters) - [Time parameters](#time-parameters)
- [Max operations per block](#max-operations-per-block) - [Max operations per block](#max-operations-per-block)
- [Reward and penalty quotients](#reward-and-penalty-quotients) - [Reward and penalty quotients](#reward-and-penalty-quotients)
- [Signature domain types](#signature-domain-types)
- [Data structures](#data-structures) - [Data structures](#data-structures)
- [New Beacon Chain operations](#new-beacon-chain-operations) - [New Beacon Chain operations](#new-beacon-chain-operations)
- [`CustodySlashing`](#custodyslashing) - [`CustodySlashing`](#custodyslashing)
@ -79,14 +78,6 @@ This document details the beacon chain additions and changes in Phase 1 of Ether
| `EARLY_DERIVED_SECRET_REVEAL_SLOT_REWARD_MULTIPLE` | `2**1` (= 2) | | `EARLY_DERIVED_SECRET_REVEAL_SLOT_REWARD_MULTIPLE` | `2**1` (= 2) |
| `MINOR_REWARD_QUOTIENT` | `2**8` (= 256) | | `MINOR_REWARD_QUOTIENT` | `2**8` (= 256) |
### Signature domain types
The following types are defined, mapping into `DomainType` (little endian):
| Name | Value |
| - | - |
| `DOMAIN_CUSTODY_BIT_SLASHING` | `DomainType('0x83000000')` |
## Data structures ## Data structures
### New Beacon Chain operations ### New Beacon Chain operations

View File

@ -36,6 +36,10 @@
- [Construct attestation](#construct-attestation) - [Construct attestation](#construct-attestation)
- [Custody bits blocks](#custody-bits-blocks) - [Custody bits blocks](#custody-bits-blocks)
- [Signature](#signature) - [Signature](#signature)
- [Attestation Aggregation](#attestation-aggregation)
- [Broadcast aggregate](#broadcast-aggregate)
- [`AggregateAndProof`](#aggregateandproof)
- [`SignedAggregateAndProof`](#signedaggregateandproof)
- [Light client committee](#light-client-committee) - [Light client committee](#light-client-committee)
- [Preparation](#preparation) - [Preparation](#preparation)
- [Light clent vote](#light-clent-vote) - [Light clent vote](#light-clent-vote)
@ -47,7 +51,7 @@
- [Light client vote aggregation](#light-client-vote-aggregation) - [Light client vote aggregation](#light-client-vote-aggregation)
- [Aggregation selection](#aggregation-selection) - [Aggregation selection](#aggregation-selection)
- [Construct aggregate](#construct-aggregate) - [Construct aggregate](#construct-aggregate)
- [Broadcast aggregate](#broadcast-aggregate) - [Broadcast aggregate](#broadcast-aggregate-1)
- [`LightAggregateAndProof`](#lightaggregateandproof) - [`LightAggregateAndProof`](#lightaggregateandproof)
- [`SignedLightAggregateAndProof`](#signedlightaggregateandproof) - [`SignedLightAggregateAndProof`](#signedlightaggregateandproof)