@stvoffutt I finally figured it out! (well it was actually @ATADA ) and also thanks to everyone else that helped me understand the issue in the Cardano Stake Pool Best Practice Workgroup telegram channel.
Basically with the hard fork the way to calculate the fee was changed to be more precise. That’s why putting fee 0
doesn’t work any more. But also you need to provide a realistic value to the --tx-out
which in my case was 50k ada. So in my case I used --fee 200000
and --tx-out $(cat payment.addr)+50000000000
this way it calculated the correct fee at 171529
Cheers