3

In Pallet ImOnline configuration

type MaxKeys: Get<u32> The maximum number of keys that can be added.

What keys are they talking about? Is it the number of fields from our SessionsKey struct?

1 Answer 1

2

ImOnline sends a heartbeat when an authority asks it to. The MaxKeys is setting the maximum number of authorities that are allowed to ask for the heartbeat to be sent.

We try and bound blockchain storage where possible. One of the benefits of this is that the worst case weight is likely to be less with lower bounds and thus users get cheaper fees.

3
  • Meaning if I set 10,000, the maximum number of heartbeat transactions I could recieve are 10,000 or is the the max number of heartbeats I can send to peers? Because there's also MaxPeerInHeartbeats which I am not sure how it relates to MaxKeys Commented Mar 15, 2022 at 12:11
  • MaxPeerInHeartbeats is the maximum number of peers to track. Kusama has 1000 validators so I think this constant could be set to 999 for kusama (as you don't need to track yourself).
    – Squirrel
    Commented Mar 15, 2022 at 14:12
  • Reading the code it looks to me that MaxKeys should also be set to the maximum possible number of validatiors.
    – Squirrel
    Commented Mar 15, 2022 at 14:25

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.