Custom blockchain checkpoints.public-key

Hi,

Please tell how to get checkpoints.public-key from new genesis block? I try to use custom private blockchain. Genesis block is new and is generated according to the private custom blockchain documentation. But there is not a word about how to get the public key from it. The documentation on configuration files says that it makes sense to get checkpoints.public-key only for custom blockchain. but it is not written how to do it.

Hello,
Do you know the purpose of the checkpoints?
The checkpoint public key has no relation with genesis block. It’s just a public key of a key pair used to sign checkpoints. Just generate a new key pair and put the public key into configuration files on the nodes.
It’s long time abandoned feature, so I think, you won’t use it.

Yes thank you. Can you tell me more about checkpoints and how it turns out to check the whole blockchain with one key? And I asked this question so that it was because of this key that I get a verification error of the genesis block. Now I understand that the error is due to something else. When I install my genesis key, I get an error - GenericError(Passed genesis signature is not valid). Where in the code and how to check? And how to fix it?

Ok, I see. Actually, Genesis block doesn’t have a real signature, it is signed with all zeros private key, in configuration file you have to fix the one of many valid signatures.
It’s better to use GenesisBlockGenerator for this, like described in the documentation.

Checkpoint contains few block signatures at different heights. For example, at -1, -10, -100, -1000, -10k, -100k, -1m blocks from the current height. So then applying it the node just search to the nearest valid block and if such block is found rollbacks to it and start to apply the rest of the block from the network.
But as I said, the tools for this is abandoned and this feature will be removed from the node in one of the upcoming releases.

Thanks for your reply, but I still get an error. Somewhere an extra check is being performed which I cannot overcome.I added a link to all changes in the answer below. How to fix error - GenericError(Passed genesis signature is not valid)?

Please, don’t forget to remove data folder when changing blockchain settings, because the genesis blocks stored in it and in settings are different now. May be this is your case.

Thanks, it worked. The question remains. What exactly is the mainnet checkpoint public key 7EXnkmJyz1gPfLJwytThcwGwpyfjzFXC3hxBhvVK4EQP? What is the very first block or transaction it checks in the blockchain? What is the very first test height?

It could be any. It depends on what you send in the checkpoint.