Simplified version of Block Clock #212

Closed
shaavan wants to merge 7 commits from 221216-the_block_clock_simplified into main AGit
shaavan commented 2022-12-16 13:43:32 +00:00 (Migrated from github.com)

This PR is the simplified version of #148. And removes commits in #127 to allow easier upstream commit merges.

Functional changes from the original version:

  1. The PeersIndicator has been replaced with plain rectangles to keep the UI intact.
  2. The conns property representing if the number of connections is greater than 0, has been set to always positive. With this change, the "connecting" page, though implemented, becomes inaccessible through the UI.
This PR is the simplified version of #148. And removes commits in #127 to allow easier upstream commit merges. Functional changes from the original version: 1. The **PeersIndicator** has been replaced with plain rectangles to keep the UI intact. 2. The `conns` property representing if the number of connections is greater than 0, has been set to always positive. With this change, the "connecting" page, though implemented, becomes inaccessible through the UI.
johnny9 commented 2022-12-17 03:14:41 +00:00 (Migrated from github.com)

On Ubuntu 22.04.1 LTS, I had to install apt install qml-module-qtgraphicaleffects for the application to load otherwise I receive the error

QQmlApplicationEngine failed to load component
qrc:/qml/pages/main.qml:53:13: Type NodeRunner unavailable
qrc:/qml/pages/node/NodeRunner.qml:24:9: Type BlockClockComponent unavailable
qrc:/qml/components/BlockClockComponent.qml:6:1: Type BlockClock unavailable
qrc:/qml/controls/BlockClock.qml:4:1: module "QtGraphicalEffects" is not installed

Might want to extend the README for the qml directory to include that module.

On Ubuntu 22.04.1 LTS, I had to install `apt install qml-module-qtgraphicaleffects` for the application to load otherwise I receive the error ``` QQmlApplicationEngine failed to load component qrc:/qml/pages/main.qml:53:13: Type NodeRunner unavailable qrc:/qml/pages/node/NodeRunner.qml:24:9: Type BlockClockComponent unavailable qrc:/qml/components/BlockClockComponent.qml:6:1: Type BlockClock unavailable qrc:/qml/controls/BlockClock.qml:4:1: module "QtGraphicalEffects" is not installed ``` Might want to extend the README for the qml directory to include that module.
johnny9 commented 2022-12-17 03:40:47 +00:00 (Migrated from github.com)

It looks great. Tested pause/resume as well as a sync on signet and here's what I got.

Screenshot_2022-12-16_22-18-31 Screenshot_2022-12-16_22-19-02 Screenshot_2022-12-16_22-25-01 Screenshot_2022-12-16_22-26-42 Screenshot_2022-12-16_22-28-51
It looks great. Tested pause/resume as well as a sync on signet and here's what I got. |![Screenshot_2022-12-16_22-18-31](https://user-images.githubusercontent.com/985648/208221768-bbf55e20-d529-4472-94cd-a7115f71270e.png)|![Screenshot_2022-12-16_22-19-02](https://user-images.githubusercontent.com/985648/208221777-46e59c67-fe80-4d5d-9877-8a247f069b78.png)|![Screenshot_2022-12-16_22-25-01](https://user-images.githubusercontent.com/985648/208221788-9deabdf1-389a-4a61-b264-fbabf8a28d2c.png)|![Screenshot_2022-12-16_22-26-42](https://user-images.githubusercontent.com/985648/208221794-9d770b93-b6e1-4f81-b835-a4223844d6f0.png)|![Screenshot_2022-12-16_22-28-51](https://user-images.githubusercontent.com/985648/208221797-4ebe4269-c89a-4301-9f15-ab5dc71f1f93.png)| |---|---|---|---|---|
johnny9 (Migrated from github.com) requested changes 2022-12-17 03:55:50 +00:00
johnny9 (Migrated from github.com) left a comment

Some QML errors appear during runtime. tail -f debug.log | grep GUI to watch for issues when running bitcoin-qt.

Some QML errors appear during runtime. `tail -f debug.log | grep GUI` to watch for issues when running bitcoin-qt.
johnny9 (Migrated from github.com) commented 2022-12-17 03:54:21 +00:00

"No new line at end of file"

"No new line at end of file"
johnny9 (Migrated from github.com) commented 2022-12-17 03:41:56 +00:00

"No newline at end of file"

"No newline at end of file"
johnny9 (Migrated from github.com) commented 2022-12-17 03:53:54 +00:00

QML error appears when shutting down.

2022-12-17T03:52:37Z Shutdown: In progress...
2022-12-17T03:52:37Z torcontrol thread exit
2022-12-17T03:52:37Z addcon thread exit
2022-12-17T03:52:37Z msghand thread exit
2022-12-17T03:52:37Z net thread exit
2022-12-17T03:52:39Z opencon thread exit
2022-12-17T03:52:39Z DumpAnchors: Flush 0 outbound block-relay-only peer addresses to anchors.dat started
2022-12-17T03:52:39Z DumpAnchors: Flush 0 outbound block-relay-only peer addresses to anchors.dat completed (0.01s)
2022-12-17T03:52:39Z scheduler thread exit
2022-12-17T03:52:39Z Writing 0 unbroadcast transactions to disk.
2022-12-17T03:52:39Z Dumped mempool: 3.7e-06s to copy, 0.00448635s to dump
2022-12-17T03:52:39Z Shutdown: done
2022-12-17T03:52:39Z GUI: qrc:/qml/components/BlockClockComponent.qml:34: TypeError: Cannot read property 'timeRatioList' of null
QML error appears when shutting down. ``` 2022-12-17T03:52:37Z Shutdown: In progress... 2022-12-17T03:52:37Z torcontrol thread exit 2022-12-17T03:52:37Z addcon thread exit 2022-12-17T03:52:37Z msghand thread exit 2022-12-17T03:52:37Z net thread exit 2022-12-17T03:52:39Z opencon thread exit 2022-12-17T03:52:39Z DumpAnchors: Flush 0 outbound block-relay-only peer addresses to anchors.dat started 2022-12-17T03:52:39Z DumpAnchors: Flush 0 outbound block-relay-only peer addresses to anchors.dat completed (0.01s) 2022-12-17T03:52:39Z scheduler thread exit 2022-12-17T03:52:39Z Writing 0 unbroadcast transactions to disk. 2022-12-17T03:52:39Z Dumped mempool: 3.7e-06s to copy, 0.00448635s to dump 2022-12-17T03:52:39Z Shutdown: done 2022-12-17T03:52:39Z GUI: qrc:/qml/components/BlockClockComponent.qml:34: TypeError: Cannot read property 'timeRatioList' of null ```
johnny9 (Migrated from github.com) commented 2022-12-17 03:51:20 +00:00

The following error appears when going into the paused state.

2022-12-17T03:50:17Z GUI: qrc:/qml/controls/BlockClock.qml:96: TypeError: Value is undefined and could not be converted to an object
The following error appears when going into the paused state. ``` 2022-12-17T03:50:17Z GUI: qrc:/qml/controls/BlockClock.qml:96: TypeError: Value is undefined and could not be converted to an object ```
johnny9 (Migrated from github.com) commented 2022-12-17 03:47:12 +00:00
GUI: qrc:/qml/pages/node/NodeRunner.qml:24:9: QML BlockClockComponent: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.

Should be able to remove the ColumnLayout containing the BlockClockComponent and just define the BlockClockComponent as the content to this Page. When you do this, also remove the anchors.fill: parent and spacing: 0 in this file.

``` GUI: qrc:/qml/pages/node/NodeRunner.qml:24:9: QML BlockClockComponent: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead. ``` Should be able to remove the ColumnLayout containing the BlockClockComponent and just define the BlockClockComponent as the content to this Page. When you do this, also remove the `anchors.fill: parent` and `spacing: 0` in this file.
johnny9 (Migrated from github.com) reviewed 2022-12-17 14:42:28 +00:00
johnny9 (Migrated from github.com) commented 2022-12-17 14:42:28 +00:00

Also a small style thing, put spaces before and after operators so its easier to read.

Also a small style thing, put spaces before and after operators so its easier to read.
shaavan commented 2022-12-18 13:29:38 +00:00 (Migrated from github.com)

Moved the changes of this PR to #148 to preserve comment history for the block_clock and prevent the splitting of discussion between two PRs.

@johnny9, I shall be addressing your comments here and in #148. Thanks for your cooperation.

Moved the changes of this PR to #148 to preserve comment history for the block_clock and prevent the splitting of discussion between two PRs. @johnny9, I shall be addressing your comments here and in #148. Thanks for your cooperation.
Sign in to join this conversation.
No description provided.