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

dapp staking v3 - part 5 #1087

Merged
merged 88 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from 87 commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
0a7c519
EraRewardSpan
Dinonard Oct 11, 2023
e598d1b
Initial version of claim_staker_reward
Dinonard Oct 12, 2023
fff0656
Tests
Dinonard Oct 12, 2023
0daae3a
Test utils for claim-staker
Dinonard Oct 13, 2023
ebae663
Bug fixes, improvements
Dinonard Oct 13, 2023
c76ade9
Claim improvements & some tests
Dinonard Oct 13, 2023
096726e
Refactoring in progress
Dinonard Oct 16, 2023
39c6cf0
Refactoring continued
Dinonard Oct 16, 2023
e77327d
Refactoring progress
Dinonard Oct 17, 2023
025f0b7
Refactoring finished
Dinonard Oct 17, 2023
80a0e4f
Bonus rewards
Dinonard Oct 18, 2023
82c71ad
Docs & some minor changes
Dinonard Oct 18, 2023
582aef4
Comments, tests, improved coverage
Dinonard Oct 18, 2023
b25ccb1
Tier params & config init solution
Dinonard Oct 20, 2023
3d2d146
Tier reward calculation WIP
Dinonard Oct 20, 2023
894d10d
Tier assignemnt
Dinonard Oct 23, 2023
ff61cf1
Minor cleanup
Dinonard Oct 24, 2023
3ded046
Claim dapp rewards
Dinonard Oct 24, 2023
f2f8a5f
Claim dapp reward tests
Dinonard Oct 24, 2023
03d88f4
unstake from unregistered call
Dinonard Oct 24, 2023
ea3e23d
Extra traits
Dinonard Oct 24, 2023
7558682
fixes
Dinonard Oct 24, 2023
e0f19e1
Extra calls
Dinonard Oct 25, 2023
4926838
Refactoring
Dinonard Oct 25, 2023
d47bcf4
More refactoring, improvements, TODO solving
Dinonard Oct 25, 2023
0197c95
Local integration
Dinonard Oct 25, 2023
4ea8556
Genesis config
Dinonard Oct 25, 2023
589575b
Add forcing call
Dinonard Oct 25, 2023
1e80e09
try runtime build fix
Dinonard Oct 25, 2023
fbe4c4d
Minor changes
Dinonard Oct 26, 2023
12d01fd
Minor
Dinonard Oct 27, 2023
d725575
Formatting
Dinonard Oct 27, 2023
72d3983
Benchmarks INIT
Dinonard Oct 27, 2023
f0c14cc
Compiling benchmarks
Dinonard Oct 27, 2023
e2447b3
Fix
Dinonard Oct 30, 2023
4b9e03d
dapp tier calculation benchmark
Dinonard Oct 30, 2023
8982e10
Measured tier assignment
Dinonard Oct 30, 2023
ee50c2d
Decending rewards in benchmarks
Dinonard Oct 30, 2023
67de44c
Series refactoring & partial tests
Dinonard Oct 31, 2023
c586a6c
Comments, minor changes
Dinonard Oct 31, 2023
5cf60a1
Tests, improvements
Dinonard Oct 31, 2023
7a3c634
More tests, some minor refactoring
Dinonard Nov 2, 2023
c47d36e
Formatting
Dinonard Nov 2, 2023
d36839c
More benchmarks & experiments, refactoring
Dinonard Nov 2, 2023
d0d196e
Readme, docs
Dinonard Nov 2, 2023
9723d9f
Minor renaming, docs
Dinonard Nov 3, 2023
24b4b53
More docs
Dinonard Nov 3, 2023
408eaad
More docs
Dinonard Nov 3, 2023
fd65f20
Minor addition
Dinonard Nov 7, 2023
8fe1563
Review comment fixes & changes
Dinonard Nov 9, 2023
3b894ef
Minor change
Dinonard Nov 10, 2023
7cc82da
Review comments
Dinonard Nov 10, 2023
cc1efcc
Update frontier to make CI pass
Dinonard Nov 13, 2023
ab77e36
dApp staking v3 - part 5
Dinonard Nov 13, 2023
f05e19b
Make check work
Dinonard Nov 14, 2023
6269499
Limit map size to improve benchmarks
Dinonard Nov 14, 2023
5921194
Merge remote-tracking branch 'origin/feat/dapp-staking-v3' into feat/…
Dinonard Nov 14, 2023
978559b
Fix for cleanup
Dinonard Nov 14, 2023
4162866
Minor fixes, more tests
Dinonard Nov 14, 2023
8060de5
More fixes & test
Dinonard Nov 14, 2023
7f81f32
Minor changes
Dinonard Nov 15, 2023
4e85bdb
More tests
Dinonard Nov 15, 2023
f8d5297
More tests, some clippy fixes
Dinonard Nov 15, 2023
86ba902
Finished with type tests for now
Dinonard Nov 15, 2023
94998aa
Log, remove some TODOs
Dinonard Nov 15, 2023
0655196
Changes
Dinonard Nov 15, 2023
b9832da
Bug fix for unstake era, more tests
Dinonard Nov 16, 2023
718b8a9
Merge remote-tracking branch 'origin/feat/dapp-staking-v3' into feat/…
Dinonard Nov 16, 2023
2d78cb0
Formatting, extra test
Dinonard Nov 16, 2023
05e43c8
Unregistered unstake, expired cleanup, test utils & tests
Dinonard Nov 16, 2023
cd3143d
Cleanup tests, minor fixes
Dinonard Nov 16, 2023
a0efeed
force tests
Dinonard Nov 17, 2023
a0725e4
Remove TODOs
Dinonard Nov 17, 2023
cafb67b
Tier assignment test WIP
Dinonard Nov 17, 2023
8e93106
Finish dapp tier assignment test, fix reward calculation bug
Dinonard Nov 17, 2023
b7ba462
Some renaming, test utils for era change WIP
Dinonard Nov 20, 2023
db6cd36
Fix minor issues, propagaste renaming
Dinonard Nov 20, 2023
b940375
More checks
Dinonard Nov 20, 2023
878e450
Finish on_init tests
Dinonard Nov 21, 2023
215a13e
Comments, docs, some benchmarks
Dinonard Nov 21, 2023
75e6fd3
Benchmark progress
Dinonard Nov 21, 2023
2bcb763
More benchmarks
Dinonard Nov 21, 2023
218e6c2
Even more benchmarks
Dinonard Nov 21, 2023
b893000
All extrinsics benchmarked
Dinonard Nov 21, 2023
6517154
Expand tests
Dinonard Nov 21, 2023
076e867
Comment
Dinonard Nov 21, 2023
a99bd64
Missed error test
Dinonard Nov 22, 2023
af53a55
Review comments
Dinonard Nov 29, 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
50 changes: 26 additions & 24 deletions Cargo.lock

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

4 changes: 4 additions & 0 deletions pallets/dapp-staking-v3/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ repository.workspace = true
[dependencies]
frame-support = { workspace = true }
frame-system = { workspace = true }
log = { workspace = true }
num-traits = { workspace = true }
parity-scale-codec = { workspace = true }

Expand All @@ -23,6 +24,7 @@ sp-std = { workspace = true }

astar-primitives = { workspace = true }

assert_matches = { workspace = true, optional = true }
frame-benchmarking = { workspace = true, optional = true }

[dev-dependencies]
Expand All @@ -32,6 +34,7 @@ pallet-balances = { workspace = true }
default = ["std"]
std = [
"serde",
"log/std",
"parity-scale-codec/std",
"scale-info/std",
"num-traits/std",
Expand All @@ -52,5 +55,6 @@ runtime-benchmarks = [
"frame-system/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"astar-primitives/runtime-benchmarks",
"assert_matches",
]
try-runtime = ["frame-support/try-runtime"]
18 changes: 18 additions & 0 deletions pallets/dapp-staking-v3/coverage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh

targets=("protocol_state" "account_ledger" "dapp_info" "period_info" "era_info" \
"stake_amount" "singular_staking_info" "contract_stake_amount" "era_reward_span" \
"period_end_info" "era_stake_pair_iter" "tier_threshold" "tier_params" "tier_configuration" \
"dapp_tier_rewards" )

for target in "${targets[@]}"
do
cargo tarpaulin -p pallet-dapp-staking-v3 -o=html --output-dir=./coverage/$target -- $target
done

# Also need to check the coverage when only running extrinsic tests (disable type tests)

# Also need similar approach to extrinsic testing, as above


# NOTE: this script will be deleted before the final release!
Loading
Loading