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

Slashing #171

Merged
merged 240 commits into from
Jan 22, 2025
Merged

Slashing #171

merged 240 commits into from
Jan 22, 2025

Conversation

TomasArrachea
Copy link
Collaborator

@TomasArrachea TomasArrachea commented Nov 29, 2024

Closes #182

Copy link
Contributor

@MegaRedHand MegaRedHand left a comment

Choose a reason for hiding this comment

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

LGTM, but some functions from the Go SDK are missing:

  • GetOperatorAVSSplit
  • GetOperatorPISplit
  • SetOperatorAVSSplit
  • SetOperatorPISplit
  • ProcessClaims
  • ForceDeregisterFromOperatorSets
  • NewRemovePermissionTx
  • NewSetPermissionTx
  • NewAcceptAdminTx
  • NewAddPendingAdminTx
  • NewRemoveAdminTx
  • NewRemovePendingAdminTx

Also, some reader functions were implemented on the writer:

  • GetDistributionRootsLength
  • CurrRewardsCalculationEndTimestamp
  • GetCurrentClaimableDistributionRoot
  • GetRootIndexFromHash
  • GetCumulativeClaimed
  • CheckClaim

I will work on this on different PRs to avoid muddying this PR.

…#191)

This PR moves from the EL writer to the reader, these functions:

- [x] GetDistributionRootsLength
- [x] CurrRewardsCalculationEndTimestamp
- [x] GetCurrentClaimableDistributionRoot
- [x] GetRootIndexFromHash
- [x] GetCumulativeClaimed
- [x] CheckClaim
@MegaRedHand
Copy link
Contributor

@supernovahs I made some changes to this PR before branching. Here's the diff so you can review those:
https://github.com/Layr-Labs/eigensdk-rs/pull/171/files/ffad9a30b9138d8c6657c88055e5e11da1e754dc..098656439a9ac830987993851ecefb5e1467bb2d
(should be less than 150 lines changed)

Copy link
Collaborator

@supernovahs supernovahs left a comment

Choose a reason for hiding this comment

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

left a comment regarding remapping

This PR adds functions:
- `GetOperatorAVSSplit`
- `GetOperatorPISplit`
- `SetOperatorAVSSplit`
- `SetOperatorPISplit`
@MegaRedHand
Copy link
Contributor

Regarding the missing functions, we found that ForceDeregisterFromOperatorSets is a duplicate of DeregisterFromOperatorSets, so we skipped it and made a PR removing it from the Go SDK (Layr-Labs/eigensdk-go#426).

We also skipped the New____Tx functions, since they don't map easily into Rust and I'm not sure of their purpose.

This PR adds the missing `process_claims` function to the writer and
tests for both claim functions.
@MegaRedHand MegaRedHand marked this pull request as ready for review January 9, 2025 14:18
MegaRedHand and others added 3 commits January 13, 2025 10:21
This PR merges changes from `dev` to `slashing`, and regenerates the
bindings with `make bindings` (after removing the old ones).

---------

Co-authored-by: Tomas <[email protected]>
Co-authored-by: Pablo Deymonnaz <[email protected]>
Co-authored-by: supernovahs <[email protected]>
Co-authored-by: supernovahs <[email protected]>
@MegaRedHand MegaRedHand linked an issue Jan 16, 2025 that may be closed by this pull request
@pablodeymo pablodeymo added the changelog-added [changelog] PR adds a new feature label Jan 20, 2025
Cargo.toml Outdated Show resolved Hide resolved
Copy link
Collaborator

@supernovahs supernovahs left a comment

Choose a reason for hiding this comment

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

couple small nits

@supernovahs
Copy link
Collaborator

we can merge this for now i think . and make a new PR for more upcoming changes in eigenlayer-middleware/contracts

@pablodeymo pablodeymo merged commit c3b34e6 into dev Jan 22, 2025
3 checks passed
@pablodeymo pablodeymo deleted the slashing branch January 22, 2025 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-added [changelog] PR adds a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pending methods in ElContract Writer
5 participants