diff --git a/eth2deposit/credentials.py b/eth2deposit/credentials.py index d561956..ce5318b 100644 --- a/eth2deposit/credentials.py +++ b/eth2deposit/credentials.py @@ -76,7 +76,7 @@ class Credential: @property def deposit_datum_dict(self) -> Dict[str, bytes]: """ - Returns a single deposit datum for 1 validator including all + Return a single deposit datum for 1 validator including all the information needed to verify and process the deposit. """ signed_deposit_datum = self.signed_deposit diff --git a/eth2deposit/key_handling/key_derivation/mnemonic.py b/eth2deposit/key_handling/key_derivation/mnemonic.py index 3525e87..bae4c81 100644 --- a/eth2deposit/key_handling/key_derivation/mnemonic.py +++ b/eth2deposit/key_handling/key_derivation/mnemonic.py @@ -39,7 +39,7 @@ def _get_word_list(language: str, path: str) -> Sequence[str]: def _get_word(*, word_list: Sequence[str], index: int) -> str: """ - Returns the corresponding word for the supplied index while stripping out '\\n' chars. + Return the corresponding word for the supplied index while stripping out '\\n' chars. """ assert index < 2048 return word_list[index][:-1] diff --git a/eth2deposit/key_handling/key_derivation/path.py b/eth2deposit/key_handling/key_derivation/path.py index cfd4097..8923aef 100644 --- a/eth2deposit/key_handling/key_derivation/path.py +++ b/eth2deposit/key_handling/key_derivation/path.py @@ -20,7 +20,7 @@ def path_to_nodes(path: str) -> List[int]: def mnemonic_and_path_to_key(*, mnemonic: str, path: str, password: str) -> int: """ - Returns the SK at position `path`, secured with `password` derived from `mnemonic`. + Return the SK at position `path`, secured with `password` derived from `mnemonic`. """ seed = get_seed(mnemonic=mnemonic, password=password) sk = derive_master_SK(seed) diff --git a/eth2deposit/key_handling/key_derivation/tree.py b/eth2deposit/key_handling/key_derivation/tree.py index e9d2fc2..e4af719 100644 --- a/eth2deposit/key_handling/key_derivation/tree.py +++ b/eth2deposit/key_handling/key_derivation/tree.py @@ -59,7 +59,7 @@ def _HKDF_mod_r(*, IKM: bytes, key_info: bytes=b'') -> int: def derive_child_SK(*, parent_SK: int, index: int) -> int: """ - Given a SK, `derive_child_SK` returns the child SK at the supplied `index` + Given a parent SK `parent_SK`, return the child SK at the supplied `index`. Ref: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2333.md#derive_child_sk """ diff --git a/eth2deposit/key_handling/keystore.py b/eth2deposit/key_handling/keystore.py index 11872b2..83d7837 100644 --- a/eth2deposit/key_handling/keystore.py +++ b/eth2deposit/key_handling/keystore.py @@ -75,7 +75,7 @@ class KeystoreCrypto(BytesDataclass): @dataclass class Keystore(BytesDataclass): """ - Implements an EIP 2335-compliant keystore. A keystore is a JSON file that + Implement an EIP 2335-compliant keystore. A keystore is a JSON file that stores an encrypted version of a private key under a user-supplied password. Ref: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2335.md diff --git a/eth2deposit/utils/ssz.py b/eth2deposit/utils/ssz.py index 91682c5..00cadac 100644 --- a/eth2deposit/utils/ssz.py +++ b/eth2deposit/utils/ssz.py @@ -43,7 +43,7 @@ def compute_deposit_domain(fork_version: bytes) -> bytes: def compute_deposit_fork_data_root(current_version: bytes) -> bytes: """ - Returns the appropriate ForkData root for a given deposit version. + Return the appropriate ForkData root for a given deposit version. """ genesis_validators_root = ZERO_BYTES32 # For deposit, it's fixed value assert len(current_version) == 4 diff --git a/eth2deposit/utils/validation.py b/eth2deposit/utils/validation.py index d835940..2de3f30 100644 --- a/eth2deposit/utils/validation.py +++ b/eth2deposit/utils/validation.py @@ -21,7 +21,7 @@ from eth2deposit.utils.constants import ( def verify_deposit_data_json(filefolder: str) -> bool: """ - Validates every deposit found in the deposit-data json file. + Validate every deposit found in the deposit-data JSON file folder. """ with open(filefolder, 'r') as f: deposit_json = json.load(f)