-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(consensus): fallback json rpc syncing for consensus (#3211)
if for any reason p2p syncing is behind, json RPC syncing will activate. This is a protective measure for while we deploy changes to the consensus algorithm. Fixes BFT-516
- Loading branch information
Showing
10 changed files
with
85 additions
and
160 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ mod abi; | |
mod config; | ||
mod en; | ||
pub mod era; | ||
mod metrics; | ||
mod mn; | ||
mod registry; | ||
mod storage; | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
//! Consensus related metrics. | ||
#[derive(Debug, vise::Metrics)] | ||
#[metrics(prefix = "zksync_node_consensus")] | ||
pub(crate) struct Metrics { | ||
/// Number of blocks that has been fetched via JSON-RPC. | ||
/// It is used only as a fallback when the p2p syncing is disabled or falling behind. | ||
/// so it shouldn't be increasing under normal circumstances if p2p syncing is enabled. | ||
pub fetch_block: vise::Counter, | ||
} | ||
|
||
#[vise::register] | ||
pub(super) static METRICS: vise::Global<Metrics> = vise::Global::new(); |
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
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
Oops, something went wrong.