From 451790adb72887db9f144d9de665de46fb4ef7a0 Mon Sep 17 00:00:00 2001 From: aubrey Date: Wed, 6 Dec 2023 12:39:34 -0800 Subject: [PATCH] protos: move the transaction fee out of the transaction body and into the transaction parameters, add FeeView message type --- .../core/component/fee/v1alpha1/fee.proto | 17 +++++++++++++++++ .../core/transaction/v1alpha1/transaction.proto | 8 ++++---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/proto/penumbra/penumbra/core/component/fee/v1alpha1/fee.proto b/proto/penumbra/penumbra/core/component/fee/v1alpha1/fee.proto index 6d67ed2f94..87a9929ab8 100644 --- a/proto/penumbra/penumbra/core/component/fee/v1alpha1/fee.proto +++ b/proto/penumbra/penumbra/core/component/fee/v1alpha1/fee.proto @@ -13,6 +13,23 @@ message Fee { asset.v1alpha1.AssetId asset_id = 2; } +message FeeView { + + message Visible { + // The fee paid by the transaction. + component.fee.v1alpha1.Fee fee = 1; + // The metadata of the asset used to pay fees. + asset.v1alpha1.DenomMetadata denom_metadata = 2; + } + message Opaque { + // The fee paid by the transaction. + component.fee.v1alpha1.Fee fee = 1; + } + oneof fee_view { + Visible visible = 1; + Opaque opaque = 2; + } +} message GasPrices { // The price per unit block space in terms of the staking token, with an implicit 1,000 denominator. uint64 block_space_price = 1; diff --git a/proto/penumbra/penumbra/core/transaction/v1alpha1/transaction.proto b/proto/penumbra/penumbra/core/transaction/v1alpha1/transaction.proto index f7e9183133..b561da0e40 100644 --- a/proto/penumbra/penumbra/core/transaction/v1alpha1/transaction.proto +++ b/proto/penumbra/penumbra/core/transaction/v1alpha1/transaction.proto @@ -35,12 +35,10 @@ message TransactionBody { repeated Action actions = 1; // Parameters determining if a transaction should be accepted by this chain. TransactionParameters transaction_parameters = 2; - // The transaction fee. - component.fee.v1alpha1.Fee fee = 3; // Detection data for use with Fuzzy Message Detection - DetectionData detection_data = 4; + DetectionData detection_data = 3; // Sub-message containing memo ciphertext if a memo was added to the transaction. - MemoData memo_data = 5; + MemoData memo_data = 4; } // Represents the encrypted memo data. @@ -59,6 +57,8 @@ message TransactionParameters { // The chain this transaction is intended for. Including this prevents // replaying a transaction on one chain onto a different chain. string chain_id = 2; + // The transaction fee. + component.fee.v1alpha1.Fee fee = 3; } // Detection data used by a detection server performing Fuzzy Message Detection.