1. 08 Nov, 2018 1 commit
  2. 02 Nov, 2018 1 commit
  3. 16 Oct, 2018 1 commit
  4. 16 Jul, 2018 1 commit
  5. 17 Feb, 2018 2 commits
  6. 03 Oct, 2017 1 commit
  7. 23 Mar, 2017 1 commit
  8. 12 Feb, 2017 1 commit
  9. 20 Nov, 2016 1 commit
  10. 17 Aug, 2016 1 commit
  11. 31 Jul, 2016 1 commit
    • David Vorick's avatar
      remove safelocks from host · 7abb0e83
      David Vorick authored
      Very slow disk I/O was causing false positives in the deadlock detector
      in the host. While it's a pretty significant issue that the I/O is that
      slow, it's more significant that false deadlocks are being detected.
      The deadlock detector should not be triggering due to I/O waits. But
      until the situation with the locking + I/O can be resolved, we're going
      to have to remove the safelocks.
  12. 26 Jul, 2016 2 commits
  13. 14 Jul, 2016 3 commits
    • David Vorick's avatar
      finally fix host deadlock · 8883bca8
      David Vorick authored
      See if you can spot the mistake:
      	func (h *Host) lockStorageObligation(soid types.FileContractID) {
      		// Check if a lock has been created for this storage obligation. If not,
      		// create one. The map must be accessed under lock, but the request for the
      		// storage lock must not be made under lock.
      		tl, exists := h.lockedStorageObligations[soid]
      		if !exists {
      			tl = new(sync.TryMutex)
      			h.lockedStorageObligations[soid] = tl
      The mistake is that the storage obligation lock, 'tl.Lock()', can be
      held for a long time. Per convention, 'lockStorageObligation' must be
      called under a host lock as it is not an exported function, and has no
      concurrency prefix. If the storage obligation lock is being held for a
      long time, so is the host lock. The host lock is critical to the
      functioning of the host, and should only ever be held briefly.
      This commit fixes up the locking usage around the storage obligation
      locks, fixing several critical deadlocks in the host.
    • David Vorick's avatar
      replace host mutex with a safelock · d6ed282f
      David Vorick authored
    • David Vorick's avatar
      better storage obligation safety · 17b9bbbb
      David Vorick authored
      The host now locks storage obligations before ever pulling them from the
      database, and keeps the locks until the host is no longer going to be
      adding them to the database. This resolves some issues relating to
      storage obligation corruption, which can cause errors like 'Consensus
      Conflict' and can cause the host to report the wrong revision number, or
      to have the wrong sector roots, etc.
  14. 12 Jul, 2016 1 commit
  15. 19 Apr, 2016 1 commit
  16. 15 Apr, 2016 1 commit
    • David Vorick's avatar
      a mess of host improvements · fa67d11e
      David Vorick authored
      As the host is nearing completion, I've become a bit more perfectionist
      with the coding. Consequently, while working on one thing I went off and
      fixed a few others. The result is that this commit has a whole bunch of
      changes that really should have been spread out better.
      Approximate list:
      + Added the FinancialMetrics RPC, and also improved the financial
      + Changed the way that the host manages the netAddress. Instead of
      having the net address in the settings and the internal net address be
      the same, they are now different. The internal net address is the
      address that is discovered when doing a hostname lookup. It is not used
      if the settings.NetAddress address is set.
      + Some extra cleanup and close attention was payed to file contract
  17. 14 Apr, 2016 2 commits
  18. 13 Apr, 2016 1 commit
  19. 11 Apr, 2016 3 commits
  20. 10 Jan, 2016 1 commit
  21. 30 Dec, 2015 3 commits
  22. 18 Dec, 2015 2 commits
  23. 16 Dec, 2015 5 commits
    • Luke Champine's avatar
      remove punctuation from rpcUpload error · 772966a4
      Luke Champine authored
    • Luke Champine's avatar
      don't reject payout equal to minimum · 19fc6ebf
      Luke Champine authored
      The hostdb now calculates an exact value for the payout (instead of
      adding 5%). This was causing revisions to fail because the host was
      using <= in its comparison instead of <.
    • Luke Champine's avatar
      copy renewed data to new file · 9385cf24
      Luke Champine authored
      David pointed out that two contracts can't point to the same file
      on disk, because a revision to one contract would affect the other.
      So we are forced to duplicate the data, despite the inefficiency.
      Perhaps someday we could optimize this by using a symlink initially,
      and performing a full copy only if one of the contracts is revised.
    • Luke Champine's avatar
      fix path bug in rpcRenew · bbe57492
      Luke Champine authored
      negotiateContract was internally calculating the path of the new
      contractObligation by incrementing the file counter. When used with
      rpcRenew, this would cause the new obligation to point to a non-
      existent file instead of the original file.
      The fix isn't super pretty, but it should work.
    • Luke Champine's avatar
      add rpcRenew · 57a8b15e
      Luke Champine authored
      This is a new Host RPC that allows a renter to renew an existing
      contract without having to reupload the contract data. The RPC
      protocol is identical to standard contract negotiation, except
      that the old Merkle root is used instead of a blank one.
      As a result, the negotiation logic has been factored out into a
      separate function, used by both rpcUpload and rpcRenew. It is yet
      unknown if there are subtleties to rpcRenew that make this reuse
      a bad idea. It makes implementation easy though!
  24. 17 Nov, 2015 1 commit
    • Luke Champine's avatar
      send revision after adding obligation · 1697d0d2
      Luke Champine authored
      This prevents dumb race conditions during testing where the renter
      would initiate a revision before the host had added the obligation.
      It also makes sense to add the obligation even if writing the txn
      set to the renter fails, because the contract has already been
      submitted to the tpool.
  25. 11 Nov, 2015 2 commits