Commit Graph

41 Commits

Author SHA1 Message Date
Marten Seemann cec8c6584b remove all circuit v1 related code (#2107)
* autorelay: remove support for circuit v1 nodes

* circuitv2: remove v1 backwards compatibility

* remove circuitv1 implementation only used for testing

* remove circuitv1 protocol implementation
2023-02-16 21:39:36 -08:00
Sukun 0a40e7c0af use atomic.Int32 and atomic.Int64 (#2096) 2023-02-14 12:52:55 -08:00
Sukun ee07b39ad9 use atomic.Bool instead of int32 operations (#2089) 2023-02-13 15:08:28 -08:00
web3-bot 3a66ff89a1 sync: update CI config files (#2073)
* bump go.mod to Go 1.19 and run go fix

* stop using the deprecated io/ioutil package

* bump go.mod to Go 1.19 and run go fix

* bump go.mod to Go 1.19 and run go fix

* bump go.mod to Go 1.19 and run go fix

* stop using the deprecated io/ioutil package

* bump go.mod to Go 1.19 and run go fix

* stop using the deprecated io/ioutil package

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

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

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

* various fixes

* stop using deprecated math/rand.Read

---------

Co-authored-by: web3-bot <web3-bot@users.noreply.github.com>
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2023-02-12 01:18:10 -08:00
Marco Munizaga 753e48e5ce rcmgr: *: Always close connscope (#2037)
* rcmgr: Fix connection accounting

* Always close conn scope in the case of errors

* circuitv2: fix resource accounting when connection upgrading fails

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2023-02-01 09:59:30 -08:00
Sukun 6b9c11680e consistently use protocol.ID instead of strings (#2004)
* Change PeerStore interface to use protocol.ID

This reduces the string to protocol.ID translations happening
at various places in the code

* Fix misc cases of protocol.ID conversion

* Merge multistream changes

* Use protocol.ID in network.ConnectionState

* don't update examples

* fix error message tests

* merge new go-multistream changes

* update test-plans go mod

* change transport back to string
2023-01-27 01:39:59 -08:00
Marten Seemann f1109c59c1 use Google's Protobuf library instead of GoGo 2023-01-12 16:43:50 +13:00
Marten Seemann 4ad3734091 circuitv2: correctly set the transport in the ConnectionState (#1972) 2023-01-06 21:48:12 -08:00
Marten Seemann 75a0d4288b circuitv2: disable the resource manager in tests (#1899) 2022-11-21 13:54:14 -08:00
Marten Seemann 30e59560d3 upgrader: simplify the constructor 2022-11-10 10:07:17 +00:00
Håvard Anda Estensen 21dc42bd72 chore: preallocate slices (#1842)
* Preallocate slices

* Move slice allocs to right before they're used

* Revert slice assignments to append

* Don't preallocate for tests or deprecated code

* Don't preallocate too much
2022-11-06 04:48:40 -08:00
Marten Seemann c0a0aa010e rcmgr: make it possible to embed the NullResourceManager 2022-10-24 13:24:04 +01:00
Marco Munizaga b54a26ba35 Don't use rcmgr in this test (#1799) 2022-10-06 12:53:30 -07:00
Marten Seemann 4623690009 switch from github.com/libp2p/go-libp2p-core to core 2022-08-17 17:13:02 +03:00
web3-bot eff72c4afa sync: update CI config files (#1678)
* bump go.mod to Go 1.18 and run go fix

* bump go.mod to Go 1.18 and run go fix

* bump go.mod to Go 1.18 and run go fix

* bump go.mod to Go 1.18 and run go fix

* run gofmt -s

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

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

* stop using the deprecated io/ioutil package

Co-authored-by: web3-bot <web3-bot@users.noreply.github.com>
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2022-08-17 01:05:51 -07:00
Marten Seemann ab634d2ba1 switch from github.com/libp2p/go-libp2p-peerstore to p2p/host/peerstore 2022-08-15 12:29:16 +03:00
Marco Munizaga 3eb35223a7 Pass endpoint information to resource manager's OpenConnection (#1633)
* Move mux testsuite to here

* Update OpenConnection call sites to pass in endpoint information

* Go mod update

* Use proper versions for deps
2022-07-01 15:43:42 -07:00
Marten Seemann 786a4d2649 switch from github.com/libp2p/go-libp2p-circuit to p2p/protocol/internal/circuitv1-deprecated 2022-07-01 17:45:15 +02:00
Marten Seemann dfc3a3f24a switch from github.com/libp2p/go-tcp-transport to p2p/transport/tcp 2022-04-22 14:48:25 +01:00
Marten Seemann 3effab121a switch from github.com/libp2p/go-libp2p-swarm to p2p/net/swarm 2022-04-21 13:35:04 +01:00
Marten Seemann fc2c34e045 switch from github.com/libp2p/go-libp2p-blankhost to p2p/host/blank 2022-04-19 14:41:06 +01:00
vyzo df2301ba95 use the resource manager in libp2p bundled services, initialize default one 2022-01-18 12:27:07 +04:00
Marten Seemann 4268804809 make go-libp2p build when using the resource manager dependencies 2022-01-18 12:25:31 +04:00
Marten Seemann 0f0cc4e4a0 use the transport.Upgrader interface 2022-01-04 13:20:59 +04:00
Marten Seemann fcf0d4267b require the expiration field of the circuit v2 Reservation protobuf 2021-12-18 20:15:36 +04:00
Marten Seemann 56bcd81a3f use the new network.ConnStats 2021-12-13 17:26:07 +04:00
Gus Eggert 7a35d0df97 feat: plumb through peerstore context changes (#1237) 2021-11-12 13:43:02 -05:00
Marten Seemann d01b892679 update go-libp2p-swarm to v0.7.0 2021-10-19 10:39:32 +02:00
Marten Seemann a157b1bd91 move isRelayAddr helper function 2021-10-12 15:09:30 +02:00
Marten Seemann 2828a61f9c move circuitv2 tests to the relay package 2021-10-12 15:09:29 +02:00
Marten Seemann 7ecefa8cba reject circuitv2 reservations with nonsensical expiration times 2021-09-24 14:43:22 +01:00
vyzo 9674b5cda5 make hop tags and values private 2021-09-21 13:38:50 +03:00
vyzo 0d8a1852cf make tag value fixed, tagged in first circuit, untagged in last. 2021-09-21 13:37:41 +03:00
vyzo 369df59523 fix tag increment 2021-09-21 13:37:41 +03:00
vyzo 3df061d90e tag relay hops in relay implementations 2021-09-21 13:37:40 +03:00
vyzo d1e26810a0 Add standalone implementation of v1 Relay (#1186)
* add circuitv1 protobuf

* add implementation of v1 circuit relay

Intended to be used by standalone daemons and tests

* remove references to go-libp2p-circuit from production code

* update tests to use the in-tree v1 Relay

* use go-log/v2 in relay v1 impl

* use in-tree v1 relay in relay example

* remove go-libp2p-circuit dep from examples go.mod, go mod tidy
2021-09-20 00:29:42 -07:00
Marten Seemann 29da01af70 update go-libp2p-core to v0.10.0 2021-09-17 18:50:15 +02:00
Marten Seemann a5f982ff01 Merge pull request #1185 from libp2p/circuit-shutdown
don't use a context to shut down the circuitv2
2021-09-17 18:23:41 +02:00
Marten Seemann 729386c495 don't use a context to shut down the circuitv2 2021-09-17 11:37:28 +02:00
Steven Allen 2c69c99b23 fix: remove v1 go-log dep 2021-09-15 20:01:07 +02:00
vyzo 79d995404c Use circuitv2 code (#1183)
* move circuitv2 to p2p/protocol

* update circuitv2 imports

* RIP circuit v2; use circuitv2

* fix autorelay test

* fix holepunch test

* fix relay example
2021-09-10 02:43:58 -07:00