Skip to content

Commit

Permalink
protos: move the transaction fee out of the transaction body and into…
Browse files Browse the repository at this point in the history
… the transaction parameters, add FeeView message type
  • Loading branch information
aubrika committed Dec 6, 2023
1 parent ab12795 commit 451790a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
17 changes: 17 additions & 0 deletions proto/penumbra/penumbra/core/component/fee/v1alpha1/fee.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down

0 comments on commit 451790a

Please sign in to comment.