Skip to content

feat: Show tip for first sync and show dialog when disk is not enough#3005

Merged
Keith-CY merged 3 commits into
nervosnetwork:developfrom
yanguoyu:feat-disk-usage
Feb 4, 2024
Merged

feat: Show tip for first sync and show dialog when disk is not enough#3005
Keith-CY merged 3 commits into
nervosnetwork:developfrom
yanguoyu:feat-disk-usage

Conversation

@yanguoyu

Copy link
Copy Markdown
Contributor

Refer to Magickbase/neuron-public-issues#255

  1. When synced for the first time. We can delete ~/Library/Application Support/Neuron/settings.json and all synced data to mock the first sync.
new-sync.mov
  1. When the ckb stops by disk space is not enough.
no-disk-space.mov

@Keith-CY

Keith-CY commented Dec 29, 2023

Copy link
Copy Markdown
Contributor

/package
Packaging for test is done in 7353570293. @Keith-CY

@Keith-CY

Copy link
Copy Markdown
Contributor

CI failed

Comment thread packages/neuron-ui/src/containers/Main/index.tsx Outdated
Comment thread packages/neuron-ui/src/containers/Main/hooks.ts Outdated
Comment thread packages/neuron-ui/src/locales/en.json
Comment thread packages/neuron-ui/src/locales/en.json
Comment thread packages/neuron-ui/src/widgets/MigrateCkbDataDialog/index.tsx Outdated
Comment thread packages/neuron-wallet/src/services/node.ts Outdated
Comment thread packages/neuron-wallet/src/services/settings.ts
Comment thread packages/neuron-wallet/src/controllers/api.ts Outdated
Comment thread scripts/update-wallet-env.js Outdated
Comment thread scripts/update-wallet-env.js Outdated
Comment thread packages/neuron-wallet/src/services/ckb-runner.ts Outdated
@yanguoyu
yanguoyu marked this pull request as draft January 14, 2024 11:53
@yanguoyu
yanguoyu force-pushed the feat-disk-usage branch 3 times, most recently from 54e28dc to 27d4aef Compare January 23, 2024 02:54
@yanguoyu
yanguoyu marked this pull request as ready for review January 23, 2024 02:59
@yanguoyu
yanguoyu requested a review from homura January 23, 2024 02:59
@yanguoyu

Copy link
Copy Markdown
Contributor Author

It's ready for review now. Please have a review. @Keith-CY @homura @devchenyan @WhiteMinds

@yanguoyu

yanguoyu commented Jan 24, 2024

Copy link
Copy Markdown
Contributor Author

/package
Packaging for test is done in 7635166733. @yanguoyu

@silySuper

Copy link
Copy Markdown

It is hard to sync ,the internal node mainnet is 0.00% for more than ten minutes.There was an error when network is switch to internal node mainnet.
截屏2024-01-30 16 53 17

[error] CKB: init fail: WARN: Mining feature is disabled because of the lack of the block assembler config options.

debug log is too big and is poseted to mail address [yanguoyu@magickbase.com]:

@yanguoyu

Copy link
Copy Markdown
Contributor Author

It is hard to sync ,the internal node mainnet is 0.00% for more than ten minutes.There was an error when network is switch to internal node mainnet. 截屏2024-01-30 16 53 17

[error] CKB: init fail: WARN: Mining feature is disabled because of the lack of the block assembler config options.

debug log is too big and is poseted to mail address [yanguoyu@magickbase.com]:

[2024-01-30T08:39:30.242Z] [info]  CKB:	Initializing node...
[2024-01-30T08:39:30.376Z] [error] CKB:	init fail: WARN: Mining feature is disabled because of the lack of the block assembler config options.

[2024-01-30T08:39:30.377Z] [info]  CKB:	init result: Initialized CKB directory in /Users/chllp/Documents/test storage
Create ckb.toml

[2024-01-30T08:39:30.377Z] [info]  CKB:	init result: Create ckb-miner.toml

[2024-01-30T08:39:30.378Z] [info]  CKB:	init result: Create default.db-options

[2024-01-30T08:39:30.414Z] [info]  CKB:	init result: Genesis Hash: 0x92b197aa1fba0f63633922c61c92375c9c074a93e85963554f5499fe1450d0e5

So, "[error] CKB: init fail: WARN: Mining feature is disabled because of the lack of the block assembler config options."
This log may not affect sync, and the mainnet will look for the assumed valid target before sync. I can create a new PR to skip this process, and then it will quickly start sync. #3031

@silySuper

Copy link
Copy Markdown

1.The sync process is show less and less.

2024-02-02.09.55.46.mov

2.When chose a disk space(22G left) less than needed disk space(59G).I can not see the second pop up window.

2024-02-01.16.12.15.mov

debug log is send to [yanguoyu@magickbase.com]

@yanguoyu

yanguoyu commented Feb 2, 2024

Copy link
Copy Markdown
Contributor Author

.The sync process is show less and less.

It's normal because we skip looking assumed valid target then the tip header will increase, so the process will be less until the tip header reaches the latest block number.

When chose a disk space(22G left) less than needed disk space(59G).I can not see the second pop up window.

When the ckb process stop by the disk is not enough, the pop-up windows will show, we will not check when you choose the directory.

@silySuper

Copy link
Copy Markdown

.The sync process is show less and less.

It's normal because we skip looking assumed valid target then the tip header will increase, so the process will be less until the tip header reaches the latest block number.

When chose a disk space(22G left) less than needed disk space(59G).I can not see the second pop up window.

When the ckb process stop by the disk is not enough, the pop-up windows will show, we will not check when you choose the directory.

1.I sync from yesterday,if the process is not actual process ,I will wait half a day more.
2.If it reached 100%,I will see the pop up window in expect.

@yanguoyu

yanguoyu commented Feb 2, 2024

Copy link
Copy Markdown
Contributor Author

If it reached 100%,I will see the pop up window in expect.

You can choose a directory that in a disk only has 1GB or less left disk space, then the pop-up windows will show faster.

@silySuper

Copy link
Copy Markdown

assumed valid target

After half a day more, it only sync reached 50%,I will change another way as you suggest

@Keith-CY
Keith-CY added this pull request to the merge queue Feb 4, 2024
Merged via the queue into nervosnetwork:develop with commit ace289b Feb 4, 2024
@yanguoyu
yanguoyu deleted the feat-disk-usage branch February 4, 2024 05:28
yanguoyu added a commit to yanguoyu/neuron that referenced this pull request Mar 14, 2024
@Keith-CY Keith-CY mentioned this pull request Mar 14, 2024
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.

5 participants