Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing proto files for indexing #8754

Merged
merged 2 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### State Compatible

* [#8754](https://github.com/osmosis-labs/osmosis/pull/8754) Add missing proto files for indexing
* [#8563](https://github.com/osmosis-labs/osmosis/pull/8563) Add additional queries in x/gauges
* [#8726](https://github.com/osmosis-labs/osmosis/pull/8726) fix: multiple temp directories on command executions
* [#8731](https://github.com/osmosis-labs/osmosis/pull/8731) fix: in place testnet logs
Expand Down
13 changes: 12 additions & 1 deletion proto/osmosis/lockup/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,15 @@ message MsgSetRewardReceiverAddress {
string reward_receiver = 3
[ (gogoproto.moretags) = "yaml:\"reward_receiver\"" ];
}
message MsgSetRewardReceiverAddressResponse { bool success = 1; }
message MsgSetRewardReceiverAddressResponse { bool success = 1; }

// DEPRECATED
// Following messages are deprecated but kept to support indexing.
message MsgUnlockPeriodLock {
string owner = 1 [ (gogoproto.moretags) = "yaml:\"owner\"" ];
uint64 ID = 2;
}

message MsgUnlockTokens {
string owner = 1 [ (gogoproto.moretags) = "yaml:\"owner\"" ];
}
12 changes: 10 additions & 2 deletions proto/osmosis/protorev/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -173,5 +173,13 @@ message MsgSetBaseDenoms {
];
}

// MsgSetBaseDenomsResponse defines the Msg/SetBaseDenoms response type.
message MsgSetBaseDenomsResponse {}
// Deprecated, but must be retained in the file to allow indexers
// to index blocks since genesis
message MsgSetBaseDenomsResponse {}
// MsgSetPoolWeights defines the Msg/SetPoolWeights request type.
message MsgSetPoolWeights {
// admin is the account that is authorized to set the pool weights.
string admin = 1;
// pool_weights is the list of pool weights to set.
PoolWeights pool_weights = 2;
}
Comment on lines +179 to +185
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Add missing options and field annotations to MsgSetPoolWeights

The new message MsgSetPoolWeights lacks the option declarations and field annotations that are present in other message definitions within the file. This may lead to inconsistent behavior or serialization issues. For consistency and correctness, please add the amino.name and cosmos.msg.v1.signer options, and annotate the fields appropriately.

Here is a suggested fix:

 message MsgSetPoolWeights {
+  option (amino.name) = "osmosis/MsgSetPoolWeights";
+  option (cosmos.msg.v1.signer) = "admin";

   // admin is the account that is authorized to set the pool weights.
-  string admin = 1;
+  string admin = 1 [
+    (gogoproto.moretags) = "yaml:\"admin\"",
+    (cosmos_proto.scalar) = "cosmos.AddressString"
+  ];

   // pool_weights is the list of pool weights to set.
-  PoolWeights pool_weights = 2;
+  PoolWeights pool_weights = 2 [
+    (gogoproto.moretags) = "yaml:\"pool_weights\"",
+    (gogoproto.nullable) = false
+  ];
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// MsgSetPoolWeights defines the Msg/SetPoolWeights request type.
message MsgSetPoolWeights {
// admin is the account that is authorized to set the pool weights.
string admin = 1;
// pool_weights is the list of pool weights to set.
PoolWeights pool_weights = 2;
}
// MsgSetPoolWeights defines the Msg/SetPoolWeights request type.
message MsgSetPoolWeights {
option (amino.name) = "osmosis/MsgSetPoolWeights";
option (cosmos.msg.v1.signer) = "admin";
// admin is the account that is authorized to set the pool weights.
string admin = 1 [
(gogoproto.moretags) = "yaml:\"admin\"",
(cosmos_proto.scalar) = "cosmos.AddressString"
];
// pool_weights is the list of pool weights to set.
PoolWeights pool_weights = 2 [
(gogoproto.moretags) = "yaml:\"pool_weights\"",
(gogoproto.nullable) = false
];
}

Loading