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

The Peer is Dead. Long live the ID #466

Merged
merged 38 commits into from
Dec 23, 2014
Merged

The Peer is Dead. Long live the ID #466

merged 38 commits into from
Dec 23, 2014

Commits on Dec 23, 2014

  1. threadsafe SeededRand

    jbenet committed Dec 23, 2014
    Configuration menu
    Copy the full SHA
    cc7a869 View commit details
    Browse the repository at this point in the history
  2. util: fractional context

    jbenet committed Dec 23, 2014
    Configuration menu
    Copy the full SHA
    ec96a0b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d399a93 View commit details
    Browse the repository at this point in the history
  4. peer change: peer.Peer -> peer.ID

    this is a major refactor of the entire codebase
    it changes the monolithic peer.Peer into using
    a peer.ID and a peer.Peerstore.
    
    Other changes:
    - removed handshake3.
    -	testutil vastly simplified peer
    -	secio bugfix + debugging logs
    -	testutil: RandKeyPair
    -	backpressure bugfix: w.o.w.
    -	peer: added hex enc/dec
    -	peer: added a PeerInfo struct
      PeerInfo is a small struct used to pass around a peer with
     	a set of addresses and keys. This is not meant to be a
     	complete view of the system, but rather to model updates to
     	the peerstore. It is used by things like the routing system.
    -	updated peer/queue + peerset
    -	latency metrics
    -	testutil: use crand for PeerID gen
     	RandPeerID generates random "valid" peer IDs. it does not
     	NEED to generate keys because it is as if we lost the key
     	right away. fine to read some randomness and hash it. to
     	generate proper keys and an ID, use:
     	  sk, pk, _ := testutil.RandKeyPair()
     	  id, _ := peer.IDFromPublicKey(pk)
     	Also added RandPeerIDFatal helper
    - removed old spipe
    - updated seccat
    - core: cleanup initIdentity
    - removed old getFromPeerList
    jbenet committed Dec 23, 2014
    Configuration menu
    Copy the full SHA
    c84a714 View commit details
    Browse the repository at this point in the history
  5. fix: the docker-test's make task

    Brian Tiger Chow authored and jbenet committed Dec 23, 2014
    Configuration menu
    Copy the full SHA
    10bb354 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    c2b21e4 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    d996189 View commit details
    Browse the repository at this point in the history
  8. net: have an explicit IdentifyConn on dial

    - Make sure we call IdentifyConn on dialed out conns
    - we wait until the identify is **done** before return
    - on listening case, we can also wait.
    - tests now make sure dial does wait.
    - tests now make sure we can wait on listening case.
    jbenet committed Dec 23, 2014
    Configuration menu
    Copy the full SHA
    4fe1dd9 View commit details
    Browse the repository at this point in the history
  9. net/mocknet: fixed listenaddrs (misrepresenting)

    some dht tests signaled "sending peer empty addresses"
    which would then cause a failure. this was a misrepresentation
    on the part of mocknet. it has been corrected.
    jbenet committed Dec 23, 2014
    Configuration menu
    Copy the full SHA
    497297b View commit details
    Browse the repository at this point in the history
  10. Makefiles: build the test docker img

    this commit changes how the dockertest image is built.
    it moves the command into dockertest/Makefile. It also
    uses a cached file that -- if removed with make clean
    -- can signal whether the image should be rebuilt.
    (it may be ideal to have it either detect code has
    changed, or just rebuild every time. )
    jbenet committed Dec 23, 2014
    Configuration menu
    Copy the full SHA
    87c4fb2 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    a10fb7a View commit details
    Browse the repository at this point in the history
  12. dht: bit nicer logging

    jbenet committed Dec 23, 2014
    Configuration menu
    Copy the full SHA
    2c95cb5 View commit details
    Browse the repository at this point in the history
  13. dockertest script to run the test on any img

    - run the build image task every time to avoid
      running the test on stale code
    - run the test from a script, so that we can
      run the test on different pre-built images.
      like:
    
        # build an image now and run tests on it
        make test
    
        # run tests on previously built image
        ./run-test-on-img.sh ipfs-stable
    
        # TODO: run test on git ref
        ./run-test-on-git-ref.sh <git-ref>
    jbenet committed Dec 23, 2014
    Configuration menu
    Copy the full SHA
    4c13b95 View commit details
    Browse the repository at this point in the history
  14. added bootstrap logging

    jbenet committed Dec 23, 2014
    Configuration menu
    Copy the full SHA
    7952d95 View commit details
    Browse the repository at this point in the history
  15. net: Connectedness bugfix

    Connectedness was totally incorrect. added a test case.
    jbenet committed Dec 23, 2014
    Configuration menu
    Copy the full SHA
    4d9f1f0 View commit details
    Browse the repository at this point in the history
  16. peerstream updated (data race)

    jbenet committed Dec 23, 2014
    Configuration menu
    Copy the full SHA
    8b4c7cf View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    b61b281 View commit details
    Browse the repository at this point in the history
  18. test(docker/network) disable color in daemon logs

    License: MIT
    Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
    Brian Tiger Chow authored and jbenet committed Dec 23, 2014
    Configuration menu
    Copy the full SHA
    d5789de View commit details
    Browse the repository at this point in the history
  19. remote low SnR debug statement

    cc @jbenet @whyrusleeping
    
    License: MIT
    Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
    Brian Tiger Chow authored and jbenet committed Dec 23, 2014
    Configuration menu
    Copy the full SHA
    b19a931 View commit details
    Browse the repository at this point in the history
  20. rm low SnR debug statement

    "Get" is still fairly useful. Leaving it there.
    
    License: MIT
    Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
    Brian Tiger Chow authored and jbenet committed Dec 23, 2014
    Configuration menu
    Copy the full SHA
    e3f8f8c View commit details
    Browse the repository at this point in the history
  21. misc naming

    License: MIT
    Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
    Brian Tiger Chow authored and jbenet committed Dec 23, 2014
    Configuration menu
    Copy the full SHA
    06d4df2 View commit details
    Browse the repository at this point in the history
  22. fix: data race in test

    https://build.protocol-dev.com/job/race/9352/console
    
    @jbenet @whyrusleeping
    
    pinging you guys to spread awareness about the delay.D type for
    configurable delays
    
    License: MIT
    Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
    Brian Tiger Chow authored and jbenet committed Dec 23, 2014
    Configuration menu
    Copy the full SHA
    3f9c126 View commit details
    Browse the repository at this point in the history
  23. connectedness test timing

    jbenet committed Dec 23, 2014
    Configuration menu
    Copy the full SHA
    0dbd86c View commit details
    Browse the repository at this point in the history
  24. listen addresses: add Interface addresses

    network.ListenAddresses() are general.
    Interface addresses are specific.
    jbenet committed Dec 23, 2014
    Configuration menu
    Copy the full SHA
    64a4abc View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    a7eb52a View commit details
    Browse the repository at this point in the history
  26. bitswap: network interface changed

    Had to change the network interface from DialPeer(peer.ID) to
    DialPeer(peer.PeerInfo), so that addresses of a provider are
    handed to the network.
    
    @maybebtc and I are discussing whether this should go all the
    way down to the network, or whether the network _should always
    work_ with just an ID (which means the network needs to be
    able to resolve ID -> Addresses, using the routing system.
    This latter point might mean that "routing" might need to
    break down into subcomponents. It's a bit sketchy that
    the Network would become smarter than just dial/listen and
    I/O, but maybe there's a distinction between net.Network,
    and something like a peernet.Network that has routing
    built in...)
    jbenet committed Dec 23, 2014
    Configuration menu
    Copy the full SHA
    d970f53 View commit details
    Browse the repository at this point in the history
  27. Revert "bitswap: network interface changed"

    This reverts commit bf88f1a.
    Brian Tiger Chow authored and jbenet committed Dec 23, 2014
    Configuration menu
    Copy the full SHA
    55c8f8f View commit details
    Browse the repository at this point in the history
  28. fix(bitswap) always dial

    Brian Tiger Chow authored and jbenet committed Dec 23, 2014
    Configuration menu
    Copy the full SHA
    d0d220f View commit details
    Browse the repository at this point in the history
  29. fix(bitswap) always use prvivate send method to send

    Brian Tiger Chow authored and jbenet committed Dec 23, 2014
    Configuration menu
    Copy the full SHA
    fb75184 View commit details
    Browse the repository at this point in the history
  30. style(bitswap) rename

    Brian Tiger Chow authored and jbenet committed Dec 23, 2014
    Configuration menu
    Copy the full SHA
    4ab4da7 View commit details
    Browse the repository at this point in the history
  31. style(bitswap) public methods at top

    Brian Tiger Chow authored and jbenet committed Dec 23, 2014
    Configuration menu
    Copy the full SHA
    a225568 View commit details
    Browse the repository at this point in the history
  32. feat(bitswap/network) expose peerstore

    Brian Tiger Chow authored and jbenet committed Dec 23, 2014
    Configuration menu
    Copy the full SHA
    60f3a87 View commit details
    Browse the repository at this point in the history
  33. style(bitswap) rename to network

    Brian Tiger Chow authored and jbenet committed Dec 23, 2014
    Configuration menu
    Copy the full SHA
    070b633 View commit details
    Browse the repository at this point in the history
  34. fix(bitswap) always add addresses

    Brian Tiger Chow authored and jbenet committed Dec 23, 2014
    Configuration menu
    Copy the full SHA
    c629464 View commit details
    Browse the repository at this point in the history
  35. refactor(bitswap) bitswap.Network now abstracts ipfs.Network + ipfs.R…

    …outing
    
    @jbenet @whyrusleeping
    
    the next commit will change bitswap.Network.FindProviders to only deal
    with IDs
    Brian Tiger Chow authored and jbenet committed Dec 23, 2014
    Configuration menu
    Copy the full SHA
    27dc959 View commit details
    Browse the repository at this point in the history
  36. refactor(bitswap) change PeerInfo to ID in bitswap package

    @jbenet @whyrusleeping
    
    This commit replaces peer.PeerInfo with peer.ID in the bitswap package
    Brian Tiger Chow authored and jbenet committed Dec 23, 2014
    Configuration menu
    Copy the full SHA
    c34132e View commit details
    Browse the repository at this point in the history
  37. chore(bitswap) remove Peerstore() methods from bitswap.Network interface

    Brian Tiger Chow authored and jbenet committed Dec 23, 2014
    Configuration menu
    Copy the full SHA
    bd45adf View commit details
    Browse the repository at this point in the history
  38. net/mock: interface addresses

    jbenet committed Dec 23, 2014
    Configuration menu
    Copy the full SHA
    a5018fc View commit details
    Browse the repository at this point in the history