Commit Graph

479 Commits

Author SHA1 Message Date
Brian Tiger Chow
d514b91ff3 fix(routing:dht) implement FindProvidersAsync in terms of FindProviders
until construction is complete on the actual async method

reverts changes from ec50703395098f75946f0bad01816cc54ab18a58

ec50703395
2014-09-22 04:06:18 -07:00
Brian Tiger Chow
39ad222da9 fix(bitswap) keep interface the same
changing the bitswap interace breaks tests and makes things a bit
difficult going forward. I think I have a temporary solution to replace
the async method.

this commit partially reverts changes from:

ec50703395098f75946f0bad01816cc54ab18a58

ec50703395
2014-09-22 04:06:18 -07:00
Brian Tiger Chow
2179b5d77b fix(bitswap:testnet) Provide takes ctx 2014-09-22 04:06:18 -07:00
Brian Tiger Chow
b806270e5d test(bitswap) test sending wantlist to peers 2014-09-22 04:06:18 -07:00
Brian Tiger Chow
b4ef99bc81 fix(exch) name the error 2014-09-22 04:06:18 -07:00
Brian Tiger Chow
b5ea124a76 style(bitswap) swap argument order 2014-09-22 04:06:18 -07:00
Brian Tiger Chow
7d62be76ad chore(bitswap) cleanup 2014-09-22 04:06:18 -07:00
Brian Tiger Chow
60798b800a style(bitswap) make signature more readable 2014-09-22 04:06:18 -07:00
Brian Tiger Chow
814cb992f4 misc(crypto) remove stale test
@jbenet

Handshake library has been modified to use Secure Pipe. This test
targets the old implementation.

TODO: write a new handshake test
2014-09-22 04:06:18 -07:00
Juan Batiz-Benet
8112fae7b3 get bitswap working with dht
@perfmode using non-async version as apparently there's
a bug in async. will look into it.
2014-09-22 04:06:18 -07:00
Juan Batiz-Benet
8d29a3255f core bugfix -- connect ctx 2014-09-22 04:06:18 -07:00
Juan Batiz-Benet
52cefb16cd Routing uses context now
@perfmode boom
2014-09-22 04:06:18 -07:00
Juan Batiz-Benet
8c35988b8d add bootstrap peers to peerstore. 2014-09-22 04:06:17 -07:00
Juan Batiz-Benet
b30dd47aa3 Peerstore fix (ptr to iface) 2014-09-22 04:06:17 -07:00
Juan Batiz-Benet
81b4b38140 RPC Address init + checks 2014-09-22 04:06:17 -07:00
Juan Batiz-Benet
1653304129 adjusted what Address means in config
There are (so far) two sorts of addresses that peers care about:

- peer network addresses, local to listen, saved to bootstrap.
  `config.Identity.Address`

- peer RPC network address, local RPC tcp endpoint
  `config.RPCAddress`

@whyrusleeping @perfmode
2014-09-22 04:06:17 -07:00
Juan Batiz-Benet
64ba4cd0df output + linting 2014-09-22 04:06:17 -07:00
Juan Batiz-Benet
6807b6e98e added mars.i.ipfs.io as a bootstrap node
In the future, let's have a (signed) list of bootstrap
nodes. Ideally just a list of ipfs multiaddrs (with node.ID)
2014-09-22 04:06:17 -07:00
Juan Batiz-Benet
da20887e76 ipfs add should output hash to user
for now, ipfs add output format:

    added <hash> <path>
    ...

(these commands will adhere to strict formats.)
2014-09-22 04:06:17 -07:00
Juan Batiz-Benet
b053896e5f uncommenting global debug
let's keep this a turn-on for testing sort of thing.
(want the outputs of commands like `ipfs add` to be
usable as inputs to other programs/scripts).

maybe we should consider adding a --debug (not -d),
once we figure out adding flags that apply globally :)
@whyrusleeping
2014-09-22 04:06:17 -07:00
Juan Batiz-Benet
370d2593dc this warning should only print out on debug
(perhaps should be logged instead)
2014-09-22 04:06:17 -07:00
Juan Batiz-Benet
74a0aa54ad fixed [%s] bug 2014-09-22 04:06:17 -07:00
Juan Batiz-Benet
8ed04cfe23 fixed test 2014-09-22 04:06:17 -07:00
Brian Tiger Chow
315e121ef9 feat(bitswap:message) implement FromNet 2014-09-22 04:06:16 -07:00
Juan Batiz-Benet
d1c4ffba7c init -f fix and output 2014-09-22 04:06:16 -07:00
Brian Tiger Chow
b7b046582b test(bitswap) test with swarm of ~500 instances
test(bitswap) run synchronously to aid the scheduler
2014-09-22 04:06:16 -07:00
Brian Tiger Chow
d0a5339547 feat(bitswap) ACTIVATE FULL CONCURRENCY cap'n
fix(bitswap) Put synchronously. Then notify async
2014-09-22 04:06:16 -07:00
Brian Tiger Chow
88f5be3f0d test(bitswap:testnet) shuffle the providers
to avoid letting client rely on order for correctness
2014-09-22 04:06:16 -07:00
Brian Tiger Chow
8213cfbaa4 docs(bitswap:strat) interface comments 2014-09-22 04:06:16 -07:00
Brian Tiger Chow
251f1d7f00 test(bitswap) add SessionGenerator 2014-09-22 04:06:16 -07:00
Brian Tiger Chow
5aa6ccbad5 refac(bitswap) nil slices are 'range'able 2014-09-22 04:06:16 -07:00
Brian Tiger Chow
331fcd1756 chore(bitswap) rm unused helper func 2014-09-22 04:06:16 -07:00
Brian Tiger Chow
a5fb64071a test(bitswap) enable get block test 2014-09-22 04:06:16 -07:00
Juan Batiz-Benet
d17fcc1780 fix security comment #92 2014-09-22 04:06:16 -07:00
Juan Batiz-Benet
aa29603923 dht tests pass again 2014-09-22 04:06:16 -07:00
Juan Batiz-Benet
afb1d01048 provider testing 2014-09-22 04:06:15 -07:00
Brian Tiger Chow
6e7a12dc11 refac(exch:offline) move offline exchange to its own package 2014-09-22 04:06:15 -07:00
Brian Tiger Chow
ddf889d876 test(bitswap) send block from one instance to another 2014-09-22 04:06:15 -07:00
Brian Tiger Chow
800af9ca3a fix(bitswap:message) don't use proto internally 2014-09-22 04:06:15 -07:00
Brian Tiger Chow
57e088bbff fix(bitswap:testnet) use peer.Map 2014-09-22 04:06:15 -07:00
Brian Tiger Chow
a8a7caa088 refac(bitswap:testnet) give testnet its own package 2014-09-22 04:06:15 -07:00
Brian Tiger Chow
9f685af14f test(bitswap) 2014-09-22 04:06:15 -07:00
Brian Tiger Chow
543dfeea35 refac(bitswap) less concurrency while testing and iterating 2014-09-22 04:06:15 -07:00
Brian Tiger Chow
6e1c3b36bb fix(bitswap) check for nil in public interface 2014-09-22 04:06:15 -07:00
Brian Tiger Chow
c80c8aa977 test(bitswap:testnet)
misc:
* test network client getting more than max
* test for find providers
* rename factory method
* local network
* misc test improvements
* test bitswap get block timeout
* test provider exists but cannot connect to peer
* test sending a message async over local network
2014-09-22 04:06:15 -07:00
Brian Tiger Chow
7975ffe721 fix(exchange) package name 2014-09-22 04:06:15 -07:00
Brian Tiger Chow
0c67019447 style(exch:bitswap) rename adapter, session, etc.
style(exch:bitswap) rename NetMessage adapter impl
2014-09-22 04:06:14 -07:00
Brian Tiger Chow
071a66495f style(exch:bitswap) rename variable 2014-09-22 04:06:14 -07:00
Brian Tiger Chow
71aed67413 feat(bitswap) broadcast block to routing, peers on receipt 2014-09-22 04:06:14 -07:00
Brian Tiger Chow
98a6e9fac2 feat(exch:bitswap) simply get method 2014-09-22 04:06:14 -07:00