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

Investigate diff between staking-payouts results vs staking.nominators call (targets) #1447

Open
Imod7 opened this issue Jun 5, 2024 · 0 comments

Comments

@Imod7
Copy link
Contributor

Imod7 commented Jun 5, 2024

Description
Investigate why the validator addresses returned by Sidecar's staking-payouts endpoint do not always match those retrieved from the staking.nominators call -> targets field. While the number of entries is consistent, not all addresses appear in both results. This discrepancy is not necessarily a bug so this issue has been opened to understand the underlying logic.

Steps to Reproduce
Sidecar request
https://polkadot-public-sidecar.parity-chains.parity.io/accounts/15j4dg5GzsL1bw2U2AWgeyAk6QTxq43V7ZPbXdAmbVLjvDCK/staking-payouts

returns

{
  "at": {
    "height": "21083723",
    "hash": "0x656c0b3e888430fc6f1f1900df20a059d16dbe7f1119c8c698db936d2d5e758f"
  },
  "erasPayouts": [
    {
      "era": "1463",
      "totalEraRewardPoints": "31468160",
      "totalEraPayout": "3861854409796879",
      "payouts": [
        {
          "validatorId": "16fmwCAoqJdVtmj7wGEGuFa24WT7x974ZEQsa42x8k9uop1o",
          "nominatorStakingPayout": "11340102541795",
          "claimed": false,
          "totalValidatorRewardPoints": "105400",
          "validatorCommission": "50000000",
          "totalValidatorExposure": "28126449916859119",
          "nominatorExposure": "25956323565534164"
        },
        {
          "validatorId": "15ZvLonEseaWZNy8LDkXXj3Y8bmAjxCjwvpy4pXWSL4nGSBs",
          "nominatorStakingPayout": "12329615130151",
          "claimed": false,
          "totalValidatorRewardPoints": "106420",
          "validatorCommission": "50000000",
          "totalValidatorExposure": "28126017830660242",
          "nominatorExposure": "27950293004354102"
        },
        {
          "validatorId": "1CUBGfKnpHCW1AZbdJGGj1dihn4QNZ623THYs59r6yuPEMq",
          "nominatorStakingPayout": "10072770397413",
          "claimed": false,
          "totalValidatorRewardPoints": "103900",
          "validatorCommission": "50000000",
          "totalValidatorExposure": "28124764559480449",
          "nominatorExposure": "23386979860786085"
        },
        {
          "validatorId": "15kkg1mK1tCGgqqo3c1CghtKCQsBEAPPjYNNmmRT3r29FeRX",
          "nominatorStakingPayout": "10857593131697",
          "claimed": false,
          "totalValidatorRewardPoints": "106600",
          "validatorCommission": "50000000",
          "totalValidatorExposure": "28126793702637359",
          "nominatorExposure": "24572449253517342"
        },
        {
          "validatorId": "1LUckyocmz9YzeQZHVpBvYYRGXb3rnSm2tvfz79h3G3JDgP",
          "nominatorStakingPayout": "7544076767191",
          "claimed": false,
          "totalValidatorRewardPoints": "103260",
          "validatorCommission": "50000000",
          "totalValidatorExposure": "28123011014396133",
          "nominatorExposure": "17623316955540395"
        },
        {
          "validatorId": "1JoBYyPoUdsuU7vZi3KgQAaQYn6WhKqUDXRDmsaJ8Zgxr4T",
          "nominatorStakingPayout": "7722762990094",
          "claimed": false,
          "totalValidatorRewardPoints": "106220",
          "validatorCommission": "50000000",
          "totalValidatorExposure": "28124602463315772",
          "nominatorExposure": "17538994864844029"
        },
        {
          "validatorId": "132XjckpT4rxeYgFxyJn1QdpbeXmG7arFwfnHs7LVS2VVjzh",
          "nominatorStakingPayout": "11274996840325",
          "claimed": false,
          "totalValidatorRewardPoints": "105800",
          "validatorCommission": "50000000",
          "totalValidatorExposure": "28124898893290529",
          "nominatorExposure": "25708317416427207"
        },
        {
          "validatorId": "15KDFYfFjdqhp3MDFEtHuyu9kLpXbT7k1zjx78MphViFdCaU",
          "nominatorStakingPayout": "8000797803827",
          "claimed": false,
          "totalValidatorRewardPoints": "106060",
          "validatorCommission": "50000000",
          "totalValidatorExposure": "28125906005184360",
          "nominatorExposure": "18198691221468536"
        },
        {
          "validatorId": "15iA5hpjUecWBbf38Nfegwmtyux25o3LrGaNodfZDxq5nXXE",
          "nominatorStakingPayout": "8951506930052",
          "claimed": false,
          "totalValidatorRewardPoints": "106880",
          "validatorCommission": "20000000",
          "totalValidatorExposure": "28127450466936252",
          "nominatorExposure": "19587525656467498"
        },
        {
          "validatorId": "15cfSaBcTxNr8rV59cbhdMNCRagFr3GE6B3zZRsCp4QHHKPu",
          "nominatorStakingPayout": "6462094525356",
          "claimed": false,
          "totalValidatorRewardPoints": "105020",
          "validatorCommission": "30000000",
          "totalValidatorExposure": "28164072824452833",
          "nominatorExposure": "14557960952578401"
        },
        {
          "validatorId": "14UBogS2gU4BqNySJK2uXvgwsawucnwg6kHz1vPfxRV6jY81",
          "nominatorStakingPayout": "12145451255181",
          "claimed": false,
          "totalValidatorRewardPoints": "105760",
          "validatorCommission": "4000000",
          "totalValidatorExposure": "28123330822658683",
          "nominatorExposure": "26422575125855244"
        },
        {
          "validatorId": "1q14G2evG5w34dR6YdSuPbkjP5JAourGASmDXYN1Bzn1z9E",
          "nominatorStakingPayout": "12354808850912",
          "claimed": false,
          "totalValidatorRewardPoints": "106160",
          "validatorCommission": "50000000",
          "totalValidatorExposure": "28124306078907580",
          "nominatorExposure": "28074296078907580"
        },
        {
          "validatorId": "12eKu3VtN7wm2BN8VmuJJvDyJfWNCCQg8QQVcogk5L71wtC3",
          "nominatorStakingPayout": "12333331887350",
          "claimed": false,
          "totalValidatorRewardPoints": "106220",
          "validatorCommission": "50000000",
          "totalValidatorExposure": "28124461232959637",
          "nominatorExposure": "28009814480139772"
        },
        {
          "validatorId": "15N2nvyikmU96F5wE919Gc6YLAKGtL6NoQ5ixKLeLp4T4LBV",
          "nominatorStakingPayout": "12074807625514",
          "claimed": false,
          "totalValidatorRewardPoints": "106020",
          "validatorCommission": "50000000",
          "totalValidatorExposure": "28124152393496559",
          "nominatorExposure": "27474121198068744"
        }
      ]
    }
  ]
}

Call
staking.nominators for this account 15j4dg5GzsL1bw2U2AWgeyAk6QTxq43V7ZPbXdAmbVLjvDCK

returns

{
  targets: [
    15wnPRex2QwgWNCMRVSqgqp2syDn8Gf6LPGGabRhA8zoohpt
    16JwE96t9MMvWQHuyHntqVyo6Ks97XCK1kHvWumGNLGVJg5p
    12YUDdiZCHE47WqR6etGD4gfdpSUhrRFvASrVhtc1RcbLva8
    14oaTVEjXK23ukZZqJ1cK5YQpewpeoy1aVpfPNigvmPSNHZF
    13foHgXdzr1agokV6Ed9CBHGQG1NpBqvqhmUL7rojcBUBzvq
    12WNzfWXzogo8N27yNuE9T1xXC2VyJYmTqRDuePp2CNJLgPk
    15tfUt4iQNjMyhZiJGBf4EpETE2KqtW1nfJwbBT1MvWjvcK9
    167Pbuy2HvbHshqc7Xtk4cweCXyyZoJLttAsddDuH3tN7Fco
    15ZvLonEseaWZNy8LDkXXj3Y8bmAjxCjwvpy4pXWSL4nGSBs
    127zarPDhVzmCXVQ7Kfr1yyaa9wsMuJ74GJW9Q7ezHfQEgh6
    16fmwCAoqJdVtmj7wGEGuFa24WT7x974ZEQsa42x8k9uop1o
    12bwaiu2AN7944nT1n3VX9UR2F16PuVDbtGC61Wk5DLzQJsc
    16hUkBK3h94uh7682gk7HeTYvPmSa4D1Y2w4KUZh1u1cP5J
    13BeUcLu7hzSTaoKpEtpdqiXKZz6yVfT9exKH6JuTW8RQQvJ
  ]
  submittedIn: 1,464
  suppressed: false
}

The address 16fmwCAoqJdVtmj7wGEGuFa24WT7x974ZEQsa42x8k9uop1o and 15ZvLonEseaWZNy8LDkXXj3Y8bmAjxCjwvpy4pXWSL4nGSBs can be found in both results but the rest appear different. Maybe this is related to the controller ? (result from staking.bonded call)

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

No branches or pull requests

1 participant