-
Notifications
You must be signed in to change notification settings - Fork 170
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
feat(oracle): add slashing events #2532
Conversation
WalkthroughThe recent updates introduce a new event Changes
Sequence Diagram(s) (Beta)sequenceDiagram
participant OracleModule
participant EventSystem
participant Validator
Note over OracleModule: Exchange Rate Update
OracleModule->>OracleModule: SlashAndResetMissCounters()
OracleModule->>EventSystem: Emit EventSlash (validator address, slash factor, reason, jailed status)
EventSystem-->>Validator: Notify Slashing Event
Poem
Tip Early Access Features
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 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 as PR comments)
Additionally, you can add CodeRabbit Configration 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: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (2)
swagger/swagger.yaml
is excluded by!**/*.yaml
x/oracle/types/events.pb.go
is excluded by!**/*.pb.go
,!**/*.pb.go
Files selected for processing (1)
- proto/umee/oracle/v1/events.proto (1 hunks)
Additional comments not posted (1)
proto/umee/oracle/v1/events.proto (1)
32-44
: The newEventSlash
message definition looks well-formed and follows protobuf conventions.However, ensure that the field
validator
is consistently named across different messages if it refers to the same entity.
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: 1
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- x/oracle/keeper/slash.go (2 hunks)
Additional comments not posted (1)
x/oracle/keeper/slash.go (1)
6-7
: Imports added forsdkutil
andoracle/types
.Ensure that these libraries are used appropriately in the codebase and check for any potential version conflicts.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2532 +/- ##
===========================================
- Coverage 75.38% 62.64% -12.75%
===========================================
Files 100 276 +176
Lines 8025 15943 +7918
===========================================
+ Hits 6050 9988 +3938
- Misses 1589 5182 +3593
- Partials 386 773 +387
|
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
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- CHANGELOG.md (1 hunks)
- x/auction/keeper/rewards.go (2 hunks)
Additional Context Used
LanguageTool (13)
CHANGELOG.md (13)
Near line 116: Using ‘plenty’ without ‘of’ is considered to be informal.
Context: .../pull/2368) Fix inflow amount calculation. Previously, the inflow amount of the t...
Rule ID: PLENTY_OF_NOUNS
Near line 117: Possible missing preposition found.
Context: ...nd SDK account sequence setting changes the calling client. ### API Breaking - [2...
Rule ID: AI_HYDRA_LEO_MISSING_TO
Near line 218: Did you mean “limiting”? Or maybe you should add a pronoun? In active voice, ‘allow’ + ‘to’ takes an object, usually a pronoun.
Context: ...veragedLiquidate.MaxRepay` which allows to limit the liquidation size using the leverage...
Rule ID: ALLOW_TO
Near line 351: The singular proper name ‘Bridge’ must be used with a third-person or a past tense verb.
Context: ...-network/umee/pull/1967) Gravity Bridge phase out phase-2: disable Umee -> Ethereum t...
Rule ID: HE_VERB_AGR
Near line 352: The singular proper name ‘Bridge’ must be used with a third-person or a past tense verb.
Context: ...-network/umee/pull/1967) Gravity Bridge phase out phase-2: disable Umee -> Ethereum t...
Rule ID: HE_VERB_AGR
Near line 402: Make sure that the singular noun after the number ‘4.1’ is correct.
Context: ...e/pull/1807) Fixes BNB ibc denom in 4.1 migration - [1812](https://github.com/umee-networ...
Rule ID: CD_POINT_CD_NN
Near line 420: In contexts where ‘if’ is followed by ‘or’, using ‘whether’ may be more appropriate (and formal).
Context: ...rowand
MsgRepay` won't return errors if there is nothing to withdraw, borrow or...
Rule ID: IF_WHETHER
Near line 467: Possible missing article found.
Context: ...of the build process (you must build on same host as you run the binary, or copy the...
Rule ID: AI_HYDRA_LEO_MISSING_THE
Near line 471: Possible typo: you repeated a word
Context: ...e/pull/1555) Updates IBC to v5.1.0 that adds adds optional memo field to `FungibleTokenPa...
Rule ID: ENGLISH_WORD_REPEAT_RULE
Near line 528: A comma may be missing after the conjunctive/linking adverb ‘Also’.
Context: ...ableLend, docs, and internal functions. Also QueryLoaned similar queries to QuerySup...
Rule ID: SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA
Near line 532: This word is normally spelled as one.
Context: ...roto getters in x/leverage and x/oracle proto types. - [1126](https://github.com/umee-netwo...
Rule ID: EN_COMPOUNDS_PROTO_TYPES
Near line 553: Possible missing comma found.
Context: ...umee/pull/1157) AddedPrintOrErr
util function optimizing the CLI code flow. - [1118](...
Rule ID: AI_HYDRA_LEO_MISSING_COMMA
Near line 651: Possible typo: you repeated a word
Context: ...k/umee/pull/1358/files) Disable Gravity Bridge bridge messages. ### Improvements - [#1355](...
Rule ID: ENGLISH_WORD_REPEAT_RULE
Additional comments not posted (3)
x/auction/keeper/rewards.go (2)
124-124
: Improved error handling by directly returning the error fromstore.SetValue
.
166-166
: Consistent improvement in error handling across related functions.CHANGELOG.md (1)
55-55
: The changelog entry is correctly formatted and accurately reflects the addition made by PR #2532.
Description
Add oracle slashing events