Commit Graph

170 Commits

Author SHA1 Message Date
Steven Allen ec8630b6b7 Merge branch 'gx/update-fzw9j3' 2018-11-02 16:06:47 -07:00
Steven Allen 8dc8c4a64c gx publish 1.3.6 2018-11-02 15:54:33 -07:00
Steven Allen 393301199b gx publish 1.3.5 2018-10-18 11:19:28 +01:00
Steven Allen d237243b4a
Merge pull request #84 from multiformats/fix/shortcut-split-component
shortcut split on components
2018-10-18 10:43:51 +01:00
Steven Allen faf8963c9a fix zone validator
(bug caught by fuzzer)
2018-10-18 10:35:11 +01:00
Steven Allen 877fe6538c shortcut split on components
Instead of re-parsing single-components, shortcut split/for-each functions.
2018-10-18 10:32:13 +01:00
Steven Allen dda950c1d3 gx publish 1.3.4 2018-10-16 16:57:21 +01:00
Steven Allen 021d073ecd Merge branch 'feat/component' 2018-10-16 16:57:14 +01:00
Steven Allen fa28600751 gx publish 1.3.3 2018-10-16 16:50:53 +01:00
Steven Allen 42326a8c13
Merge pull request #79 from multiformats/nit/cleanup
small cleanups and optimizations
2018-10-16 16:38:27 +01:00
Steven Allen c8d6befb43 add more split tools and a bunch of tests 2018-10-02 14:26:34 -07:00
Steven Allen 96897075ba fix path test
Opinionated: Paths should start with /, dammit!
2018-10-01 22:05:11 -07:00
Steven Allen 58bcbc8e51 add component/foreach helpers
This adds a `Component` helper type and a `ForEach` helper method.

The first attempt used an interface but interfaces imply allocation. We really
can't afford to allocate here.
2018-10-01 21:18:11 -07:00
Steven Allen 7989a080af don't put the buffer struct on the heap
This showed up when profile go-ipfs.
2018-10-01 17:10:03 -07:00
Steven Allen 2e9c819c18 make cast use NewMultiaddrBytes
This will perform all the correct checks *except* that it won't bother actually
stringifying the multiaddr. It should be significantly faster.
2018-10-01 16:57:15 -07:00
Steven Allen 6c70a3d7b5 remove protocol correctness test
This is checked when the protocol is *registered*. There's no reason to test it
twice.
2018-10-01 16:56:58 -07:00
Steven Allen 2999d4efba small Join optimizations 2018-10-01 16:56:58 -07:00
Steven Allen 0f158f1163 nit: mark test helper 2018-10-01 16:56:58 -07:00
Steven Allen 61e31ed48b stop copying when calling `Bytes`
This is a huge performance hit. Really, we just need to tell users not to modify
the result.

Also, get rid of an unnecessary pointer indirection (no api change).
2018-10-01 16:56:57 -07:00
Steven Allen fe1c46f8be gx publish 1.3.2 2018-09-30 18:12:25 -07:00
Steven Allen 87800bf753
Merge pull request #78 from multiformats/fix/77-1
correctly format ip4-in-6 addresses
2018-09-30 23:44:15 +00:00
Steven Allen 41068aa69c correctly format ip4-in-6 addresses
fixes part one of #77
2018-09-30 16:41:00 -07:00
Steven Allen a80cfc331f gx publish 1.3.1 2018-09-24 02:07:54 -07:00
Steven Allen 8988e82d78
Merge pull request #69 from mwnx/ip6z
Add "ip6%" multiaddr (IPv6 with zone ID)
2018-09-24 09:03:16 +00:00
Steven Allen 6f084e635d validate ipv6 zone 2018-09-14 18:51:03 -07:00
mwnx 1f9df061aa Add "zone" multiaddr (IPv6 zone)
See [rfc4007].

Can be prefixed to "ip6" like so:

    /zone/eth0/ip6/fe80::1

This corresponds to the rfc4007 address `fe80::1%eth0`

[rfc4007] https://tools.ietf.org/html/rfc4007
2018-09-14 18:41:48 -07:00
Steven Allen de7d6d8195
Merge pull request #75 from overbool/docs/modify-readme
docs(README): modify readme
2018-09-14 16:00:47 +00:00
Overbool c7b4679a01 docs(README): modify readme 2018-09-14 22:13:38 +08:00
Steven Allen d6ad8896de
Merge pull request #73 from multiformats/feat/better-protocol
add protocol by code map
2018-07-21 00:31:18 +00:00
Steven Allen 1ae1320955 refactor the protocol definition files
Also use `AddProtocol` for *all* protocols (even predefined ones).
2018-07-18 09:09:29 -07:00
Steven Allen 6688376452 unexport ProtocolsByName and add protocolsByCode 2018-06-26 14:53:06 -07:00
Steven Allen 47e3ab13b2 validate protocol definition in add protocol 2018-06-22 18:34:55 -07:00
Steven Allen ece734f18d remove redundant case 2018-06-22 18:32:03 -07:00
Steven Allen 9680498266
Merge pull request #71 from multiformats/fix/panic
fully validate multiaddr byte representations on construction
2018-06-22 21:55:16 +00:00
Steven Allen 2b4e098f3e gx publish 1.3.0 2018-06-22 14:36:39 -07:00
Steven Allen 1fc094e0e0 explicitly throw away impossible write errors 2018-06-22 14:31:41 -07:00
Steven Allen 1e80322cf0 add test case for panic 2018-06-22 13:29:31 -07:00
Steven Allen 1e4c6be785 fully validate p2p addresses when decoding from bytes
Otherwise, .String() can panic.
2018-06-22 13:29:31 -07:00
Steven Allen 5416c663d5 simplify variable-length argument handling
Instead of having the transformers deal with variable length argument prefixes,
just do this in the bytesToString/stringToBytes functions.
2018-06-22 13:29:31 -07:00
Steven Allen b68c4a264d go fmt 2018-06-22 13:28:00 -07:00
Steven Allen 84fb105635
Merge pull request #66 from multiformats/feat/p2p-transition
begin transition from /ipfs/ to /p2p/ multiaddrs
2018-06-19 01:34:16 +00:00
Steven Allen 7f59fc3f88 add tests for /p2p addrs 2018-06-18 18:31:18 -07:00
Steven Allen a778a9db10 add a round-trip test 2018-06-18 18:27:39 -07:00
Jeromy dea70a9f19 begin transition from /ipfs/ to /p2p/ multiaddrs 2018-06-18 18:24:36 -07:00
Steven Allen 997959a3cb
Merge pull request #68 from mwnx/master
Two small bugfixes
2018-06-16 20:42:20 +00:00
Steven Allen b9548e77d7 bump minimum go version to 1.10 2018-06-16 13:35:24 -07:00
mwnx 7bf24dca81 Fix CodeToVarint []byte size
We were missing a logarithm... CodeToVarint would previously allocate
more bytes than necessary (exponentially) for the varint slice. This bug
was silent but deserves to be fixed nonetheless.
2018-06-16 19:53:08 +02:00
mwnx ae494b7f0c Fix ipv6 parser error message ("ip4" → "ip6") 2018-06-16 19:53:08 +02:00
Steven Allen f36800afeb gx publish 1.2.7 2018-06-08 20:23:07 -07:00
Steven Allen 123a717755 gx publish 1.2.6 2018-01-19 20:50:56 -08:00