move signed envelopes

This commit is contained in:
protolambda 2019-12-03 21:34:48 +01:00
parent 103a66b2af
commit afb9a1d7c0
No known key found for this signature in database
GPG Key ID: EC89FDBB2B4C7623

View File

@ -33,20 +33,21 @@
- [`DepositMessage`](#depositmessage) - [`DepositMessage`](#depositmessage)
- [`DepositData`](#depositdata) - [`DepositData`](#depositdata)
- [`BeaconBlockHeader`](#beaconblockheader) - [`BeaconBlockHeader`](#beaconblockheader)
- [`SignedBeaconBlockHeader`](#signedbeaconblockheader)
- [Beacon operations](#beacon-operations) - [Beacon operations](#beacon-operations)
- [`ProposerSlashing`](#proposerslashing) - [`ProposerSlashing`](#proposerslashing)
- [`AttesterSlashing`](#attesterslashing) - [`AttesterSlashing`](#attesterslashing)
- [`Attestation`](#attestation) - [`Attestation`](#attestation)
- [`Deposit`](#deposit) - [`Deposit`](#deposit)
- [`VoluntaryExit`](#voluntaryexit) - [`VoluntaryExit`](#voluntaryexit)
- [`SignedVoluntaryExit`](#signedvoluntaryexit)
- [Beacon blocks](#beacon-blocks) - [Beacon blocks](#beacon-blocks)
- [`BeaconBlockBody`](#beaconblockbody) - [`BeaconBlockBody`](#beaconblockbody)
- [`BeaconBlock`](#beaconblock) - [`BeaconBlock`](#beaconblock)
- [`SignedBeaconBlock`](#signedbeaconblock)
- [Beacon state](#beacon-state) - [Beacon state](#beacon-state)
- [`BeaconState`](#beaconstate) - [`BeaconState`](#beaconstate)
- [Signed envelopes](#signed-envelopes)
- [`SignedVoluntaryExit`](#signedvoluntaryexit)
- [`SignedBeaconBlock`](#signedbeaconblock)
- [`SignedBeaconBlockHeader`](#signedbeaconblockheader)
- [Helper functions](#helper-functions) - [Helper functions](#helper-functions)
- [Math](#math) - [Math](#math)
- [`integer_squareroot`](#integer_squareroot) - [`integer_squareroot`](#integer_squareroot)
@ -374,14 +375,6 @@ class BeaconBlockHeader(Container):
body_root: Root body_root: Root
``` ```
#### `SignedBeaconBlockHeader`
```python
class SignedBeaconBlockHeader(Container):
message: BeaconBlockHeader
signature: BLSSignature
```
### Beacon operations ### Beacon operations
#### `ProposerSlashing` #### `ProposerSlashing`
@ -426,14 +419,6 @@ class VoluntaryExit(Container):
validator_index: ValidatorIndex validator_index: ValidatorIndex
``` ```
#### `SignedVoluntaryExit`
```python
class SignedVoluntaryExit(Container):
message: VoluntaryExit
signature: BLSSignature
```
### Beacon blocks ### Beacon blocks
#### `BeaconBlockBody` #### `BeaconBlockBody`
@ -461,14 +446,6 @@ class BeaconBlock(Container):
body: BeaconBlockBody body: BeaconBlockBody
``` ```
#### `SignedBeaconBlock`
```python
class SignedBeaconBlock(Container):
message: BeaconBlock
signature: BLSSignature
```
### Beacon state ### Beacon state
#### `BeaconState` #### `BeaconState`
@ -505,6 +482,34 @@ class BeaconState(Container):
finalized_checkpoint: Checkpoint 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 ## Helper functions
*Note*: The definitions below are for specification purposes and are not necessarily optimal implementations. *Note*: The definitions below are for specification purposes and are not necessarily optimal implementations.