In the latter, the firstvalid and lastvalid refer to the transaction validity period rather than the intended participation key validity period.
Does the roundfirstvalid works for goal account changeonlinestatus ?
In addition to Tsachi’s excellent answer, please be very careful when using sudo to generate the participation key.
When you run sudo goal account addpartkey ..., the partkey will be owned by the user root and will not be working properly if algod is run by a different user.
That is the case if you are using the default Debian installation, which runs algod under the user algorand.
In that case, you need to run all your commands using the user algorand:
I dropped the --firstvalid and --lastvalid parameters from the goal account changeonlinestatus command. This allowed me to generate and sign the message. My account is now online.
Really appreciate the help with the command and also the Sudo tip.