Setting accepting NEW contracts to false prevents SIA from using EXISTING contract
Created by: MaxMaximus
Hello
I have found out disabling of accepting new file contract on host prevent SIA from using already existing file contracts. I set up one host this summer for testing. I got 15 file contracts and was getting some real upload and download traffic. After i finished tests I set "acceptingcontracts = false" to finish work of host correctly. But after this setting all activity on existing contracts (except of storage proofs) immediately stopped. Host is still running about 1.5 month in 24/7 online mode but did not get even single piece of upload/download data. Only a lot of settings update (which shows that host is running and reachable by other clients).
Here my stat from host (siad ver 1.3.0)
Host Financials: Contract Count: 15 Transaction Fee Compensation: 0 H Potential Fee Compensation: 15 SC Transaction Fee Expenses: 0 H Storage Revenue: 0 H Potential Storage Revenue: 1.029 SC Locked Collateral: 349.2 SC Risked Collateral: 2.059 SC Lost Collateral: 0 H Download Revenue: 0 H Potential Download Revenue: 945.6 uS Upload Revenue: 0 H Potential Upload Revenue: 3.464 mS
RPC Stats: Error Calls: 0 Unrecognized Calls: 2479 Download Calls: 0 Renew Calls: 0 Revise Calls: 0 Settings Calls: 67992 FormContract Calls: 0
I am not sure is this issue on host on renter side. But it is serious.
This setting should not affect work of existing contracts. They are still valid and can be used by renter until expire or at least until renew time. It should affect only forming new contract and renew of contracts.
In current state it is not only cause additional expenses for renters (they need to form a new contract with other host while already have valid and thus pay additional fees and lock up additional allowance), lost revenues to host and record of unnecessary excessive information to the blockchain, but also open serious attack vector on network in general.
I do not write details here or it will help exploit it(but i think some users already exploiting it on minor scale).
I can send it in private to devs If you do not understand which exactly vulnerability it opens.
P.S.
I think similar issue happens when host owner rise prices in host setting after successful formation of some contacts. Host tries to apply this new prices to old contracts (which signed when prices were lower) and renters refuse to accept this change. After each price change I saw a lot of errors in logs where my host and renters "argue" about price and revise attempts (renters try to upload/download) failed due to new prices.
This also effectively "kills" all existing contracts after host setting change with include higher prices or/and lower collateral.
While logical solution will be apply new prices only to new/renewed contracts. And keep old condition for old contracts until they expire.
It is a contract (signed agreement about storage condition including prices) between two sides after all, isn't it?