-
Notifications
You must be signed in to change notification settings - Fork 10
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
rename createprice to pricefeed #313
base: develop
Are you sure you want to change the base?
Conversation
WalkthroughThis pull request renames all references to the oracle "create-price" transaction to "price-feed" across the codebase. Changes include updating conditional checks, function and method names, error messages, event types, CLI commands, message constructors, and associated tests. The core logic and control flow remain unchanged, with only the naming and documentation updated to reflect the new terminology. Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🔭 Outside diff range comments (1)
x/oracle/keeper/msg_server_create_price.go (1)
1-92
: 🛠️ Refactor suggestionRename the file to match the new function name.
The file is still named
msg_server_create_price.go
but contains thePriceFeed
function. Consider renaming it tomsg_server_price_feed.go
for consistency.
🧹 Nitpick comments (5)
x/oracle/types/errors.go (1)
25-25
: Inconsistent formatting: Standardize separator in error message.The error message uses a hyphen (
price-feed
) while other occurrences use an underscore (price_feed
). This inconsistency in formatting should be standardized across the codebase.- ErrInvalidMsg = sdkerrors.Register(ModuleName, invalidMsg, "invalid input price-feed") + ErrInvalidMsg = sdkerrors.Register(ModuleName, invalidMsg, "invalid input price_feed")x/oracle/client/cli/tx_create_price.go (1)
1-93
: Consider renaming the file to match the new terminology.The file name
tx_create_price.go
still uses the old terminology. Consider renaming it totx_price_feed.go
for consistency.testutil/network/tx.go (1)
25-27
: LGTM! Function name and comments updated consistently.The function name change and comment updates align with the PR objective.
Fix typo in the comment.
The word "senario" should be "scenario".
-// SendTxOraclePriceFeed consturct and sign that tx with input msgs, it's different from SendTx, since when we use ed25519 for oracle senario, we allowed that signer is an unexists account, this implementation skip the 'accoutn exists' related checks +// SendTxOraclePriceFeed construct and sign that tx with input msgs, it's different from SendTx, since when we use ed25519 for oracle scenario, we allowed that signer is an unexists account, this implementation skip the 'account exists' related checksapp/ante/cosmos/txsize_gas.go (1)
40-44
: Fix grammatical error in the error message.The error message contains a grammatical error: "has exceeds" should be "has exceeded".
- return ctx, sdkerrors.ErrTxTooLarge.Wrapf("oracle price-feed tx has exceeds size limit, limit:%d, got:%d", anteutils.TxSizeLimit, len(ctx.TxBytes())) + return ctx, sdkerrors.ErrTxTooLarge.Wrapf("oracle price-feed tx has exceeded size limit, limit:%d, got:%d", anteutils.TxSizeLimit, len(ctx.TxBytes()))x/oracle/keeper/msg_server_test.go (1)
29-126
: Update test file name to match new functionality.Since the tests now focus on
PriceFeed
functionality instead ofCreatePrice
, consider renaming this test file frommsg_server_test.go
to something more specific likemsg_server_price_feed_test.go
.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
x/oracle/types/recent_msg.pb.go
is excluded by!**/*.pb.go
x/oracle/types/tx.pb.go
is excluded by!**/*.pb.go
📒 Files selected for processing (27)
app/ante/cosmos/context.go
(1 hunks)app/ante/cosmos/fees.go
(1 hunks)app/ante/cosmos/min_price.go
(1 hunks)app/ante/cosmos/sigverify.go
(4 hunks)app/ante/cosmos/txsize_gas.go
(1 hunks)app/ante/evm/fee_market.go
(1 hunks)app/ante/utils/oracle.go
(1 hunks)app/app.go
(1 hunks)client/docs/swagger-ui/swagger.json
(6 hunks)proto/exocore/oracle/v1/recent_msg.proto
(1 hunks)proto/exocore/oracle/v1/tx.proto
(2 hunks)tests/e2e/oracle/create_price.go
(13 hunks)tests/e2e/oracle/recovery.go
(15 hunks)testutil/network/tx.go
(1 hunks)x/oracle/client/cli/tx.go
(1 hunks)x/oracle/client/cli/tx_create_price.go
(2 hunks)x/oracle/keeper/feedermanagement/feedermanager.go
(4 hunks)x/oracle/keeper/msg_server_create_price.go
(4 hunks)x/oracle/keeper/msg_server_test.go
(4 hunks)x/oracle/keeper/native_token.go
(2 hunks)x/oracle/keeper/nonce.go
(1 hunks)x/oracle/keeper/validate_timestamp.go
(1 hunks)x/oracle/types/codec.go
(1 hunks)x/oracle/types/errors.go
(1 hunks)x/oracle/types/events.go
(1 hunks)x/oracle/types/message_create_price.go
(2 hunks)x/oracle/types/message_create_price_test.go
(1 hunks)
✅ Files skipped from review due to trivial changes (5)
- x/oracle/keeper/native_token.go
- x/oracle/keeper/nonce.go
- app/app.go
- proto/exocore/oracle/v1/recent_msg.proto
- client/docs/swagger-ui/swagger.json
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: test-unit-e2e
- GitHub Check: ante-benchmark-test
- GitHub Check: Analyze (go)
- GitHub Check: goreleaser
🔇 Additional comments (25)
app/ante/utils/oracle.go (2)
8-8
: LGTM! Documentation updated to reflect new terminology.The comment has been correctly updated to use "price-feed" instead of "create-price".
11-22
: LGTM! Function renamed and message type check updated.The function has been correctly renamed from
IsOracleCreatePriceTx
toIsOraclePriceFeedTx
and the message type check has been updated to useMsgPriceFeed
. The changes are consistent with the PR objective.x/oracle/types/codec.go (2)
11-11
: LGTM! Message type registration updated.The concrete type registration has been correctly updated to use
MsgPriceFeed
and "oracle/PriceFeed".
17-19
: LGTM! Interface registration updated.The interface registration has been correctly updated to use
MsgPriceFeed
.x/oracle/types/message_create_price_test.go (1)
13-42
: LGTM! Test function and message types updated.The test function has been correctly renamed and all message types have been updated to use
MsgPriceFeed
. The test logic remains unchanged.x/oracle/keeper/validate_timestamp.go (1)
12-31
: LGTM! Function parameter type updated.The function parameter type has been correctly updated from
MsgCreatePrice
toMsgPriceFeed
. The function logic remains unchanged.x/oracle/client/cli/tx.go (1)
31-31
: Breaking Change: CLI command renamed.The command registration has been updated from
CmdCreatePrice()
toCmdPriceFeed()
. This is a breaking change that will affect CLI users who have scripts or documentation referencing the old command.Please ensure:
- Documentation is updated to reflect the new command name
- Release notes mention this breaking change
- Migration guide is provided for users
x/oracle/types/message_create_price.go (1)
11-21
: LGTM: Message type renamed consistently.The message type and all its associated methods have been consistently renamed from
MsgCreatePrice
toMsgPriceFeed
. The implementation remains unchanged, maintaining the existing functionality.Also applies to: 23-50
app/ante/evm/fee_market.go (1)
33-33
: LGTM! Function name updated consistently.The renaming from
IsOracleCreatePriceTx
toIsOraclePriceFeedTx
aligns with the PR objective.x/oracle/client/cli/tx_create_price.go (2)
16-21
: LGTM! Command name and description updated consistently.The function name and command description changes align with the PR objective.
74-74
: LGTM! Message constructor updated consistently.The message constructor name change aligns with the PR objective.
app/ante/cosmos/min_price.go (1)
35-35
: LGTM! Function name updated consistently.The renaming from
IsOracleCreatePriceTx
toIsOraclePriceFeedTx
aligns with the PR objective.app/ante/cosmos/context.go (1)
42-44
: LGTM! Consistent renaming of oracle transaction type.The renaming from
OracleCreatePriceTx
toOraclePriceFeedTx
is consistent with the PR objectives, and the comment has been appropriately updated to reflect the new terminology.x/oracle/keeper/msg_server_create_price.go (2)
22-23
: LGTM! Function and message type renaming is consistent.The renaming from
CreatePrice
toPriceFeed
and the corresponding message type changes are consistent with the PR objectives.
56-57
: Address the TODO comment about event type.The TODO comment suggests using another event type, but it's not clear what type should be used instead.
Could you clarify what event type would be more appropriate here?
app/ante/cosmos/fees.go (1)
62-62
: LGTM!The function name change from
IsOracleCreatePriceTx
toIsOraclePriceFeedTx
is consistent with the PR objectives and maintains the same functionality.tests/e2e/oracle/recovery.go (1)
26-27
: LGTM!The changes consistently rename all instances of
CreatePrice
toPriceFeed
while maintaining the same test coverage and functionality. The test scenarios and assertions remain unchanged.Also applies to: 76-77, 81-82, 105-106, 110-111
tests/e2e/oracle/create_price.go (1)
31-34
: LGTM!The changes consistently rename test functions and update comments to use "price-feed" terminology while maintaining the same test coverage and functionality.
Also applies to: 37-37, 57-58, 60-60, 64-64, 75-77, 80-82, 104-106, 109-111
app/ante/cosmos/sigverify.go (1)
61-62
: LGTM!The changes consistently rename transaction type checks and update comments to use "price-feed" terminology while maintaining the same transaction handling logic.
Also applies to: 176-176, 261-261, 388-389, 391-391
x/oracle/keeper/feedermanagement/feedermanager.go (3)
305-305
: LGTM!The event type has been correctly renamed from
EventTypeCreatePrice
toEventTypePriceFeed
to align with the new terminology.
603-603
: LGTM!The function signature has been correctly updated to use the new
MsgPriceFeed
type while maintaining the same validation logic.
663-663
: LGTM!The function signature has been correctly updated to use the new
MsgPriceFeed
type while maintaining the same processing logic.proto/exocore/oracle/v1/tx.proto (3)
16-17
: LGTM!The RPC method has been correctly renamed from
CreatePrice
toPriceFeed
with an appropriate comment update.
22-23
: LGTM!The message type has been correctly renamed from
MsgCreatePrice
toMsgPriceFeed
with an appropriate comment update.
37-38
: LGTM!The response message type has been correctly renamed from
MsgCreatePriceResponse
toMsgPriceFeedResponse
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
cmd/exocored/root.go (1)
144-167
: Consider creating a tracking issue for re-enabling the price feeder.The TODO comments clearly explain that this is a temporary measure to fix dependency conflicts. However, to ensure this technical debt is properly tracked:
- Create a dedicated issue to track the re-enabling of the price feeder
- Include the specific version requirements:
- Update price feeder to use EVMOS v16
- Update Exocore dependency to include this fix
Would you like me to help create a tracking issue for this technical debt?
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
cmd/exocored/root.go
(2 hunks)x/oracle/types/events.go
(1 hunks)x/oracle/types/message_create_price.go
(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (5)
- GitHub Check: test-unit-e2e
- GitHub Check: test-unit-cover
- GitHub Check: Analyze (go)
- GitHub Check: ante-benchmark-test
- GitHub Check: goreleaser
🔇 Additional comments (3)
x/oracle/types/message_create_price.go (1)
9-50
: LGTM! Consistent renaming of message type.The renaming from
CreatePrice
toPriceFeed
has been applied consistently across the message type definition, constructor, and all interface methods.x/oracle/types/events.go (1)
4-4
: LGTM! Event type renamed consistently.The event type has been correctly renamed from "create_price" to "price_feed", maintaining consistency with the message type changes.
cmd/exocored/root.go (1)
53-54
: LGTM! Imports correctly commented out.The price feeder imports have been properly commented out, maintaining code cleanliness.
Description
This PR supersede #294
Temporary comment out integrated price-feeder to get avoid of the dependency conflict
Closes #XXX
Summary by CodeRabbit
Summary by CodeRabbit