Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warn for not using local stacks node with the signer #4782

Merged
merged 8 commits into from
May 22, 2024
10 changes: 8 additions & 2 deletions stacks-signer/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ use clap::Parser;
use clarity::vm::types::QualifiedContractIdentifier;
use libsigner::{RunningSigner, Signer, SignerEventReceiver, SignerSession, StackerDBSession};
use libstackerdb::StackerDBChunkData;
use slog::{slog_debug, slog_info};
use slog::{slog_debug, slog_info, slog_warn};
use stacks_common::util::hash::to_hex;
use stacks_common::util::secp256k1::{MessageSignature, Secp256k1PublicKey};
use stacks_common::{debug, info};
use stacks_common::{debug, info, warn};
use stacks_signer::cli::{
Cli, Command, GenerateStackingSignatureArgs, GetChunkArgs, GetLatestChunkArgs, PutChunkArgs,
RunSignerArgs, StackerDBArgs,
Expand Down Expand Up @@ -81,6 +81,12 @@ fn write_chunk_to_stdout(chunk_opt: Option<Vec<u8>>) {
fn spawn_running_signer(path: &PathBuf) -> SpawnedSigner {
let config = GlobalConfig::try_from(path).unwrap();
let endpoint = config.endpoint;
warn!(
ASuciuX marked this conversation as resolved.
Show resolved Hide resolved
"Reminder: The signer is primarily designed for use with a local or subnet network stacks node. \
ASuciuX marked this conversation as resolved.
Show resolved Hide resolved
It's important to exercise caution if you are communicating with an external node, \
as this could potentially expose sensitive data or functionalities to security risks \
if additional proper security checks are not integrated in place."
);
info!("Starting signer with config: {}", config);
let (cmd_send, cmd_recv) = channel();
let (res_send, res_recv) = channel();
Expand Down