You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the stake program depends on the existence of EpochRewards to know if it should be locked out from stake operations or not, but this sysvar is only initialized after the first rewards period. this is not an issue for native stake because it gets the value directly from SysvarCache and cleanly maps a None to false. however the bpf stake program must get it via syscall, which causes svm to halt with an uncatchable UnsupportedSysvar error in this case
in practice this is not a grave issue because no public clusters are on epoch 0, but it could be a problem for people standing up new clusters using a forked agave, because it would prevent all stake operations for the first epoch. however it also makes it impossible to use bpf stake with solana-test-validator until epoch 1
Proposed Solution
set EpochRewards to its default value at genesis. this probably just means adding it to the starting accounts that get populated in GenesisConfig and letting fill_missing_sysvar_cache_entries() pick it up in new_with_paths(). epoch rewards internals are well-encapsulated from Bank so it doesn't have a full object representation like EpochSchedule et al, just EpochRewardStatus which defaults to Inactive
The text was updated successfully, but these errors were encountered:
Problem
the stake program depends on the existence of
EpochRewards
to know if it should be locked out from stake operations or not, but this sysvar is only initialized after the first rewards period. this is not an issue for native stake because it gets the value directly fromSysvarCache
and cleanly maps aNone
tofalse
. however the bpf stake program must get it via syscall, which causes svm to halt with an uncatchableUnsupportedSysvar
error in this casein practice this is not a grave issue because no public clusters are on epoch 0, but it could be a problem for people standing up new clusters using a forked agave, because it would prevent all stake operations for the first epoch. however it also makes it impossible to use bpf stake with
solana-test-validator
until epoch 1Proposed Solution
set
EpochRewards
to its default value at genesis. this probably just means adding it to the starting accounts that get populated inGenesisConfig
and lettingfill_missing_sysvar_cache_entries()
pick it up innew_with_paths()
. epoch rewards internals are well-encapsulated fromBank
so it doesn't have a full object representation likeEpochSchedule
et al, justEpochRewardStatus
which defaults toInactive
The text was updated successfully, but these errors were encountered: