Skip to content

fix: normalize signer_key 0x prefix in signer stackers lookup#2451

Open
the-fixr wants to merge 1 commit intohirosystems:developfrom
the-fixr:fix/signer-key-0x-prefix
Open

fix: normalize signer_key 0x prefix in signer stackers lookup#2451
the-fixr wants to merge 1 commit intohirosystems:developfrom
the-fixr:fix/signer-key-0x-prefix

Conversation

@the-fixr
Copy link

Summary

  • The getPoxCycleSignerStackers method correctly normalizes signer_key to include the 0x prefix (via has0xPrefix) but the signer existence check on line 901 used the raw args.signer_key instead of the normalized signerKey variable
  • This caused the /v2/pox/cycles/{cycle_number}/signers/{signer_key}/stackers endpoint to return a 404 PoX cycle signer not found error when a user queried without the 0x prefix, even though the main query (line 968) correctly used the normalized variable

The fix is a one-line change: use signerKey (already normalized on line 891) instead of args.signer_key in the existence check query.

Test plan

  • Query /v2/pox/cycles/{N}/signers/{key}/stackers with 0x-prefixed key — should return results (no change)
  • Query the same endpoint without 0x prefix — should now return results instead of 404

Fixes #2009

The `getPoxCycleSignerStackers` method normalizes `args.signer_key`
to include the `0x` prefix (line 891) but the signer existence check
on line 901 used the raw `args.signer_key` instead of the normalized
`signerKey` variable. This caused lookups to fail when users omitted
the `0x` prefix, since `signing_key` values in `pox_sets` are stored
with the prefix.

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

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Param signer_key should work without 0x prefix

1 participant