Skip to content

Commit

Permalink
[DifficultyHash] Prepare for difficulty multiplier usage (#836)
Browse files Browse the repository at this point in the history
## Summary

This PR prepares for claimed amount calculation to use the
`RelayDifficultyMultiplier`.
* It removes the `RelayDifficultyTargetHash` `proof` param.
* Replace `prooftypes.DefaultRelayDifficultyTargetHash` occurrences with
`protocol.BaseRelayDifficultyHashBz`.
* Moves the `RleayMiningDifficulty` logic to the `service` module due to
cyclic dependencies.
* Rename `num_compute_units` to `num_claimed_compute_units` and add
`num_estimated_compute_units` and `claimed_amount_upokt`
* Remove the no longer used tokenomics querier to retrieve a service
difficulty target hash.

The PR is only renaming and moving of files most (~13200LOC) changes are
auto-generated code.

## Type of change

Select one or more from the following:

- [ ] New feature, functionality or library
- [x] Consensus breaking; add the `consensus-breaking` label if so. See
#791 for details
- [ ] Bug fix
- [x] 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`
- [ ] **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
- [ ] I have left TODOs throughout the codebase, if applicable
  • Loading branch information
red-0ne authored Oct 10, 2024
1 parent fd71973 commit 879401e
Show file tree
Hide file tree
Showing 92 changed files with 8,676 additions and 6,428 deletions.
1,048 changes: 842 additions & 206 deletions api/poktroll/proof/event.pulsar.go

Large diffs are not rendered by default.

174 changes: 46 additions & 128 deletions api/poktroll/proof/params.pulsar.go

Large diffs are not rendered by default.

842 changes: 842 additions & 0 deletions api/poktroll/service/event.pulsar.go

Large diffs are not rendered by default.

212 changes: 185 additions & 27 deletions api/poktroll/service/genesis.pulsar.go

Large diffs are not rendered by default.

2,269 changes: 2,203 additions & 66 deletions api/poktroll/service/query.pulsar.go

Large diffs are not rendered by default.

84 changes: 81 additions & 3 deletions api/poktroll/service/query_grpc.pb.go

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

Loading

0 comments on commit 879401e

Please sign in to comment.