From 71835c6b4005ec5c3b99dca8501b34fd95d9bf9a Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Tue, 3 May 2022 09:22:29 -0600 Subject: [PATCH] Add new `DomainType` for application usage --- specs/bellatrix/beacon-chain.md | 3 +++ specs/phase0/beacon-chain.md | 3 +++ 2 files changed, 6 insertions(+) diff --git a/specs/bellatrix/beacon-chain.md b/specs/bellatrix/beacon-chain.md index b37a8ab715..06f368d971 100644 --- a/specs/bellatrix/beacon-chain.md +++ b/specs/bellatrix/beacon-chain.md @@ -10,6 +10,7 @@ - [Introduction](#introduction) - [Custom types](#custom-types) +- [Constants](#constants) - [Preset](#preset) - [Execution](#execution) - [Updated penalty values](#updated-penalty-values) @@ -62,6 +63,8 @@ Additionally, this upgrade introduces the following minor changes: | `Transaction` | `ByteList[MAX_BYTES_PER_TRANSACTION]` | either a [typed transaction envelope](https://eips.ethereum.org/EIPS/eip-2718#opaque-byte-array-rather-than-an-rlp-array) or a legacy transaction| | `ExecutionAddress` | `Bytes20` | Address of account on the execution layer | +## Constants + ## Preset ### Execution diff --git a/specs/phase0/beacon-chain.md b/specs/phase0/beacon-chain.md index 618f396374..f06c3d56f0 100644 --- a/specs/phase0/beacon-chain.md +++ b/specs/phase0/beacon-chain.md @@ -203,6 +203,9 @@ The following values are (non-configurable) constants used throughout the specif | `DOMAIN_VOLUNTARY_EXIT` | `DomainType('0x04000000')` | | `DOMAIN_SELECTION_PROOF` | `DomainType('0x05000000')` | | `DOMAIN_AGGREGATE_AND_PROOF` | `DomainType('0x06000000')` | +| `DOMAIN_APPLICATION_MASK` | `DomainType('0x00000001')` | + +*Note*: `DOMAIN_APPLICATION_MASK` reserves the rest of the bitspace in `DomainType` for application usage. This means for some `DomainType` `DOMAIN_SOME_APPLICATION`, `DOMAIN_SOME_APPLICATION && DOMAIN_APPLICATION_MASK` **MUST** be non-zero. This expression for any other `DomainType` in the consensus specs **MUST** be zero. ## Preset