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

Incentive module remaining tests checklist #1990

Open
21 of 30 tasks
toteki opened this issue Apr 12, 2023 · 0 comments
Open
21 of 30 tasks

Incentive module remaining tests checklist #1990

toteki opened this issue Apr 12, 2023 · 0 comments

Comments

@toteki
Copy link
Member

toteki commented Apr 12, 2023

Required before feature testnet

Basic message execution

  • Bond
  • BeginUnbonding (and unbonding completion after time)
  • EmergencyUnbond (with fee)
  • Gov (params, program)
  • Sponsor

Basic rewards calculation, distribution

  • Rewards proportional to bonded amounts between multiple users
  • Rewards skip block when zero bonded
  • Simultaneous programs add together

Edge cases and cleanup - make during feature testnet

  • Zero unbonding duration skips unbonding struct, max unbondings param
  • Pending rewards on all basic messages (must automatically claim)
  • Rounding scenarios (high exponent asset test)
  • CLI tests for non-gov messages
  • Query tests for basic scenarios
  • Expanded coverage of basic functions (validate, error cases, etc)
  • Non funded programs complete immediately on start
  • First incentive program on a denom fetches asset exponent from leverage module
  • Max unbondings limit works even when multiple unbondings from the past are almost at completion

Genesis import/export

  • Generate some flows -> export genesis -> import genesis -> must work
  • Generate genesis json -> import genesis -> export genesis -> must be same as original json file.

Chain halt scenarios

  • Program start during halt (delayed)
  • Program complete during halt (remaining rewards are distributed)
  • Program both starts and would complete during halt (delayed start means delayed completion too)

Mock leverage hook scenario in incentive module tests

  • Liquidation with no effect (sufficient collateral)
  • Liquidation finishes some unbondings (earliest first)
  • Liquidation unbonds some collateral and finishes all unbondings

Mock incentive hook scenario in leverage module tests

  • Cannot withdraw bonded collateral
  • Cannot decollateralize bonded collateral
  • Can liquidate bonded collateral (and liquidation reduces bonded collateral)

Query edge cases

  • Account unbondings that have finished but have not yet been cleared by messages
  • Pending rewards simultaneous with pending completed unbondings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant