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 brentstone added the PoS label Jun 23, 2023
@brentstone brentstone force-pushed the brent/pos-redelegation branch 6 times, most recently from cfe7a8a to 8730508 Compare July 2, 2023 16:32
@brentstone brentstone force-pushed the brent/pos-redelegation branch 8 times, most recently from 1ae11c8 to b400eb1 Compare July 18, 2023 04:18
@brentstone brentstone force-pushed the brent/pos-redelegation branch 4 times, most recently from 8ea76a1 to a6a744f Compare July 25, 2023 20:22
@brentstone brentstone force-pushed the brent/pos-redelegation branch from 398576b to 35a2c64 Compare July 28, 2023 02:28
@brentstone brentstone force-pushed the brent/pos-redelegation branch from 187cb90 to a5a8eba Compare August 9, 2023 15:56
@brentstone brentstone force-pushed the brent/pos-redelegation branch 6 times, most recently from bc2fd9f to 50508a5 Compare August 16, 2023 15:59
@brentstone
Copy link
Collaborator Author

pls run pos tests

@brentstone brentstone force-pushed the brent/pos-redelegation branch from 48032ac to 68b5704 Compare October 13, 2023 18:16
@brentstone brentstone requested a review from tzemanovic October 13, 2023 18:16
@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
@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