Skip to content

fix(api): node renamed witness→validator on read shapes - #16

Merged
chiliec merged 1 commit into
mainfrom
fix/witness-to-validator-read-types
Aug 13, 2026
Merged

fix(api): node renamed witness→validator on read shapes#16
chiliec merged 1 commit into
mainfrom
fix/witness-to-validator-read-types

Conversation

@chiliec

@chiliec chiliec commented Aug 13, 2026

Copy link
Copy Markdown
Member

What

The viz-cpp-node witness→validator migration renamed the fields the node returns from the read RPCs, but the SDK types still declared the old names:

Old (declared) New (node emits) RPC
DynamicGlobalProperties.current_witness current_validator get_dynamic_global_properties
Block.witness validator get_block / get_block_header
Block.witness_signature validator_signature get_block

Change

  • New names primary, old names kept as @deprecated aliases.
  • Widen getBlockHeader's Pick to include validator.

The write path (op-schema, tx builder) already used the new names — this fixes only the lagging read shapes.

Verified against live node.viz.cx

  • get_block_header{ previous, timestamp, validator, transaction_merkle_root, extensions } (no witness)
  • get_dynamic_global_propertiescurrent_validator
  • get_blockvalidator, validator_signature

tsc --noEmit clean; 232 unit tests pass.

The viz-cpp-node witness→validator migration renamed the fields the node
returns from the read RPCs, but the SDK types still declared the old names:

- DynamicGlobalProperties.current_witness → current_validator
  (database_api.get_dynamic_global_properties)
- Block.witness            → validator
- Block.witness_signature  → validator_signature
  (database_api.get_block / get_block_header)

Add the new names as primary and keep the old ones as @deprecated aliases;
widen getBlockHeader's Pick to include validator. The write path
(op-schema, tx builder) already used the new names — this fixes only the
lagging read shapes. Verified against live node.viz.cx: get_block_header
returns { previous, timestamp, validator, ... } and dgp returns
current_validator. tsc --noEmit clean; 232 unit tests pass.
@chiliec
chiliec merged commit a5dd9e3 into main Aug 13, 2026
4 checks passed
@chiliec
chiliec deleted the fix/witness-to-validator-read-types branch August 13, 2026 14:25
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.

1 participant