1. 29 Jun, 2015 1 commit
  2. 27 Jun, 2015 2 commits
    • Juan Batiz-Benet's avatar
      daemon option to optionally disable secio · e37fefdf
      Juan Batiz-Benet authored
      This commit adds an option to turn off all encryption. This is a mode
      used for tests, debugging, achieving protocol implementation interop,
      learning about how the protocol works (nc ftw), and worst case
      networks which _demand_ to be able to snoop on all the traffic.
      (sadly, there are some private intranets like this...). (We should
      consider at least _signing_ all this traffic.)
      
      Because of the severity of this sort of thing, this is an
      all-or-nothing deal. Either encryption is ON or OFF _fully_.
      This way, partially unencrypted nodes cannot be accidentally left
      running without the user's understanding. Nodes without encrypted
      connections will simply not be able to speak to any of the global
      bootstrap nodes, or anybody in the public network.
      
      License: MIT
      Signed-off-by: default avatarJuan Batiz-Benet <juan@benet.ai>
      e37fefdf
    • Juan Batiz-Benet's avatar
      daemon output includes swarm addresses · 9716018c
      Juan Batiz-Benet authored
      daemon output now includes initial swarm addresses. this is not a
      full solution, as a change in network will not trigger re-printing.
      We need a good way to do that.
      
      This made me re-think how we're outputting these messages, perhaps
      we should be throwing them as log.Events, and capturing some with
      a special keyword to output to the user on stdout. Things like
      network addresses being rebound, NATs being holepunched, external
      network addresses being figured out, connections established, etc
      may be valuable events to show the user. Of course, these should be
      very few, as a noisy daemon is an annoying daemon.
      
      License: MIT
      Signed-off-by: default avatarJuan Batiz-Benet <juan@benet.ai>
      9716018c
  3. 20 Jun, 2015 1 commit
  4. 18 Jun, 2015 2 commits
  5. 15 Jun, 2015 1 commit
  6. 14 Jun, 2015 1 commit
  7. 08 Jun, 2015 2 commits
  8. 06 Jun, 2015 1 commit
  9. 01 Jun, 2015 1 commit
  10. 26 May, 2015 1 commit
  11. 20 May, 2015 2 commits
  12. 18 May, 2015 1 commit
  13. 10 May, 2015 1 commit
  14. 01 May, 2015 2 commits
  15. 28 Apr, 2015 1 commit
  16. 27 Apr, 2015 3 commits
  17. 26 Apr, 2015 1 commit
  18. 25 Apr, 2015 1 commit
  19. 21 Apr, 2015 2 commits
    • Juan Batiz-Benet's avatar
      init: lower default rsa key size to 2048 for now · 16f56e1c
      Juan Batiz-Benet authored
      I think we should lower the default rsa key size to 2048 for now -- until we have a proper focus on securing everything. It's always a pain for new users to get hung on 4096 rsa key gen, when we have not even made sure we're using the keys perfectly correctly yet. (And 2048 is still considered secure)
      16f56e1c
    • Travis Person's avatar
      Check to see if the daemon is currently running · e1f8dfa2
      Travis Person authored
      If the daemon is running we do not want to proceed with an
      an initialization.
      
      Return a client error telling the user to kill the daemon
      before proceeding with the command.
      e1f8dfa2
  20. 20 Apr, 2015 9 commits
    • Tor Arne Vestbø's avatar
      Remove daemon InitDone guard in interrupt handler · bfd12114
      Tor Arne Vestbø authored
      Instead of just terminating right there and then, we cancel the
      context, and let the daemon exit cleanly. This make take a few
      seconds, as the node builder and its child processes do not
      care too much about the context state while building nodes,
      but this can be improved by injecting checks for ctx.Done()
      before time-consuming steps.
      bfd12114
    • Tor Arne Vestbø's avatar
      Handle ipfs command interruption by cancelling the command context · cf6a268c
      Tor Arne Vestbø authored
      Instead of assuming the command is the daemon command and closing
      the node, which resulted in bugs like #1053, we cancel the context
      and let the context children detect the cancellation and gracefully
      clean up after themselves.
      
      The shutdown logging has been moved into the daemon command, where
      it makes more sense, so that commands like ping will not print out
      the same output on cancellation.
      cf6a268c
    • Tor Arne Vestbø's avatar
      Sync up request context with root context just before calling command · 3d057642
      Tor Arne Vestbø authored
      The context passed on from main() may change before we hit callCommand,
      so setting it in Parse is a bit optimistic.
      3d057642
    • Tor Arne Vestbø's avatar
      main: wait for interrupt to finish before ending command invocation · 00a6e595
      Tor Arne Vestbø authored
      If a command invocation such as 'daemon' is interrupted, the interrupt
      handler asks the node to close. The closing of the node will result in
      the command invocation finishing, and possibly returning from main()
      before the interrupt handler is done. In particular, the info logging
      that a graceful shutdown was completed may never reach reach stdout.
      
      As the whole point of logging "Gracefully shut down." is to give
      confidence when debugging that the shutdown was clean, this is
      slightly unfortunate.
      
      The interrupt handler needs to be set up in main() instead of Run(),
      so that we can defer the closing of the interrupt handler until just
      before returning from main, not when Run() returns with a streaming
      result reader.
      00a6e595
    • Tor Arne Vestbø's avatar
      Revert "fix ugly error message when killing commands" · 61efc4de
      Tor Arne Vestbø authored
      This reverts commit f74e71f9.
      
      The 'Online' flag of the command context does not seem to be set in
      any code paths, at least not when running commands such as 'ipfs daemon'
      or 'ipfs ping'. The result after f74e71f9 is that we never shutdown
      cleanly, as we'll always os.Exit(0) from the interrupt handler.
      
      The os.Exit(0) itself is also dubious, as conceptually the interrupt
      handler should ask whatever is stalling to stop stalling, so that
      main() can return like normal. Exiting with -1 in error cases where
      the interrupt handler is unable to stop the stall is fine, but the
      normal case of interrupting cleanly should exit through main().
      61efc4de
    • Jeromy's avatar
      make ipfs understand the new migration · c419a489
      Jeromy authored
      c419a489
    • Jeromy's avatar
      f3fbedf3
    • Juan Batiz-Benet's avatar
      remove debugerrors · 140cd1fd
      Juan Batiz-Benet authored
      We now consider debugerrors harmful: we've run into cases where
      debugerror.Wrap() hid valuable error information (err == io.EOF?).
      I've removed them from the main code, but left them in some tests.
      Go errors are lacking, but unfortunately, this isn't the solution.
      
      It is possible that debugerros.New or debugerrors.Errorf should
      remain still (i.e. only remove debugerrors.Wrap) but we don't use
      these errors often enough to keep.
      140cd1fd
    • Jeromy's avatar
      fix for #1008 and other pinning fixes · 0a6b880b
      Jeromy authored
      This commit adds a new set of sharness tests for pinning, and addresses
      bugs that were pointed out by said tests.
      
      test/sharness: added more pinning tests
      
      Pinning is currently broken. See issue #1051. This commit introduces
      a few more pinning tests. These are by no means exhaustive, but
      definitely surface the present problems going on. I believe these
      tests are correct, but not sure. Pushing them as failing so that
      pinning is fixed in this PR.
      
      make pinning and merkledag.Get take contexts
      
      improve 'add' commands usage of pinning
      
      FIXUP: fix 'pin lists look good'
      
      ipfs-pin-stat simple script to help check pinning
      
      This is a simple shell script to help check pinning.
      
      We ought to strive towards making adding commands this easy.
      The http api is great and powerful, but our setup right now
      gets in the way. Perhaps we can clean up that area.
      
      updated t0081-repo-pinning
      
      - fixed a couple bugs with the tests
      - made it a bit clearer (still a lot going on)
      - the remaining tests are correct and highlight a problem with
        pinning. Namely, that recursive pinning is buggy. At least:
        towards the end of the test, $HASH_DIR4 and $HASH_FILE4 should
        be pinned indirectly, but they're not. And thus get gc-ed out.
        There may be other problems too.
      
      cc @whyrusleeping
      
      fix grep params for context deadline check
      
      fix bugs in pin and pin tests
      
      check for block local before checking recursive pin
      0a6b880b
  21. 12 Apr, 2015 1 commit
  22. 07 Apr, 2015 1 commit
  23. 02 Apr, 2015 1 commit
  24. 31 Mar, 2015 1 commit