refactor: expand all abbreviated identifiers to full words#800
Merged
tcoratger merged 2 commits intoMay 29, 2026
Merged
Conversation
A reference specification should read as explicitly as possible, so every abbreviated identifier is spelled out in full across src, tests, and the packages/ testing framework (~280 distinct renames). Highlights: - validator_id -> validator_index (the domain-correct term) - att -> attestation, msg -> message, sig -> signature, sk -> secret_key, pk/pubkey -> public_key, idx -> index, prev -> previous, agg -> aggregate, prop -> proposal, conn -> connection, privkey -> private_key, len -> length - function/method/class names too (split_by_msg -> split_by_message, Pubkey -> PublicKey, get_attestation_pubkey -> get_attestation_public_key) - MSG_LEN_FE -> MESSAGE_LENGTH_FIELD_ELEMENTS Kept verbatim: canonical protocol IDs (peer_id, node_id, protocol_id, subnet_id, stream_id), ENR fields (attnets, seq), num_* prefixes, the reqresp protocol name, library APIs (argparse dest, model_config, tmp_path), and external symbols (e.g. lean_multisig_py functions like split_type_2_by_msg). Internal config/fixture string keys were updated to match the renamed fields (genesis YAML keys, validator registry manifest keys, one metrics coverage-section label). Test assertions/fixtures referencing identifiers via strings (parametrize names) were aligned. Adds a NO ABBREVIATIONS IN IDENTIFIERS rule to CLAUDE.md documenting the convention and its canonical exceptions. just check passes (ruff, format, ty, codespell, mdformat). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
c99ba5d to
b6d63a0
Compare
The attribute self._keys_dir was renamed to self._keys_directory, but the matching __slots__ string entry must be renamed too -- otherwise setting the attribute raises AttributeError (slotted classes have no __dict__). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
A reference specification should read as explicitly as possible. Abbreviated identifiers (
att_data,validator_id,msg,sk, …) make the spec ambiguous. This PR spells every abbreviated identifier out in full acrosssrc/,tests/, and thepackages/testing framework — ~280 distinct renames — and codifies the convention as a rule inCLAUDE.md.What changed
Python identifiers only (variables, parameters, functions, methods, classes, attributes, constants) — never on-the-wire strings.
validator_id→validator_index(the domain-correct term)att→attestation,msg→message,sig→signature,sk→secret_key,pk/pubkey→public_keyidx→index,prev→previous,curr→current,agg→aggregate,prop→proposal,conn→connection,privkey→private_key,len→lengthsplit_by_msg→split_by_message,Pubkey→PublicKey,get_attestation_pubkey→get_attestation_public_keyMSG_LEN_FE→MESSAGE_LENGTH_FIELD_ELEMENTSDeliberately kept (verified case-by-case)
peer_id,node_id,protocol_id,subnet_id,stream_idattnets/seq, thenum_*prefix, thereqresplibp2p namedest=,model_config,tmp_path,CERT_NONE, …lean_multisig_py(split_type_2_by_msg)Format-affecting notes
Internal config/fixture string keys were updated to stay consistent with the renamed fields. Test vectors regenerate, but cross-client tooling may reference these:
attestation_pubkey/proposal_pubkey→attestation_public_key/proposal_public_key*_pubkey_hex,*_privkey_file→*_public_key_hex,*_private_key_file)"agg_start_new"→"aggregate_start_new"Verification
just checkpasses (ruff, format, ty type-check, codespell, mdformat)🤖 Generated with Claude Code