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

headers(part 3) feat: implement Linear downloader #119

Merged
merged 7 commits into from
Oct 24, 2022

Conversation

gakonst
Copy link
Member

@gakonst gakonst commented Oct 24, 2022

@gakonst gakonst changed the base branch from main to gakonst/downloader-test-utils October 24, 2022 00:52
@gakonst gakonst changed the title feat: implement Linear downloader headers(part 4) feat: implement Linear downloader Oct 24, 2022
@gakonst gakonst changed the title headers(part 4) feat: implement Linear downloader headers(part 3) feat: implement Linear downloader Oct 24, 2022
@codecov
Copy link

codecov bot commented Oct 24, 2022

Codecov Report

Merging #119 (005f2f5) into gakonst/downloader-test-utils (c19a425) will increase coverage by 1.93%.
The diff coverage is 95.48%.

@@                        Coverage Diff                        @@
##           gakonst/downloader-test-utils     #119      +/-   ##
=================================================================
+ Coverage                          68.49%   70.43%   +1.93%     
=================================================================
  Files                                132      134       +2     
  Lines                               8904     9190     +286     
=================================================================
+ Hits                                6099     6473     +374     
+ Misses                              2805     2717      -88     
Impacted Files Coverage Δ
crates/interfaces/src/consensus.rs 50.00% <0.00%> (+50.00%) ⬆️
crates/net/headers-downloaders/src/linear.rs 95.77% <95.77%> (ø)
crates/interfaces/src/p2p/headers/downloader.rs 81.08% <100.00%> (+81.08%) ⬆️
crates/net/headers-downloaders/src/lib.rs 100.00% <100.00%> (ø)
crates/net/rpc-types/src/eth/engine.rs 14.28% <100.00%> (+14.28%) ⬆️
crates/primitives/src/header.rs 92.94% <0.00%> (+8.23%) ⬆️
crates/interfaces/src/lib.rs 60.46% <0.00%> (+59.30%) ⬆️
crates/interfaces/src/p2p/headers/client.rs 66.66% <0.00%> (+66.66%) ⬆️

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

@gakonst gakonst force-pushed the gakonst/downloader-test-utils branch from bd27baf to c19a425 Compare October 24, 2022 06:13
@gakonst gakonst force-pushed the gakonst/linear-downloader branch from 94718a6 to 2b0f8a1 Compare October 24, 2022 06:15
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

q re lifetimes, borrowing in general here.

crates/net/headers-downloaders/src/linear.rs Outdated Show resolved Hide resolved
crates/net/headers-downloaders/src/linear.rs Outdated Show resolved Hide resolved
@rkrasiuk rkrasiuk merged commit fcb81f1 into gakonst/downloader-test-utils Oct 24, 2022
@rkrasiuk rkrasiuk deleted the gakonst/linear-downloader branch October 24, 2022 11:38
rkrasiuk added a commit that referenced this pull request Oct 24, 2022
* feat(interfaces): implement header client traits

* feat: add downloader trait implementer

* feat: use explicit error type instead of ok(false)

* feat: add constructor to HeaderLocked

* test: scaffold mock consensus, downloader and headersclient helpers

* test: implement test consensus

* test: implement test headers client

* refactor: cleanup download headers

* chore: fix lint

* s/test_utils/test_helpers

* headers(part 3) feat: implement Linear downloader (#119)

* feat: add headers downloaders crate

* feat: more scaffolding

* interfaces: generalize retryable erros

* feat: implement linear downloader

* fix linear downloader tests & add builder

* extend & reverse

* feat: linear downloader generics behind arc and reversed return order (#120)

* put client & consensus behind arc and return headers in rev

* cleanup

Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com>

* extract test_utils

* cargo fmt

Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com>
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.

3 participants