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.
fixed broadcasting AccountData after node restart. (near#8407)
AccountData is broadcasted by validator node periodically (every 15min). AccountData with greatest `version` field is considered the freshest. We do not store the latest broadcasted version in storage, so each time node is restarted, is starts with version = 1, unless it learns the latest broadcasted version (from the previous execution) from the network. It means that it may happen that the correct AccountData will be broadcasted only after 15min from restart. This in turn means that the validator might be not reachable (messages cannot be routed to it) for 15min which is unacceptable. We fix that by making the validator node broadcast a new version of AccountData as soon as it learns about stale AccountData (but with higher version) from the network. Alternative solutions considered are described in the accounts_data/mod.rs (see documentation of is_new() function).
- Loading branch information
1 parent
c9909ff
commit 220bec3
Showing
16 changed files
with
524 additions
and
151 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
Oops, something went wrong.