renterd
renterd copied to clipboard
Transaction spends a nonexistent siacoin output when refreshing contracts
The following logging contains the lifetime of contract 517f2bfa8c7bfb29b97321e63eaa1c93a5340b4e6c5187b59ce28b43ebb27e72
on my personal node during an overnight backup.
Apparently some time around 7am the contract was identified as being out of funds and therefore set to refresh. The refresh failed because the host reports that the renter is spending a nonexistent siacoin output. Pretty much exactly 1 hour later the refresh succeeds.
The same thing happened to about half of my contract set which caused new contracts to be formed, migration to start and then contracts to be truncated from the set again once the failed refreshes recovered.
There are 2 tasks here:
- [ ] https://github.com/SiaFoundation/renterd/pull/1111
- [ ] https://github.com/SiaFoundation/renterd/pull/1102
{"level":"info","ts":"2024-03-23T03:35:14Z","logger":"autopilot.contractor","caller":"autopilot/contractor.go:1525","msg":"refresh succeeded","fcid":"fcid:517f2bfa8c7bfb29b97321e63eaa1c93a5340b4e6c5187b59ce28b43ebb27e72","renewedFrom":"fcid:658f2044395940c73e6cda782072781043af1d766de48a8c0d50ffad38bae338","renterFunds":"~3.357 SC","minNewCollateral":"~240.3 mS","newCollateral":"~2.833 SC"}
{"level":"info","ts":"2024-03-23T07:03:37Z","logger":"autopilot.contractor","caller":"autopilot/contractor.go:823","msg":"unusable contract","hk":"ed25519:f291371aedfd74fd8a7f2a42b56ff46ecda298bc72bfd2dd7618408d75a8fc26","fcid":"fcid:517f2bfa8c7bfb29b97321e63eaa1c93a5340b4e6c5187b59ce28b43ebb27e72","reasons":["contract is out of funds"],"refresh":true,"renew":false,"recoverable":true}
{"level":"info","ts":"2024-03-23T07:04:02Z","logger":"autopilot.contractor","caller":"autopilot/contractor.go:1157","msg":"refresh estimate","fcid":"fcid:517f2bfa8c7bfb29b97321e63eaa1c93a5340b4e6c5187b59ce28b43ebb27e72","refreshAmount":"~4.029 SC","refreshAmountCapped":"~4.029 SC"}
{"level":"error","ts":"2024-03-23T07:04:02Z","logger":"autopilot.contractor","caller":"autopilot/contractor.go:1506","msg":"refresh failed","error":"couldn't renew contract: RPCRenew: failed to read RPCRenewSignatures: ReadResponse: host responded with error: 'failed to broadcast renewal transaction: consensus conflict: provided transaction set is invalid: transaction spends a nonexisting siacoin output'\n","hk":"ed25519:f291371aedfd74fd8a7f2a42b56ff46ecda298bc72bfd2dd7618408d75a8fc26","fcid":"fcid:517f2bfa8c7bfb29b97321e63eaa1c93a5340b4e6c5187b59ce28b43ebb27e72","stacktrace":"go.sia.tech/renterd/autopilot.(*contractor).refreshContract\n\t/renterd/autopilot/contractor.go:1506\ngo.sia.tech/renterd/autopilot.(*contractor).runContractRefreshes\n\t/renterd/autopilot/contractor.go:1113\ngo.sia.tech/renterd/autopilot.(*contractor).performContractMaintenance\n\t/renterd/autopilot/contractor.go:369\ngo.sia.tech/renterd/autopilot.(*Autopilot).Run.func1\n\t/renterd/autopilot/autopilot.go:304\ngo.sia.tech/renterd/autopilot.(*workerPool).withWorker\n\t/renterd/autopilot/workerpool.go:56\ngo.sia.tech/renterd/autopilot.(*Autopilot).Run\n\t/renterd/autopilot/autopilot.go:243\nmain.main.func2\n\t/renterd/cmd/renterd/main.go:630"}
{"level":"info","ts":"2024-03-23T08:03:37Z","logger":"autopilot.contractor","caller":"autopilot/contractor.go:823","msg":"unusable contract","hk":"ed25519:f291371aedfd74fd8a7f2a42b56ff46ecda298bc72bfd2dd7618408d75a8fc26","fcid":"fcid:517f2bfa8c7bfb29b97321e63eaa1c93a5340b4e6c5187b59ce28b43ebb27e72","reasons":["contract is out of funds"],"refresh":true,"renew":false,"recoverable":true}
{"level":"info","ts":"2024-03-23T08:04:06Z","logger":"autopilot.contractor","caller":"autopilot/contractor.go:1157","msg":"refresh estimate","fcid":"fcid:517f2bfa8c7bfb29b97321e63eaa1c93a5340b4e6c5187b59ce28b43ebb27e72","refreshAmount":"~4.029 SC","refreshAmountCapped":"~4.029 SC"}
{"level":"info","ts":"2024-03-23T08:04:07Z","logger":"autopilot.contractor","caller":"autopilot/contractor.go:1525","msg":"refresh succeeded","fcid":"fcid:d65b3f5e937a50656ddb629e7e112aea1e43fa6e741d46c7d5dc1f63ddcb1719","renewedFrom":"fcid:517f2bfa8c7bfb29b97321e63eaa1c93a5340b4e6c5187b59ce28b43ebb27e72","renterFunds":"~4.029 SC","minNewCollateral":"~288.3 mS","newCollateral":"~3.393 SC"}