Skip to content
30 changes: 15 additions & 15 deletions builder/src/bin/permissionless-builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use vbs::version::StaticVersionType;
struct NonPermissionedBuilderOptions {
/// URL of hotshot events API running on Espresso Sequencer DA committee node
/// The builder will subscribe to this server to receive hotshot events
#[clap(
#[arg(
long,
env = "ESPRESSO_SEQUENCER_HOTSHOT_EVENT_STREAMING_API_URL",
default_value = "http://localhost:22001"
Expand All @@ -29,15 +29,15 @@ struct NonPermissionedBuilderOptions {
///
/// This is the address fees will be charged to.
/// It must be funded with ETH in the Espresso fee ledger
#[clap(long, env = "ESPRESSO_BUILDER_ETH_MNEMONIC")]
#[arg(long, env = "ESPRESSO_BUILDER_ETH_MNEMONIC")]
eth_mnemonic: String,

/// Index of a funded account derived from eth-mnemonic.
#[clap(long, env = "ESPRESSO_BUILDER_ETH_ACCOUNT_INDEX", default_value = "8")]
#[arg(long, env = "ESPRESSO_BUILDER_ETH_ACCOUNT_INDEX", default_value = "8")]
eth_account_index: u32,

/// Url we will use for RPC communication with L1.
#[clap(
#[arg(
long,
env = "ESPRESSO_BUILDER_L1_PROVIDER",
value_delimiter = ',',
Expand All @@ -46,31 +46,31 @@ struct NonPermissionedBuilderOptions {
l1_provider_url: Vec<Url>,

/// Peer nodes use to fetch missing state
#[clap(long, env = "ESPRESSO_SEQUENCER_STATE_PEERS", value_delimiter = ',')]
#[arg(long, env = "ESPRESSO_SEQUENCER_STATE_PEERS", value_delimiter = ',')]
state_peers: Vec<Url>,

/// Port to run the builder server on.
#[clap(short, long, env = "ESPRESSO_BUILDER_SERVER_PORT")]
#[arg(short, long, env = "ESPRESSO_BUILDER_SERVER_PORT")]
port: u16,

/// Bootstrapping View number
#[clap(short, long, env = "ESPRESSO_BUILDER_BOOTSTRAPPED_VIEW")]
#[arg(short, long, env = "ESPRESSO_BUILDER_BOOTSTRAPPED_VIEW")]
view_number: u64,

/// BUILDER TRANSACTIONS CHANNEL CAPACITY
#[clap(long, env = "ESPRESSO_BUILDER_TX_CHANNEL_CAPACITY")]
#[arg(long, env = "ESPRESSO_BUILDER_TX_CHANNEL_CAPACITY")]
pub tx_channel_capacity: NonZeroUsize,

/// BUILDER HS EVENTS CHANNEL CAPACITY
#[clap(long, env = "ESPRESSO_BUILDER_EVENT_CHANNEL_CAPACITY")]
#[arg(long, env = "ESPRESSO_BUILDER_EVENT_CHANNEL_CAPACITY")]
pub event_channel_capacity: NonZeroUsize,

/// NETWORK INITIAL NODE COUNT
#[clap(short, long, env = "ESPRESSO_BUILDER_INIT_NODE_COUNT")]
#[arg(short, long, env = "ESPRESSO_BUILDER_INIT_NODE_COUNT")]
node_count: NonZeroUsize,

/// The amount of time a builder can wait before timing out a request to the API.
#[clap(
#[arg(
short,
long,
env = "ESPRESSO_BUILDER_WEBSERVER_RESPONSE_TIMEOUT_DURATION",
Expand All @@ -80,7 +80,7 @@ struct NonPermissionedBuilderOptions {
max_api_timeout_duration: Duration,

/// The amount of time a builder can wait before incrementing the max block size.
#[clap(
#[arg(
short = 'M',
long,
env = "ESPRESSO_BUILDER_MAX_BLOCK_SIZE_INCREMENT_PERIOD",
Expand All @@ -90,18 +90,18 @@ struct NonPermissionedBuilderOptions {
max_block_size_increment_period: Duration,

/// The amount of time a builder can wait before incrementing the max block size.
#[clap(
#[arg(
long,
env = "ESPRESSO_BUILDER_TX_STATUS_CACHE_SIZE",
default_value = "819200"
)]
tx_status_cache_size: usize,

/// Path to TOML file containing genesis state.
#[clap(long, name = "GENESIS_FILE", env = "ESPRESSO_BUILDER_GENESIS_FILE")]
#[arg(long, value_name = "GENESIS_FILE", env = "ESPRESSO_BUILDER_GENESIS_FILE")]
genesis_file: PathBuf,

#[clap(flatten)]
#[command(flatten)]
logging: logging::Config,
}

Expand Down
24 changes: 12 additions & 12 deletions contracts/rust/deployer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,52 +66,52 @@ pub const MAX_HISTORY_RETENTION_SECONDS: u32 = 864000;
#[derive(Clone, Debug, Parser)]
pub struct DeployedContracts {
/// Use an already-deployed PlonkVerifier.sol instead of deploying a new one.
#[clap(long, env = Contract::PlonkVerifier)]
#[arg(long, env = Contract::PlonkVerifier)]
plonk_verifier: Option<Address>,
/// Timelock.sol
#[clap(long, env = Contract::Timelock)]
#[arg(long, env = Contract::Timelock)]
timelock: Option<Address>,
/// PlonkVerifierV2.sol
#[clap(long, env = Contract::PlonkVerifierV2)]
#[arg(long, env = Contract::PlonkVerifierV2)]
plonk_verifier_v2: Option<Address>,

/// Use an already-deployed LightClient.sol instead of deploying a new one.
#[clap(long, env = Contract::LightClient)]
#[arg(long, env = Contract::LightClient)]
light_client: Option<Address>,
/// LightClientV2.sol
#[clap(long, env = Contract::LightClientV2)]
#[arg(long, env = Contract::LightClientV2)]
light_client_v2: Option<Address>,

/// Use an already-deployed LightClient.sol proxy instead of deploying a new one.
#[clap(long, env = Contract::LightClientProxy)]
#[arg(long, env = Contract::LightClientProxy)]
light_client_proxy: Option<Address>,

/// Use an already-deployed FeeContract.sol instead of deploying a new one.
#[clap(long, env = Contract::FeeContract)]
#[arg(long, env = Contract::FeeContract)]
fee_contract: Option<Address>,

/// Use an already-deployed FeeContract.sol proxy instead of deploying a new one.
#[clap(long, env = Contract::FeeContractProxy)]
#[arg(long, env = Contract::FeeContractProxy)]
fee_contract_proxy: Option<Address>,

/// Use an already-deployed EspToken.sol instead of deploying a new one.
#[clap(long, env = Contract::EspToken)]
#[arg(long, env = Contract::EspToken)]
esp_token: Option<Address>,

/// Use an already-deployed EspToken.sol proxy instead of deploying a new one.
#[clap(long, env = Contract::EspTokenProxy)]
#[arg(long, env = Contract::EspTokenProxy)]
esp_token_proxy: Option<Address>,

/// Use an already-deployed StakeTable.sol instead of deploying a new one.
#[clap(long, env = Contract::StakeTable)]
#[arg(long, env = Contract::StakeTable)]
stake_table: Option<Address>,

/// Use an already-deployed StakeTableV2.sol instead of deploying a new one.
#[clap(long, env = Contract::StakeTableV2)]
stake_table_v2: Option<Address>,

/// Use an already-deployed StakeTable.sol proxy instead of deploying a new one.
#[clap(long, env = Contract::StakeTableProxy)]
#[arg(long, env = Contract::StakeTableProxy)]
stake_table_proxy: Option<Address>,
}

Expand Down
2 changes: 1 addition & 1 deletion contracts/rust/diff-test/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ struct Cli {
#[arg(value_enum)]
action: Action,
/// Optional arguments for the `action`
#[arg(value_parser, num_args = 1.., value_delimiter = ' ')]
#[arg(num_args = 1.., value_delimiter = ' ')]
args: Vec<String>,
}

Expand Down
4 changes: 2 additions & 2 deletions hotshot-query-service/examples/simple-server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ const NUM_NODES: usize = 2;
#[derive(Parser)]
struct Options {
/// Port on which to host the query service for the first consensus node.
#[clap(long, default_value = "18080")]
#[arg(long, default_value = "18080")]
port1: u16,

/// Port on which to host the query service for the second consensus node.
#[clap(long, default_value = "28080")]
#[arg(long, default_value = "28080")]
port2: u16,
}

Expand Down
2 changes: 1 addition & 1 deletion hotshot-state-prover/src/bin/gen-demo-genesis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use url::Url;
#[derive(Parser)]
struct Args {
/// URL of the HotShot orchestrator.
#[clap(
#[arg(
short,
long,
env = "ESPRESSO_SEQUENCER_ORCHESTRATOR_URL",
Expand Down
30 changes: 15 additions & 15 deletions hotshot-state-prover/src/bin/state-prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,51 +20,51 @@ use vbs::version::StaticVersion;
#[derive(Parser)]
struct Args {
/// Start the prover service daemon
#[clap(short, long, action)]
#[arg(short, long)]
daemon: bool,

/// Url of the state relay server
#[clap(
#[arg(
long,
default_value = "http://localhost:8083",
env = "ESPRESSO_STATE_RELAY_SERVER_URL"
)]
relay_server: Url,

/// The frequency of updating the light client state, expressed in update interval
#[clap(short, long = "freq", value_parser = parse_duration, default_value = "10m", env = "ESPRESSO_STATE_PROVER_UPDATE_INTERVAL")]
#[arg(short, long = "freq", value_parser = parse_duration, default_value = "10m", env = "ESPRESSO_STATE_PROVER_UPDATE_INTERVAL")]
update_interval: Duration,

/// Interval between retries if a state update fails
#[clap(long = "retry-freq", value_parser = parse_duration, default_value = "2s", env = "ESPRESSO_STATE_PROVER_RETRY_INTERVAL")]
#[arg(long = "retry-freq", value_parser = parse_duration, default_value = "2s", env = "ESPRESSO_STATE_PROVER_RETRY_INTERVAL")]
retry_interval: Duration,

/// Interval between retries if a state update fails
#[clap(
#[arg(
long = "retries",
default_value = "10",
env = "ESPRESSO_STATE_PROVER_ONESHOT_RETRIES"
)]
max_retries: u64,

/// URL of layer 1 Ethereum JSON-RPC provider.
#[clap(
#[arg(
long,
env = "ESPRESSO_SEQUENCER_L1_PROVIDER",
default_value = "http://localhost:8545"
)]
l1_provider: Url,

/// Address of LightClient contract on layer 1.
#[clap(long, env = "ESPRESSO_SEQUENCER_LIGHT_CLIENT_PROXY_ADDRESS")]
#[arg(long, env = "ESPRESSO_SEQUENCER_LIGHT_CLIENT_PROXY_ADDRESS")]
light_client_address: Address,

/// Mnemonic phrase for a funded Ethereum wallet.
#[clap(long, env = "ESPRESSO_SEQUENCER_ETH_MNEMONIC", default_value = None)]
#[arg(long, env = "ESPRESSO_SEQUENCER_ETH_MNEMONIC", default_value = None)]
eth_mnemonic: String,

/// Index of a funded account derived from eth-mnemonic.
#[clap(
#[arg(
long,
env = "ESPRESSO_SEQUENCER_STATE_PROVER_ACCOUNT_INDEX",
default_value = "0"
Expand All @@ -73,7 +73,7 @@ struct Args {

/// URL of a sequencer node that is currently providing the HotShot config.
/// This is used to initialize the stake table.
#[clap(
#[arg(
long,
env = "ESPRESSO_SEQUENCER_URL",
default_value = "http://localhost:24000"
Expand All @@ -83,26 +83,26 @@ struct Args {
/// If daemon and provided, the service will run a basic HTTP server on the given port.
///
/// The server provides healthcheck and version endpoints.
#[clap(short, long, env = "ESPRESSO_PROVER_SERVICE_PORT")]
#[arg(short, long, env = "ESPRESSO_PROVER_SERVICE_PORT")]
pub port: Option<u16>,

/// Stake table capacity for the prover circuit
#[clap(short, long, env = "ESPRESSO_SEQUENCER_STAKE_TABLE_CAPACITY", default_value_t = DEFAULT_STAKE_TABLE_CAPACITY)]
#[arg(short, long, env = "ESPRESSO_SEQUENCER_STAKE_TABLE_CAPACITY", default_value_t = DEFAULT_STAKE_TABLE_CAPACITY)]
pub stake_table_capacity: usize,

/// max acceptable gas price **in Gwei** for prover to send light client update transaction
#[clap(short, long, env = "ESPRESSO_STATE_PROVER_MAX_GAS_PRICE_IN_GWEI")]
#[arg(short, long, env = "ESPRESSO_STATE_PROVER_MAX_GAS_PRICE_IN_GWEI")]
pub max_gas_price: Option<String>,

/// Indicated if the prover is using the old V1 LightClient contract
#[clap(
#[arg(
long = "v1-contract",
env = "ESPRESSO_STATE_PROVER_V1_CONTRACT",
default_value = "false"
)]
pub v1_contract: bool,

#[clap(flatten)]
#[command(flatten)]
logging: logging::Config,
}

Expand Down
9 changes: 4 additions & 5 deletions node-metrics/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ pub struct Options {
/// URL.
/// Example:
/// - https://query.cappuccino.testnet.espresso.network/v0/
#[clap(long, env = "ESPRESSO_NODE_VALIDATOR_STAKE_TABLE_SOURCE_BASE_URL")]
#[arg(long, env = "ESPRESSO_NODE_VALIDATOR_STAKE_TABLE_SOURCE_BASE_URL")]
stake_table_source_base_url: Url,

/// leaf_stream_base_url is the base URL for the availability API endpoint
Expand All @@ -142,7 +142,7 @@ pub struct Options {
/// Example:
/// - https://query.cappuccino.testnet.espresso.network/v0/
///
#[clap(long, env = "ESPRESSO_NODE_VALIDATOR_LEAF_STREAM_SOURCE_BASE_URL")]
#[arg(long, env = "ESPRESSO_NODE_VALIDATOR_LEAF_STREAM_SOURCE_BASE_URL")]
leaf_stream_base_url: Url,

/// initial_node_public_base_urls is a list of URLs that are the initial
Expand All @@ -155,7 +155,7 @@ pub struct Options {
///
/// Example URL:
/// - https://query-1.cappuccino.testnet.espresso.network/
#[clap(
#[arg(
long,
env = "ESPRESSO_NODE_VALIDATOR_INITIAL_NODE_PUBLIC_BASE_URLS",
value_delimiter = ','
Expand All @@ -165,9 +165,8 @@ pub struct Options {
/// port is the port that the node validator service will listen on.
/// This port is expected to be a valid port number that is available
/// for the service to bind to.
#[clap(
#[arg(
long,
value_parser,
env = "ESPRESSO_NODE_VALIDATOR_PORT",
default_value = "9000"
)]
Expand Down
8 changes: 4 additions & 4 deletions sequencer/src/api/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -568,15 +568,15 @@ impl Options {
#[derive(Parser, Clone, Copy, Debug)]
pub struct Http {
/// Port that the HTTP API will use.
#[clap(long, env = "ESPRESSO_SEQUENCER_API_PORT", default_value = "8080")]
#[arg(long, env = "ESPRESSO_SEQUENCER_API_PORT", default_value = "8080")]
pub port: u16,

/// Maximum number of concurrent HTTP connections the server will allow.
///
/// Connections exceeding this will receive and immediate 429 response and be closed.
///
/// Leave unset for no connection limit.
#[clap(long, env = "ESPRESSO_SEQUENCER_MAX_CONNECTIONS")]
#[arg(long, env = "ESPRESSO_SEQUENCER_MAX_CONNECTIONS")]
pub max_connections: Option<usize>,
}

Expand Down Expand Up @@ -610,7 +610,7 @@ pub struct Config;
#[derive(Parser, Clone, Debug, Default)]
pub struct Query {
/// Peers for fetching missing data for the query service.
#[clap(long, env = "ESPRESSO_SEQUENCER_API_PEERS", value_delimiter = ',')]
#[arg(long, env = "ESPRESSO_SEQUENCER_API_PEERS", value_delimiter = ',')]
pub peers: Vec<Url>,
}

Expand All @@ -622,7 +622,7 @@ pub struct State;
#[derive(Parser, Clone, Copy, Debug, Default)]
pub struct HotshotEvents {
/// Port that the HTTP Hotshot Event streaming API will use.
#[clap(long, env = "ESPRESSO_SEQUENCER_HOTSHOT_EVENT_STREAMING_API_PORT")]
#[arg(long, env = "ESPRESSO_SEQUENCER_HOTSHOT_EVENT_STREAMING_API_PORT")]
pub events_service_port: u16,
}

Expand Down
Loading