Skip to content

Handle empty upgrade metadata in GetLightdInfo#1071

Open
Zk-nd3r wants to merge 1 commit intozingolabs:devfrom
Zk-nd3r:fix/getlightdinfo-empty-upgrades
Open

Handle empty upgrade metadata in GetLightdInfo#1071
Zk-nd3r wants to merge 1 commit intozingolabs:devfrom
Zk-nd3r:fix/getlightdinfo-empty-upgrades

Conversation

@Zk-nd3r
Copy link
Copy Markdown

@Zk-nd3r Zk-nd3r commented Apr 27, 2026

Summary

This replaces the GetLightdInfo empty-upgrades panic path with a failed_precondition service error.

Changes

  • add a small helper for selecting the latest validator network upgrade
  • use it from both fetch and state backends
  • add a regression test for empty upgrade metadata

Context

This is the first single-concern issue/PR pair from the Zaino findings list. Kept narrow on purpose so it can fit your normal review and test policy before I split out the rest.

Testing

  • cargo +stable fmt --all --check
  • git diff --check

Could not run the targeted Rust test on this Windows host because the local GNU toolchain is missing dlltool.exe; build stops in dependency compile before reaching zaino-state.

Closes #1070

@Zk-nd3r Zk-nd3r force-pushed the fix/getlightdinfo-empty-upgrades branch from 227784d to 8a708fa Compare April 27, 2026 23:09
@idky137
Copy link
Copy Markdown
Contributor

idky137 commented Apr 28, 2026

utACK (Thanks for finding and fixing this, and helping to make Zaino stronger!)

@zancas zancas self-assigned this Apr 28, 2026
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.

GetLightdInfo should handle empty upgrade metadata without panic

3 participants