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

[MGX-632] 3rdparty rewards #593

Closed
wants to merge 90 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
5fba1e0
make rewards calculations aware of curve
mateuszaaa Sep 7, 2023
82db76a
Merge remote-tracking branch 'origin/develop' into feature/3rdparty-r…
mateuszaaa Sep 7, 2023
6c4bfdf
add: PoS::reward_pool extrinsic
mateuszaaa Sep 12, 2023
1709ea7
preliminary rewards claim
mateuszaaa Sep 15, 2023
0fb361b
wip
mateuszaaa Sep 20, 2023
5beb83b
nmap
mateuszaaa Sep 21, 2023
d26c215
schedule rewards extrinsics
mateuszaaa Sep 22, 2023
30193b1
docs for Proof of Stake
mateuszaaa Sep 22, 2023
9844c68
annotate R/W in distribute_rewards
mateuszaaa Sep 22, 2023
243ce16
refactor storage entry type for TotalActivatedLiquidityForSchedules
mateuszaaa Sep 22, 2023
398a0ba
replace proceduram macros with generic fn
mateuszaaa Sep 25, 2023
50cf222
workaround for XYK capabilities in benchmark code
mateuszaaa Sep 25, 2023
1cc2256
benchmark for PoS::reward_pool
mateuszaaa Sep 25, 2023
74a6ddd
benchmark for PoS::activate_liquidity_for_rewards_schedule
mateuszaaa Sep 25, 2023
7dc7046
Benchmarks for PoS::deactivate_liquidity_for_rewards_schedule
mateuszaaa Sep 26, 2023
9ce2c48
include new extrinsics in PoS::Weight
mateuszaaa Sep 26, 2023
5047104
valuate MGX rewards properly
mateuszaaa Sep 26, 2023
280a56b
remove unnecessary pool promotion
mateuszaaa Sep 26, 2023
6c84c11
wip
mateuszaaa Sep 26, 2023
bf719f6
tests cleanup
mateuszaaa Sep 26, 2023
4b5f06a
wip rpc/runtime api
mateuszaaa Sep 27, 2023
afa51be
Merge remote-tracking branch 'origin/develop' into feature/3rdparty-r…
mateuszaaa Sep 27, 2023
87f7df4
rpc/runtime api
mateuszaaa Sep 27, 2023
9792895
renaming
mateuszaaa Sep 27, 2023
eca4e5a
runtime compiles
mateuszaaa Sep 27, 2023
e20091a
align runtime configs
mateuszaaa Sep 27, 2023
a0ec565
runtime api implemented
mateuszaaa Sep 27, 2023
0c461b9
benchmarks for PoS::claim_3rdparty_rewards
mateuszaaa Sep 28, 2023
2519050
test for calculate_3rdparty_rewards_all
mateuszaaa Sep 28, 2023
af3a2e0
Align Proof of stake runtime api to share interface with other runtim…
mateuszaaa Sep 28, 2023
c9a24ef
Merge remote-tracking branch 'origin/develop' into feature/3rdparty-r…
mateuszaaa Sep 28, 2023
fba56e9
remove local patch to parachain staking
mateuszaaa Sep 29, 2023
5bb726b
Merge remote-tracking branch 'origin/develop' into feature/3rdparty-r…
mateuszaaa Oct 1, 2023
139b1f1
fix formatting
mateuszaaa Oct 1, 2023
15126f9
fix ut
mateuszaaa Oct 1, 2023
35b1ebe
run PoS runtime benchmarks tests separately
mateuszaaa Oct 2, 2023
c0fafcd
fix runtime benchmarks
mateuszaaa Oct 2, 2023
7532a2d
Merge branch 'develop' into feature/3rdparty-rewards
mateuszaaa Oct 2, 2023
80b9c92
apply benchmarks from ref machine
mateuszaaa Oct 2, 2023
b0bb7c6
apply formatting
mateuszaaa Oct 2, 2023
17c1d75
fwip
mateuszaaa Oct 11, 2023
e3521d7
basic list operation works
mateuszaaa Oct 13, 2023
09e8b6e
simplified version of list
mateuszaaa Oct 13, 2023
2dacdc5
almost works
mateuszaaa Oct 13, 2023
5beb988
linked list working
mateuszaaa Oct 13, 2023
710526c
add scenario for conrner case conditions where all processed schedule…
mateuszaaa Oct 13, 2023
cd4dc07
before session id unification
mateuszaaa Oct 14, 2023
5456272
progress on schedudle rewards calculation
mateuszaaa Oct 14, 2023
6e6746c
simple scenario still fails
mateuszaaa Oct 14, 2023
f7d5964
cumulative calculations
mateuszaaa Oct 23, 2023
c849265
align tests for linked list
mateuszaaa Oct 24, 2023
a18d087
almost working
mateuszaaa Oct 24, 2023
7e209c8
missing I256
mateuszaaa Oct 24, 2023
f09582b
all tests passig
mateuszaaa Oct 25, 2023
5d95d4c
rewards_are_available_in_next_session_after_rewards_are_provided test…
mateuszaaa Oct 25, 2023
67805d1
add test multiple_activations_and_deactivations_from_multiple_users_o…
mateuszaaa Oct 25, 2023
605ac82
fix formatting
mateuszaaa Oct 25, 2023
85ad4fb
remove prints
mateuszaaa Oct 25, 2023
4defde8
annotate storage reads & writes
mateuszaaa Oct 26, 2023
41d198a
remove unused param
mateuszaaa Oct 27, 2023
29e305a
align issuance & pos rewards period
mateuszaaa Oct 28, 2023
3598373
wip does not work
mateuszaaa Oct 29, 2023
776e60a
removed custom block progression method
mateuszaaa Oct 30, 2023
50f5e34
add test for preventing activation on unpromoted pool
mateuszaaa Oct 30, 2023
8ce3cb1
move cumulative distributed calculations to dedicated class
mateuszaaa Oct 30, 2023
d4a94cd
refactor: create ScheduleRewardsCalculator
mateuszaaa Oct 30, 2023
868de07
refactor: extract ScheduleRewards struct
mateuszaaa Oct 30, 2023
111b0cd
apply formatting
mateuszaaa Oct 30, 2023
5b849e9
adding docs to rewards_calculator module
mateuszaaa Oct 30, 2023
e6d3d20
fix wasm32 compilation
mateuszaaa Oct 30, 2023
bb516ed
introduce pool volume valuation and align ut
mateuszaaa Oct 31, 2023
357cb9f
verify volume of rewarded token
mateuszaaa Oct 31, 2023
ec8e4d7
fixing some of the benchmarks
mateuszaaa Oct 31, 2023
6ebec8d
compiles
mateuszaaa Nov 1, 2023
2f62b22
refactor method names
mateuszaaa Nov 1, 2023
7ebc15d
move utils to dedicated file
mateuszaaa Nov 1, 2023
8ee013f
few remaining failing tests
mateuszaaa Nov 1, 2023
cd882ff
all benchmarks work
mateuszaaa Nov 1, 2023
8175039
kusama-runtime benchmarks fix
mateuszaaa Nov 1, 2023
f5f756c
fix features so tests are imported correctly
mateuszaaa Nov 2, 2023
2841e8c
apply formatting
mateuszaaa Nov 2, 2023
03be574
fix test for that verifies that fees are not charged on successful ac…
mateuszaaa Nov 2, 2023
0c37867
align
mateuszaaa Nov 2, 2023
b4080d7
Merge remote-tracking branch 'origin/develop' into feature/3rdparty-r…
mateuszaaa Nov 2, 2023
a51e09a
compiles
mateuszaaa Nov 2, 2023
88b07f2
Merge remote-tracking branch 'origin/develop' into feature/3rdparty-r…
mateuszaaa Nov 2, 2023
d0ff567
fix manifest
mateuszaaa Nov 2, 2023
be10ab4
remove unused patches
mateuszaaa Nov 2, 2023
810e34f
impl missing fn
mateuszaaa Nov 2, 2023
5f47e65
fix RPC 'calculate_3rdparty_rewards_all'
mateuszaaa Nov 8, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/reusable-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,12 @@ jobs:
/usr/local/cargo/registry
key: cargo-benchmark-cache-${{ inputs.cache_version }}-${{ hashFiles('Cargo.lock') }}
- name: Run benchmarks tests
run: cargo test --release -j8 --features=runtime-benchmarks -p pallet-xyk -p pallet-issuance -p pallet-multipurpose-liquidity -p pallet-fee-lock -p pallet-proof-of-stake -p pallet-proof-of-stake
run: cargo test --release -j8 --features=runtime-benchmarks -p pallet-xyk -p pallet-issuance -p pallet-multipurpose-liquidity -p pallet-fee-lock
- name: Run benchmarks tests
run: cargo test --release -j8 --features=runtime-benchmarks -p pallet-bootstrap
# NOTE: MGX-742
- name: Run benchmarks tests
run: cargo test --release -j8 --features=runtime-benchmarks -p pallet-proof-of-stake

build-and-run-try-runtime:
name: Run try-runtime checks
Expand Down
Loading