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

GUI: fix model overlay header sync #15091

Merged
merged 2 commits into from Feb 6, 2019

Conversation

@jonasschnelli
Copy link
Member

@jonasschnelli jonasschnelli commented Jan 3, 2019

Update the block and header tip is constraint to have a minimal distance of 250ms between updates... which can lead to miss the last header update.

The modal overlay then assumes we are still in header sync and the view get stuck in "syncing headers,..." (while it's actually syncing blocks).

This removes the 250ms minimal delta for header updates as well as it fixes the correct display of how header updates should update the labels.

@hebasto
Copy link
Member

@hebasto hebasto commented Jan 4, 2019

Concept ACK.

src/qt/modaloverlay.cpp Outdated Show resolved Hide resolved
@jonasschnelli jonasschnelli force-pushed the 2019/01/qt_fix_modal branch from b12dfd9 to a5061f6 Jan 4, 2019
@laanwj
Copy link
Member

@laanwj laanwj commented Jan 4, 2019

This removes the 250ms minimal delta for header updates as well as it fixes the correct display of how header updates should update the labels.

The delta is there to prevent a flood of GUI update messages. I don't removing it is a good solution, we should take care that one update makes it per 250ms though.

src/qt/clientmodel.cpp Outdated Show resolved Hide resolved
@jonasschnelli
Copy link
Member Author

@jonasschnelli jonasschnelli commented Jan 4, 2019

The delta is there to prevent a flood of GUI update messages. I don't removing it is a good solution, we should take care that one update makes it per 250ms though.

I agree. This PR only removes the delay-update for header updates... which IMO should not result in GUI flood. AFAIK the GUI flood only gets problematic on chain tip updates.

@jonasschnelli jonasschnelli force-pushed the 2019/01/qt_fix_modal branch from a5061f6 to e8db6b8 Jan 4, 2019
@hebasto
Copy link
Member

@hebasto hebasto commented Jan 6, 2019

tACK e8db6b8 (Linux Mint 19.2).

@jonasschnelli jonasschnelli added this to the 0.18.0 milestone Jan 31, 2019
ui->expectedTimeLeft->setText(tr("Unknown..."));
}
}

void ModalOverlay::UpdateHeaderSyncLabel() {
int est_headers_left = bestHeaderDate.secsTo(QDateTime::currentDateTime()) / Params().GetConsensus().nPowTargetSpacing;
ui->numberOfBlocksLeft->setText(tr("Unknown. Syncing Headers (%1, %2%)...").arg(bestHeaderHeight).arg(QString::number(100.0 / (bestHeaderHeight + est_headers_left) * bestHeaderHeight, 'f', 1)));
Copy link
Member

@promag promag Jan 31, 2019

nit, could use overloaded QString::arg http://doc.qt.io/qt-5/qstring.html#arg-8 instead of QString::number. Also, not really sure if it makes a difference but expression could be 100.0 * a / b.

@promag
Copy link
Member

@promag promag commented Jan 31, 2019

utACK e8db6b8.

@laanwj laanwj merged commit e8db6b8 into bitcoin:master Feb 6, 2019
2 checks passed
laanwj added a commit that referenced this issue Feb 6, 2019
e8db6b8 Qt: Fix update headers-count (Jonas Schnelli)
7bb45e4 Qt: update header count regardless of update delay (Jonas Schnelli)

Pull request description:

  Update the block and header tip is constraint to have a minimal distance of 250ms between updates... which can lead to miss the last header update.

  The modal overlay then assumes we are still in header sync and the view get stuck in "syncing headers,..." (while it's actually syncing blocks).

  This removes the 250ms minimal delta for header updates as well as it fixes the correct display of how header updates should update the labels.

Tree-SHA512: 57608dac822b135cd604fc6ba1c80f25c0202a6e20bb140362026615d4bf243ef4fcc254a11bad36419c554a222a2f4947438d4ce44aa14041d1874751643d68
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this issue May 21, 2020
Summary:
bitcoin/bitcoin@7bb45e4

---

Depends on D6177

Partial backport of Core [[bitcoin/bitcoin#15091 | PR15091]]

Test Plan:
  ninja
  ./src/qt/bitcoin-qt

In a node that isn't 100% synced, see that overlay describes it is receiving headers,
and then blocks correctly.

Reviewers: #bitcoin_abc, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D6179
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this issue May 21, 2020
Summary:
bitcoin/bitcoin@e8db6b8

---

Depends on D6179

Concludes backport of Core [[bitcoin/bitcoin#15091 | PR15091]]

Test Plan:
  ninja
  ./src/qt/bitcoin-qt

If node isnt 100% synced, check that 'Syncing headers' message appears

Reviewers: #bitcoin_abc, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D6180
Munkybooty added a commit to Munkybooty/dash that referenced this issue Aug 23, 2021
e8db6b8 Qt: Fix update headers-count (Jonas Schnelli)
7bb45e4 Qt: update header count regardless of update delay (Jonas Schnelli)

Pull request description:

  Update the block and header tip is constraint to have a minimal distance of 250ms between updates... which can lead to miss the last header update.

  The modal overlay then assumes we are still in header sync and the view get stuck in "syncing headers,..." (while it's actually syncing blocks).

  This removes the 250ms minimal delta for header updates as well as it fixes the correct display of how header updates should update the labels.

Tree-SHA512: 57608dac822b135cd604fc6ba1c80f25c0202a6e20bb140362026615d4bf243ef4fcc254a11bad36419c554a222a2f4947438d4ce44aa14041d1874751643d68
Munkybooty added a commit to Munkybooty/dash that referenced this issue Aug 24, 2021
e8db6b8 Qt: Fix update headers-count (Jonas Schnelli)
7bb45e4 Qt: update header count regardless of update delay (Jonas Schnelli)

Pull request description:

  Update the block and header tip is constraint to have a minimal distance of 250ms between updates... which can lead to miss the last header update.

  The modal overlay then assumes we are still in header sync and the view get stuck in "syncing headers,..." (while it's actually syncing blocks).

  This removes the 250ms minimal delta for header updates as well as it fixes the correct display of how header updates should update the labels.

Tree-SHA512: 57608dac822b135cd604fc6ba1c80f25c0202a6e20bb140362026615d4bf243ef4fcc254a11bad36419c554a222a2f4947438d4ce44aa14041d1874751643d68
Munkybooty added a commit to Munkybooty/dash that referenced this issue Sep 1, 2021
e8db6b8 Qt: Fix update headers-count (Jonas Schnelli)
7bb45e4 Qt: update header count regardless of update delay (Jonas Schnelli)

Pull request description:

  Update the block and header tip is constraint to have a minimal distance of 250ms between updates... which can lead to miss the last header update.

  The modal overlay then assumes we are still in header sync and the view get stuck in "syncing headers,..." (while it's actually syncing blocks).

  This removes the 250ms minimal delta for header updates as well as it fixes the correct display of how header updates should update the labels.

Tree-SHA512: 57608dac822b135cd604fc6ba1c80f25c0202a6e20bb140362026615d4bf243ef4fcc254a11bad36419c554a222a2f4947438d4ce44aa14041d1874751643d68
Munkybooty added a commit to Munkybooty/dash that referenced this issue Sep 5, 2021
e8db6b8 Qt: Fix update headers-count (Jonas Schnelli)
7bb45e4 Qt: update header count regardless of update delay (Jonas Schnelli)

Pull request description:

  Update the block and header tip is constraint to have a minimal distance of 250ms between updates... which can lead to miss the last header update.

  The modal overlay then assumes we are still in header sync and the view get stuck in "syncing headers,..." (while it's actually syncing blocks).

  This removes the 250ms minimal delta for header updates as well as it fixes the correct display of how header updates should update the labels.

Tree-SHA512: 57608dac822b135cd604fc6ba1c80f25c0202a6e20bb140362026615d4bf243ef4fcc254a11bad36419c554a222a2f4947438d4ce44aa14041d1874751643d68
Munkybooty added a commit to Munkybooty/dash that referenced this issue Sep 7, 2021
e8db6b8 Qt: Fix update headers-count (Jonas Schnelli)
7bb45e4 Qt: update header count regardless of update delay (Jonas Schnelli)

Pull request description:

  Update the block and header tip is constraint to have a minimal distance of 250ms between updates... which can lead to miss the last header update.

  The modal overlay then assumes we are still in header sync and the view get stuck in "syncing headers,..." (while it's actually syncing blocks).

  This removes the 250ms minimal delta for header updates as well as it fixes the correct display of how header updates should update the labels.

Tree-SHA512: 57608dac822b135cd604fc6ba1c80f25c0202a6e20bb140362026615d4bf243ef4fcc254a11bad36419c554a222a2f4947438d4ce44aa14041d1874751643d68
Munkybooty added a commit to Munkybooty/dash that referenced this issue Sep 7, 2021
e8db6b8 Qt: Fix update headers-count (Jonas Schnelli)
7bb45e4 Qt: update header count regardless of update delay (Jonas Schnelli)

Pull request description:

  Update the block and header tip is constraint to have a minimal distance of 250ms between updates... which can lead to miss the last header update.

  The modal overlay then assumes we are still in header sync and the view get stuck in "syncing headers,..." (while it's actually syncing blocks).

  This removes the 250ms minimal delta for header updates as well as it fixes the correct display of how header updates should update the labels.

Tree-SHA512: 57608dac822b135cd604fc6ba1c80f25c0202a6e20bb140362026615d4bf243ef4fcc254a11bad36419c554a222a2f4947438d4ce44aa14041d1874751643d68
Munkybooty added a commit to Munkybooty/dash that referenced this issue Sep 9, 2021
e8db6b8 Qt: Fix update headers-count (Jonas Schnelli)
7bb45e4 Qt: update header count regardless of update delay (Jonas Schnelli)

Pull request description:

  Update the block and header tip is constraint to have a minimal distance of 250ms between updates... which can lead to miss the last header update.

  The modal overlay then assumes we are still in header sync and the view get stuck in "syncing headers,..." (while it's actually syncing blocks).

  This removes the 250ms minimal delta for header updates as well as it fixes the correct display of how header updates should update the labels.

Tree-SHA512: 57608dac822b135cd604fc6ba1c80f25c0202a6e20bb140362026615d4bf243ef4fcc254a11bad36419c554a222a2f4947438d4ce44aa14041d1874751643d68
Munkybooty added a commit to Munkybooty/dash that referenced this issue Sep 10, 2021
e8db6b8 Qt: Fix update headers-count (Jonas Schnelli)
7bb45e4 Qt: update header count regardless of update delay (Jonas Schnelli)

Pull request description:

  Update the block and header tip is constraint to have a minimal distance of 250ms between updates... which can lead to miss the last header update.

  The modal overlay then assumes we are still in header sync and the view get stuck in "syncing headers,..." (while it's actually syncing blocks).

  This removes the 250ms minimal delta for header updates as well as it fixes the correct display of how header updates should update the labels.

Tree-SHA512: 57608dac822b135cd604fc6ba1c80f25c0202a6e20bb140362026615d4bf243ef4fcc254a11bad36419c554a222a2f4947438d4ce44aa14041d1874751643d68
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants