Skip to content

rpc-client: get_protx_info sends the hash in inner byte order and cannot decode a fractional operatorReward #1386

Open

Description

@shumkov

Two problems in the shared RPC client's protx info path (seen at the commit Platform pins, c9aeac0, and on current dev):

  1. get_protx_info sends protx_hash.to_hex(), the inner byte order, while Core expects the hash in display order, so the request names the wrong ProTx.
  2. ProTxInfo.operator_reward is a u32, but Core reports the operator reward as a decimal percentage (for example 12.5), so decoding a masternode with a fractional reward fails.

Platform works around both in its own adapter (DefaultCoreRPC in packages/rs-drive-abci/src/rpc/core.rs, dashpay/platform#5775), but other consumers still hit them.

Request: send the hash in display order, decode operatorReward as a decimal (or offer a typed state-only protx info API), and add regression tests for the request parameter and a fractional reward at the client boundary.

Context: dashpay/platform#5775 (comment)

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions