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

PoS redelegation #1612

Merged
merged 8 commits into from
Oct 24, 2023
Merged

PoS redelegation #1612

merged 8 commits into from
Oct 24, 2023

Conversation

brentstone
Copy link
Collaborator

@brentstone brentstone commented Jun 23, 2023

Based on v0.23.0

Closes #34, closes #1829, closes #1830, closes #1556, closes #1959, closes #1640

Implements redelegation. We allow a delegator address to redelegate bonded tokens from one validator to another such that the bonded tokens will stop contributing to the original (source) validator's voting power and start contributing to the new (destination) validator's voting power at the pipeline epoch. Redelegated tokens remain slashable for unbonding length for any misbehavior committed by the source validator. Validator addresses can only bond to themselves and thus cannot redelegate.

Client cmd e.g.: namadac redelegate --source-validator {} --destination-validator {} --owner {} --amount {}

Note that until we resolve informalsystems/partnership-heliax#74, multiple slashes per validator may result in overslashing, but this issue was already present before redelegation.

Notes on things to-do:

  • check the lazy storage bounds on unbonds and redelegated_unbonds, ensure consistency
  • estimate gas for new tx_redelegate
  • more redelegation unit tests? (i.e. overslashing)

Further testing goals:

  • State machine test
  • Unit test with complexity, a la test_multiple_misbehaviors, with redelegations
  • e2e test

@brentstone
Copy link
Collaborator Author

pls run pos tests

@brentstone brentstone marked this pull request as ready for review October 13, 2023 18:17
brentstone added a commit that referenced this pull request Oct 14, 2023
* brent/pos-redelegation:
  SQUASHED redelegation
brentstone added a commit that referenced this pull request Oct 16, 2023
* brent/pos-redelegation:
  SQUASHED redelegation
tzemanovic
tzemanovic previously approved these changes Oct 17, 2023
tzemanovic added a commit that referenced this pull request Oct 17, 2023
* brent/pos-redelegation:
  remove dbg prints
tzemanovic added a commit that referenced this pull request Oct 18, 2023
* brent/pos-redelegation:
  PoS: comment out unused code
  test/e2e/slashing: fix flakiness
  bench/vps: credit source before bond tx
  make: skip pos_state_machine_test in CI
brentstone added a commit that referenced this pull request Oct 19, 2023
* brent/pos-redelegation:
  process_slashes: fix critical bug
brentstone added a commit that referenced this pull request Oct 19, 2023
* brent/pos-redelegation:
  fix bug in SMv1 test
Fraccaman added a commit that referenced this pull request Oct 23, 2023
* origin/brent/pos-redelegation:
  fix bug in SMv1 test
  process_slashes: fix critical bug
  PoS: comment out unused code
  test/e2e/slashing: fix flakiness
  bench/vps: credit source before bond tx
  make: skip pos_state_machine_test in CI
  remove dbg prints
  SQUASHED redelegation
@tzemanovic tzemanovic mentioned this pull request Oct 24, 2023
@tzemanovic tzemanovic merged commit b6b376d into main Oct 24, 2023
11 of 14 checks passed
@tzemanovic tzemanovic deleted the brent/pos-redelegation branch October 24, 2023 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment