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

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

Merged
merged 3 commits into from
Feb 4, 2024

Conversation

yanguoyu
Copy link
Collaborator

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
Copy link
Collaborator

Keith-CY commented Dec 29, 2023

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

@Keith-CY
Copy link
Collaborator

CI failed

packages/neuron-ui/src/containers/Main/index.tsx Outdated Show resolved Hide resolved
packages/neuron-ui/src/containers/Main/hooks.ts Outdated Show resolved Hide resolved
packages/neuron-ui/src/locales/en.json Show resolved Hide resolved
packages/neuron-ui/src/locales/en.json Show resolved Hide resolved
packages/neuron-wallet/src/services/node.ts Outdated Show resolved Hide resolved
packages/neuron-wallet/src/controllers/api.ts Outdated Show resolved Hide resolved
scripts/update-wallet-env.js Outdated Show resolved Hide resolved
scripts/update-wallet-env.js Outdated Show resolved Hide resolved
@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
Collaborator Author

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

@yanguoyu
Copy link
Collaborator Author

yanguoyu commented Jan 24, 2024

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

@silySuper
Copy link
Collaborator

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
Collaborator 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
Collaborator

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
Copy link
Collaborator Author

yanguoyu commented Feb 2, 2024

.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
Collaborator

.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
Copy link
Collaborator Author

yanguoyu commented Feb 2, 2024

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
Collaborator

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
10 checks passed
@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