Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data-node: missing data about markets after restoring from network-history #7726

Closed
fkondej opened this issue Mar 1, 2023 · 1 comment · Fixed by #7757
Closed

data-node: missing data about markets after restoring from network-history #7726

fkondej opened this issue Mar 1, 2023 · 1 comment · Fixed by #7757

Comments

@fkondej
Copy link
Contributor

fkondej commented Mar 1, 2023

Problem encountered

Missing data for not expired/closed markets.

After restoring 3 nodes from latest snapshot + latest network-history segments on Fairground, the FE console started reporting errors.

It was due to this GraphQL request:

query MarketsData {
  marketsConnection {
    edges {
      node {
        data {
          ...MarketsDataFields
          __typename
        }
        __typename
      }
      __typename
    }
    __typename
  }
}

fragment MarketsDataFields on MarketData {
  market {
    id
    __typename
  }
  bestBidPrice
  bestOfferPrice
  markPrice
  trigger
  staticMidPrice
  marketTradingMode
  indicativeVolume
  indicativePrice
  bestStaticBidPrice
  bestStaticOfferPrice
  targetStake
  suppliedStake
  auctionStart
  auctionEnd
  __typename
}

In the response we got these errors:

"errors": [
    {
      "message": "no market data for market: 4fc9255197c30072db6c630e114879bb82bf181b19ea5fdf00432cc3642f273f",
      "path": [
        "marketsConnection",
        "edges",
        4,
        "node",
        "data"
      ],
      "extensions": {
        "code": 13,
        "type": "Internal"
      }
    },
    {
      "message": "no market data for market: 9c55fb644c6f7de5422d40d691a62bffd5898384c70135bab29ba1e3e2e5280a",
      "path": [
        "marketsConnection",
        "edges",
        9,
        "node",
        "data"
      ],
      "extensions": {
        "code": 13,
        "type": "Internal"
      }
    },
    {
      "message": "no market data for market: 734a42802816b625e32c07f372e0a946bf608b96cb947aed66405315e4b22860",
      "path": [
        "marketsConnection",
        "edges",
        12,
        "node",
        "data"
      ],
      "extensions": {
        "code": 13,
        "type": "Internal"
      }
    },
    {
      "message": "no market data for market: 5b2cba65c72b98ad9343b0c2cf782f3f62fe1398de7135f30e00fcd9301bf40a",
      "path": [
        "marketsConnection",
        "edges",
        11,
        "node",
        "data"
      ],
      "extensions": {
        "code": 13,
        "type": "Internal"
      }
    },
    {
      "message": "no market data for market: 95fa4b30842770e2e349b0f73ae9788371513ad335ea43c5c1eb4a896a972997",
      "path": [
        "marketsConnection",
        "edges",
        14,
        "node",
        "data"
      ],
      "extensions": {
        "code": 13,
        "type": "Internal"
      }
    },
    {
      "message": "no market data for market: 81a93975147b1f80462a9d5e358698b1a6b1dfc03e41a13de42f6f0c40da1340",
      "path": [
        "marketsConnection",
        "edges",
        13,
        "node",
        "data"
      ],
      "extensions": {
        "code": 13,
        "type": "Internal"
      }
    },
    {
      "message": "no market data for market: fd7185bf8bd332f273392bb44904ab9ae830bd6d0c191fc8061854e04cd59333",
      "path": [
        "marketsConnection",
        "edges",
        18,
        "node",
        "data"
      ],
      "extensions": {
        "code": 13,
        "type": "Internal"
      }
    },
    {
      "message": "no market data for market: e8c639bbf53f8840b54e8ac67c69ea8229d3694d1fd6d46d82f23e910a9e71e6",
      "path": [
        "marketsConnection",
        "edges",
        10,
        "node",
        "data"
      ],
      "extensions": {
        "code": 13,
        "type": "Internal"
      }
    },
    {
      "message": "no market data for market: 3f150918007c7b3dabaffc448551e35c3839bdaf3602a65d90b18307edac37bf",
      "path": [
        "marketsConnection",
        "edges",
        19,
        "node",
        "data"
      ],
      "extensions": {
        "code": 13,
        "type": "Internal"
      }
    },
    {
      "message": "no market data for market: 267504b9faa18f5f872da12992543d0c6421775408a7458d7d1f31e80c59245a",
      "path": [
        "marketsConnection",
        "edges",
        5,
        "node",
        "data"
      ],
      "extensions": {
        "code": 13,
        "type": "Internal"
      }
    },
    {
      "message": "no market data for market: a445647e31d778777dd4e093b01210927dd951bb4f4d29d05606ca6db12a807b",
      "path": [
        "marketsConnection",
        "edges",
        15,
        "node",
        "data"
      ],
      "extensions": {
        "code": 13,
        "type": "Internal"
      }
    },
    {
      "message": "no market data for market: a7d1f6f2ac33ea15fc441c4d37846776ce6be8947d5cf0bd4e7bb7ffa986d24d",
      "path": [
        "marketsConnection",
        "edges",
        16,
        "node",
        "data"
      ],
      "extensions": {
        "code": 13,
        "type": "Internal"
      }
    },
    {
      "message": "no market data for market: b258fee40f1a8b14631c65b8d108c5380b9ade748801951f125422c9bd6b415d",
      "path": [
        "marketsConnection",
        "edges",
        17,
        "node",
        "data"
      ],
      "extensions": {
        "code": 13,
        "type": "Internal"
      }
    }
  ]

Some of these markets were closed/expired, but not all.

e.g.

4fc9255197c30072db6c630e114879bb82bf181b19ea5fdf00432cc3642f273f is in opening auction on other node (n08)

More details in the thread: https://vegaprotocol.slack.com/archives/C037STCKMGC/p1677575019221289

@ettec
Copy link
Contributor

ettec commented Mar 3, 2023

The solution here is to add a current state table for market data that will hold the last market data update each market.

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

Successfully merging a pull request may close this issue.

3 participants