Skip to content

[BUG] Price feeder fails to query staking module on v5.1.0 due to gRPC service incompatibility #200

@OneNov0209

Description

@OneNov0209

After upgrading a KiiChain node to v5.1.0, the oracle price-feeder fails to operate correctly.

The price-feeder repeatedly errors when attempting to query staking validator information via gRPC, resulting in failed oracle ticks on every block.
This prevents the price-feeder from submitting price votes and breaks oracle functionality entirely.


🧪 Environment

• KiiChain node version: v5.1.0

• Price feeder version: v1.3.3

• Network: Mainnet

• gRPC: Enabled (default configuration)

• Setup: Clean installation (no custom patches)


🔁 Steps to Reproduce

  1. Run a KiiChain node upgraded to v5.1.0

  2. Ensure the node is fully synced

  3. Clone and build price-feeder v1.3.3 without modifications

  4. Configure the price-feeder to connect to the node using gRPC

  5. Start the price-feeder service:

systemctl start price-feeder

  1. Observe the logs

❌ Observed Behavior

The price-feeder fails on every oracle tick with the following error:

failed to get staking validator: rpc error:
code = Unimplemented desc = unknown service cosmos.staking.v1beta1.Query

Example logs:

INF Received new Chain Height: 25764017 module=oracle_client
WRN Oracle tick failed for height 25764017, err:
failed to get staking validator:
rpc error: code = Unimplemented desc = unknown service cosmos.staking.v1beta1.Query

This error repeats continuously on every new block height.


✅ Expected Behavior

The price-feeder should be able to:

• Query staking validator information

• Fetch prices from providers

• Submit oracle votes successfully on each block


🚨 Impact

• Oracle price-feeder is completely non-functional

• No price votes are submitted

• Prices may become stale or unavailable

• Affects all operators running price-feeder on v5.1.0

This represents a High severity issue, as it breaks a core oracle component of the network.


🔍 Analysis / Suspected Cause

Based on investigation:

• gRPC incompatibility between price-feeder v1.3.3 and node v5.1.0

• The staking gRPC service
cosmos.staking.v1beta1.Query
appears unavailable or incompatible

• gRPC reflection may be disabled or unsupported for this query

• Price-feeder strictly requires gRPC and has no REST fallback


🛠 Temporary Workaround (Operator Side)

A local workaround was tested by:

• Removing mandatory gRPC validation

• Bypassing staking gRPC calls

• Adding a REST API fallback for validator data

With this workaround:

✅ Price-feeder runs without errors

✅ Prices are fetched correctly

✅ Oracle votes are submitted successfully


💡 Suggestions

Make gRPC optional in the price-feeder

Add a proper REST API fallback for staking queries

Improve version compatibility checks between node and price-feeder

Document gRPC requirements explicitly for oracle operators


📝 Additional Notes

Issue is reproducible on a clean setup

No special configuration required to trigger the error

Occurs immediately after starting the price-feeder


Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions