From a51210f36462addea1127b4222a99496e0098b18 Mon Sep 17 00:00:00 2001 From: rjl493456442 Date: Thu, 20 Feb 2020 13:51:47 +0800 Subject: [PATCH] cmd/checkpoint-admin: update doc --- cmd/checkpoint-admin/README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/cmd/checkpoint-admin/README.md b/cmd/checkpoint-admin/README.md index c1a2eaea92..43e3785ec2 100644 --- a/cmd/checkpoint-admin/README.md +++ b/cmd/checkpoint-admin/README.md @@ -12,19 +12,19 @@ In the LES protocol, there is an important concept called checkpoint. In simple *For a more detailed introduction to checkpoint, please see the LES [spec](https://github.com/ethereum/devp2p/blob/master/caps/les.md).* -Using this information, light nodes can skip all historical block headers when synchronizing data and start synchronization from this checkpoint. Therefore, as long as the Light client can obtain some latest and correct checkpoints, the amount of data and time for synchronization will be greatly reduced. +Using this information, light clients can skip all historical block headers when synchronizing data and start synchronization from this checkpoint. Therefore, as long as the light client can obtain some latest and correct checkpoints, the amount of data and time for synchronization will be greatly reduced. However, from a security perspective, the most critical step in a synchronization algorithm based on checkpoints is to determine whether the checkpoint used by the light client is correct. Otherwise, all blockchain data synchronized based on this checkpoint may be wrong. For this we provide two different ways to ensure the correctness of the checkpoint used by the light client. #### Hardcoded checkpoint -There are several hardcoded checkpoints in the [source code](https://github.com/ethereum/go-ethereum/blob/master/params/config.go#L38) of the go-ethereum project. These checkpoints are updated by go-ethereum developers when new versions of software are released. Because Light client users trust Geth developers to some extent, hardcoded checkpoints in the code can also be considered correct. +There are several hardcoded checkpoints in the [source code](https://github.com/ethereum/go-ethereum/blob/master/params/config.go#L38) of the go-ethereum project. These checkpoints are updated by go-ethereum developers when new versions of software are released. Because light client users trust Geth developers to some extent, hardcoded checkpoints in the code can also be considered correct. #### Checkpoint oracle -Hardcoded checkpoints can solve the problem of verifying the correctness of checkpoints (although this is a more centralized solution). But the pain point of this solution is that engineers can only update checkpoints when a new version of software is released. In addition, Light client users usually do not keep the Geth version they use always up to date. So hardcoded checkpoints used by users are generally stale. Therefore, it still needs to download a large amount of blockchain data during synchronization. +Hardcoded checkpoints can solve the problem of verifying the correctness of checkpoints (although this is a more centralized solution). But the pain point of this solution is that developers can only update checkpoints when a new version of software is released. In addition, light client users usually do not keep the Geth version they use always up to date. So hardcoded checkpoints used by users are generally stale. Therefore, it still needs to download a large amount of blockchain data during synchronization. -Checkpoint oracle is a more flexible solution. In simple terms, this is a smart contract that is deployed on the blockchain. The smart contract records several designated trusted signers. Whenever enough signers in this batch of trusted signers have issued their signatures for the same checkpoint, it can be considered that the checkpoint has been authenticated by the signer. Checkpoints authenticated by trusted signers can be considered correct. +Checkpoint oracle is a more flexible solution. In simple terms, this is a smart contract that is deployed on the blockchain. The smart contract records several designated trusted signers. Whenever enough trusted signers have issued their signatures for the same checkpoint, it can be considered that the checkpoint has been authenticated by the signers. Checkpoints authenticated by trusted signers can be considered correct. So this way, even without updating the software version, as long as the trusted signers regularly update the checkpoint in oracle on time, the light client can always use the latest and verified checkpoint for data synchronization. @@ -40,7 +40,7 @@ go get github.com/ethereum/go-ethereum/cmd/checkpoint-admin #### Deploy -Deploy checkpoint oracle contract. `--signers` indicates the specified trusted signer, and `--threshold` indicates the minimum number of consistent signatures required by trusted signers to update a checkpoint. +Deploy checkpoint oracle contract. `--signers` indicates the specified trusted signer, and `--threshold` indicates the minimum number of signatures required by trusted signers to update a checkpoint. ```shell checkpoint-admin deploy --rpc --clef --signer --signers --threshold 1 @@ -58,7 +58,7 @@ Checkpoint-admin provides two different modes of signing. You can automatically checkpoint-admin sign --clef --signer --rpc ``` -*It is worth noting that the connected Geth node can be a fullnode or a light client. If it is fullnode, you must enable the LES protocol, that is, add `--light.serv 50` to the startup command line flags*. +*It is worth noting that the connected Geth node can be a fullnode or a light client. If it is fullnode, you must enable the LES protocol. E.G. add `--light.serv 50` to the startup command line flags*. **Offline mode** @@ -70,7 +70,7 @@ checkpoint-admin sign --clef --signer --rpc --signer --index --signatures @@ -86,7 +86,7 @@ checkpoint-admin status --rpc ### Enable checkpoint oracle in your private network -Currently, only the Ethereum mainnet and the default supported test network (ropsten, rinkeby, goerli) activate this feature. If you want to activate this feature in your private network, you can overwrite the relevant checkpoint oracle settings through the configuration file after deploying the oracle contract. +Currently, only the Ethereum mainnet and the default supported test networks (ropsten, rinkeby, goerli) activate this feature. If you want to activate this feature in your private network, you can overwrite the relevant checkpoint oracle settings through the configuration file after deploying the oracle contract. * Get your node configuration file `geth dumpconfig OTHER_COMMAND_LINE_OPTIONS > config.toml` * Edit the configuration file and add the following information @@ -100,4 +100,4 @@ Threshold = THRESHOLD * Start geth with the modified configuration file -*In the private network, all fullnodes and light clients need to be started according to the same checkpoint oracle configuration.* \ No newline at end of file +*In the private network, all fullnodes and light clients need to be started using the same checkpoint oracle settings.* \ No newline at end of file