Skip to content

Commit

Permalink
move signed envelopes
Browse files Browse the repository at this point in the history
  • Loading branch information
protolambda committed Dec 3, 2019
1 parent 103a66b commit afb9a1d
Showing 1 changed file with 32 additions and 27 deletions.
59 changes: 32 additions & 27 deletions specs/core/0_beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,21 @@
- [`DepositMessage`](#depositmessage)
- [`DepositData`](#depositdata)
- [`BeaconBlockHeader`](#beaconblockheader)
- [`SignedBeaconBlockHeader`](#signedbeaconblockheader)
- [Beacon operations](#beacon-operations)
- [`ProposerSlashing`](#proposerslashing)
- [`AttesterSlashing`](#attesterslashing)
- [`Attestation`](#attestation)
- [`Deposit`](#deposit)
- [`VoluntaryExit`](#voluntaryexit)
- [`SignedVoluntaryExit`](#signedvoluntaryexit)
- [Beacon blocks](#beacon-blocks)
- [`BeaconBlockBody`](#beaconblockbody)
- [`BeaconBlock`](#beaconblock)
- [`SignedBeaconBlock`](#signedbeaconblock)
- [Beacon state](#beacon-state)
- [`BeaconState`](#beaconstate)
- [Signed envelopes](#signed-envelopes)
- [`SignedVoluntaryExit`](#signedvoluntaryexit)
- [`SignedBeaconBlock`](#signedbeaconblock)
- [`SignedBeaconBlockHeader`](#signedbeaconblockheader)
- [Helper functions](#helper-functions)
- [Math](#math)
- [`integer_squareroot`](#integer_squareroot)
Expand Down Expand Up @@ -374,14 +375,6 @@ class BeaconBlockHeader(Container):
body_root: Root
```

#### `SignedBeaconBlockHeader`

```python
class SignedBeaconBlockHeader(Container):
message: BeaconBlockHeader
signature: BLSSignature
```

### Beacon operations

#### `ProposerSlashing`
Expand Down Expand Up @@ -426,14 +419,6 @@ class VoluntaryExit(Container):
validator_index: ValidatorIndex
```

#### `SignedVoluntaryExit`

```python
class SignedVoluntaryExit(Container):
message: VoluntaryExit
signature: BLSSignature
```

### Beacon blocks

#### `BeaconBlockBody`
Expand Down Expand Up @@ -461,14 +446,6 @@ class BeaconBlock(Container):
body: BeaconBlockBody
```

#### `SignedBeaconBlock`

```python
class SignedBeaconBlock(Container):
message: BeaconBlock
signature: BLSSignature
```

### Beacon state

#### `BeaconState`
Expand Down Expand Up @@ -505,6 +482,34 @@ class BeaconState(Container):
finalized_checkpoint: Checkpoint
```

### Signed envelopes

Some messages in the protocol are wrapped in an envelop to better facilitate adding/pruning the signature and to `hash_tree_root` the `message` separate from the signature.

#### `SignedVoluntaryExit`

```python
class SignedVoluntaryExit(Container):
message: VoluntaryExit
signature: BLSSignature
```

#### `SignedBeaconBlock`

```python
class SignedBeaconBlock(Container):
message: BeaconBlock
signature: BLSSignature
```

#### `SignedBeaconBlockHeader`

```python
class SignedBeaconBlockHeader(Container):
message: BeaconBlockHeader
signature: BLSSignature
```

## Helper functions

*Note*: The definitions below are for specification purposes and are not necessarily optimal implementations.
Expand Down

0 comments on commit afb9a1d

Please sign in to comment.