Skip to content

Bug: Inconsistent state between market bid list and market bid get (reverse index issue) #416

@Zblocker64

Description

@Zblocker64

Summary

akash q market bid list and akash q market bid get return inconsistent bid states for the same bid. Specifically, bids that are actually closed show up as active when queried via list, while get correctly reports them as closed.

This appears to affect reverse lookup indices in the market module and likely originated during a network upgrade.

Environment

  • Binary version: v1.1.1
  • Network: Akash mainnet
  • Lease created pre-upgrade: Yes

Steps to Reproduce

  1. Query bids via list:
akash q market bid list \
  --state active \
  --provider akash1mjy4a8x02eep0z7cf3r0y3fkxd772dcffk44m3
  1. Observe the following bid returned as state: active:
bid:
  id:
    dseq: "23929880"
    gseq: 1
    oseq: 1
    bseq: 0
    owner: akash18andxgtd6r08zzfpcdqg9pdr6smks7gv76tyt6
    provider: akash1mjy4a8x02eep0z7cf3r0y3fkxd772dcffk44m3
  state: active
  1. Query the same bid directly:
akash q market bid get \
  --owner akash18andxgtd6r08zzfpcdqg9pdr6smks7gv76tyt6 \
  --dseq 23929880 \
  --provider akash1mjy4a8x02eep0z7cf3r0y3fkxd772dcffk44m3
  1. Observe the bid state:
bid:
  state: closed

Expected Behavior

  • market bid list and market bid get should return consistent bid states.
  • Closed bids should not appear as active in list queries.

Actual Behavior

  • market bid list shows the bid as active
  • market bid get correctly shows the bid as closed

Additional Findings

  • The same issue reproduces for leases:
    • market lease liststate: active
    • market lease getstate: closed
  • Deployment queries (deployment list / deployment get) are consistent and correctly show closed.
  • Reverse lookup queries using state filters appear unreliable.

Root Cause (Preliminary)

  • Bid and lease objects are correctly closed.
  • Reverse indices used by list queries appear stale or corrupted, likely due to an issue during a network upgrade.
  • This is a chain-side issue, not a CLI/client bug.

Impact

  • Consumers relying on list queries may incorrectly infer bid or lease state.
  • Workaround required to verify state via get.
  • Provider lease checks are not impacted, as providers query leases individually.

Workaround

  • Do not trust state returned by list queries.
  • Fetch objects via list, then verify each bid or lease via get.

Metadata

Metadata

Assignees

Labels

repo/nodeAkash node repo issues

Type

No type

Projects

Status

Up Next (prioritized)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions