-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add rpc metrics * update metrics as batches to reduce ocalls * count all rpc requests and TC submissions * add histogram metric for stf execution duration * add histogram metric for stf execution call counts for success and failure * add total issuance metric * add parentchains processed block metrics * measure time to load and write state * add metric for remaining duration in AURA slots * fmt * taplo fmt * clippy * fix teeracle build * add metric for state size * add account balances for enclave on all parentchains and shard vault * balance metrics with decimals applied * add enclave fingerprint and version as labels * add sidechain peer count metric * add metric for last finalized sidechain block * refactor to use more lables * cosmetics * fix and simplify bogus top-pool-size metric * clippy * fix tests * review fixes * nicen up * change top pool size to a priori * clippy
- Loading branch information
Showing
48 changed files
with
817 additions
and
257 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
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
31 changes: 31 additions & 0 deletions
31
core-primitives/node-api/api-client-extensions/src/pallet_sidechain.rs
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,31 @@ | ||
use crate::ApiResult; | ||
use itp_api_client_types::{traits::GetStorage, Api, Config, Request}; | ||
use itp_types::{parentchain::SidechainBlockConfirmation, ShardIdentifier}; | ||
|
||
pub const SIDECHAIN: &str = "Sidechain"; | ||
|
||
pub trait PalletSidechainApi { | ||
type Hash; | ||
|
||
fn latest_sidechain_block_confirmation( | ||
&self, | ||
shard: &ShardIdentifier, | ||
at_block: Option<Self::Hash>, | ||
) -> ApiResult<Option<SidechainBlockConfirmation>>; | ||
} | ||
|
||
impl<RuntimeConfig, Client> PalletSidechainApi for Api<RuntimeConfig, Client> | ||
where | ||
RuntimeConfig: Config, | ||
Client: Request, | ||
{ | ||
type Hash = RuntimeConfig::Hash; | ||
|
||
fn latest_sidechain_block_confirmation( | ||
&self, | ||
shard: &ShardIdentifier, | ||
at_block: Option<Self::Hash>, | ||
) -> ApiResult<Option<SidechainBlockConfirmation>> { | ||
self.get_storage_map(SIDECHAIN, "LatestSidechainBlockConfirmation", shard, at_block) | ||
} | ||
} |
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.