Emergency Hard Fork
This code isn't working for me. Sometimes the node dies right after starting, though I think I've tracked that problem down. (If it happens to anyone else, a cheap solution is to delete the file .proofgold/peers. More below.) Even when it does start and try to stake, it generates a private key for a fresh staking address and then complains that the private key is not in the wallet, leading it to delay staking for 10 minutes. I'm still trying to track down why this happens.
About the peers problem, load_knownpeers in net.ml adds the same peer multiple times with different "lasttm" values. All of these get saved into the peers file when the node exits. When restarting it loads the copies of the peers again and continues adding more lasttm values. My peers file ended up with 40,000 entries, most of which were duplicates. This would lead it to try to connect to the same node repeatedly often ending up with my node dying. Hopefully it wasn't also killing the nodes it was repeatedly trying to connect to. The obvious solution is to use Hashtbl.replace when appropriate and I've done this. I'll post the code later.
Edit: I've now identified the problem with the private key not being in the wallet. Yesterday when too many blocks were being staked, I tried adding 'stakewithrewards=0' to my proofgold.conf so that it wouldn't stake with the rewards. This doesn't seem to work, since with this parameter the new private key gets put into the "nonstaking" part of the wallet, but staking.ml only looks in the "staking" part of the wallet for the private key. The "cheap" fix here is not to try to use 'stakewithrewards=0'.
Complete thread:
- Emergency Hard Fork -
BlakeKeiller,
2020-06-13, 14:50
- Emergency Hard Fork -
Brown,
2020-06-13, 17:28
- Emergency Hard Fork - Brown, 2020-06-14, 17:05
- Emergency Hard Fork -
Brown,
2020-06-13, 17:28