0

code:

const nominators = await api.query.staking.nominators.entries();

example json output for nominators vaiable:

[
  [
    [
      "145xupEFYa81KCexCH5bRU6k3fqY9GgLWAH8nMhat2CKHkcd"
    ],
    {
      "targets": [
        "12gPFmRqnsDhc9C5DuXyXBFA23io5fSGtKTSAimQtAWgueD2",
        "13Q48Ep3PVpvXA1BeVcUhNJerLshsaeq4EdgPUHnemqJYmND",
        "13s9RrQSFbnp2TneY7nkdLmGc3ijBw12YQct8pc8km36Z9hg",
        "14bUYpiF2oxVpmXDnFxBipSi4m9zYBThMZoLpY8bRQrPQNG1",
        "15wepZh1jWNqxBjsgErm8HmYiE21n79c5krQJeTsYAjHddeM",
        "16DKyH4fggEXeGwCytqM19e9NFGkgR2neZPDJ5ta8BKpPbPK",
        "13RENAu9cpMpxp3EYzWFGpZXgvMZGDrnconYugNdynQz1sDQ",
        "14Y626iStBUWcNtnmH97163BBJJ2f7jc1piGMZwEQfK3t8zw",
        "16YwUZyLdeAoe4KmhivGwuuJpBH1US4qkUtXK2V83MVXUy6x",
        "14BeKcfcvJSJjvu9GZ2CA8EQ3XkK9J1HdwDrfz5Sg5ERDnrP",
        "124X3VPduasSodAjS6MPd5nEqM8SUdKN5taMUUPtkWqF1fVf",
        "127nWP7adKAsXBW135FrBgmt5mxuFA5YpXSrdD6BWp6RUoHs",
        "1EWbJs2jdh34mhH8ovwQTNiLmQ87mMksJW3raRMxk6WXY29",
        "15UyiZ9rYhrX39Rasc1iE4sdME7WHNFSj8RQT3yuuytd3Nrd",
        "15cfSaBcTxNr8rV59cbhdMNCRagFr3GE6B3zZRsCp4QHHKPu",
        "148Ta5cWD3wekK3C6EbdDhYrdxC5e71VTKQCjmHUjE1DCG31"
      ],
      "submittedIn": "813",
      "suppressed": false
    }
  ],...

I thought that the targets were validators which the nominator voted for, but that doesn't always seem to be the case.

What do these targets represent?

3
  • Can you give an example when this is not the case?
    – Shawn Tabrizi
    Commented Aug 28, 2022 at 11:52
  • @ShawnTabrizi Is this a list of all validators a nominator has staked with in the past (not adjusted for unbonding)? I was confused because many of the targets are not validators when you check subscan, but I think that's because they are simply no longer validators.
    – Teo
    Commented Aug 30, 2022 at 1:45
  • 1
    It is not constantly updated. If a user nominates some people a long time ago, never updates their nominations, and the validators drop out, then the storage will be in a stale state.
    – Shawn Tabrizi
    Commented Aug 30, 2022 at 22:04

1 Answer 1

3

It comes from the staking Rust code.

It means what validators this nominator is nominating.

2
  • I don't think that's correct. If you check subscan it will show you that many of those targets are no longer supported by the nominator; some of them aren't even validators anymore. I think that this is a list of all validators the nominator has nominated for.
    – Teo
    Commented Aug 30, 2022 at 1:30
  • 1
    The nominators set those targets. That's a list they want to nominate. We could say they are nominating those validators from some point of view because the nominator selects them and clicks the nominate button. And what you said is the result of the election.
    – AurevoirXavier
    Commented Aug 30, 2022 at 1:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.