I found that in the ethereum config, there're some trusted checkpoint for light client and peer validation.
It's very helpful if we have a detail document guide to calculate it then community can know how to calculate the trusted checkpoint for their private network. Thank you so much!
I mean how to calculate those below item for a chain
SectionIndex: 216,
SectionHead: common.HexToHash("0xae3e551c8d60d06fd411a8e6008e90625d3bb0cbbf664b65d5ed90b318553541"),
CHTRoot: common.HexToHash("0xeea7d2ab3545a37deecc66fc43c9556ae337c3ea1c6893e401428207bdb8e434"),
BloomRoot: common.HexToHash("0xb0d4176d160d67b99a9f963281e52bce0583a566b74b4497fe3ed24ae04004ff"),
@rjl493456442 @zsfelfoldi I know how to setup SectionIndex and SectionHead. Do you have any document guide to calculate CHTRoot and BloomRoot? Thank you!
You don't need to calculate the trusted checkpoint by yourself. You can retrieve them from a full node(as well as a synced light client).
Steps
--lightserv 100)geth attach <path-to-ipc>admin.nodeInfocht like
cht: {
bloomRoot: "0xc1ac19553473ebb07325b5092a09277d62e9ffe159166a1c6fbec614c4dfd885",
chtRoot: "0xce7235999aa8d73c4493b8f397474dafc627652a790dec60c4a968e2dfa5d7be",
sectionHead: "0xd0c206e064c8efea930d97e56786af95354ea481b35294a20e5a340937e4c2c9",
sectionIndex: 26
},
Or you can retrieve checkpoint from RPC
--lightserv 100) and les RPC exposed (--rpcapi "eth,les")curl -X POST -H "Content-Type: application/json" localhost:8545 --data '{"jsonrpc":"2.0","method":"les_latestCheckpoint","params":[],"id":1}'curl -X POST -H "Content-Type: application/json" localhost:8545 --data '{"jsonrpc":"2.0","method":"les_getCheckpoint","params":[26],"id":1}'Btw If you want to deploy the checkpoint oracle for your own private network, you can use tool checkpoint-admin https://github.com/ethereum/go-ethereum/tree/master/cmd/checkpoint-admin.
Step:
checkpoint-adminaddress, signers, threshold) to config filecheckpoint-admin to sign and publish some latest checkpoint@rjl493456442 magnificent! appreciate it! 馃檱
Most helpful comment
Btw If you want to deploy the
checkpoint oraclefor your own private network, you can use toolcheckpoint-adminhttps://github.com/ethereum/go-ethereum/tree/master/cmd/checkpoint-admin.Step:
checkpoint-adminaddress,signers,threshold) to config filecheckpoint-adminto sign and publish some latest checkpoint