Skip to content

fix: Optimization data path set - #2464

Merged
Keith-CY merged 5 commits into
nervosnetwork:developfrom
yanguoyu:fix-data-path-set
Aug 17, 2022
Merged

fix: Optimization data path set#2464
Keith-CY merged 5 commits into
nervosnetwork:developfrom
yanguoyu:fix-data-path-set

Conversation

@yanguoyu

@yanguoyu yanguoyu commented Aug 5, 2022

Copy link
Copy Markdown
Contributor
  1. Change CKB Node path's name
  2. Remove indexer cache when resyncing ckb node data
  3. Add tips for setting the ckb node data path
fix-data-path-set.mov

When set CKB node data path with an empty directory, and choose Data have been moved

sync-with-empty-dir.mov

@Cedar67

Cedar67 commented Aug 8, 2022

Copy link
Copy Markdown
Contributor

When set to Chinese, the margin of the tooltip is slightly abnormal:

image

@Cedar67

Cedar67 commented Aug 8, 2022

Copy link
Copy Markdown
Contributor

The style of the tooltip needs to be adjusted.

Current:

image

Expected:

image

@Cedar67

Cedar67 commented Aug 8, 2022

Copy link
Copy Markdown
Contributor

When set to Chinese, the margin of the tooltip is slightly abnormal:

image

Verified.

@Cedar67

Cedar67 commented Aug 8, 2022

Copy link
Copy Markdown
Contributor

The style of the tooltip needs to be adjusted.

Current:

image

Expected:

image

Verified.

@Cedar67

Cedar67 commented Aug 8, 2022

Copy link
Copy Markdown
Contributor

Neuron does not reset Indexer data under two conditions:

  • Click Data have been moved
  • The new CKB node directory is a new empty directory (No CKB node is available in new directory)

Expected: When both of the above conditions are met, Neuron will reset Indexer data.

Reference:
#2459 (comment)

@yanguoyu

yanguoyu commented Aug 8, 2022

Copy link
Copy Markdown
Contributor Author

Neuron does not reset Indexer data under two conditions:

  • Click Data have been moved
  • The new CKB node directory is a new empty directory (No CKB node is available in new directory)

Expected: When both of the above conditions are met, Neuron will reset Indexer data.

Reference: #2459 (comment)

Only Click Synchronize from scratch will remove indexer data. We will not check the users has moved data.

@Cedar67

Cedar67 commented Aug 10, 2022

Copy link
Copy Markdown
Contributor

Tips need a period symbol.
image

Comment thread packages/neuron-ui/src/components/DataSetting/hooks.ts Outdated
Comment thread packages/neuron-ui/src/locales/en.json Outdated
Comment thread packages/neuron-ui/src/locales/en.json Outdated
Comment thread packages/neuron-ui/src/locales/zh-tw.json Outdated
Comment thread packages/neuron-ui/src/locales/zh-tw.json Outdated
Comment thread packages/neuron-ui/src/locales/zh.json Outdated
Comment thread packages/neuron-wallet/src/locales/zh-tw.ts Outdated
Comment thread packages/neuron-wallet/src/locales/zh.ts Outdated

@Cedar67 Cedar67 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  1. Change CKB Node path's name - Verified.
  2. Remove indexer cache when resyncing ckb node data - Verified. It needs to be merged with another PR for further verification.
  3. Add tips for setting the ckb node data path - Verified.

1. Change CKB Node path's name
2. Remove indexer cache when resync ckb node data
3. Add tips for set ckb node data path
@Keith-CY
Keith-CY merged commit 5f5ccf7 into nervosnetwork:develop Aug 17, 2022
@Cedar67

Cedar67 commented Aug 23, 2022

Copy link
Copy Markdown
Contributor

The Indexer error log info found.

image

Reproduce

  • Change the path of the CKB node by Data Path Setting
  • From a MainNet node to a TestNet node
  • Develop branch
  • Mac OS

Indexer data package:
newIndexer 2.zip

@yanguoyu

Copy link
Copy Markdown
Contributor Author

The Indexer error log info found.

image

Reproduce

  • Change the path of the CKB node by Data Path Setting
  • From a MainNet node to a TestNet node
  • Develop branch
  • Mac OS

Indexer data package: newIndexer 2.zip

The data in newIndexer/0x10639e0895502b5688a6be8cf69460d76541bfa4821629d86d62ba0aae3f9606 is really about mainnet. When i start ckb-node and ckb-indexer outside neuron, it also throw this error.
And the https://github.com/nervosnetwork/ckb-indexer#get_tip RPC also return mainnet block.
I think you should clear the 0x10639e0895502b5688a6be8cf69460d76541bfa4821629d86d62ba0aae3f9606 data and sync again.

@Cedar67

Cedar67 commented Aug 24, 2022

Copy link
Copy Markdown
Contributor

The Indexer error log info found.
image
Reproduce

  • Change the path of the CKB node by Data Path Setting
  • From a MainNet node to a TestNet node
  • Develop branch
  • Mac OS

Indexer data package: newIndexer 2.zip

The data in newIndexer/0x10639e0895502b5688a6be8cf69460d76541bfa4821629d86d62ba0aae3f9606 is really about mainnet. When i start ckb-node and ckb-indexer outside neuron, it also throw this error. And the https://github.com/nervosnetwork/ckb-indexer#get_tip RPC also return mainnet block. I think you should clear the 0x10639e0895502b5688a6be8cf69460d76541bfa4821629d86d62ba0aae3f9606 data and sync again.

After the data 0x10639e0895502b5688a6be8cf69460d76541bfa4821629d86d62ba0aae3f9606 is clear, the synch can be restored to normal.
The indexer data 0x10639e0895502b5688a6be8cf69460d76541bfa4821629d86d62ba0aae3f9606 is automatically generated by Neuron, is there any exception during initialization or writing?

@yanguoyu

Copy link
Copy Markdown
Contributor Author

The Indexer error log info found.
image
Reproduce

  • Change the path of the CKB node by Data Path Setting
  • From a MainNet node to a TestNet node
  • Develop branch
  • Mac OS

Indexer data package: newIndexer 2.zip

The data in newIndexer/0x10639e0895502b5688a6be8cf69460d76541bfa4821629d86d62ba0aae3f9606 is really about mainnet. When i start ckb-node and ckb-indexer outside neuron, it also throw this error. And the https://github.com/nervosnetwork/ckb-indexer#get_tip RPC also return mainnet block. I think you should clear the 0x10639e0895502b5688a6be8cf69460d76541bfa4821629d86d62ba0aae3f9606 data and sync again.

After the data 0x10639e0895502b5688a6be8cf69460d76541bfa4821629d86d62ba0aae3f9606 is clear, the synch can be restored to normal. The indexer data 0x10639e0895502b5688a6be8cf69460d76541bfa4821629d86d62ba0aae3f9606 is automatically generated by Neuron, is there any exception during initialization or writing?

I try to set an empty ckb node path, it's really maybe happened. I guess ckb-indexer starting before ckb-node started, so indexer-data save in the wrong directory。

@Cedar67

Cedar67 commented Aug 25, 2022

Copy link
Copy Markdown
Contributor

The Indexer error log info found.
image
Reproduce

  • Change the path of the CKB node by Data Path Setting
  • From a MainNet node to a TestNet node
  • Develop branch
  • Mac OS

Indexer data package: newIndexer 2.zip

The data in newIndexer/0x10639e0895502b5688a6be8cf69460d76541bfa4821629d86d62ba0aae3f9606 is really about mainnet. When i start ckb-node and ckb-indexer outside neuron, it also throw this error. And the https://github.com/nervosnetwork/ckb-indexer#get_tip RPC also return mainnet block. I think you should clear the 0x10639e0895502b5688a6be8cf69460d76541bfa4821629d86d62ba0aae3f9606 data and sync again.

After the data 0x10639e0895502b5688a6be8cf69460d76541bfa4821629d86d62ba0aae3f9606 is clear, the synch can be restored to normal. The indexer data 0x10639e0895502b5688a6be8cf69460d76541bfa4821629d86d62ba0aae3f9606 is automatically generated by Neuron, is there any exception during initialization or writing?

I try to set an empty ckb node path, it's really maybe happened. I guess ckb-indexer starting before ckb-node started, so indexer-data save in the wrong directory。

Another appearance that may be related:
Testnet Indexer was deleted when CKB node path is set to an empty directory.
Expected:
The Indexer directory of Mainnet was deleted.

Reproduce:
https://user-images.githubusercontent.com/64718893/186570411-b60f64d4-ed51-47f9-96a8-5271334f36d6.mov

@yanguoyu

Copy link
Copy Markdown
Contributor Author

Because it started ckb testnet node, i can't get the mainnet genesis hash. So I will delete all the directory in the indexer path(same as started ckb mainnet node).

@yanguoyu
yanguoyu deleted the fix-data-path-set branch August 25, 2022 09:44
@Keith-CY Keith-CY mentioned this pull request Sep 2, 2022
@Keith-CY Keith-CY mentioned this pull request Dec 26, 2022
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.

3 participants