I am trying to write a script on my mac to participate in consensus, but I am having trouble with setting the wallet password in my script. I am trying to set the online status to true every 5000 seconds (~ 5 sec per round) for 1000 rounds, but every time I use goal account changeonlinestatus ... I am asked for my wallet password. I thought I could just do something like this:
Is there any particular reason you want to renew the participation key every 5000 rounds ? most of the keys, I believe, I being generated ( and registered online ) for a long duration; i.e. several millions of rounds.
Another approach is to use an empty password, which would save you the needs to re-type the password over and over. It might be slightly less secured, but keep in mind that the KMD ( who receives the password ) only accept incoming connections from your computer. So, as long as your computer doesn’t get compromised, it shouldn’t be a horrendous security issue.
@tsachi
Thank you for your response. The intent is to go online to participate in consensus every 1000 rounds. Every round is around 4.5 seconds. So every 5000 seconds (5 * 1000) I do the following:
From what I understand, the online status is only good for 1000 rounds max. Am I understanding this right? It does seem odd that I need to continue to set the online status so often.
@josep01972, ahh - I see where the confusion is coming from.
There are two different “time lines”. The first one is the participation key validity range.
You create a participation key that is good for voting starting the current round, and (let’s say) up to 10 million round from now.
Separately, you create a transaction that inform the network that your participation key is going to (sometimes) vote in the consensus. This transaction ( like all other transaction types ), has a limit of 1000 rounds before need to be applied to the blockchain.
If you “miss” the 1000 rounds window, you can send another transaction.
That is what I understand as well. The participation key is set for 30 million rounds so I think I understand that correctly. I think what I was describing is the transaction to attempt to vote in consensus. Do I have to send a transaction every 1000 rounds to make sure I participate, or do I just have to send 1 transaction to go online?