forked from near/nearcore
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(runtime): Fix validator stake host function (near#4535)
In near#3821, we correctly fixed the meaning of `last_block_hash` in `ApplyState`. However, this unveiled a bug that was previously masked: we used `last_block_hash` in the implementation of `validator_*` function and unfortunately, when the chunk is applied, the block is not yet added to epoch manager and therefore trying to access `last_block_hash` leads to a `EpochError`, which in turn leads to the chunk getting rejected. This is what caused the testnet to stall on June 29th. This fix has already been deployed on both testnet and mainnet. This PR ports the fix to master. Test plan ---------- * `test_validator_stake_host_function`
- Loading branch information
1 parent
d2ba8b6
commit 84ae110
Showing
2 changed files
with
88 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters