Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add periodic bootstrapping #583

Merged
merged 20 commits into from
Jan 23, 2015
Merged

add periodic bootstrapping #583

merged 20 commits into from
Jan 23, 2015

Commits on Jan 23, 2015

  1. Configuration menu
    Copy the full SHA
    82d38a2 View commit details
    Browse the repository at this point in the history
  2. diag/net: io must respect timeout ctx

    See the discussion below. A future commit will implement the closer
    change below, and rebase this one on top.
    
    <•jbenet> `n.Diagnostics.GetDiagnostic(time.Second * 20)` is not being respected. should it use a context instead? or is it a timeout because the timeout is sent to other nodes?
    <•jbenet> oh it's that the io doesnt respect the context so we're stuck waiting for responses.
    <•jbenet> this is that complex interface point between the world of contexts, and the world of io. ctxutil.Reader/Writer is made for this, but you have to make sure to defer close the stream. (see how dht_net uses it). i'd love to find a safer interface. not sure what it is, but we have to a) respect contexts, and b) allow using standard io.Reader/Writers. Maybe TRTTD
    <•jbenet> is have ctxutil.Reader/Writer take ReadCloser and WriteClosers and always close them. the user _must_ pass an ioutil. NopCloser to avoid ctxutil closing on you when you dont want it to.
    <•jbenet> this seems safer to me in the general case.
    jbenet committed Jan 23, 2015
    Configuration menu
    Copy the full SHA
    c64338a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    898b969 View commit details
    Browse the repository at this point in the history
  4. net/diag: recursively decrement timeouts.

    Not sure this works. we dont have tests for net diag.
    We should make some.
    cc @whyrusleeping.
    jbenet committed Jan 23, 2015
    Configuration menu
    Copy the full SHA
    f627873 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    65b657e View commit details
    Browse the repository at this point in the history
  6. try less aggressive bootstrap

    jbenet committed Jan 23, 2015
    Configuration menu
    Copy the full SHA
    8966743 View commit details
    Browse the repository at this point in the history
  7. core: call dht bootstrap

    jbenet committed Jan 23, 2015
    Configuration menu
    Copy the full SHA
    ec848c4 View commit details
    Browse the repository at this point in the history
  8. dht/bootstrap: logging

    jbenet committed Jan 23, 2015
    Configuration menu
    Copy the full SHA
    1493c9d View commit details
    Browse the repository at this point in the history
  9. dht/bootstrap: timeout queries

    jbenet committed Jan 23, 2015
    Configuration menu
    Copy the full SHA
    9cd975c View commit details
    Browse the repository at this point in the history
  10. dht/query: err return NotFound case

    When some queries finished, but we got no result, it should
    be a simple NotFoundError. Only when every single query ended
    in error do we externalize those to the client, in case
    something major is going wrong
    jbenet committed Jan 23, 2015
    Configuration menu
    Copy the full SHA
    4865361 View commit details
    Browse the repository at this point in the history
  11. dht: kick off all the queries wit every node in our rt

    s/kademlia calls for makign sure to query all peers we
    have in our routing table, not just those closest. this
    helps ensure most queries resolve properly.
    jbenet committed Jan 23, 2015
    Configuration menu
    Copy the full SHA
    5259cf0 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    8e9413b View commit details
    Browse the repository at this point in the history
  13. p2p/proto/id: more helpful log

    jbenet committed Jan 23, 2015
    Configuration menu
    Copy the full SHA
    773ee2e View commit details
    Browse the repository at this point in the history
  14. ipfs swarm peers: sort output

    jbenet committed Jan 23, 2015
    Configuration menu
    Copy the full SHA
    010cedf View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    c43f97d View commit details
    Browse the repository at this point in the history
  16. core/bootstrap: cleaned up bootstrapping

    Moved it to its own package to isolate scope.
    jbenet committed Jan 23, 2015
    Configuration menu
    Copy the full SHA
    d6ce837 View commit details
    Browse the repository at this point in the history
  17. core/bootstrap: CR comments

    jbenet committed Jan 23, 2015
    Configuration menu
    Copy the full SHA
    dd9c1b6 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    95d58b2 View commit details
    Browse the repository at this point in the history
  19. reprovide: wait a minute before reproviding

    Many times, a node will start up only to shut down immediately.
    In these cases, reproviding is costly to both the node, and the
    rest of the network. Also note: the probability of a node being
    up another minute increases with uptime.
    
    TODO: maybe this should be 5 * time.Minute
    jbenet committed Jan 23, 2015
    1 Configuration menu
    Copy the full SHA
    4a5f5e2 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    5c33b75 View commit details
    Browse the repository at this point in the history