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

CSUB-264 Palletizing Creditcoin's offchain worker #813

Merged
merged 9 commits into from
Dec 23, 2022
Merged

Conversation

CAGS295
Copy link
Contributor

@CAGS295 CAGS295 commented Dec 13, 2022

Description of proposed changes:

Practical tips for PR review & merge:

  • All GitHub Actions report PASS
  • Newly added code/functions have unit tests
    • Coverage tools report all newly added lines as covered
    • The positive scenario is exercised
    • Negative scenarios are exercised, e.g. assert on all possible errors
    • Assert on events triggered if applicable
    • Assert on changes made to storage if applicable
  • Modified behavior/functions - try to make sure above test items are covered
  • Integration tests are added if applicable/needed

@github-actions
Copy link

For full LLVM coverage report click here!

@codecov-commenter
Copy link

codecov-commenter commented Dec 13, 2022

Codecov Report

Merging #813 (262daf8) into dev (2c25748) will decrease coverage by 0.33%.
The diff coverage is 93.84%.

❗ Current head 262daf8 differs from pull request most recent head 013aab3. Consider uploading reports for the commit 013aab3 to get more accurate results

@@            Coverage Diff             @@
##              dev     #813      +/-   ##
==========================================
- Coverage   78.24%   77.91%   -0.34%     
==========================================
  Files          51       65      +14     
  Lines       10317    10487     +170     
==========================================
+ Hits         8073     8171      +98     
- Misses       2244     2316      +72     
Impacted Files Coverage Δ
node/rpc/src/task.rs 82.22% <ø> (ø)
node/src/rpc.rs 0.00% <ø> (ø)
node/src/service/nonce_monitor.rs 0.00% <0.00%> (ø)
pallets/creditcoin/src/migrations/mod.rs 0.00% <0.00%> (ø)
pallets/creditcoin/src/ocw.rs 96.00% <ø> (-0.50%) ⬇️
pallets/creditcoin/src/ocw/errors.rs 58.33% <0.00%> (-19.45%) ⬇️
pallets/creditcoin/src/ocw/rpc.rs 78.61% <ø> (-3.78%) ⬇️
pallets/creditcoin/src/types.rs 91.11% <0.00%> (-1.42%) ⬇️
...ets/offchain-task-scheduler/runtime-api/src/lib.rs 42.85% <ø> (ø)
pallets/offchain-task-scheduler/src/tasks/error.rs 0.00% <0.00%> (ø)
... and 40 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@atodorov atodorov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few minor requests as I review more.

pallets/offchain-task-scheduler/src/ocw.rs Show resolved Hide resolved
pallets/creditcoin/src/migrations/v7.rs Show resolved Hide resolved
Copy link
Contributor

@nathanwhit nathanwhit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

.github/workflows/bench.yml Outdated Show resolved Hide resolved
runtime/src/lib.rs Outdated Show resolved Hide resolved
pallets/offchain-task-scheduler/src/ocw/tests.rs Outdated Show resolved Hide resolved
atodorov
atodorov previously approved these changes Dec 20, 2022
Copy link
Contributor

@atodorov atodorov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM as well.

nathanwhit
nathanwhit previously approved these changes Dec 20, 2022
atodorov
atodorov previously approved these changes Dec 21, 2022
nathanwhit
nathanwhit previously approved these changes Dec 21, 2022
@nathanwhit
Copy link
Contributor

Looks like the merge of #827 created some conflicts that need resolution before we can merge this @CAGS295

nathanwhit
nathanwhit previously approved these changes Dec 21, 2022
nathanwhit
nathanwhit previously approved these changes Dec 21, 2022
@nathanwhit nathanwhit enabled auto-merge (rebase) December 21, 2022 23:58
CAGS295 and others added 5 commits December 21, 2022 17:42
* Connect task-scheduler interface

* move IntoBounded to extensions

* migrate `PendingTasks` storage

* remove make id functions in favor of From impl

* types: transfers

* types: CollectedCoins

* fix duplicated id constructors

* mocked runtime

* Authority Interface

* port nonce tests

* updated legacy transfers now use the new task-scheduler + remove old Task's implementations + leak transfer's inner_hash for testing

* fix `register_transfer_ocw_fail_to_send`

* use task-scheduler in creditcoin's mocked runtime

* port `offchain_signed_tx_works`

* `remove_authority_works_for_root() fix`+ `add_authority_works_for_root`

* port `offchain_worker_logs_error_when_transfer_validation_errors`

* port `effective_guard_lifetime_until_task_expiration`

* port `completed_oversubscribed_tasks_are_skipped`

* port `ocw_retries`

* port` task_deadline_oversubscription`

* port `offchain_worker_should_log_and_forget_guard_when_task_is_already_handled`

* rename `duplicate_retry_fail_and_succeed`

* change keystore id to 'gots'

* move task-scheduler

* Benchmarks

* Update pallets/offchain-task-scheduler/src/ocw/tests.rs

Co-authored-by: Alexander Todorov <alex.todorov@gluwa.com>

* remove unused code

* consistent weight update in `migrate`

Co-authored-by: Alexander Todorov <alex.todorov@gluwa.com>

Update creditcoin-js interface

format
@nathanwhit nathanwhit merged commit d21ef32 into dev Dec 23, 2022
@nathanwhit nathanwhit deleted the feature/CSUB-264 branch December 23, 2022 09:42
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

Successfully merging this pull request may close these issues.

4 participants