This repository was archived by the owner on Apr 25, 2026. It is now read-only.
feat: slashing precompile#795
Merged
Merged
Conversation
drewstone
suggested changes
Oct 18, 2024
drewstone
left a comment
Contributor
There was a problem hiding this comment.
Looks good but you are not adding enough tests to this type of work. Please add cases that fail too.
drewstone
approved these changes
Oct 18, 2024
drewstone
left a comment
Contributor
There was a problem hiding this comment.
Looks good, need some docs on functions.rs and then this is good if CI passes.
drewstone
approved these changes
Oct 18, 2024
drewstone
added a commit
that referenced
this pull request
Oct 22, 2024
* feat: Slashing Queue (#793) * feat: Slashing Queue * feat: Per Service restaking percentage exposure * test: add more tests for the unapplied slash * feat: slashing precompile (#795) * feat: slashing precompile * feat: Slashing and Dispute precompiles * Update subxt * test: add more tests to cover more cases * doc: Update internal functions docs * chore: Update toml formatting * lint: fix clippy * chore: update tangle-subxt version --------- Co-authored-by: shekohex <dev+github@shadykhalifa.me>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of changes
Changes introduced in this pull request:
This pull request introduces several key changes across multiple files, primarily focusing on updating submodules, refactoring contract inheritance, and enhancing the service pallet with new hooks and error handling. The most important changes include updating submodule references, modifying contract inheritance, refactoring function names and hooks, and adding new error types and events.
Submodule Updates:
forge/lib/forge-std,forge/lib/openzeppelin-contracts, andforge/lib/tnt-coreto their latest commits. (forge/lib/forge-std[1]forge/lib/openzeppelin-contracts[2]forge/lib/tnt-core[3]Contract Refactoring:
CGGMP21Blueprint.solfromBlueprintServiceManagertoBlueprintServiceManagerBaseand made minor code adjustments. (forge/src/cggmp21/CGGMP21Blueprint.sol[1] [2]Function and Hook Refactoring:
pallets/services/src/functions.rsto follow a more consistent naming convention and updated related logic. (pallets/services/src/functions.rs[1] [2] [3]pallets/services/src/functions.rspallets/services/src/functions.rsL240-R352)Error Handling and Events:
pallets/services/src/lib.rsto handle slashing and dispute scenarios more effectively. (pallets/services/src/lib.rs[1] [2]Storage Enhancements:
pallets/services/src/lib.rspallets/services/src/lib.rsR460-R464)These changes aim to improve code clarity, update dependencies, and enhance the functionality of the service pallet.
Reference issue to close (if applicable)
Closes