1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-27 16:07:42 +08:00

729 Commits

Author SHA1 Message Date
4d7b87df31 Merge branch 'ipns' of github.com:jbenet/go-ipfs into ipns 2014-10-08 21:55:58 +00:00
1aafd285b5 add in some extra debug logging, and increase routing table latencies 2014-10-08 21:55:50 +00:00
31cc605c3a comment out debug msg 2014-10-08 14:49:21 -07:00
dc6fdd39c5 use encoded (pretty) keys only on fs ds 2014-10-08 14:49:04 -07:00
0ffc20384e make vendor is your friend
cc @whyrusleeping
2014-10-08 14:48:34 -07:00
9ebf3ae640 keytransform ds 2014-10-08 14:33:31 -07:00
093c8fb04d Rework package structure for unixfs and subpackage
cc @jbenet
2014-10-08 21:14:18 +00:00
15a4701003 update error handling in ipns 2014-10-08 17:29:46 +00:00
916fc54633 add more comments! 2014-10-08 16:51:53 +00:00
dc2dbdbb02 vendor things
cc @whyrusleeping
2014-10-08 04:17:52 -07:00
2944360f5c New NameSystem interface
type NameSystem interface {
      Resolver
      Publisher
    }

should say it all.

cc @whyrusleeping
2014-10-08 04:14:52 -07:00
cf6efc7a09 deprecate merkledag.Node.Update 2014-10-08 03:11:29 -07:00
459e0d5373 ipns TestFastRepublish 2014-10-08 02:52:16 -07:00
ffe2bdceef init SetupLoggers
this is useful so that loggers are all setup during tests
2014-10-08 02:50:42 -07:00
8e9b10f9d1 one last failed test 2014-10-07 21:35:33 -07:00
66839fa1de changed logging, in dht and elsewhere
- use log.* instead of u.*
- use automatic type conversions to .String()
  (Peer.String() prints nicely, and avoids calling b58 encoding
  until needed)
2014-10-07 21:33:59 -07:00
7c5679536c bugfix: use consistent interface
We'll want a `type blocks.Block interface {}` later, but
for now, make sure Blockstore uses ptrs for both Get and Put.

+ fix NewBlock output compile error
2014-10-07 21:32:17 -07:00
b98e48836f added u.Key.String 2014-10-07 21:32:17 -07:00
5ba2efc2b8 make tests pass 2014-10-08 04:25:51 +00:00
bdaee9bcb2 some performance tweaks for the dagwriter write path 2014-10-08 03:42:29 +00:00
6e0cfb3273 removed error from return type of blocks.NewBlock() 2014-10-07 20:46:01 +00:00
98cde1578d integrate dagmodifier into ipns 2014-10-07 07:23:30 +00:00
5c802ae852 add more tests and rework a lot of utility structures 2014-10-07 05:55:28 +00:00
3591e10b2e implement dagmodifier and tests. 2014-10-06 23:49:45 +00:00
77fccaa2f3 Obviated need for .ID.Pretty() all over the place. 2014-10-06 04:23:55 -07:00
910a76e220 updated multiaddr use across codebase 2014-10-06 04:13:43 -07:00
20a20c9e1a updated multiaddr 2014-10-06 04:07:22 -07:00
f3ae0e8e1b u.Hash - error
the u.Hash error can be safely ignored (panic) because multihash
only fails from the selection of hash function. If the fn + length
are valid, it won't error.

cc @whyrusleeping
2014-10-06 02:26:52 -07:00
501030f987 Merge pull request #144 from jbenet/bootstrap-cmd
bootstrap cmd
2014-10-06 02:17:49 -07:00
abefd93fb8 edited bootstrap cmd
- safer parsing
- multiple inputs
- add: dup detection
- common cfg writing
2014-10-06 02:14:05 -07:00
af1ce6ee50 Merge branch 'ipns' of github.com:jbenet/go-ipfs into ipns 2014-10-06 03:43:10 +00:00
5592030ed3 working on dag modification structures, factored out the data format into an importer subpackage and added more ipns tests 2014-10-06 03:42:59 +00:00
091f6f8516 added getConfig 2014-10-05 17:46:44 -07:00
a2c2c48773 Implement ipfs bootstrap command.
This set of commits implements the bootstrap commands,
following from the description in #117
2014-10-05 17:18:42 -07:00
5136c786e5 Bugfix: "Malformed Public Key" Error
This commit fixed the notoriously annoying "Malformed Public Key"
problem. The issue was that sometimes the byte representation of
the points (x,y in big.Int) generated would be one less byte than
expected. This is simply because (* big.Int) Write uses the least
amount of bytes needed for the int.

I instead changed the marshalling/unmarshalling to do exactly
what stdlib crypto/tls does: use `ellipctic.Marshal` which marshals
according to the ANSI X9.62 standard.

http://golang.org/pkg/crypto/elliptic/#Marshal
http://golang.org/src/pkg/crypto/tls/key_agreement.go#L214

```Go
// crypto/tls
ka.privateKey, x, y, err = elliptic.GenerateKey(ka.curve, config.rand())
ecdhePublic := elliptic.Marshal(ka.curve, x, y)

// ipfs/crypto
priv, x, y, err := elliptic.GenerateKey(curve, rand.Reader)
pubKey := elliptic.Marshal(curve, x, y)
```

((Warning: we're using `rand.Reader` directly, which we shouldn't
do, as it can be seeded. We should use a configured source, as
crypto/tls. Flagged in #143))

This makes me think we should re-use a lot of their datastructures
and functions directly (e.g. ecdheKeyAgreement)

Fixed: #135

cc @bren2010 @whyrusleeping
2014-10-05 15:56:52 -07:00
d7d3af3faf vendoring protobuf + go-is-domain 2014-10-05 15:15:49 -07:00
c0250f3c8e bump logging to ERROR 2014-10-05 14:50:39 -07:00
7e83982247 print out key if 'malformed' 2014-10-05 14:50:30 -07:00
a13baff33d fixed data size reporting 2014-10-05 01:22:01 +00:00
16e42f82b0 fixed ipns file persistence bug 2014-10-04 22:42:03 +00:00
a0d77dbf99 fixed keyspace tests on 32 bit systems 2014-10-04 19:29:08 +00:00
faaaa2298b Merge branch 'ipns' of github.com:jbenet/go-ipfs into ipns 2014-10-04 19:26:58 +00:00
25b36d1000 moved mock core node to core package 2014-10-04 19:13:56 +00:00
ee1d1ac078 add: only show added once. 2014-10-04 03:56:12 -07:00
0c8ae7674e loggers: set level 2014-10-04 03:53:21 -07:00
7e1cd59259 initialize loggers at ERROR 2014-10-04 03:36:30 -07:00
c64add1959 clean up ipns test and add more asserts 2014-10-04 08:30:24 +00:00
5423a00894 create test node and make first ipns test pass 2014-10-04 08:00:13 +00:00
0c7ff7b0a8 add skeleton for ipns test, to be finished when there is a mock core.IpfsNode 2014-10-04 07:24:57 +00:00
02de522216 Merge branch 'ipns-dev' of github.com:jbenet/go-ipfs into ipns-dev 2014-10-04 06:34:15 +00:00