Skip to content

upstream(core): Rename Accumulator to GlobalStateHash#11186

Open
jkrvivian wants to merge 1 commit intocore-protocol/upstream-changes/mainnet-1.48.4-1.49.2from
core-protocol/upstream-1.48.4-1.49.2/89eca
Open

upstream(core): Rename Accumulator to GlobalStateHash#11186
jkrvivian wants to merge 1 commit intocore-protocol/upstream-changes/mainnet-1.48.4-1.49.2from
core-protocol/upstream-1.48.4-1.49.2/89eca

Conversation

@jkrvivian
Copy link
Copy Markdown
Contributor

Description of change

Rename the Accumulator to GlobalStateHash to make room for the new Accumulator. File renames: accumulator.rsglobal_state_hash.rs, state_accumulator.rsglobal_state_hasher.rs. Key type renames: AccumulatorGlobalStateHash, StateAccumulatorGlobalStateHasher, AccumulatorStoreGlobalStateHashStore.

Links to any relevant issues

Part of #11101

How the change has been tested

  • Basic tests (linting, compilation, formatting, unit/integration tests)
  • Patch-specific tests (correctness, functionality coverage)
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that new and existing unit tests pass locally with my changes

@jkrvivian jkrvivian requested review from a team as code owners April 8, 2026 14:35
@jkrvivian jkrvivian added the node Issues related to the Core Node team label Apr 8, 2026
@jkrvivian jkrvivian requested review from a team as code owners April 8, 2026 14:35
@jkrvivian jkrvivian self-assigned this Apr 8, 2026
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
rebased-explorer Building Building Preview, Comment Apr 8, 2026 2:36pm
5 Skipped Deployments
Project Deployment Actions Updated (UTC)
apps-backend Ignored Ignored Preview Apr 8, 2026 2:36pm
apps-ui-kit Ignored Ignored Preview, Comment Apr 8, 2026 2:36pm
iota-evm-bridge Ignored Ignored Preview Apr 8, 2026 2:36pm
iota-multisig-toolkit Ignored Ignored Preview Apr 8, 2026 2:36pm
wallet-dashboard Ignored Ignored Preview, Comment Apr 8, 2026 2:36pm

Request Review

pub(crate) struct CheckpointExecutionState {
pub data: CheckpointExecutionData,
accumulator: Option<Accumulator>,
state_hasher: Option<GlobalStateHash>,
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.

I am a bit confused it is hash or hasher? Because there is a struct called GlobalStateHasher.

&self,
checkpoint: &CheckpointSequenceNumber,
accumulator: &Accumulator,
accumulator: &GlobalStateHash,
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.

here the param is still called accumulator

Copy link
Copy Markdown
Contributor

@semenov-vladyslav semenov-vladyslav left a comment

Choose a reason for hiding this comment

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

Accumulator is a proper cryptographic construction with certain properties, so Accumulator as identifier is more appropriate. Accumulator value is then hashed to get a state hash, so Hasher is also valid term but it hides the properties of cryptographic accumulator.

@semenov-vladyslav
Copy link
Copy Markdown
Contributor

Does #11165 fix the test failure?

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

Labels

core-protocol node Issues related to the Core Node team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants