Juan Batiz-Benet
ffe2bdceef
init SetupLoggers
...
this is useful so that loggers are all setup during tests
2014-10-08 02:50:42 -07:00
Juan Batiz-Benet
8e9b10f9d1
one last failed test
2014-10-07 21:35:33 -07:00
Juan Batiz-Benet
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
Juan Batiz-Benet
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
Juan Batiz-Benet
b98e48836f
added u.Key.String
2014-10-07 21:32:17 -07:00
Jeromy
5ba2efc2b8
make tests pass
2014-10-08 04:25:51 +00:00
Jeromy
bdaee9bcb2
some performance tweaks for the dagwriter write path
2014-10-08 03:42:29 +00:00
Jeromy
6e0cfb3273
removed error from return type of blocks.NewBlock()
2014-10-07 20:46:01 +00:00
Jeromy
98cde1578d
integrate dagmodifier into ipns
2014-10-07 07:23:30 +00:00
Jeromy
5c802ae852
add more tests and rework a lot of utility structures
2014-10-07 05:55:28 +00:00
Jeromy
3591e10b2e
implement dagmodifier and tests.
2014-10-06 23:49:45 +00:00
Juan Batiz-Benet
77fccaa2f3
Obviated need for .ID.Pretty() all over the place.
2014-10-06 04:23:55 -07:00
Juan Batiz-Benet
910a76e220
updated multiaddr use across codebase
2014-10-06 04:13:43 -07:00
Juan Batiz-Benet
20a20c9e1a
updated multiaddr
2014-10-06 04:07:22 -07:00
Juan Batiz-Benet
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
Jeromy
af1ce6ee50
Merge branch 'ipns' of github.com:jbenet/go-ipfs into ipns
2014-10-06 03:43:10 +00:00
Jeromy
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
Juan Batiz-Benet
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
Juan Batiz-Benet
d7d3af3faf
vendoring protobuf + go-is-domain
2014-10-05 15:15:49 -07:00
Juan Batiz-Benet
c0250f3c8e
bump logging to ERROR
2014-10-05 14:50:39 -07:00
Juan Batiz-Benet
7e83982247
print out key if 'malformed'
2014-10-05 14:50:30 -07:00
Jeromy
a13baff33d
fixed data size reporting
2014-10-05 01:22:01 +00:00
Jeromy
16e42f82b0
fixed ipns file persistence bug
2014-10-04 22:42:03 +00:00
Jeromy
a0d77dbf99
fixed keyspace tests on 32 bit systems
2014-10-04 19:29:08 +00:00
Jeromy
faaaa2298b
Merge branch 'ipns' of github.com:jbenet/go-ipfs into ipns
2014-10-04 19:26:58 +00:00
Jeromy
25b36d1000
moved mock core node to core package
2014-10-04 19:13:56 +00:00
Juan Batiz-Benet
ee1d1ac078
add: only show added once.
2014-10-04 03:56:12 -07:00
Juan Batiz-Benet
0c8ae7674e
loggers: set level
2014-10-04 03:53:21 -07:00
Juan Batiz-Benet
7e1cd59259
initialize loggers at ERROR
2014-10-04 03:36:30 -07:00
Jeromy
c64add1959
clean up ipns test and add more asserts
2014-10-04 08:30:24 +00:00
Jeromy
5423a00894
create test node and make first ipns test pass
2014-10-04 08:00:13 +00:00
Jeromy
0c7ff7b0a8
add skeleton for ipns test, to be finished when there is a mock core.IpfsNode
2014-10-04 07:24:57 +00:00
Jeromy
02de522216
Merge branch 'ipns-dev' of github.com:jbenet/go-ipfs into ipns-dev
2014-10-04 06:34:15 +00:00
Jeromy
11332fc73b
make the tests pass!
2014-10-04 06:34:06 +00:00
Juan Batiz-Benet
73b2058f8f
DNSResolver: use isd.IsDomain
...
this commit dedicated to @whyrusleeping
2014-10-03 18:08:27 -07:00
Jeromy
7bb2bd6d16
a little more progress... and some debugging code
2014-10-03 23:50:05 +00:00
Jeromy
791daf5f8b
Merge branch 'ipns-dev' of github.com:jbenet/go-ipfs into ipns-dev
2014-10-03 23:04:47 +00:00
Jeromy
e7aa1166bc
add writerAt for fuse writes
2014-10-03 23:04:41 +00:00
Juan Batiz-Benet
612be59643
use string datastore keys.
2014-10-03 15:39:22 -07:00
Juan Batiz-Benet
2ce9415c69
+ fs ds + thread safe
2014-10-03 14:45:21 -07:00
Juan Batiz-Benet
88d804e32a
added core logging
2014-10-03 14:45:21 -07:00
Juan Batiz-Benet
8a7f6aca99
godeps: updated datastore
2014-10-03 14:45:21 -07:00
Jeromy
dc66b699b0
fix writes zeroing files
2014-10-03 21:36:29 +00:00
Jeromy
4727535160
fixing mutability issues in ipns
2014-10-03 19:22:54 +00:00
Jeromy
d872e0cce5
move publish and resolve under the 'name' subcommand
2014-10-02 22:30:50 +00:00
Jeromy
80c64ffa6d
break ipns into separate files
2014-10-02 17:25:08 +00:00
Juan Batiz-Benet
41bc355be3
/rpcaddr should be storing a multiaddr
...
client expects a multiaddr. server was writing a bsaddr
2014-10-02 03:42:19 -07:00
Juan Batiz-Benet
a76f6af1df
remove old cat
2014-10-02 03:33:20 -07:00
Juan Batiz-Benet
f923652d88
remove extra printf
2014-10-02 03:07:52 -07:00
Juan Batiz-Benet
bc0769e370
ipfs + ipns mounts with flags + config
2014-10-02 03:05:49 -07:00