1. 16 Jul, 2018 1 commit
  2. 16 Feb, 2018 1 commit
  3. 19 Sep, 2017 1 commit
  4. 06 Jul, 2017 1 commit
  5. 16 Apr, 2017 1 commit
  6. 25 Mar, 2017 1 commit
  7. 23 Mar, 2017 1 commit
  8. 17 Aug, 2016 1 commit
  9. 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.
  10. 26 Jul, 2016 2 commits
    • David Vorick's avatar
    • David Vorick's avatar
      reimagine host errors · 38232e43
      David Vorick authored
      start with RPCDownload and all dependent RPCs, including
      RPCRecentRevision and RPCSettings.
      The reimagined error system is very verbose, giving lots of context so
      that from the logs it is easy to determine exactly where a failure
      occurred within the codebase, including the callstack.
  11. 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.
  12. 21 May, 2016 1 commit
  13. 21 Apr, 2016 1 commit
  14. 20 Apr, 2016 2 commits
    • David Vorick's avatar
      polish up RPCReviseContract · 1933fd73
      David Vorick authored
    • David Vorick's avatar
      recent revision now supports challenges · 0a5afeec
      David Vorick authored
      The host will now propose a challenge to the renter, and the renter must
      prove that they own the public key that they will need to perform the
      file contract  revision. This is to prevent a DoS where an attacker
      could otherwise lock a file contract revision without being able to edit
  15. 19 Apr, 2016 2 commits
    • David Vorick's avatar
      misc errors · 3071f900
      David Vorick authored
      Some TODOs were in awkward places
      The download and revise RPCs were not properly locking storage
      obligations, now they are.
      An extra check has been added for finding the right signatures in a file
      contract revision transaction set.
    • David Vorick's avatar
      finish rough draft of download rpc · 4ad751fd
      David Vorick authored
  16. 18 Apr, 2016 4 commits
  17. 16 Apr, 2016 1 commit
    • David Vorick's avatar
      Add 'RecentRevision' to the list of host RPCs · abf3db3e
      David Vorick authored
      'RecentRevision' allows a renter to request a recent file contract
      revision from the host. The host will return the revision and the
      signatures for the revision. A helper function has been added to the
      modules package which verifies that the revision + signatures are valid
      and follow protocol.