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

Metrics comparison between full node mode and light client mode #138

Closed
Keith-CY opened this issue May 3, 2023 · 10 comments
Closed

Metrics comparison between full node mode and light client mode #138

Keith-CY opened this issue May 3, 2023 · 10 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@Keith-CY
Copy link
Member

Keith-CY commented May 3, 2023

  1. Brief introduction of light client mode(better with video)
  2. Functionalities
  3. Time of synchronization
  4. Disk usage
  5. Use scenarios for both modes
@Keith-CY Keith-CY added the documentation Improvements or additions to documentation label May 3, 2023
@Keith-CY Keith-CY added this to Neuron May 3, 2023
@Keith-CY Keith-CY self-assigned this May 3, 2023
@Keith-CY Keith-CY moved this to 🆕 New in Neuron May 3, 2023
@Keith-CY Keith-CY assigned Sven-TBD and Danie0918 and unassigned Keith-CY May 3, 2023
@Danie0918
Copy link
Contributor

Is there a deadline for this? Also, are there any related references to facilitate the documentation?

@Keith-CY
Copy link
Member Author

Keith-CY commented May 4, 2023

Is there a deadline for this? Also, are there any related references to facilitate the documentation?

Better to be done in the next 2 weeks because it's expected to be referenced in the release note.

I'll demonstrate the light client mode and submit a video

The comparison of functionalities may be done by @yanguoyu (depending on how you arrange these works)

The comparison of time and disk usage may be done by QA members

@Danie0918 Danie0918 moved this from 🆕 New to 📌Planning in Neuron May 8, 2023
@Danie0918 Danie0918 assigned yanguoyu and unassigned Sven-TBD May 8, 2023
@Keith-CY
Copy link
Member Author

Keith-CY commented May 12, 2023

Brief introduction of neuron with light client:
https://we.tl/t-ptaSLM7H4U

The final one will be uploaded to YouTube and clipped by chapters


Updated: https://we.tl/t-7ziJAJJkBv

  • prepend chapters
  • add BGM

Uploaded to Youtube: https://youtu.be/tQm9YvgG7iE

Screenshot 2023-05-18 at 01 47 24

@Danie0918 Danie0918 moved this from 📌Planning to 🏗 In Progress in Neuron May 15, 2023
@Danie0918
Copy link
Contributor

@Keith-CY The Chinese version of the document has been completed, please check it.
https://note.youdao.com/s/GzIJlkgq

@Danie0918
Copy link
Contributor

@Keith-CY New test data has been added and the English version has been updated:https://docs.google.com/document/d/1zWc_7f1VO4FXCwLA_Erve8q49f4Awi_8MFMuUjS8TKo/edit?usp=sharing

@Keith-CY
Copy link
Member Author

@Keith-CY New test data has been added and the English version has been updated:docs.google.com/document/d/1zWc_7f1VO4FXCwLA_Erve8q49f4Awi_8MFMuUjS8TKo/edit?usp=sharing

Some suggestions are added to the document

@Danie0918 Danie0918 moved this from 🏗 In Progress to 👀 Testing in Neuron May 29, 2023
@Danie0918 Danie0918 moved this from 👀 Testing to 🚩Pre Release in Neuron May 29, 2023
@Keith-CY
Copy link
Member Author

Keith-CY commented May 29, 2023

@Keith-CY New test data has been added and the English version has been updated:docs.google.com/document/d/1zWc_7f1VO4FXCwLA_Erve8q49f4Awi_8MFMuUjS8TKo/edit?usp=sharing

The document is ready, please append it to this issue directly

@Danie0918
Copy link
Contributor

【中文版】
Neuron钱包支持轻节点功能上线

尊敬的用户,
我们很高兴向您介绍我们的最新功能:轻客户端模式。这一功能将使我们的区块链钱包应用更加实用和方便,让您更加轻松地管理您的数字资产。(目前仅支持测试网,主网版本需等待硬分叉激活)

什么是轻客户端模式?
轻客户端模式是一种比完整节点更轻量级的节点模式,它只需下载区块链的一部分数据,就可以获取所需的信息,用户可以更快地访问区块链信息,并且不需要等待完整节点同步。

轻客户端模式优势
更快的同步时间:使用轻客户端模式可以更快地同步区块链数据,节省用户的时间和网络带宽。
更少的磁盘使用:轻客户端模式只需要存储区块链数据的一部分,相比完整节点需要更少的存储空间。

以 MacBook Pro (13-inch, M1, 2020) 设备为例,我们真实测试了从0开始到最新区块9380828的同步情况(2023/05/22 Pudge网络数据):

轻节点:同步 用时约 5小时30分钟,数据约 45M;(轻客户端模式磁盘占用与账户交易数量有关,测试账户共782条交易记录)
全节点: 同步用时约 36小时, 数据约 107.8G;(不含寻找可信高度时间)

以上测试数据在同设备和网络情况下,轻节点相较于全节点同步用时减少 84.7% 磁盘使用减少 99.9%(数据仅供参考,由于设备、网络及账户数据不同,可能与测试数据有所出入)

轻客户端模式使用场景
与完整节点相比,轻节点需要的磁盘空间和网络带宽更少,适用于那些希望快速访问区块链信息,并且不需要完整的区块链数据的场景,因而需要注意对于含时间锁、Cheque合约等需要全节点数据的交易无法在轻客户端模式下使用。

1.转账/收款 CKB
【转账】:支持正常及含时间锁的转账,可以正常添加地址、输入金额、添加备注及设置交易费。
【收款】:支持非锁定时间的收款,可以接收并在交易历史中显示对应的记录,含时间锁的收款则无法展示需要切换全节点网络。
2.存入/取出 Nervos DAO
可以正常的存入和取出Nervos DAO,支持显示交易历史。
3.发送/接收自定义资产
【发送】:使用Cheque合约发送时,对方需为全节点模式才可领取;或者将额外 142 CKBytes 与 sudt 一同发给收款方用于维持资产;不支持发送给ACP地址用户。
【接收】:只能接收已添加的无时间锁的资产;未添加、含时间锁或Cheque资产,需要切换全节点网络。

功能介绍
1.添加轻节点网络
打开网络设置,选中内置的轻节点网络(出于安全考虑,目前暂不支持添加其他轻节点网络),关闭设置页面。

2.同步区块
等待区块自动同步完成即可开始使用轻客户端模式。

【完整演示视频】

如果您有任何疑问或问题,请随时联系我们,我们会尽快为您提供帮助。
Discord : https://discord.gg/SKNsWhyazT
Github : https://github.com/Magickbase
Mail : [email protected]

@Danie0918
Copy link
Contributor

Danie0918 commented May 29, 2023

【English version】
Neuron wallet support for light nodes is live

Dear users.

We are pleased to introduce you our new feature: Light Client Mode. This feature will make our blockchain wallet application more practical and convenient, allowing you to manage your digital assets more easily.(Only support test network, main network version need to wait for hard fork activation)

What is the light client model?

Light client mode is a node mode that is lighter than a full node, it only needs to download a portion of the blockchain data to get the required information, users can access the blockchain information faster and do not need to wait for the full node to synchronize.

Light Client Mode Advantages

1.Faster synchronization time: Using Light Client mode allows faster synchronization of blockchain data, saving users' time and network bandwidth.
2.Less disk usage: Light client mode requires only a fraction of the blockchain data to be stored, requiring less storage space compared to full nodes.

Using a MacBook Pro (13-inch, M1, 2020) device as an example, we realistically tested the synchronization from 0 to the latest block 9380828 (2023/05/22 Pudge network data):

Light node: synchronization time about 5 hours and 30 minutes, data about 45M; (light client mode disk consumption is related to the number of account transactions, the test account a total of 782 transaction records)
Full node: about 36 hours for synchronization, about 107.8G of data;(excluding the time to find a trusted height)

The above test data in the case of the same equipment and network, light node compared to full node synchronization time reduced 84.7% disk use reduced 99.9% (data for reference only, due to different equipment, network and account data, may be different from the experimental data)

Light Client Mode Usage Scenarios

Compared with full nodes, light nodes require less disk space and network bandwidth, and are suitable for those who want to access blockchain information quickly and do not need the full blockchain data. Therefore, it should be noted that for transactions containing time locks, Cheque contracts, etc. that require full node data verification, you need to switch to full nodes.

1.Send/Receive CKB
【Send】:Support normal and time-locked transfer, you can add address, input amount, add notes and set transaction fee normally.
【Receive】: Support non-locked time receipts, you can receive and display the corresponding records in the transaction history, while receipts with time lock cannot be displayed and need to switch to the full node network.

  1. Deposit/Withdraw Nervos DAO
    You can deposit and withdraw Nervos DAO normally, and support displaying transaction history.

3.Send/Receive Custom Assets
【Send】: When sending with Cheque contract, the recipient needs to be in full node mode to receive; or send additional 142 CKBytes together with sudt to the recipient for maintaining the asset; not supported to send to ACP address users.
【Receive】: Can only receive assets that have been added without time lock; not added, containing time lock or Cheque assets, need to switch full node network.

Function introduction

1.Add light node network
Open the network settings, select the built-in light node network (for security reasons, we do not support adding other light node networks at the moment), and close the settings page.

  1. Synchronize blocks
    You can start using Light Client mode after the blocks are automatically synchronized.

[Full Demo Video]
If you have any questions or problems, please feel free to contact us and we will help you as soon as possible.
Discord : https://discord.gg/SKNsWhyazT
Github : https://github.com/Magickbase
Mail : [email protected]

@Keith-CY Keith-CY closed this as completed Jun 4, 2023
@github-project-automation github-project-automation bot moved this from 🚩Pre Release to ✅ Done in Neuron Jun 4, 2023
@Keith-CY
Copy link
Member Author

Keith-CY commented Jun 4, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Archived in project
Development

No branches or pull requests

4 participants