1

Hey so I have been running a custom substrate chain with 3 validators. But recently the chain got crashed with a log election provider failed due to ElectionError::Fallback("NoFallback.")

But the chain continued to run after getting this error in chain and in the explorer stakingElectionfailed

But after some time the peers connected to validators went from 2 to 0. And when I checked the logs, the validators started forking each other and lost the connectivity.

Trying to debug this. Anyone faced any similar issue or any hints that I can use? I'm stuck nowhere now :(

1 Answer 1

3

This is because for some reason your pallet-election-provider-multi-phase failed, without a proper fallback configured. The reason for the failure can be multiple things, but the most common one is that you don't have enough validators candidates, compared to how many you want.

In other words, if you check the storage item Staking::validator_count, and for example if this value is 4, but you only have 3 candidates, your election will always fail.

We are working on relaxing this condition in this pull request.

The easiest fix for a failing election, specially for test networks, is to change type Fallback to something that doesn't fail as easy. An example of this is frame_election_provider_support::OnchainSequentialPhragmen.

Although, using this in production can be problematic. This is also something that another pull request is trying to tackle.

2
  • hey thanks @kianenigma! actually the onchainphragmen was not properly configured and it worked fixing that. A doubt on my mind is that before losing connectivity with each other the validators in my case its 3(validator_count is also put as 3) has creatde a fork and when I checked the logs each have different extrisics. So the reason I'm thinking is that on the next epoc change the im-online was not working and no fallback configured so validators were not selected correctly?
    – kroos47
    Mar 11 at 5:23
  • Correct me if I am wrong but isn't that the job for minimum_validator_count? If election will fail for validators < validator_count doesn't it invalidate the reason for existence of minimum_validator_count? Apr 16 at 12:19

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.