Skip to content

Commit

Permalink
[Supplier] Initial slashing implementation (#795)
Browse files Browse the repository at this point in the history
## Summary

This PR introduces the initial implementation of `Supplier` slashing:
- Adjusts proof parameters to align with the probabilistic proofs paper.
- Adds comments on potential follow-up improvements and adjustments.
- Implements `Supplier` slashing for invalid or missing proofs.
- Unstakes a `Supplier` whose stake falls below the minimum due to
slashing.
- Move the `ComputeUnitsToTokenMultiplier` to the `shared` module.

_~1300LOC is auto-generated code_

## Issue

To enable permissionless demand, the protocol must discourage the
submission of false or invalid claims.

As part of this, `Suppliers` should be penalized for failing to comply
with the C&P life cycle rules.

- #758 

## Type of change

Select one or more from the following:

- [x] New feature, functionality or library
- [x] Consensus breaking; add the `consensus-breaking` label if so. See
#791 for details
- [ ] Bug fix
- [ ] Code health or cleanup
- [ ] Documentation
- [ ] Other (specify)

## Testing

- [ ] **Documentation**: `make docusaurus_start`; only needed if you
make doc changes
- [x] **Unit Tests**: `make go_develop_and_test`
- [x] **LocalNet E2E Tests**: `make test_e2e`
- [x] **DevNet E2E Tests**: Add the `devnet-test-e2e` label to the PR.

## Sanity Checklist

- [x] I have tested my changes using the available tooling
- [x] I have commented my code
- [x] I have performed a self-review of my own code; both comments &
source code
- [ ] I create and reference any new tickets, if applicable
- [x] I have left TODOs throughout the codebase, if applicable

---------

Co-authored-by: Daniel Olshansky <[email protected]>
  • Loading branch information
red-0ne and Olshansk authored Sep 18, 2024
1 parent 56f7052 commit 09fc4ce
Show file tree
Hide file tree
Showing 65 changed files with 1,996 additions and 867 deletions.
156 changes: 96 additions & 60 deletions api/poktroll/proof/params.pulsar.go

Large diffs are not rendered by default.

98 changes: 83 additions & 15 deletions api/poktroll/shared/params.pulsar.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 09fc4ce

Please sign in to comment.