joystream icon indicating copy to clipboard operation
joystream copied to clipboard

Luxor QA Plan

Open freakstatic opened this issue 1 year ago β€’ 6 comments

Features Tests

Proposal for reducing council budget

  • [x] Create a proposal to reduce the council budget, check the budget value before and after the proposal execution
  • [x] Try to reduce the council budget more than the current value on the council budget
  • [x] Try to make a proposal with a negative reduction

Vested spending from WG budgets

  • [x] Create a vested spending from the WG budget and verify that the destination wallet receives the right amount of vested tokens
  • [x] Try to create a vested spending with a value higher than the amount in the WG budget
  • [x] Check what happens if an account has too many vesting schedules already and we do the payment

Proposal for adjusting validator rewards budget

  • [x] Create a proposal with a validator reward multiplier (Ex: 0.5) and verify that the validator and nominators rewards match the expected new value
  • [x] Try to create proposals with values outside of the range (lower than 0.2 and higher than 1.0)

Proposal for adjusting CRT pallet constraints

  • [x] Create a proposal to update all the constraints and verify the chain state after the proposal execution
  • [x] Create a proposal to update each constraint individually and check if only the selected constraint was changed and the rest didn't reset to a default value
    • [ ] max_yearly_rate
    • [ ] min_amm_slope
    • [ ] min_sale_duration
    • [ ] min_revenue_split_duration
    • [ ] min_revenue_split_time_to_start
    • [ ] sale_platform_fee
    • [ ] amm_buy_tx_fees
    • [ ] amm_sell_tx_fees
    • [ ] bloat_bond

Add proxy pallet

  • [x] Assign a proxy account to the account A and try to perform a operation that only the account A can perform using the proxy account
  • [x] Remove the proxy account association and try to perform a transaction that only the account A can perform using the proxy account WIP

Pre-Upgrade Tests

  • [ ] Try to connect and sync the joystream-node and QN (compiled from the luxor branch) to a nara chain

Post-Upgrade Tests

  • [ ] Try to connect nara pioneer (RPC and QN) to a luxor chain
  • [ ] Try to connect nara atlas (RPC, QN and Orion) to a luxor chain
  • [ ] Try to sync the luxor joystream-node and QN with the mainnet chain
  • [x] Verify that the validator rewards match the expect value considering the validator reward multiplier default value

freakstatic avatar Mar 28 '24 02:03 freakstatic

Enhancements

Post Uprade test

  • [x] council.eraPayoutDampingFactor should be 100%

Vesting WG spending

  • [ ] Test our rivalrous locks logic
    pub static ref NON_RIVALROUS_LOCKS: Vec<LockIdentifier> = [
        VotingLockId::get(),
        VESTING_LOCK_ID,
        InvitedMemberLockId::get(),
        BoundStakingAccountLockId::get(),
    ]
    .to_vec();
  • [x] Vesting schedule setup with the following parameters:
    • amount > 0 & amount_per_block == 0 should fail
    • amount == 0 & amount_per_block > 0 should fail
    • amount > 0 & amount_per_block == 0 should succeed and have similar semantics to a spend_budget result
    • amount > 0 & amount_per_block > amount should fail

Correction

  • Try to create proposals with values outside of the range (lower than 0.2 and higher than 2.0): The correct range for the damping factor should be [0,1] @kdembler please confirm

dobertRowneySr avatar Apr 02 '24 20:04 dobertRowneySr

  • Try to create proposals with values outside of the range (lower than 0.2 and higher than 2.0): The correct range for the damping factor should be [0,1] @kdembler please confirm

yeah that info was outdated, I have corrected it βœ… thanks for you input πŸ‘

freakstatic avatar Apr 02 '24 21:04 freakstatic

Reduce council budget

Happy case proposal: https://168.119.228.195.nip.io/pioneer/#/proposals/preview/1 Budget before reduction: 366,666.67 Budget after reduction: 66,666.67 βœ…

Too much reduction proposal (created via polkadot.js, pioneer properly validated): https://168.119.228.195.nip.io/pioneer/#/proposals/preview/2 Budget before reduction: 66,666.67 Execution failed βœ…

Try to make a proposal with a negative reduction is not possible. The proposal argument is u128 so it's not possible to pass a negative value βœ…

Vested spending

Happy case: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2F168.119.228.195.nip.io%2Fws-rpc#/explorer/query/0x945903fb2c797ad6b5ee1e1f872407f347b7a89550cbe0d465a4b1db4d80e689 Worked fineβœ…

Bigger spend than WG budget: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2F168.119.228.195.nip.io%2Fws-rpc#/explorer/query/0xfadad2e8cc29876c14ae630723f3e611eeb689c06086e93096cfd9a474c8e4ef Failed with storageWorkingGroup.InsufficientBudgetForSpending βœ…

Exceeding vesting schedules limit: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2F168.119.228.195.nip.io%2Fws-rpc#/explorer/query/0x56d17c7715defee8c84951eaa52c56a694357729134cdb0316847cfa7aabdc5f Failed with vesting.AtMaxVestingSchedules βœ…

Edge case params (per @ignazio-bovo):

  • amount > 0 & amount_per_block == 0 fails as expected

  • amount == 0 & amount_per_block > 0 fails as expected

  • amount > 0 & amount_per_block == 0 was suggested to succeed but it fails with invalid vesting params, I think that's the correct behaviour

  • amount > 0 & amount_per_block == amount works (vesting is done in 1 block) CleanShot 2024-04-09 at 14 00 51@2x

  • amount > 0 & amount_per_block > amount was suggested to fail but it works and the vesting is done immediately CleanShot 2024-04-09 at 14 01 10@2x

LGTM βœ…

kdembler avatar Apr 09 '24 10:04 kdembler

CRT constrains update

Update all params: https://168.119.228.195.nip.io/pioneer/#/proposals/preview/6 Inputs: CleanShot 2024-04-09 at 14 13 55@2x Before: CleanShot 2024-04-09 at 14 14 24@2x After: CleanShot 2024-04-09 at 14 17 53@2x

All good βœ…

Update single param: https://168.119.228.195.nip.io/pioneer/#/proposals/preview/7 After: CleanShot 2024-04-09 at 14 26 00@2x

All good βœ…

kdembler avatar Apr 09 '24 12:04 kdembler

Validator rewards

Era 2 ended here: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2F168.119.228.195.nip.io%2Fws-rpc#/explorer/query/0x4dfbd99fe529d5126701b8a76a753e15d9a01514a96c7ebaeaf0407d36abf9cb validatorPayout: 18,013,461,826,846 remainder: 53,835,103,847,695 Damping update proposal executed shortly after: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2F168.119.228.195.nip.io%2Fws-rpc#/explorer/query/0x5b11a99152505216a3c61546836480fce391280600e592c1dee15cd3fb36b8ac

Era 2 payout requested here: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2F168.119.228.195.nip.io%2Fws-rpc#/explorer/query/0x57d2fc9f8a72097455a93ec49a9e4e7eaff21cd6818967dc8664203508a9eba1 Paid out 1,801.3461826846 as expected

Era 3 ended here: https://polkadot.js.org/apps/?rpc=wss://168.119.228.195.nip.io/ws-rpc#/explorer/query/14401 validatorPayout: 9,006,730,909,085 remainder: 62,841,834,730,754 So validator payouts were halved, the payout+remainder is the same

Era 3 payout requested here: https://polkadot.js.org/apps/?rpc=wss://168.119.228.195.nip.io/ws-rpc#/explorer/query/0x372decb07ac6d110fb301bb0e5d1e57356d74f4bcbbf9bff29d00ed80278d2dd Paid out 900.6730909085 as expected

All looks good βœ…

kdembler avatar Apr 09 '24 12:04 kdembler

Proxy pallet

Created Any proxy: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2F168.119.228.195.nip.io%2Fws-rpc#/explorer/query/0x2c3dc3ca3a27620b7e0e34cb2927d708b7f6d1f9d2149da37e834f2a204e6043

Sent funds via a proxy: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2F168.119.228.195.nip.io%2Fws-rpc#/explorer/query/0xf7656e31621c2c017c88f14b2ac5a478b114baf27a0cc3b244ba5e0529c976ca

Properly executed, funds were withdrawn from the proxied account βœ… Call fails after proxy was removed βœ…

Created Referendum proxy, balance transfer failed βœ…, referendum calls succeeded βœ…

kdembler avatar Apr 09 '24 13:04 kdembler