Commit Graph

63 Commits

Author SHA1 Message Date
Marten Seemann
9994046f06 deprecate this repo 2022-08-19 11:15:54 +03:00
Marten Seemann
35ab42caf0
use a mock clock in bandwidth tests (#276) 2022-08-16 21:45:31 +03:00
Marten Seemann
b6981edffe
remove unused MultistreamSemverMatcher (#277) 2022-07-12 08:38:25 -07:00
Marco Munizaga
8814b31902
Remove btcsuite/btcd dep (#272) 2022-07-05 16:49:17 -07:00
Masih H. Derkani
58f60d8483
chore: upgrade to go-cid to v0.2.0 (#262)
Upgrade the go-cid dependency
2022-06-23 04:30:09 -07:00
Marco Munizaga
31262b0447
Add canonical log for misbehaving peers (#258)
* Add canonical logging for misbehaving peers

* Add component and use manet.FromNetAddr

* Fix log test
2022-06-17 09:09:23 -07:00
Marten Seemann
041d78f639
force usage of github.com/btcsuite/btcd v0.22.1 or newer (#254) 2022-05-25 06:06:10 -07:00
Brian Meek
374bb62823
update btcec dependency (#247) 2022-04-20 02:00:42 -07:00
web3-bot
f927693924
sync: update CI config files (#241)
* bump go.mod to Go 1.17 and run go fix

* update .github/workflows/automerge.yml

* update .github/workflows/go-test.yml

* update .github/workflows/go-check.yml

* remove unneeded nil check in ECDSAPublicKey.Verify

Co-authored-by: web3-bot <web3-bot@users.noreply.github.com>
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2022-04-10 02:38:48 -07:00
Marcin Rataj
2a28e1d32f
fix: switch to go-multicodec mappings (#240)
The mappings in go-cid were maintained by hand and are invalid.
More details in https://github.com/ipfs/go-cid/pull/137

This is switching to go-multicodec which has correct mappings
that are generated, not written by hand.

Co-authored-by: Daniel Martí <mvdan@mvdan.cc>
2022-03-31 16:04:14 +02:00
Marten Seemann
8dd07b859a
update gopkg.in/yaml.v2 to v2.2.8 (#233) 2022-01-08 22:27:00 -08:00
Marten Seemann
a3dd401efe
introduce a transport.Upgrader interface (#232)
* introduce a transport.Upgrader interface

* remove deprecated Upgrader methods
2022-01-04 00:36:44 -08:00
Marten Seemann
5f1ff676b2
remove the Process from the Network interface (#212) 2021-09-08 03:34:53 -07:00
Marten Seemann
094b0d3f8b
save the role (client, server) in the simultaneous connect context (#210) 2021-08-24 13:30:29 +01:00
web3-bot
8a10694282
sync: update CI config files (#209)
* bump go.mod to Go 1.16 and run go fix

* run go mod tidy

* run gofmt -s

* update .github/workflows/automerge.yml

* update .github/workflows/go-test.yml

* update .github/workflows/go-check.yml

Co-authored-by: web3-bot <web3-bot@users.noreply.github.com>
2021-08-22 08:55:33 -07:00
Steven Allen
ea6cbf9ff2
feat: remove unused metrics (#208)
This drops the opensensus dependency. Nobody uses this, from what I can
tell.

fixes #58
2021-07-23 08:21:59 -07:00
web3-bot
aec4faac4d
sync: update CI config files (#189)
* disable Travis

* set Go version to 1.15 and run go mod tidy

* add .github/workflows/automerge.yml

* add .github/workflows/go-test.yml

* add .github/workflows/go-check.yml

* chore: tidy submodule

* chore: give vet something to vet

* test: disable timing dependent bandwidth test unless we're on linux

Co-authored-by: web3-bot <web3-bot@users.noreply.github.com>
Co-authored-by: Steven Allen <steven@stebalien.com>
2021-07-12 17:25:09 -07:00
Raúl Kripalani
98f9714258
upgrade deps. (#161) 2020-07-30 10:39:34 +01:00
dependabot-preview[bot]
acf0d3d15a
build(deps): bump github.com/multiformats/go-multiaddr from 0.2.1 to 0.2.2 (#152) 2020-05-18 11:43:10 +01:00
dependabot-preview[bot]
e3a456b253
build(deps): bump github.com/libp2p/go-openssl from 0.0.4 to 0.0.5 (#149) 2020-05-14 16:53:30 +01:00
Steven Allen
9df5e4fcaf fix: don't drop bytes in the insecure transport
gogo's varint reader buffers internally. If you use it then throw it away,
you'll drop data. This commit reverts to using msgio, but uses the varint
reader/writers instead.
2020-04-02 20:44:44 -07:00
dependabot-preview[bot]
4c983715a3
build(deps): bump github.com/jbenet/goprocess from 0.1.3 to 0.1.4
Bumps [github.com/jbenet/goprocess](https://github.com/jbenet/goprocess) from 0.1.3 to 0.1.4.
- [Release notes](https://github.com/jbenet/goprocess/releases)
- [Commits](https://github.com/jbenet/goprocess/compare/v0.1.3...v0.1.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-25 11:19:03 +00:00
Steven Allen
fdc64dde88
deps: move tools to a sub-module (#130)
That way, the root module doesn't depend on gocompat and all its dependencies.
2020-03-09 19:57:19 -07:00
dependabot-preview[bot]
a4abfae3ee
build(deps): bump github.com/multiformats/go-multiaddr
Bumps [github.com/multiformats/go-multiaddr](https://github.com/multiformats/go-multiaddr) from 0.2.0 to 0.2.1.
- [Release notes](https://github.com/multiformats/go-multiaddr/releases)
- [Commits](https://github.com/multiformats/go-multiaddr/compare/v0.2.0...v0.2.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-02 11:20:25 +00:00
dependabot-preview[bot]
d0e5396808
build(deps): bump github.com/libp2p/go-buffer-pool from 0.0.1 to 0.0.2
Bumps [github.com/libp2p/go-buffer-pool](https://github.com/libp2p/go-buffer-pool) from 0.0.1 to 0.0.2.
- [Release notes](https://github.com/libp2p/go-buffer-pool/releases)
- [Commits](https://github.com/libp2p/go-buffer-pool/compare/v0.0.1...v0.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-11 16:52:42 +00:00
Steven Allen
78c3b1fe4c
Merge pull request #110 from libp2p/dependabot/go_modules/github.com/ipfs/go-cid-0.0.5
build(deps): bump github.com/ipfs/go-cid from 0.0.4 to 0.0.5
2020-02-11 08:50:27 -08:00
dependabot-preview[bot]
f7961b9df5
build(deps): bump go.opencensus.io from 0.22.2 to 0.22.3
Bumps [go.opencensus.io](https://github.com/census-instrumentation/opencensus-go) from 0.22.2 to 0.22.3.
- [Release notes](https://github.com/census-instrumentation/opencensus-go/releases)
- [Commits](https://github.com/census-instrumentation/opencensus-go/compare/v0.22.2...v0.22.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-10 19:55:44 +00:00
dependabot-preview[bot]
c7f37b285b
build(deps): bump github.com/ipfs/go-cid from 0.0.4 to 0.0.5
Bumps [github.com/ipfs/go-cid](https://github.com/ipfs/go-cid) from 0.0.4 to 0.0.5.
- [Release notes](https://github.com/ipfs/go-cid/releases)
- [Commits](https://github.com/ipfs/go-cid/compare/v0.0.4...v0.0.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-10 19:55:37 +00:00
Yusef Napora
7b2888dfdb
Signed envelopes & routing records (#73)
* add SignedEnvelope type

* use struct for SignedEnvelope instead of exposing protobuf directly

* doc comments for envelopes

* tests for SignedEnvelopes

* add helpers to make routing records for Host

* fix doc comment

* go fmt

* add method to peerstore to retrieve signed routing records

* update to match spec changes

* just use nanoseconds

* use proto3  &  rename fields to match spec changes

* use proto3 for routing records

* make envelope fields private & validate on unmarshal

* use buffer pool for envelope signatures

* tests for RoutingState

* go fmt

* rename Equals -> Equal, add some comments

* use test helpers

* get rid of unsigned RoutingState struct, only expose SignedRoutingState

* rm batching SignedRoutingStates accessor in peerstore

the datastore peerstore implementation doesn't support batched reads, so
it's no more efficient to get a bunch of states at once than it
is to call SignedRoutingState multiple times.

* whitespace

* expose struct fields & remove accessors

* use camelCase in protos for consistency

* use multiformats uvarint for length-prefixes

* remove payloadType check when unmarhaling

* rm stray ref to golang/protobuf

* define CertifiedAddrBook to avoid breaking API change

* add events for updated addresses and routing state

* remove SignedRoutingStateFromHost helper

moving this to go-libp2p

* add routing state records, extend peerstore API

* fix: rebuild protos with new gogofaster generator

* filter private addrs from signed routing records

* envelope: use byte slices from pool; adjust interface.

* move envelope to record package.

* move protobuf files; adjust imports everywhere.

* rename RoutingStateRecord -> PeerRecord

also removes embedded reference to Envelope from the record,
as that was confusing.

as a result, the CertifiedAddrBook now accepts/returns
record.SignedEnvelope instead of a specialized type.

* hoist Seq from PeerRecord to SignedEnvelope

* test that PeerRecords can't be signed by wrong key

* commit go.sum

* add Seq field to envelope signature

* fix proto_path in Makefile

* fix import ordering

* comments for PeerRecord proto message

also removes the seq field from PeerMessage proto,
since it was moved to the SignedEnvelope

* use Record type for envelope payloads

* rename SignedEnvelope -> Envelope, unmarshal payload in ConsumeEnvelope

* return buffer to pool before early return

* doc comments

* rename CertifiedAddrBook methods, update comments

* cache unmarshalled Record payload inside Envelope

* doc comments

* store reflect.Type when registering Record

* Revert "return buffer to pool before early return"

8d8da386f2

misread this - unsigned will be nil if there's an
error, so it was right the way it was

* use a DefaultRecord for unregistered PayloadTypes

instead of returning an error if we don't have a registered
Record for a given PayloadType, we can have a catch-all
DefaultRecord type that just preserves the original payload
as a []byte

* cleanup DefaultRecord code a bit

- removes unused error return from blankRecordForPayloadType
- just references instead of copying in DefaultRecord.UnmarshalRecord
  I figure this is likely safe, since we'll be unmarshalling from the
  payload of an Envelope, which shouldn't get altered after it's
  created.

* use explicit payloadType in MakeEnvelopeWithRecord

* Revert DefaultRecord commits

ae3bc7bdfb
a26c845a76

* doc comments

* move Seq field back to PeerRecord

* make diffs optional in EvtLocalAddressesUpdated

* more envelope tests

* replace MakeEnvelope with record.Seal

also:
- add Domain and Codec fields to Record interface

* fix import

* add interface check

* rename ProcessPeerRecord -> ConsumePeerRecord

also, adds bool `accepted` return value

* rename event field, add doc comment

* peer record protobuf: fix field casing.

* record protobuf: add docs and fix casing.

* cleanup: group imports.

* nit: split test/utils.go => test/{addrs,errors}.go.

Co-authored-by: Raúl Kripalani <raul.kripalani@gmail.com>
2020-02-10 14:53:24 -05:00
dependabot-preview[bot]
748a57a953
build(deps): bump github.com/multiformats/go-multihash
Bumps [github.com/multiformats/go-multihash](https://github.com/multiformats/go-multihash) from 0.0.10 to 0.0.13.
- [Release notes](https://github.com/multiformats/go-multihash/releases)
- [Commits](https://github.com/multiformats/go-multihash/compare/v0.0.10...v0.0.13)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-04 11:17:12 +00:00
dependabot-preview[bot]
94fac75dea
build(deps): bump github.com/ipfs/go-cid from 0.0.3 to 0.0.4
Bumps [github.com/ipfs/go-cid](https://github.com/ipfs/go-cid) from 0.0.3 to 0.0.4.
- [Release notes](https://github.com/ipfs/go-cid/releases)
- [Commits](https://github.com/ipfs/go-cid/compare/v0.0.3...v0.0.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-16 11:20:22 +00:00
dependabot-preview[bot]
ee9d9da3cf
build(deps): bump github.com/multiformats/go-multiaddr
Bumps [github.com/multiformats/go-multiaddr](https://github.com/multiformats/go-multiaddr) from 0.1.2 to 0.2.0.
- [Release notes](https://github.com/multiformats/go-multiaddr/releases)
- [Commits](https://github.com/multiformats/go-multiaddr/compare/v0.1.2...v0.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-11 11:34:55 +00:00
Steven Allen
af4f53a061 chore(dep): update btc (sekp) and openssl libraries
* The btc (sekp crypto) library now uses go mod.
* Our openssl library now supports a few more platforms.
2019-12-09 13:19:02 +01:00
dependabot-preview[bot]
a986079787
build(deps): bump github.com/libp2p/go-openssl from 0.0.3 to 0.0.4
Bumps [github.com/libp2p/go-openssl](https://github.com/libp2p/go-openssl) from 0.0.3 to 0.0.4.
- [Release notes](https://github.com/libp2p/go-openssl/releases)
- [Commits](https://github.com/libp2p/go-openssl/compare/v0.0.3...v0.0.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-09 11:20:31 +00:00
Steven Allen
cd602e126d chore: bump minimum go version 2019-12-07 10:32:20 -05:00
Dmitry Yu Okunev
205fb711b9 Use standard library "crypto/ed25519" 2019-12-06 21:58:31 -05:00
dependabot-preview[bot]
d9020dbcf6
build(deps): bump github.com/mr-tron/base58 from 1.1.2 to 1.1.3
Bumps [github.com/mr-tron/base58](https://github.com/mr-tron/base58) from 1.1.2 to 1.1.3.
- [Release notes](https://github.com/mr-tron/base58/releases)
- [Commits](https://github.com/mr-tron/base58/compare/v1.1.2...v1.1.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-07 00:44:47 +00:00
dependabot-preview[bot]
ebca051e1f
build(deps): bump github.com/multiformats/go-multiaddr
Bumps [github.com/multiformats/go-multiaddr](https://github.com/multiformats/go-multiaddr) from 0.1.1 to 0.1.2.
- [Release notes](https://github.com/multiformats/go-multiaddr/releases)
- [Commits](https://github.com/multiformats/go-multiaddr/compare/v0.1.1...v0.1.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-06 22:30:49 +00:00
dependabot-preview[bot]
8f5557aa4d
build(deps): bump go.opencensus.io from 0.22.1 to 0.22.2
Bumps [go.opencensus.io](https://github.com/census-instrumentation/opencensus-go) from 0.22.1 to 0.22.2.
- [Release notes](https://github.com/census-instrumentation/opencensus-go/releases)
- [Commits](https://github.com/census-instrumentation/opencensus-go/compare/v0.22.1...v0.22.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-06 22:09:11 +00:00
dependabot-preview[bot]
1aa5516910
build(deps): bump github.com/multiformats/go-multihash
Bumps [github.com/multiformats/go-multihash](https://github.com/multiformats/go-multihash) from 0.0.8 to 0.0.10.
- [Release notes](https://github.com/multiformats/go-multihash/releases)
- [Commits](https://github.com/multiformats/go-multihash/compare/v0.0.8...v0.0.10)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-06 17:41:54 +00:00
Steven Allen
d350e2be80 chore(dep): update go-flow-metrics 2019-11-15 18:40:15 -08:00
Yusef Napora
f06e38f2e8
use varints for delimiting plaintext 2.0 msgs (#74)
* use varints for delimiting plaintext 2.0 msgs

* lower size limit, fix comment

* go mod tidy - rm unused msgio dependency
2019-11-12 11:52:55 -05:00
Steven Allen
b1df0aa8b1 fix(metrics): update go-flow-metrics and fix tests for upstream changes 2019-10-31 23:47:34 -07:00
Roman Proskuryakov
7dbbdcc417 Add API to reset bandwidth counters 2019-11-01 04:25:27 +03:00
Steven Allen
11af061e49 chore(dep): update protobuf 2019-10-28 13:07:54 -07:00
Steven Allen
a5bf2487c1
Merge pull request #66 from quorumcontrol/update/crypto-library
Update golang.org/x/crypto to latest version
2019-10-23 02:21:11 +09:00
Steven Allen
bf79471ef0 fix(key size): forbid small openssl RSA keys
Also, add a test.
2019-10-21 15:52:27 -07:00
Wes Morgan
69fe90d32d
Update golang.org/x/crypto to latest version
There was a breaking change in the previous version that has since been
reverted.
2019-10-17 11:20:42 -06:00
Steven Allen
ac53ea6aa0 chore(dep): update deps
* Update gogo protobuf to 1.3.0
* Update go-multiaddr to move protocol definitions _into_ go-multiaddr itself.
* update opencensus to 0.22.1
* update golang.org/x/crypto
* update sha256-simd to fix webasm build.
* update btcd (used by sekp keys)
2019-09-25 11:12:15 -07:00
Steven Allen
3b4a4b474f mod: require go 1.12 2019-09-24 10:31:44 -07:00