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

DDC Validator pallet crate #2

Merged
merged 285 commits into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
285 commits
Select commit Hold shift + click to select a range
8b6ac90
An empty DAC Validator pallet crate
khssnv Mar 16, 2023
ff1928d
Era counter with privileged inc for DAC Validator
khssnv Mar 17, 2023
de4be86
Hooks and storage items for DAC Validator
khssnv Mar 17, 2023
c551411
add function fetch_tasks
Raid5594 Mar 17, 2023
cb3c966
Assign a random DAC validator for each edge
khssnv Mar 20, 2023
eb02ac0
Assign DAC validation tasks on era increment
khssnv Mar 20, 2023
86d2174
Format DAC Validator files
khssnv Mar 20, 2023
6a330d7
adjust era
Raid5594 Mar 21, 2023
a9ed277
fix era
Raid5594 Mar 21, 2023
3b6a21b
merge offchain worker with ddc validator
Raid5594 Mar 22, 2023
f50b16d
add proof of delivery
Raid5594 Mar 22, 2023
b906084
add PoD trigger in offchain worker
Raid5594 Mar 22, 2023
f9dd9a0
Move JSON parsing fix to ddc-validator
MRamanenkau Mar 23, 2023
0cbef50
fix timestamp bug
Raid5594 Mar 23, 2023
427f79e
Autoformat DAC Validator files
khssnv Mar 24, 2023
673cd93
add filtering of requests
Raid5594 Mar 24, 2023
b12511f
Refactor guard condition
khssnv Mar 27, 2023
3853a50
Refactor a guard condition to decrease indentation
khssnv Mar 27, 2023
fb88c8a
Use era type from staking primitives
khssnv Mar 27, 2023
8e47f4a
Fix faulty hook on block initialization
khssnv Mar 28, 2023
2f290ae
Autoformat DAC Validator files
khssnv Mar 28, 2023
416c2c6
Typo fix
khssnv Mar 28, 2023
1b75a63
Introduce era key for DAC validator tasks
khssnv Mar 28, 2023
1b9ec07
Set DAC Validators quorum size in runtime crate
khssnv Mar 29, 2023
3dac8e8
Print pubkeys available to offchain worker
khssnv Mar 29, 2023
9a473c4
merge with latest commit
Raid5594 Mar 29, 2023
669dded
fix merge
Raid5594 Mar 29, 2023
48a130d
fix typo
Raid5594 Mar 29, 2023
c9986fa
Add doc comments
khssnv Mar 29, 2023
9c77216
Module level docs
khssnv Mar 29, 2023
65ff73d
Remove http request from tx
MRamanenkau Mar 29, 2023
4f0495d
Submit DAC Validation decision call
khssnv Mar 30, 2023
419abd0
Fix validation decision update
khssnv Mar 31, 2023
1977ef7
Typo fix
khssnv Mar 31, 2023
f4c46ea
Integer type ValidationThreshold
khssnv Apr 10, 2023
095718f
Autoformat DAC Validator files
khssnv Apr 10, 2023
7244a13
Set PoD allowed deviation in runtime crate
khssnv Apr 10, 2023
fa83b3c
DAC Validators run a process by signal
khssnv Apr 14, 2023
de1c21b
fix(ddc-validator): compilation error is fixed
yahortsaryk Apr 15, 2023
eb7da59
Fix MaxNominations config
MRamanenkau Apr 17, 2023
dce3973
Reorder imps block according to construct_runtime!
MRamanenkau Apr 17, 2023
26dfce6
Merge branch 'feature/pallet-ddc-validator' into feature/integrate-un…
MRamanenkau Apr 17, 2023
2835f56
Fix compilation errors after merge
MRamanenkau Apr 17, 2023
4c0817a
Add unit test example
MRamanenkau Apr 17, 2023
b4c5a68
Fix build
MRamanenkau Apr 18, 2023
d7da313
Make data provider url configurable via rpc
MRamanenkau Apr 19, 2023
c7f928b
Fix local storage reading
khssnv Apr 19, 2023
a4a9f8c
Clean up
MRamanenkau Apr 19, 2023
a9f264a
Remove duplicate parameter
khssnv Apr 20, 2023
bae3c9e
Autoformat DAC Validator files
khssnv Apr 20, 2023
201db36
Separate modules for validation and DAC client
khssnv Apr 20, 2023
553f375
Implement job assignment
MRamanenkau Apr 20, 2023
72c0c28
Compilation fixes
MRamanenkau Apr 20, 2023
8eca54e
Validation results with aggregates from DAC
khssnv Apr 21, 2023
8434e99
Remove unnecessary validators signal reset call
khssnv Apr 21, 2023
3079bac
Remove an obsolete task manager related code
khssnv Apr 21, 2023
44c2e66
Remove an obsolete ValidationResult related code
khssnv Apr 21, 2023
45911d9
Use AccountId instead of String
MRamanenkau Apr 21, 2023
19b6088
Merge branch 'feature/pallet-ddc-validator' into feature/job-assgnment
MRamanenkau Apr 21, 2023
cf81f91
Revert "Remove an obsolete ValidationResult related code"
MRamanenkau Apr 21, 2023
52716f7
Revert "Remove an obsolete task manager related code"
MRamanenkau Apr 21, 2023
b44f304
Revert "Remove unnecessary validators signal reset call"
MRamanenkau Apr 21, 2023
130c941
Merge branch 'feature/pallet-ddc-validator' into feature/job-assgnment
MRamanenkau Apr 21, 2023
f931a2c
Remove obsolete code
MRamanenkau Apr 21, 2023
18798de
Try parse
MRamanenkau Apr 24, 2023
64b813b
Fix compilation error
MRamanenkau Apr 25, 2023
d20c095
Fix parsing
MRamanenkau Apr 25, 2023
c07d3a2
Update data format
MRamanenkau Apr 25, 2023
8307b44
Clean up
MRamanenkau Apr 25, 2023
7d3fd19
Remove obsolete create level docs
khssnv Apr 26, 2023
7cb69c5
Autoformat DAC Validator files
khssnv Apr 26, 2023
18ca6fd
Move DAC interaction code to a separate module
khssnv Apr 26, 2023
4758722
Add DAC Validator utils module
khssnv Apr 26, 2023
a2e6b91
Fix dac module usage in ddc-validator crate
khssnv Apr 26, 2023
1c0abec
Use log crate directly
khssnv Apr 27, 2023
0f29c1c
Implement bytes aggregation
MRamanenkau Apr 27, 2023
11c219c
Clean up code
MRamanenkau Apr 27, 2023
1f458ae
Fix mock data url
MRamanenkau Apr 28, 2023
652fd81
Fix info macro
MRamanenkau Apr 28, 2023
f5bb023
DAC aggregates reading function
khssnv Apr 28, 2023
4fa175b
Print the number of broken sessions by CDN node
khssnv Apr 28, 2023
c2e4656
Autoformat DAC Validator files
khssnv Apr 28, 2023
3365192
Add const for threshold configuration
MRamanenkau Apr 28, 2023
6298c5d
DAC Validators' "shared memory" module
khssnv May 3, 2023
f18fe68
Borrow DAC data for validation, remove ownership
khssnv May 4, 2023
c600727
Make all DAC data types fields public
khssnv May 4, 2023
2479953
Create intermediate validation decisions
khssnv May 4, 2023
2689bff
Remove let...else unstable feature usage
khssnv May 4, 2023
bf748db
Base64 encoding func for validators' shared memory
khssnv May 5, 2023
e93cad5
A func to publish intermediate validation result
khssnv May 5, 2023
a81248a
Reset validators launch signal each block
khssnv May 5, 2023
9ef60d6
Publish intermediate validation results to shm
khssnv May 5, 2023
7356682
Implement validator decisions fetching
MRamanenkau May 4, 2023
118ead1
Fix shm save_validation_result_by_node request arg
khssnv May 10, 2023
6a5e48f
Module docs for validators' shared memory mod
khssnv May 10, 2023
5d54ce5
Payments module for DDC Validator pallet
khssnv May 10, 2023
240f13f
Get final decision
MRamanenkau May 11, 2023
eb86761
Run cargo fmt
MRamanenkau May 11, 2023
6f14608
Replace FinalDecision wiht ValidationDecision
MRamanenkau May 11, 2023
d983ac8
Implement find_largest_group
MRamanenkau May 11, 2023
9391f9c
Send tx
MRamanenkau May 12, 2023
b2a5309
Cargo fmt
MRamanenkau May 12, 2023
6d05d49
Put mocked era to get_validation_results
MRamanenkau May 12, 2023
ee5be4a
Merge pull request #216 from Cerebellum-Network/feature/post-final-on…
MRamanenkau May 12, 2023
8cc34ae
Add `set_era_reward_points` call to ddc-validator
khssnv May 12, 2023
a10a664
Set era reward points from off-chain worker
khssnv May 12, 2023
c638578
Prevent panic on redis shared memory comm error
khssnv May 15, 2023
ce1acf4
accounts first version
Raid5594 May 12, 2023
98077dc
fix code quality
Raid5594 May 12, 2023
dacff9a
add existential balance for pallet accounts
Raid5594 May 15, 2023
5b580da
Validate once per era
MRamanenkau May 15, 2023
03da8e2
Return early if no `dacv` key found, don't panic
khssnv May 16, 2023
96c201a
feat(pallets): ddc-validator
yahortsaryk May 17, 2023
40a9fd3
feat(pallets): ddc-accounts
yahortsaryk May 17, 2023
6c31ece
feat(pallets): ddc-validator and ddc-staking pallets
yahortsaryk May 17, 2023
aaf056f
Merge pull request #21 from Cerebellum-Network/fix/dev-flag
yahortsaryk May 17, 2023
2e72f43
add charge payments to accounts
Raid5594 May 18, 2023
937ae39
Don't panic in absence of `LastManagedEra` value
khssnv May 18, 2023
d38fb2e
Autoformat DAC Validator files
khssnv May 18, 2023
2f8e1d8
Remove unwraps from bytes sent and received fetch
khssnv May 19, 2023
7b206d1
Print an account available to the off-chain worker
khssnv May 19, 2023
ed5cee9
Typo fix
khssnv May 19, 2023
ca0b17d
Add ddc-accounts dependency to ddc-validator
khssnv May 19, 2023
24efe5d
Price per byte storage item and a call to set it
khssnv May 19, 2023
740dce6
Move pricing storage item and call to ddc-staking
khssnv May 19, 2023
1cc29e0
Compute CDN payout using the price per byte
khssnv May 19, 2023
a466399
account for unlocking chunks for payments
Raid5594 May 19, 2023
cce436f
Autoformat DAC Validator files
khssnv May 22, 2023
9af794b
Move code form the old repo
MRamanenkau May 22, 2023
5768ed8
Fix job assignment
MRamanenkau May 23, 2023
a5054c9
Incerease spec_version
MRamanenkau May 24, 2023
3b71b50
Merge branch 'dev' into feature/pallet-ddc-validator
khssnv May 29, 2023
b0ad5a8
Return result type from shm encode/decode funcs
khssnv May 29, 2023
076e13c
Panic at higher level on shm coding errors
khssnv May 29, 2023
d9c9bcc
Fix encoding/decoding
MRamanenkau May 29, 2023
bc90d78
Assign job for current era if there is no assignment
MRamanenkau May 29, 2023
406889a
Merge branch 'dev' into feature/pallet-ddc-validator
khssnv Jun 12, 2023
ee6a19a
Fix `PalletId` to `AccountId` conversion
khssnv Jun 12, 2023
f67157a
link payments
Raid5594 May 31, 2023
2754f72
fix entry point for call
Raid5594 Jun 3, 2023
2e7543a
add OCWkeys
Raid5594 Jun 23, 2023
584d4e4
add rewards structure for cluster manager
Raid5594 Jun 23, 2023
0145f40
update access control
Raid5594 Jun 26, 2023
6b30429
link payout to stakers
Raid5594 Jun 30, 2023
775e8c3
update staking
Raid5594 Jun 30, 2023
25920a7
Merge branch 'dev' into feature/pallet-ddc-validator
khssnv Jul 4, 2023
6b5b7c4
Update dependencies versions to fix build
khssnv Jul 4, 2023
5f8c8f1
Fix weight return
khssnv Jul 4, 2023
92cf3d5
Sort `pallet-ddc-validator` dependencies
khssnv Jul 4, 2023
4cddbc8
Autoformat DDC pallets
khssnv Jul 4, 2023
3966b3d
Fix faulty testing
khssnv Jul 4, 2023
64b19eb
Merge branch 'dev' into feature/pallet-ddc-validator
khssnv Jul 4, 2023
96ee036
Remove comment line
khssnv Jul 4, 2023
e37e316
Add job assignment related comments
khssnv Jul 5, 2023
07d67bf
Fix validation job assignment
khssnv Jul 5, 2023
b07496a
Fix to assign validation tasks once per DDC era
khssnv Jul 5, 2023
c69cbb7
update redis url
Raid5594 Jul 5, 2023
3fe489b
update validator
Raid5594 Jul 5, 2023
d15c723
update job assignment
Raid5594 Jul 5, 2023
a5b9c43
fix url bug
Raid5594 Jul 5, 2023
cfe9cbf
use webdis
Raid5594 Jul 5, 2023
0c96082
Produce tasks assignment for the next era
khssnv Jul 6, 2023
d354723
Autoformat `pallet-ddc-validator` files
khssnv Jul 6, 2023
58afb86
Run validation once per DDC era
khssnv Jul 6, 2023
1159398
Fix duplicate validation start each block
khssnv Jul 6, 2023
13ff254
Remove an obsolete comment
khssnv Jul 6, 2023
11c834f
Fix validators signal check skipping
khssnv Jul 6, 2023
66a4765
Remove obsolete validation code used data mockups
khssnv Jul 6, 2023
00e54b4
Remove commented out broken sessions detection
khssnv Jul 6, 2023
ea666d2
Fix validation start by the signal
khssnv Jul 6, 2023
22352c9
Print data provider URL only if validation starts
khssnv Jul 6, 2023
a4e4d54
Merge branch 'dev' into feature/pallet-ddc-validator
khssnv Jul 11, 2023
c006aeb
Autoformat with `rustfmt`
khssnv Jul 11, 2023
afee1b9
fix eras for exstrinsics & accumulate payments for buckets
Raid5594 Jul 11, 2023
01421ea
add events for cluster management
Raid5594 Jul 12, 2023
63f5e4c
update events for cluster management; incorporate missing logic for s…
Raid5594 Jul 12, 2023
655061d
fix storage mutation for aggregate node rewards
Raid5594 Jul 13, 2023
19e2b84
fix last era validation lock to avoid repeptitive validation
Raid5594 Jul 13, 2023
bfc28ee
fix typos
Raid5594 Jul 13, 2023
3507f29
fix urls
Raid5594 Jul 13, 2023
2b6ac62
Merge branch 'dev' into feature/pallet-ddc-validator
khssnv Jul 17, 2023
8e133aa
Update dependencies
khssnv Jul 17, 2023
f7a4eda
Fix `RuntimeCall` and `RuntimeEvent` types
khssnv Jul 17, 2023
be7da1b
set OCW keys as assignees for validators & fix the bug which let to e…
Raid5594 Jul 19, 2023
e6b22cf
update github workflows
Raid5594 Jul 20, 2023
420d296
new workflows
Raid5594 Jul 20, 2023
97196aa
test(ddc-validator): mock dac requests for tests are prepared
yahortsaryk Jul 12, 2023
541ed00
test(ddc-validator): mock request for shared decisions and tx pool ex…
yahortsaryk Jul 12, 2023
8102950
test(ddc-validator): mock transaction assertion in tests
yahortsaryk Jul 12, 2023
61d913f
test(ddc-validator): simple test scenario for setting validation deci…
yahortsaryk Jul 13, 2023
9b2961e
Autoformat `pallet-ddc-validator` code
khssnv Jul 21, 2023
74cc434
Add `Runtime` prefix to `Call`, `Event` and etc.
khssnv Jul 21, 2023
6801c20
Fix associated types in mock for validator tests
khssnv Jul 21, 2023
06a1bdf
payments can only be charged by OCW registered keys
Raid5594 Jul 27, 2023
d7a7481
skipdeserializing on incorrect type
Raid5594 Jul 27, 2023
cb8d37b
avoid double spend of content owner funds
Raid5594 Jul 28, 2023
d5ca085
Return an error on validators assignment failure
khssnv Aug 2, 2023
e52eaec
Tasks assignment errors handling
khssnv Aug 2, 2023
ca716fa
add workflow
Raid5594 Aug 4, 2023
af26c4d
update workflows
Raid5594 Aug 4, 2023
c1509c4
Build on official github runners
ADobrodey Aug 4, 2023
7134076
Actualize build
ADobrodey Aug 4, 2023
e3cc31d
comment out not tested functionality
Raid5594 Aug 4, 2023
02fa607
Return Result from validation func
khssnv Aug 11, 2023
c21ced4
Get DDC era from DDC staking pallet
khssnv Aug 14, 2023
4a358b4
Prevent OCW panic on validator's key absence
khssnv Aug 14, 2023
dafb2e8
Log warning with DDC validation error
khssnv Aug 14, 2023
49df915
add data structures for UI
Raid5594 Aug 14, 2023
10edd83
update double spend protection for charging owners & paying stakers
Raid5594 Aug 14, 2023
9a3e6e0
Fix faulty test
khssnv Aug 15, 2023
92c909a
fix trigerring payments for era not validated
Raid5594 Aug 15, 2023
542571f
Fix validation rerun by validated era storing
khssnv Aug 16, 2023
f47e620
extra checks intermediate progress
Raid5594 Aug 16, 2023
84313df
Merge branch 'dev' into feature/pallet-ddc-validator
khssnv Aug 16, 2023
c638a3a
finish with safety checks
Raid5594 Aug 16, 2023
a316d65
charge content owners based on pricing (fix bug)
Raid5594 Aug 17, 2023
fe7f288
Enable DDC validation depending on storage key
khssnv Aug 17, 2023
f398b0c
New CLI parameter for enabling DDC validation
khssnv Aug 17, 2023
2886959
Enable validation while testing
khssnv Aug 18, 2023
f50d1cc
Simplify imports
khssnv Aug 18, 2023
713612b
Update CHANGELOG.md
khssnv Aug 18, 2023
c024cd8
Bump spec version
khssnv Aug 18, 2023
de7ad94
Prevent panicking during the validation assignment
khssnv Aug 18, 2023
225f8a5
Decrease validation assignment logs severity
khssnv Aug 18, 2023
13fb21b
complete merge
Raid5594 Aug 18, 2023
64aae9c
Return validation errro in absence of assignment
Raid5594 Aug 18, 2023
1bffc10
Decrease pallet-ddc-accounts logs severity
Raid5594 Aug 18, 2023
c560fe7
decrease pallet-ddc-validator logs severity to debug
Raid5594 Aug 18, 2023
7619421
fix remaining conflicts not smotted by git
Raid5594 Aug 18, 2023
362cee7
fix tests
Raid5594 Aug 21, 2023
293cfd0
update log info and debug
Raid5594 Aug 22, 2023
834041d
use current_era from ddc_staking
Raid5594 Aug 23, 2023
7677a58
change hash type to Identity for accountId
Raid5594 Aug 23, 2023
b87f620
add missing error types and remove unwrap from exstrinsics
Raid5594 Aug 23, 2023
5285008
remove type TimeProvider
Raid5594 Aug 23, 2023
af8508f
remove deprecated method and rename charge_payments to charge_content…
Raid5594 Aug 23, 2023
7c4f5bd
remove obsolete method; payout_cdn_owners can be called directly from…
Raid5594 Aug 23, 2023
3064fca
remove obsolete method set_era_reward_points
Raid5594 Aug 23, 2023
a047427
fix comments for errors and exstrinsics
Raid5594 Aug 24, 2023
9b37895
rename ocw key to validator key & some formatting
Raid5594 Aug 24, 2023
08a1d88
add another safety check to verify that stash key belonging to valida…
Raid5594 Aug 24, 2023
955b116
simplify do_payout_stakers
Raid5594 Aug 24, 2023
4392557
update validator tests
Raid5594 Aug 24, 2023
6c45c94
use snake_case for getters
Raid5594 Aug 24, 2023
db88c54
deposit events should be placed in the end of an exstrinsic as they a…
Raid5594 Aug 24, 2023
e33b622
remove unnecessary moethds and unused imports; change naming
Raid5594 Aug 25, 2023
b348217
fixes base on latest comments
Raid5594 Aug 25, 2023
c65f551
test with one validation in quorum works correctly
Raid5594 Aug 28, 2023
17762ec
update test to 3 validators in quorum
Raid5594 Aug 29, 2023
fdd1009
revert storage map types
Raid5594 Aug 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
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- ...
- [D] New `pallet-ddc-validator` which implements DDC CDN nodes validation and rewarding. You can enable DDC validation providing `--enable-ddc-validation` argument. It will only work on the nodes with validation and offchain workers enabled as well.
- [D] Several calls for `pallet-ddc-staking` to distribute rewards.

### Changed

Expand Down
Loading
Loading