Skip to content

chore: rename ptcVotes to payloadTimelinessVotes - #9424

Merged
nflaig merged 4 commits into
ChainSafe:unstablefrom
lodekeeper:chore/rename-ptc-votes-to-payload-timeliness-votes
May 30, 2026
Merged

chore: rename ptcVotes to payloadTimelinessVotes#9424
nflaig merged 4 commits into
ChainSafe:unstablefrom
lodekeeper:chore/rename-ptc-votes-to-payload-timeliness-votes

Conversation

@lodekeeper

Copy link
Copy Markdown
Contributor

Motivation

Align the private field name in ProtoArray with the gloas fork-choice spec, which calls this store entry payload_timeliness_vote. The companion field for blob-data availability is already tracked via the existing daVotes map.

This was the last unmerged piece of lodekeeper#8 — the data-availability tracking landed independently in #9416 and force-reorg in #9387, so only the rename is left.

Changes

  • packages/fork-choice/src/protoArray/protoArray.ts: rename private ptcVotesprivate payloadTimelinessVotes and all 6 in-class references.
  • packages/fork-choice/test/unit/protoArray/gloas.test.ts: update 2 comments that reference the old field name.

Pure rename — no behavior change. Public getPTCVotes() API, isPayloadTimely/isPayloadNotTimely, and surrounding spec comments are unchanged.

Verification

  • pnpm check-types clean in packages/fork-choice.
  • pnpm biome check clean on the two touched files.
  • vitest run test/unit/protoArray/gloas.test.ts → 80/80 pass.

🤖 Generated with AI assistance

Align the private field name with the gloas fork-choice spec, which
calls this store entry `payload_timeliness_vote` (companion to the
existing `payload_data_availability_vote` tracked by `daVotes`).

Pure rename — no behavior change. Unit tests pass (80/80 in
`packages/fork-choice/test/unit/protoArray/gloas.test.ts`). The public
`getPTCVotes()` API and the spec-comment references are unchanged.

🤖 Generated with AI assistance
@lodekeeper
lodekeeper requested a review from a team as a code owner May 30, 2026 08:24

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request renames the private property ptcVotes to payloadTimelinessVotes in the ProtoArray class to improve clarity, updating all its references and associated test comments. There are no review comments, and I have no feedback to provide.

nflaig
nflaig previously approved these changes May 30, 2026
Comment thread packages/fork-choice/src/protoArray/protoArray.ts Outdated
Mirror the `ptcVotes` → `payloadTimelinessVotes` rename so the second
PTC vote map also matches its spec name. The gloas store entry is
`payload_data_availability_vote`, parallel to `payload_timeliness_vote`.

Local variables (`const daVotes = this.payloadDataAvailabilityVotes…`)
are kept short — same pattern as `const votes` aliasing the timeliness
map in `notifyPtcMessages`/`isPayloadTimely`/etc.

Pure rename — no behavior change. `pnpm check-types` + biome clean,
80/80 gloas protoArray tests pass.

🤖 Generated with AI assistance
Comment thread packages/fork-choice/src/protoArray/protoArray.ts
`ptcAttested` was the odd one out after the previous renames: it tracks
which PTC members have voted at all (any payload_status), not a specific
vote value, so "Attested" was imprecise.  `ptcParticipation` captures the
intent (presence/membership tracking) without implying a vote direction.

🤖 Generated with AI assistance
Comment thread packages/fork-choice/src/protoArray/protoArray.ts Outdated
Per nflaig review on r3328590550, keep the previous `ptcAttested`
name. The earlier rename to `ptcParticipation` was a follow-up
suggestion; nflaig prefers the original.

🤖 Generated with AI assistance
@nflaig nflaig changed the title chore(fork-choice): rename ptcVotes to payloadTimelinessVotes chore: rename ptcVotes to payloadTimelinessVotes May 30, 2026

@nflaig nflaig left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since I generally dislike abbreviations and this matches the spec more I am in favor of the renaming but leaving up to @ensi321 or @twoeths to decide

@wemeetagain wemeetagain left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@nflaig

nflaig commented May 30, 2026

Copy link
Copy Markdown
Member

lgtm

that suffices, merging

@nflaig
nflaig merged commit b66425f into ChainSafe:unstable May 30, 2026
26 of 27 checks passed
@wemeetagain

Copy link
Copy Markdown
Member

🎉 This PR is included in v1.44.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants