add documentation

This commit is contained in:
Kirill Lykov 2022-03-15 16:48:26 +00:00 committed by kirill lykov
parent 7074ebf45a
commit 2da896fa40
2 changed files with 28 additions and 0 deletions

View File

@ -7,6 +7,7 @@ repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
publish = false
description = "Tool to send various requests to cluster in order to evaluate the effect on performance"
[dependencies]
bincode = "1.3.3"

View File

@ -1,3 +1,30 @@
//! DoS tool
//!
//! Sends requests to cluster in a loop to measure
//! the effect of ihandling these requests on the performance of the cluster.
//!
//! * `mode` argument defines interface to use (e.g. rpc, tvu, tpu)
//! * `data-type` argument specifies the type of the request.
//! It takes various values, some of them makes sense with particular `mode` value (e.g. `get-account-info` is valid only with `mode=rpc`).
//!
//! Most of the options are provided for `data-type = transaction`.
//! These options allow to compose transaction whcih fails at
//! a particular stage of the processing pipeline.
//!
//! Example 1: send random transactions to TPU
//! ```bash
//! solana-dos --entrypoint 127.0.0.1:8001 --mode tpu --data-type random
//! ```
//!
//! Example 2: send unique transactions with valid hashblock to TPU
//! ```bash
//! solana-dos --entrypoint 127.0.0.1:8001 --mode tpu --data-type random
//! solana-dos --entrypoint 127.0.0.1:8001 --mode tpu \
//! --data-type transaction --generate-unique-transactions
//! --payer config/bootstrap-validator/identity.json \
//! --generate-valid-blockhash
//! ```
//!
#![allow(clippy::integer_arithmetic)]
use {
clap::{crate_description, crate_name, crate_version, ArgEnum, Args, Parser},