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

Implement cubic slashing #892

Closed
wants to merge 31 commits into from
Closed

Implement cubic slashing #892

wants to merge 31 commits into from

Conversation

brentstone
Copy link
Collaborator

@brentstone brentstone commented Dec 14, 2022

Based on v0.16.0

Closes #14, closes #35, closes #124, closes #789.

Note to consider for review: in the pseudocode (Informal partnership), slashes are processed at the very end of an epoch, while in Namada, they are processed at the very beginning of an epoch. This produces slightly different bounds for iteration in several places.

In order to merge into 0.17.0, the following items have been removed from the PR and will have their own PRs to integrate after:

  • fix client queries with slashing (may need to use get_slashed_amount)
  • proper transferring of slashed tokens to the slash pool address

@brentstone brentstone mentioned this pull request Dec 20, 2022
15 tasks
@brentstone brentstone force-pushed the brent/cubic-slashing branch 2 times, most recently from 7bb827b to de939e1 Compare December 24, 2022 17:02
@cwgoes cwgoes added this to the 0.15 milestone Jan 16, 2023
@brentstone brentstone force-pushed the brent/cubic-slashing branch 2 times, most recently from cb3e324 to 9602de1 Compare February 15, 2023 04:36
@brentstone brentstone force-pushed the brent/cubic-slashing branch 2 times, most recently from 3402429 to e6a8e3b Compare February 22, 2023 16:09
@brentstone brentstone force-pushed the brent/cubic-slashing branch 4 times, most recently from d046e7f to 5e7c689 Compare March 14, 2023 05:07
@brentstone brentstone force-pushed the brent/cubic-slashing branch 5 times, most recently from 8bd9cb4 to aba1bcc Compare March 21, 2023 05:56
@brentstone brentstone force-pushed the brent/cubic-slashing branch 5 times, most recently from 8cff386 to 69f9a25 Compare March 22, 2023 23:56
brentstone added a commit that referenced this pull request May 26, 2023
brentstone added a commit that referenced this pull request May 27, 2023
* brent/cubic-slashing:
  fixup! cubic and general slashing algorithms and transactions
  fixup! rip slash pool
  changelog: #892
  fixup!: don't call `process_slashes` within `advance_epoch`
  clean up logging
  fix clippy
  remove test code until slash pool transfers are solved
  rip slash pool
  get_slashed_amount: inclusive on infraction epoch
  add cli to sdk impl for tx unjail
  make find_slashes_in_ranges inclusive on end epoch
  withdraw: fix bounds for collecting slashes for an unbond
  aesthetic cleaning
  revert bound cleaning for readability
  refactor slash lookup
  fixup! add cubic_slash_window_length to bounds (maybe still needs change)
  remove unused cubic slash function
  refactor epoch offsets with params methods
  store total bond sums of each validator for efficient computation
  pos/lib.rs: WIP fix things inside of `bonds_and_unbonds`
  fix PoS client query related functions
  fix `bond_amount`
  state machine test: add slashing
  basic nested map test
  slashing: unit and e2e tests
  Makefile and Cargo.toml
  cubic and general slashing algorithms and transactions
tzemanovic
tzemanovic previously approved these changes May 28, 2023
brentstone added a commit that referenced this pull request Jun 1, 2023
brentstone added a commit that referenced this pull request Jun 1, 2023
* brent/cubic-slashing:
  WIP changes from Manu and logging
  fixing `find_slashes_in_range`
  pos sm test: ease load on the CI
  changelog: #892
  fixup!: don't call `process_slashes` within `advance_epoch`
  clean up logging
  fix clippy
  remove test code until slash pool transfers are solved
  rip slash pool
  get_slashed_amount: inclusive on infraction epoch
  add cli to sdk impl for tx unjail
  make find_slashes_in_ranges inclusive on end epoch
  withdraw: fix bounds for collecting slashes for an unbond
  aesthetic cleaning
  revert bound cleaning for readability
  refactor slash lookup
  fixup! add cubic_slash_window_length to bounds (maybe still needs change)
  remove unused cubic slash function
  refactor epoch offsets with params methods
  store total bond sums of each validator for efficient computation
  pos/lib.rs: WIP fix things inside of `bonds_and_unbonds`
  fix PoS client query related functions
  fix `bond_amount`
  state machine test: add slashing
  basic nested map test
  slashing: unit and e2e tests
  Makefile and Cargo.toml
  cubic and general slashing algorithms and transactions
  format: rustfmt for incorrect sdk-wallet-force commits
  changelog: add #925, update
  ci: remove clippy-abcipp check
  changelog: add #889
  DoS checks in fee specs for fee unshielding
  Adjusts block proposer address in fee specs
  Improves unshielding tx verification in fee specs
  Updates tendermint link in fee specs
  Improves gas accounting in specs
  Updates check table in fee specs
  Misc updates to fee specs
  Fixes wal in fee specs
  Adds protocol transactions to fee specs
  Adds governance proposals to fee specs
  Fixes unshielding in fee specs
  Enforces tx type order in fee specs
  Refactors sections of fee specs
  Adds unshielding to fee specs
  Updates fee specs
  Adds fee specs
brentstone added a commit that referenced this pull request Jun 1, 2023
brentstone added a commit that referenced this pull request Jun 1, 2023
* brent/cubic-slashing:
  fix wasm tx tests
  WIP changes from Manu and logging
  fixing `find_slashes_in_range`
  pos sm test: ease load on the CI
  changelog: #892
  fixup!: don't call `process_slashes` within `advance_epoch`
  clean up logging
  fix clippy
  remove test code until slash pool transfers are solved
  rip slash pool
  get_slashed_amount: inclusive on infraction epoch
  add cli to sdk impl for tx unjail
  make find_slashes_in_ranges inclusive on end epoch
  withdraw: fix bounds for collecting slashes for an unbond
  aesthetic cleaning
  revert bound cleaning for readability
  refactor slash lookup
  fixup! add cubic_slash_window_length to bounds (maybe still needs change)
  remove unused cubic slash function
  refactor epoch offsets with params methods
  store total bond sums of each validator for efficient computation
  pos/lib.rs: WIP fix things inside of `bonds_and_unbonds`
  fix PoS client query related functions
  fix `bond_amount`
  state machine test: add slashing
  basic nested map test
  slashing: unit and e2e tests
  Makefile and Cargo.toml
  cubic and general slashing algorithms and transactions
  format: rustfmt for incorrect sdk-wallet-force commits
  changelog: add #925, update
  ci: remove clippy-abcipp check
  changelog: add #889
  DoS checks in fee specs for fee unshielding
  Adjusts block proposer address in fee specs
  Improves unshielding tx verification in fee specs
  Updates tendermint link in fee specs
  Improves gas accounting in specs
  Updates check table in fee specs
  Misc updates to fee specs
  Fixes wal in fee specs
  Adds protocol transactions to fee specs
  Adds governance proposals to fee specs
  Fixes unshielding in fee specs
  Enforces tx type order in fee specs
  Refactors sections of fee specs
  Adds unshielding to fee specs
  Updates fee specs
  Adds fee specs
Fraccaman pushed a commit that referenced this pull request Jun 5, 2023
Fraccaman added a commit that referenced this pull request Jun 5, 2023
* origin/brent/cubic-slashing:
  fix wasm tx tests
  WIP changes from Manu and logging
  fixing `find_slashes_in_range`
  pos sm test: ease load on the CI
  changelog: #892
  fixup! cubic and general slashing algorithms and transactions
  fixup! rip slash pool
  fixup!: don't call `process_slashes` within `advance_epoch`
  clean up logging
  fix clippy
  remove test code until slash pool transfers are solved
  rip slash pool
  get_slashed_amount: inclusive on infraction epoch
  add cli to sdk impl for tx unjail
  make find_slashes_in_ranges inclusive on end epoch
  withdraw: fix bounds for collecting slashes for an unbond
  aesthetic cleaning
  revert bound cleaning for readability
  refactor slash lookup
  fixup! add cubic_slash_window_length to bounds (maybe still needs change)
  remove unused cubic slash function
  refactor epoch offsets with params methods
  store total bond sums of each validator for efficient computation
  pos/lib.rs: WIP fix things inside of `bonds_and_unbonds`
  fix PoS client query related functions
  fix `bond_amount`
  state machine test: add slashing
  basic nested map test
  slashing: unit and e2e tests
  Makefile and Cargo.toml
  cubic and general slashing algorithms and transactions
@Fraccaman Fraccaman closed this Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants