Skip to content
Commit df24729d authored by Sam Elamin's avatar Sam Elamin Committed by GitHub
Browse files

add warp to target block for parachains (#12761)



* add warp to target block for parachains

* fix for failing tests

* format using  `Cargo +nightly fmt`

* Remove blocking based on PR comments and create new `WarpSync` on poll

* remove method from trait

* add tests for wait for target

* Update client/network/common/src/sync/warp.rs

Co-authored-by: default avatarBastian Köcher <[email protected]>

* Update client/network/common/src/sync/warp.rs

Co-authored-by: default avatarBastian Köcher <[email protected]>

* Update client/network/test/src/sync.rs

Co-authored-by: default avatarBastian Köcher <[email protected]>

* Update client/network/test/src/sync.rs

Co-authored-by: default avatarBastian Köcher <[email protected]>

* Update client/network/test/src/lib.rs

Co-authored-by: default avatarBastian Köcher <[email protected]>

* Update client/network/test/src/sync.rs

Co-authored-by: default avatarBastian Köcher <[email protected]>

* Update client/network/test/src/sync.rs

Co-authored-by: default avatarBastian Köcher <[email protected]>

* code refactor based on pr comments

* Second round of PR comments

* Third round of pr comments

* add comments to explain logic

* Update client/network/sync/src/lib.rs

Co-authored-by: default avatarBastian Köcher <[email protected]>

* Update client/network/sync/src/lib.rs

Co-authored-by: default avatarBastian Köcher <[email protected]>

* Update client/network/sync/src/warp.rs

Co-authored-by: default avatarBastian Köcher <[email protected]>

* Update client/network/sync/src/warp.rs

Co-authored-by: default avatarBastian Köcher <[email protected]>

* Update client/network/sync/src/warp.rs

Co-authored-by: default avatarBastian Köcher <[email protected]>

* Update client/network/sync/src/lib.rs

Co-authored-by: default avatarBastian Köcher <[email protected]>

* code refactor based on last PR comments

* move warp sync polling before `process_outbound_requests`

Add error message if target block fails to be retreived

* Update client/network/sync/src/warp.rs

Co-authored-by: default avatarArkadiy Paronyan <[email protected]>

* Update client/network/sync/src/lib.rs

Co-authored-by: default avatarBastian Köcher <[email protected]>

* Update client/network/sync/src/warp.rs

Co-authored-by: default avatarBastian Köcher <[email protected]>

* fmt after code suggestions

* rebase changes

* Bring down the node if the target block fails to return

* Revert "Bring down the node if the target block fails to return"

This reverts commit c0ecb220d66dd8e7b1a5ee29831b776f4f18d024.

* Update client/network/common/src/sync/warp.rs

Co-authored-by: default avatarMichal Kucharczyk <[email protected]>

* Update client/network/common/src/sync/warp.rs

Co-authored-by: default avatarMichal Kucharczyk <[email protected]>

* use matching on polling to avoid calling poll more than once

* Update client/network/sync/src/warp.rs

Co-authored-by: default avatarBastian Köcher <[email protected]>

* Update client/network/sync/src/warp.rs

Co-authored-by: default avatarBastian Köcher <[email protected]>

* Update client/network/sync/src/warp.rs

Co-authored-by: default avatarBastian Köcher <[email protected]>

* fix typo on comment

* update snapshot with new folder structure

* Upload snapshot

* Bump zombienet

* bump zombienet again

* Improve test

* Update client/network/test/src/sync.rs

Co-authored-by: default avatarBastian Köcher <[email protected]>

* Update client/network/test/src/sync.rs

Co-authored-by: default avatarBastian Köcher <[email protected]>

* fix tests

* dummy commit to restart builds

* Converted the target block to an optional value that is set to `None` when an error occurs

* dummy commit to restart builds

---------

Co-authored-by: default avatarBastian Köcher <[email protected]>
Co-authored-by: default avatarArkadiy Paronyan <[email protected]>
Co-authored-by: default avatarMichal Kucharczyk <[email protected]>
Co-authored-by: default avatarSebastian Kunert <[email protected]>
parent 4af64eb0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment