revery bls types to include BLS

This commit is contained in:
Danny Ryan 2019-02-01 20:42:11 -08:00
parent 7ff345404e
commit 11ae40fc49
No known key found for this signature in database
GPG Key ID: 2765A792E42CE07A
2 changed files with 6 additions and 10 deletions

View File

@ -612,8 +612,8 @@ We define the following Python custom types for type hinting and readability:
| `ValidatorIndex` | `uint64` | an index in the validator registry | | `ValidatorIndex` | `uint64` | an index in the validator registry |
| `Gwei` | `uint64` | an amount in Gwei | | `Gwei` | `uint64` | an amount in Gwei |
| `Bytes32` | `bytes32` | 32 bytes of binary data | | `Bytes32` | `bytes32` | 32 bytes of binary data |
| `Pubkey` | `bytes48` | a BLS12-381 public key | | `BLSPubkey` | `bytes48` | a BLS12-381 public key |
| `Signature` | `bytes96` | a BLS12-381 signature | | `BLSSignature` | `bytes96` | a BLS12-381 signature |
## Helper functions ## Helper functions
@ -1200,8 +1200,8 @@ def get_entry_exit_effect_epoch(epoch: Epoch) -> Epoch:
```python ```python
def validate_proof_of_possession(state: BeaconState, def validate_proof_of_possession(state: BeaconState,
pubkey: Pubkey, pubkey: BLSPubkey,
proof_of_possession: Signature, proof_of_possession: BLSSignature,
withdrawal_credentials: Bytes32) -> bool: withdrawal_credentials: Bytes32) -> bool:
""" """
Verify the given ``proof_of_possession``. Verify the given ``proof_of_possession``.
@ -1230,9 +1230,9 @@ Used to add a [validator](#dfn-validator) or top up an existing [validator](#dfn
```python ```python
def process_deposit(state: BeaconState, def process_deposit(state: BeaconState,
pubkey: Pubkey, pubkey: BLSPubkey,
amount: Gwei, amount: Gwei,
proof_of_possession: Signature, proof_of_possession: BLSSignature,
withdrawal_credentials: Bytes32) -> None: withdrawal_credentials: Bytes32) -> None:
""" """
Process a deposit from Ethereum 1.0. Process a deposit from Ethereum 1.0.

4
tmp.md
View File

@ -1,4 +0,0 @@
Should we strength the registry change condition to all cro
Need to set `active_index_root` for `ENTRY_EXIT_DELAY` in the future at the end
of the current registry change.