move to weav prefix; wevr is deprecated

Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
Uncle Stretch 2026-11-01 19:12:11 +03:00
parent ee23e6ba64
commit 3870446a5b
Signed by: str3tch
GPG Key ID: 84F3190747EE79AA
5 changed files with 17 additions and 17 deletions

View File

@ -2,7 +2,7 @@
name = "ghost-eye" name = "ghost-eye"
authors = ["str3tch <stretch@ghostchain.io>"] authors = ["str3tch <stretch@ghostchain.io>"]
description = "Application for interacting with Casper/Ghost nodes that are exposing RPC only to the localhost" description = "Application for interacting with Casper/Ghost nodes that are exposing RPC only to the localhost"
version = "0.4.2" version = "0.4.3"
edition = "2021" edition = "2021"
homepage = "https://git.ghostchain.io/ghostchain" homepage = "https://git.ghostchain.io/ghostchain"
repository = "https://git.ghostchain.io/ghostchain/ghost-eye" repository = "https://git.ghostchain.io/ghostchain/ghost-eye"

View File

@ -70,10 +70,10 @@ impl RotatePopup {
let babe_key = format!("0x{}", &self.cached_keys[2..66]); let babe_key = format!("0x{}", &self.cached_keys[2..66]);
let gran_key = format!("0x{}", &self.cached_keys[66..130]); let gran_key = format!("0x{}", &self.cached_keys[66..130]);
let audi_key = format!("0x{}", &self.cached_keys[130..194]); let audi_key = format!("0x{}", &self.cached_keys[130..194]);
let wevr_key = format!("0x{}", &self.cached_keys[194..258]); let weav_key = format!("0x{}", &self.cached_keys[194..258]);
let exds_key = format!("0x{}", &self.cached_keys[258..322]); let exds_key = format!("0x{}", &self.cached_keys[258..322]);
(babe_key, gran_key, audi_key, wevr_key, exds_key) (babe_key, gran_key, audi_key, weav_key, exds_key)
} else { } else {
( (
String::from("0x0000000000000000000000000000000000000000000000000000000000000000"), String::from("0x0000000000000000000000000000000000000000000000000000000000000000"),
@ -145,7 +145,7 @@ impl Component for RotatePopup {
fn draw(&mut self, frame: &mut Frame, area: Rect) -> Result<()> { fn draw(&mut self, frame: &mut Frame, area: Rect) -> Result<()> {
if self.is_active { if self.is_active {
let (border_style, border_type) = self.palette.create_popup_style(); let (border_style, border_type) = self.palette.create_popup_style();
let (babe_key, gran_key, audi_key, wevr_key, exds_key) = self.parse_session_keys(); let (babe_key, gran_key, audi_key, weav_key, exds_key) = self.parse_session_keys();
let table = Table::new( let table = Table::new(
vec![ vec![
@ -162,8 +162,8 @@ impl Component for RotatePopup {
Cell::from(Text::from(audi_key).alignment(Alignment::Right)), Cell::from(Text::from(audi_key).alignment(Alignment::Right)),
]), ]),
Row::new(vec![ Row::new(vec![
Cell::from(Text::from("wevr".to_string()).alignment(Alignment::Left)), Cell::from(Text::from("weav".to_string()).alignment(Alignment::Left)),
Cell::from(Text::from(wevr_key).alignment(Alignment::Right)), Cell::from(Text::from(weav_key).alignment(Alignment::Right)),
]), ]),
Row::new(vec![ Row::new(vec![
Cell::from(Text::from("exds".to_string()).alignment(Alignment::Left)), Cell::from(Text::from("exds".to_string()).alignment(Alignment::Left)),

View File

@ -56,7 +56,7 @@ impl StashInfo {
stash_address: String::new(), stash_address: String::new(),
stash_pair: None, stash_pair: None,
session_keys: Default::default(), session_keys: Default::default(),
key_names: &["gran", "babe", "audi", "wevr", "exds"], key_names: &["gran", "babe", "audi", "weav", "exds"],
stash_filepath: PathBuf::from("/etc/ghost/stash-key"), stash_filepath: PathBuf::from("/etc/ghost/stash-key"),
} }
} }

View File

@ -238,15 +238,15 @@ pub async fn get_session_keys(
account_id: &[u8; 32], account_id: &[u8; 32],
) -> Result<()> { ) -> Result<()> {
let maybe_session_keys = super::raw_calls::session::next_keys(api, None, account_id).await?; let maybe_session_keys = super::raw_calls::session::next_keys(api, None, account_id).await?;
let (babe_key, gran_key, audi_key, wevr_key, exds_key) = match maybe_session_keys { let (babe_key, gran_key, audi_key, weav_key, exds_key) = match maybe_session_keys {
Some(session_keys) => { Some(session_keys) => {
let babe_key = format!("0x{}", hex::encode(session_keys.babe.0)); let babe_key = format!("0x{}", hex::encode(session_keys.babe.0));
let gran_key = format!("0x{}", hex::encode(session_keys.grandpa.0)); let gran_key = format!("0x{}", hex::encode(session_keys.grandpa.0));
let audi_key = format!("0x{}", hex::encode(session_keys.authority_discovery.0)); let audi_key = format!("0x{}", hex::encode(session_keys.authority_discovery.0));
let wevr_key = format!("0x{}", hex::encode(session_keys.weaver.0)); let weav_key = format!("0x{}", hex::encode(session_keys.weaver.0));
let exds_key = format!("0x{}", hex::encode(session_keys.exodus.0)); let exds_key = format!("0x{}", hex::encode(session_keys.exodus.0));
(babe_key, gran_key, audi_key, wevr_key, exds_key) (babe_key, gran_key, audi_key, weav_key, exds_key)
} }
None => (String::new(), String::new(), String::new(), String::new(), String::new()), None => (String::new(), String::new(), String::new(), String::new(), String::new()),
}; };
@ -254,7 +254,7 @@ pub async fn get_session_keys(
check_author_has_key(rpc_client, action_tx, &babe_key, "babe").await?; check_author_has_key(rpc_client, action_tx, &babe_key, "babe").await?;
check_author_has_key(rpc_client, action_tx, &gran_key, "gran").await?; check_author_has_key(rpc_client, action_tx, &gran_key, "gran").await?;
check_author_has_key(rpc_client, action_tx, &audi_key, "audi").await?; check_author_has_key(rpc_client, action_tx, &audi_key, "audi").await?;
check_author_has_key(rpc_client, action_tx, &wevr_key, "wevr").await?; check_author_has_key(rpc_client, action_tx, &weav_key, "weav").await?;
check_author_has_key(rpc_client, action_tx, &exds_key, "exds").await?; check_author_has_key(rpc_client, action_tx, &exds_key, "exds").await?;
Ok(()) Ok(())
@ -269,17 +269,17 @@ pub async fn get_queued_session_keys(
let account = super::raw_calls::convert_array_to_account_id(account_id); let account = super::raw_calls::convert_array_to_account_id(account_id);
let maybe_queued_keys = super::raw_calls::session::queued_keys(api, None).await?; let maybe_queued_keys = super::raw_calls::session::queued_keys(api, None).await?;
let (babe_key, gran_key, audi_key, wevr_key, exds_key) = match maybe_queued_keys { let (babe_key, gran_key, audi_key, weav_key, exds_key) = match maybe_queued_keys {
Some(session_keys) => match session_keys.iter().find(|tuple| tuple.0 == account) { Some(session_keys) => match session_keys.iter().find(|tuple| tuple.0 == account) {
Some(keys) => { Some(keys) => {
let session_keys = &keys.1; let session_keys = &keys.1;
let babe_key = format!("0x{}", hex::encode(session_keys.babe.0)); let babe_key = format!("0x{}", hex::encode(session_keys.babe.0));
let gran_key = format!("0x{}", hex::encode(session_keys.grandpa.0)); let gran_key = format!("0x{}", hex::encode(session_keys.grandpa.0));
let audi_key = format!("0x{}", hex::encode(session_keys.authority_discovery.0)); let audi_key = format!("0x{}", hex::encode(session_keys.authority_discovery.0));
let wevr_key = format!("0x{}", hex::encode(session_keys.weaver.0)); let weav_key = format!("0x{}", hex::encode(session_keys.weaver.0));
let exds_key = format!("0x{}", hex::encode(session_keys.exodus.0)); let exds_key = format!("0x{}", hex::encode(session_keys.exodus.0));
(babe_key, gran_key, audi_key, wevr_key, exds_key) (babe_key, gran_key, audi_key, weav_key, exds_key)
} }
None => (String::new(), String::new(), String::new(), String::new(), String::new()), None => (String::new(), String::new(), String::new(), String::new(), String::new()),
}, },
@ -289,7 +289,7 @@ pub async fn get_queued_session_keys(
check_author_has_key(rpc_client, action_tx, &babe_key, "q_babe").await?; check_author_has_key(rpc_client, action_tx, &babe_key, "q_babe").await?;
check_author_has_key(rpc_client, action_tx, &gran_key, "q_gran").await?; check_author_has_key(rpc_client, action_tx, &gran_key, "q_gran").await?;
check_author_has_key(rpc_client, action_tx, &audi_key, "q_audi").await?; check_author_has_key(rpc_client, action_tx, &audi_key, "q_audi").await?;
check_author_has_key(rpc_client, action_tx, &wevr_key, "q_wevr").await?; check_author_has_key(rpc_client, action_tx, &weav_key, "q_weav").await?;
check_author_has_key(rpc_client, action_tx, &exds_key, "q_exds").await?; check_author_has_key(rpc_client, action_tx, &exds_key, "q_exds").await?;
Ok(()) Ok(())

View File

@ -115,7 +115,7 @@ pub async fn set_keys(
hashed_keys_str: &String, hashed_keys_str: &String,
maybe_nonce: Option<&mut u32>, maybe_nonce: Option<&mut u32>,
) -> Result<TxProgress<CasperConfig, OnlineClient<CasperConfig>>> { ) -> Result<TxProgress<CasperConfig, OnlineClient<CasperConfig>>> {
let (babe_key, gran_key, audi_key, wevr_key, exds_key) = { let (babe_key, gran_key, audi_key, weav_key, exds_key) = {
let s = hashed_keys_str.trim_start_matches("0x"); let s = hashed_keys_str.trim_start_matches("0x");
( (
hex::decode(&s[0..64]) hex::decode(&s[0..64])
@ -149,7 +149,7 @@ pub async fn set_keys(
babe: runtime_types::sp_consensus_babe::app::Public(babe_key), babe: runtime_types::sp_consensus_babe::app::Public(babe_key),
grandpa: runtime_types::sp_consensus_grandpa::app::Public(gran_key), grandpa: runtime_types::sp_consensus_grandpa::app::Public(gran_key),
authority_discovery: runtime_types::sp_authority_discovery::app::Public(audi_key), authority_discovery: runtime_types::sp_authority_discovery::app::Public(audi_key),
weaver: runtime_types::ghost_weaver::sr25519::app_sr25519::Public(wevr_key), weaver: runtime_types::ghost_weaver::sr25519::app_sr25519::Public(weav_key),
exodus: runtime_types::ghost_exodus::sr25519::app_sr25519::Public(exds_key), exodus: runtime_types::ghost_exodus::sr25519::app_sr25519::Public(exds_key),
}; };
// it seems like there is no check for the second paramter, that's why // it seems like there is no check for the second paramter, that's why