Custom blockchain checkpoints.public-key


#1

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.


#2

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.


#3

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?


#4

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.


#5

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)?


#6

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.


#7

Yes, every time after stopping the service I delete all data from /var/lib/waves/*, but the error still remains.
I create a repository in which you can see after which everything stops working and I get an error - GenericError(Passed genesis signature is not valid). What and where do I need to add everything to work? https://github.com/wavespay/Waves