chore(proto, core)!: remove action suffix from all action types#1630
chore(proto, core)!: remove action suffix from all action types#1630SuperFluffy merged 11 commits intomainfrom
Conversation
6665ccd to
7287613
Compare
| package astria.protocol.transaction.v1alpha1; | ||
|
|
||
| import "astria/primitive/v1/types.proto"; | ||
| import "astria/protocol/transaction/v1alpha1/actions.proto"; |
There was a problem hiding this comment.
I don't believe you need to import these since they are in the same package.
There was a problem hiding this comment.
Unfortunately you do (assumed the same and tried without at first). Proof:
import "astria/primitive/v1/types.proto";
// import "astria/protocol/transaction/v1alpha1/actions.proto";
import "astria_vendored/penumbra/core/component/ibc/v1/ibc.proto";
import "astria_vendored/tendermint/abci/types.proto";
import "google/protobuf/any.proto";proto/protocolapis/astria/protocol/transaction/v1alpha1/transaction.proto:25:12:field astria.protocol.transaction.v1alpha1.UnsignedTransaction.actions: unknown type Actionmove action protos to new file, rename types.proto to transaction.proto actions.proto -> action.proto
d901258 to
a7a765b
Compare
|
Squashed and rebased on top of recent main. |
joroshiba
left a comment
There was a problem hiding this comment.
Approved with note on yet another potential fee related change as follow up.
| } | ||
|
|
||
| message FeeChangeAction { | ||
| message FeeChange { |
There was a problem hiding this comment.
Thinking on the semantics of the fee change given the need for the rust type change from this. Would it make more sense to have this message be something like:
enum FeeVariable {
UNKNOWN_FEE_VARIABLE = 0;
TRANSFER_BASE_FEE = 1;
...
}
message FeeChange {
FeeVariable fee_variable = 1;
astria.primitive.v1.Uint128 value = 2;
}Then the rust fee variables could be related to the enum and the FeeChangeKind might be able to go away? Probably not for this PR though.
There was a problem hiding this comment.
Discussed offline: generally agree. This action is not nice to read and its semantics are off. But will push that to a different PR.
* main: feat(sequencer)!: enforce block ordering by transaction group (#1618) fix(cli): ensure checkTx passes before waiting for inclusion (#1636) chore(sequencer)!: update storage keys locations and values (ENG-898) (#1616) chore: cargo audit warning (#1644) chore(proto, core)!: remove action suffix from all action types (#1630) feat(sequencer)!: add limit to total amount of transactions in parked (#1638)
Summary
This patch removes the
*Actionsuffix from all protobuf on-wire and domain types that represent sequencer actions.Background
The
*Actionsuffix is redundant because at no point in the last 12 months was there a risk of confusing action types with non-action types that have a similar name (if there are any even).Furthermore, we follow Rust naming conventions for types. Since we defined domain types in a module called
action, clippy'smodule_name_repetitionwarning triggered on the names, requiringallowattributes to quiet the warnings and to stay in sync with the on-wire protobuf types.Changes
Actionsuffix from all action protobuf and domain typestransactions -> transactionin the formerastria.protocol.transactions.v1alpha1action.proto(similar toaction.rs), but keeping the sameastria.protocol.transaction.v1alpha1protobuf package (because actions don't exist outside of transactions).enum FeeChangetoenum FeeChangeKindbecause the formerFeeChangeActionnow clashes with the enum.Testing
Only type names were changed. The code still compiles and all tests run. No business logic was changed.
Breaking Changelist
Related Issues
Closes #1629