Our problem is that we need to get a new address on each stake.
What I've tried so far is:
- Generating a new address right before a block is accepted and try using it to receive the stakes, but that kept getting signing verification errors, I could tell the wallet to ignore all that verification, but I could end up making the wallet vulnerable.
2.Taking the stealth address route, loading up a stealth address for receiving the staking rewards, since a stealth addy automatically associates itself with a pub addy and could have solved it smoothly but again there was a signing verification error.
After some research, I figured an address has to be used in a transaction previously in a wallet for it to be used and accepted for receiving rewards, specifically the very last address.
So currently I'm working on creating a microtransaction within a wallet, sign it, and it will be picked automatically to be used for receiving the staking rewards.
From my point of view, there are two options:
1. Creating a new addy and use it to generate a self-transaction that is not charged a transaction fee, just making sure it's the most recently used in the transactions list, before creating a new block. This way we guarantee when the new block looks up for an addy to send rewards to, this one will be picked up.
2. Changing the address picking approach, instead of looking for a recently used addy in wallet transaction list, we tell it to create a new one and use it instead. Problem with this one, we don't know if this newly generated addy works, IMO it is a loophole that could be used to attack the wallet.
There is also generating a stealth transaction which didn't work for me, had block signing issues.
Any guidance would be grateful.