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

Redelegate without unbonding #2440

Merged
merged 23 commits into from
Jan 14, 2022

Conversation

darthsiroftardis
Copy link
Contributor

@darthsiroftardis darthsiroftardis commented Dec 6, 2021

CHANGELOG:

  • Added a new_validator field to UnbondingPurses which allows redelegation without unbonding
  • Added a new struct WithdrawPurse to represent unbonding purses in current/live networks
  • Added a new Key::Unbond under which UnbondingPurses are written
  • Amended the upgrade logic to transform previous purses that are still be paid out into UnbondingPurses

Closes #2345

@goral09 goral09 removed their request for review December 9, 2021 13:11
@goral09
Copy link
Contributor

goral09 commented Dec 9, 2021

FYI, I had to unassign myself as the reviewer as I won't be able to do a proper review before the end of 1.5.0 development cycle.

Copy link
Contributor

@Fraser999 Fraser999 left a comment

Choose a reason for hiding this comment

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

There is one critical issue in process_unbond_requests() which must be resolved.

I'd like to see tests for

  • redelegate to an invalid validator
  • redelegate to the same validator (should be a no-op resulting in no unbonding purse entry)

The PR also needs to include an entry to each of the EE and types changelogs.

execution_engine/src/core/engine_state/error.rs Outdated Show resolved Hide resolved
execution_engine/src/core/engine_state/mod.rs Outdated Show resolved Hide resolved
types/src/system/auction/unbonding_purse.rs Outdated Show resolved Hide resolved
types/src/system/auction/detail.rs Show resolved Hide resolved
types/src/system/auction/detail.rs Outdated Show resolved Hide resolved
types/src/system/auction/detail.rs Show resolved Hide resolved
types/src/system/auction/detail.rs Outdated Show resolved Hide resolved
# Conflicts:
#	execution_engine/src/core/engine_state/error.rs
#	resources/test/rpc_schema_hashing_V2.json
Copy link
Contributor

@Fraser999 Fraser999 left a comment

Choose a reason for hiding this comment

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

I made a few further comments, but the main blocker has been resolved now thanks.

@darthsiroftardis
Copy link
Contributor Author

bors r+

@casperlabs-bors-ng
Copy link
Contributor

Build failed:

@darthsiroftardis
Copy link
Contributor Author

bors r+

@casperlabs-bors-ng
Copy link
Contributor

Build failed:

@goral09
Copy link
Contributor

goral09 commented Jan 13, 2022

bors retry

@casperlabs-bors-ng
Copy link
Contributor

Build succeeded:

@casperlabs-bors-ng casperlabs-bors-ng bot merged commit cc69907 into casper-network:dev Jan 14, 2022
@@ -13,6 +13,12 @@ All notable changes to this project will be documented in this file. The format

## [Unreleased]

### Changed
* Extended `UnbondingPurses` to take a new field `new_validator` which represents the validator to whom tokens will be re-delegated.
Copy link
Contributor

Choose a reason for hiding this comment

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

You forgot to mention that we also changed:

  • RPC API
  • SSE data
  • clients (in this PR only Rust client but the change forces the update to all the other SDKs)

@cspramit
Copy link
Contributor

There is one critical issue in process_unbond_requests() which must be resolved.

I'd like to see tests for

  • redelegate to an invalid validator
  • redelegate to the same validator (should be a no-op resulting in no unbonding purse entry)

The PR also needs to include an entry to each of the EE and types changelogs.

@Fraser999 @darthsiroftardis were these tests included?

darthsiroftardis added a commit to darthsiroftardis/casper-node that referenced this pull request Jan 14, 2022
This reverts commit cc69907, reversing
changes made to ef9d92e.
casperlabs-bors-ng bot added a commit that referenced this pull request Jan 14, 2022
2591: Revert merge of Redelegate r=darthsiroftardis a=darthsiroftardis

CHANGELOG:

- Reverts the changes made in #2440 

Co-authored-by: Karan Dhareshwar <karan@casperlabs.io>
darthsiroftardis added a commit to darthsiroftardis/casper-node that referenced this pull request Jan 21, 2022
2440: Redelegate without unbonding r=darthsiroftardis a=darthsiroftardis

CHANGELOG:

- Added a `new_validator` field to `UnbondingPurses` which allows redelegation without unbonding
- Added a new struct `WithdrawPurse` to represent unbonding purses in current/live networks
- Added a new `Key::Unbond` under which `UnbondingPurses` are written
- Amended the upgrade logic to transform previous purses that are still be paid out into `UnbondingPurses`


Closes casper-network#2345 


Co-authored-by: Karan Dhareshwar <karan@casperlabs.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add functionality to redelegate without unbonding
6 participants