From a55b46f2e3537e92365efe094cad42960e6a99f9 Mon Sep 17 00:00:00 2001 From: Conor Schaefer Date: Tue, 4 Jun 2024 09:22:13 -0700 Subject: [PATCH] fix: add FeeTier support to galileo tx sending During Testnet 77 we enabled fees [0] and in the process broke some things like Galileo. Adding FeeTier support is rather straightforward, although this changeset requires a patch to the `penumbra-fee` crate in order to compile [1]. [0] https://github.com/penumbra-zone/penumbra/issues/4306 [1] https://github.com/penumbra-zone/penumbra/pull/4539 --- Cargo.toml | 1 + src/opt/serve.rs | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1c7c2d0..51868eb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,6 +15,7 @@ parallel = ["penumbra-wallet/parallel"] # Penumbra dependencies penumbra-proto = { path = "../penumbra/crates/proto", features = ["rpc", "box-grpc"] } penumbra-asset = { path = "../penumbra/crates/core/asset" } +penumbra-fee = { path = "../penumbra/crates/core/component/fee" } penumbra-keys = { path = "../penumbra/crates/core/keys" } penumbra-custody = { path = "../penumbra/crates/custody" } penumbra-wallet = { path = "../penumbra/crates/wallet" } diff --git a/src/opt/serve.rs b/src/opt/serve.rs index ab9c537..b0a9288 100644 --- a/src/opt/serve.rs +++ b/src/opt/serve.rs @@ -6,6 +6,7 @@ use futures_util::{stream::StreamExt, stream::TryStreamExt}; use num_traits::identities::Zero; use penumbra_asset::Value; use penumbra_custody::soft_kms::SoftKms; +use penumbra_fee::FeeTier; use penumbra_proto::{ custody::v1::{ custody_service_client::CustodyServiceClient, custody_service_server::CustodyServiceServer, @@ -27,9 +28,9 @@ use crate::{ #[derive(Debug, Clone, Parser)] pub struct Serve { - /// The transaction fee for each response (paid in upenumbra). - #[structopt(long, default_value = "0")] - fee: u64, + /// The level of gas prices to pay on send transactions. Defaults to "low". + #[structopt(long, default_value_t)] + fee_tier: FeeTier, /// Per-user rate limit (e.g. "10m" or "1day"). #[clap(short, long, default_value = "1day", parse(try_from_str = humantime::parse_duration))] rate_limit: Duration,