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

Fix sync timeout issue #1149

Merged
merged 5 commits into from
Jun 29, 2020
Merged

Conversation

matkt
Copy link
Contributor

@matkt matkt commented Jun 25, 2020

Signed-off-by: Karim TAAM karim.t2am@gmail.com

PR description

This PR fixes an error when downloading chain (Async operation failed)

When there are several blocks which are very large (> 12MB) and which are requested in the same segment (by default 200) we can have timeouts and never manage to synchronize. This modification will make it possible to gradually reduce the size of the segment with each attempt. Then the segment resumes its default size for the next blocks

If the reduction is not enough at the last attempt we try with a single block

Tested

Test
Mordor - Fullsync after already Fastsync completed OK
Mordor - Complete Fastsync OK
CLIQUE - Local OK
IBFT - Local OK
IBFT - Lacchain OK
Goerli - Fullsync OK
  • Result with LACCHAIN network
    LACCHAIN (Before) -> Always stuck after 20 minutes
    LACCHAIN (After) -> Download restart after 2-5 minutes of sync

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
@matkt matkt linked an issue Jun 25, 2020 that may be closed by this pull request
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
@matkt matkt marked this pull request as ready for review June 29, 2020 08:09
matkt added 2 commits June 29, 2020 10:10
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Copy link
Contributor

@AbdelStark AbdelStark left a comment

Choose a reason for hiding this comment

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

Looks good to me.
Only looked the code.

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
@matkt matkt merged commit 1755648 into hyperledger:master Jun 29, 2020
shemnon pushed a commit to shemnon/besu that referenced this pull request Jun 30, 2020
This PR fixes an error when downloading chain (Async operation failed)

When there are several blocks which are very large (> 12M) and which are requested in the same segment (by default 200) we can have timeouts and never manage to synchronize. This modification will make it possible to gradually reduce the size of the segment with each attempt. Then the segment resumes its default size for the next blocks

If the reduction is not enough at the last attempt we try with a single block

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
(cherry picked from commit 1755648)
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
shemnon pushed a commit that referenced this pull request Jun 30, 2020
This PR fixes an error when downloading chain (Async operation failed)

When there are several blocks which are very large (> 12M) and which are requested in the same segment (by default 200) we can have timeouts and never manage to synchronize. This modification will make it possible to gradually reduce the size of the segment with each attempt. Then the segment resumes its default size for the next blocks

If the reduction is not enough at the last attempt we try with a single block

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
(cherry picked from commit 1755648)
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
matkt added a commit that referenced this pull request Jul 24, 2020
Add  #1156 and #1149

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>

Co-authored-by: Ratan (Rai) Sur <ratan.r.sur@gmail.com>
shemnon pushed a commit to shemnon/besu that referenced this pull request Jul 28, 2020
Add  hyperledger#1156 and hyperledger#1149

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>

Co-authored-by: Ratan (Rai) Sur <ratan.r.sur@gmail.com>
(cherry picked from commit baa11a2)
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
shemnon pushed a commit that referenced this pull request Jul 28, 2020
Add  #1156 and #1149

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>

Co-authored-by: Ratan (Rai) Sur <ratan.r.sur@gmail.com>
(cherry picked from commit baa11a2)
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
@matkt matkt deleted the feature/fix-sync-timeout-issue branch August 14, 2020 12:21
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.

Error When downloading chain: Async operation failed
2 participants