6

I have added parachain staking and moonbeam-orbiters of moonbeam in our project. When I test it, all the extrinsics are performing well except the staking part. I have gone through this https://docs.moonbeam.network/tokens/staking/stake/#staking-your-tokens Here, it is mentioned that "To access staking features, you need to import/create an Ethereum-style account first (H160 address)," Can we access staking features with a normal account? Like If I perform delegate extrinsics with a normal account, staking tokens reflected in the reserve amount of the delegator account(EVE)(As mentioned in above tutorial). But in my case the Eve account is not getting any reward. enter image description here

Some Setup details: 1. enter image description here 2. enter image description here 3. enter image description here

  1. enter image description here
  2. enter image description here
  3. enter image description here
  4. enter image description here
  5. enter image description here

What should I do to get reward ? Thanks in advance.

1
  • I have also transfer some money from one account to another for getting some fees which can be our reward. Jun 19 at 13:28

1 Answer 1

2
+50

Without knowing much about the setup, this is how Delegator Eve ends up getting a reward, when a candidate Alice creates a block:

To receive a reward, the following parameters are important: defaultBlocksPerRound (default 600) and rewardPaymentDelay (default 2).

Using the above values, a single round goes on for 600 blocks, where Alice may create N (of total) number of blocks and gets points awarded for it accordingly. The storage items round and points can be used to observe the current round, and the total points that are rewarded currently to all candidates.

Once a round is complete, rewardPaymentDelay comes into play, so Eve will be awarded after 2 rounds, i.e. after 1200 (2 * 600) blocks once the current round has ended. The reward will only be awarded to the candidate and their delegators that are present in the topDelegations storage item.

EDIT:

EventHandler implementation for staking pallet:

impl pallet_author_inherent::Config for Runtime {
    type SlotBeacon = RelaychainBlockNumberProvider<Self>;
    type AccountLookup = MoonbeamOrbiters;

    type EventHandler = ParachainStaking; // This calls the staking pallet
                                          // when a block is produced
    type CanAuthor = AuthorFilter;
    type WeightInfo = pallet_author_inherent::weights::SubstrateWeight<Runtime>;
}
16
  • 1
    Thanks for the additional context. In one of the images, I see that the points value is actually 0. Could you check that for the previous round? You can also check if awardedPts for the previous round and collator are actually non-zero. It might just be that the collator never produced a block.
    – nbaztec
    Jun 20 at 10:35
  • 2
    I have checked points and awardedPts for previous round as well but it shows 0. How I can check that collator is produced block or not ? Jun 20 at 12:24
  • 1
    The only way to check that would be to see the authors of previous blocks. The information is also visible on polkadotjs Explorer home page, where recent blocks are listed. On their right is the collator that produced the block. If the collator is listed but the points for them for the current round is 0, then something is indeed wrong.
    – nbaztec
    Jun 20 at 13:58
  • 1
    Additionally, the note_author handler must be invoked from the consensus (we use nimbus), that informs the staking pallet of the authorship and allows it to assign points to the author.
    – nbaztec
    Jun 20 at 14:32
  • 1
    Now I joined charlie as a collator but Blocks are still produced by alice(added photo above). for note_author, I import the whole parachain-staking and moonbeam-orbiter in our project. I have also added some more photos of code above please take a look. Jun 20 at 17:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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