Skip to content

Commit

Permalink
resp to PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Zanyar Sherwani authored and Zanyar Sherwani committed Jul 13, 2022
1 parent d2df2ce commit e9dbdde
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 32 deletions.
1 change: 1 addition & 0 deletions core/src/relayer_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ impl RelayerStage {
.spawn(move || {
if !address.contains("http") {
error!("missing or malformed mev proxy address provided, exiting mev loop [address={}]", address);
datapoint_info!(METRICS_NAME, ("bad_proxy_addr", 1, i64));
return;
}

Expand Down
2 changes: 1 addition & 1 deletion core/src/tip_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ impl TipManager {
SanitizedTransaction::try_from_legacy_transaction(Transaction::new_signed_with_payer(
&[ix],
Some(&self.tip_distribution_account_config.payer.pubkey()),
&[&self.tip_distribution_account_config.payer],
&[self.tip_distribution_account_config.payer.as_ref()],
recent_blockhash,
))
.unwrap()
Expand Down
5 changes: 4 additions & 1 deletion multinode-demo/bootstrap-validator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ args+=(
--identity "$identity"
--vote-account "$vote_account"
--tip-distribution-account-payer "$tip_distribution_account_payer"
--merkle-root-upload-authority "$vote_account"
--merkle-root-upload-authority "$identity"
--rpc-faucet-address 127.0.0.1:9900
--no-poh-speed-test
--no-os-network-limits-test
Expand All @@ -164,6 +164,9 @@ args+=(
)
default_arg --gossip-port 8001
default_arg --log -
default_arg --tip-payment-program-pubkey "DThZmRNNXh7kvTQW9hXeGoWGPKktK8pgVAyoTLjH7UrT"
default_arg --tip-distribution-program-pubkey "FjrdANjvo76aCYQ4kf9FM1R8aESUcEE6F8V7qyoVUQcM"
default_arg --commission-bps 0


pid=
Expand Down
6 changes: 5 additions & 1 deletion multinode-demo/validator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,11 @@ fi

default_arg --identity "$identity"
default_arg --vote-account "$vote_account"
default_arg --merkle-root-upload-authority "$vote_account"
default_arg --merkle-root-upload-authority "$identity"
default_arg --tip-distribution-account-payer "$identity"
default_arg --tip-payment-program-pubkey "DThZmRNNXh7kvTQW9hXeGoWGPKktK8pgVAyoTLjH7UrT"
default_arg --tip-distribution-program-pubkey "FjrdANjvo76aCYQ4kf9FM1R8aESUcEE6F8V7qyoVUQcM"
default_arg --commission-bps 0
default_arg --ledger "$ledger_dir"
default_arg --log -
default_arg --full-rpc-api
Expand Down
23 changes: 0 additions & 23 deletions sdk/src/signer/keypair.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ use {
fs::{self, File, OpenOptions},
io::{Read, Write},
path::Path,
sync::Arc,
},
wasm_bindgen::prelude::*,
};
Expand Down Expand Up @@ -67,28 +66,6 @@ impl Keypair {
}
}

impl Signer for Arc<Keypair> {
fn pubkey(&self) -> Pubkey {
Pubkey::new(self.0.public.as_ref())
}

fn try_pubkey(&self) -> Result<Pubkey, SignerError> {
Ok(self.pubkey())
}

fn sign_message(&self, message: &[u8]) -> Signature {
Signature::new(&self.0.sign(message).to_bytes())
}

fn try_sign_message(&self, message: &[u8]) -> Result<Signature, SignerError> {
Ok(self.sign_message(message))
}

fn is_interactive(&self) -> bool {
false
}
}

impl Signer for Keypair {
fn pubkey(&self) -> Pubkey {
Pubkey::new(self.0.public.as_ref())
Expand Down
12 changes: 6 additions & 6 deletions validator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3207,15 +3207,15 @@ fn tip_manager_config_from_matches(
tip_payment_program_id: pubkey_of(matches, "tip_payment_program_pubkey").unwrap_or_else(
|| {
if !voting_disabled {
panic!("--tip-payment-program-pubkey not specified");
panic!("--tip-payment-program-pubkey argument required when validator is voting");
}
Pubkey::new_unique()
},
),
tip_distribution_program_id: pubkey_of(matches, "tip_distribution_program_pubkey")
.unwrap_or_else(|| {
if !voting_disabled {
panic!("--tip-distribution-program-pubkey not specified");
panic!("--tip-distribution-program-pubkey argument required when validator is voting");
}
Pubkey::new_unique()
}),
Expand All @@ -3224,7 +3224,7 @@ fn tip_manager_config_from_matches(
let keypair =
keypair_of(matches, "tip_distribution_account_payer").unwrap_or_else(|| {
if !voting_disabled {
panic!("--tip-distribution-account-payer not specified");
panic!("--tip-distribution-account-payer argument required when validator is voting");
}
Keypair::new()
});
Expand All @@ -3234,19 +3234,19 @@ fn tip_manager_config_from_matches(
merkle_root_upload_authority: pubkey_of(matches, "merkle_root_upload_authority")
.unwrap_or_else(|| {
if !voting_disabled {
panic!("--merkle-root-upload-authority not specified");
panic!("--merkle-root-upload-authority argument required when validator is voting");
}
Pubkey::new_unique()
}),
vote_account: pubkey_of(matches, "vote_account").unwrap_or_else(|| {
if !voting_disabled {
panic!("--vote-account not specified");
panic!("--vote-account argument required when validator is voting");
}
Pubkey::new_unique()
}),
commission_bps: value_t!(matches, "commission_bps", u16).unwrap_or_else(|_| {
if !voting_disabled {
panic!("--commission-bps not specified, validator will not vote");
panic!("--commission-bps argument required when validator is voting");
}
0
}),
Expand Down

0 comments on commit e9dbdde

Please sign in to comment.