Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libp2p: fix for slow dht lookups using extra queue #2642

Merged
merged 18 commits into from
Dec 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
4c764b4
Merge pull request #1896 from fetchai/develop
DavidMinarsch Nov 6, 2020
ad0562d
Merge pull request #1911 from fetchai/develop
DavidMinarsch Nov 9, 2020
0ec1b5f
Merge pull request #1933 from fetchai/develop
DavidMinarsch Nov 12, 2020
e888b4c
Merge pull request #1963 from fetchai/develop
DavidMinarsch Nov 18, 2020
fb4b6db
Merge pull request #1996 from fetchai/develop
DavidMinarsch Nov 25, 2020
b422208
Merge pull request #2063 from fetchai/develop
DavidMinarsch Dec 17, 2020
e520f2f
Merge pull request #2117 from fetchai/develop
DavidMinarsch Jan 6, 2021
ef78677
Merge pull request #2157 from fetchai/develop
DavidMinarsch Jan 14, 2021
e8ba780
Merge pull request #2188 from fetchai/develop
DavidMinarsch Jan 22, 2021
6792082
Merge pull request #2246 from fetchai/develop
DavidMinarsch Feb 11, 2021
4fcf900
Merge pull request #2281 from fetchai/develop
DavidMinarsch Feb 21, 2021
c4b2721
libp2p: fix for slow dht lookups using extra queue
solarw Oct 2, 2021
5d6fe9a
slow queue channel fix on dhtpeer closing
solarw Oct 6, 2021
2ce143f
Merge branch 'develop' of github.com:fetchai/agents-aea into fix/libp…
solarw Oct 11, 2021
11c287f
Merge branch 'develop' of github.com:fetchai/agents-aea into fix/libp…
solarw Oct 12, 2021
0659523
Merge branch 'develop' of github.com:fetchai/agents-aea into fix/libp…
solarw Oct 18, 2021
d4bdacb
Merge branch 'master' of github.com:fetchai/agents-aea into fix/libp2…
solarw Dec 10, 2021
cf55072
Merge branch 'develop' of github.com:fetchai/agents-aea into fix/libp…
solarw Dec 10, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libs/go/libp2p_node/dht/dhtclient/dhtclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (
"github.com/rs/zerolog"
"google.golang.org/protobuf/proto"

"github.com/libp2p/go-libp2p"
libp2p "github.com/libp2p/go-libp2p"
"github.com/libp2p/go-libp2p-core/crypto"
"github.com/libp2p/go-libp2p-core/host"
"github.com/libp2p/go-libp2p-core/network"
Expand Down
6 changes: 5 additions & 1 deletion libs/go/libp2p_node/dht/dhtpeer/benchmarks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ package dhtpeer

import (
"bufio"
"context"
"flag"
"net"
"os"
"testing"
"time"

"libp2p_node/acn"
"libp2p_node/aea"
Expand Down Expand Up @@ -330,10 +332,12 @@ func benchmarkAgentLookup(npeers uint16, b *testing.B) {
}
defer peerCleanup()
ensureAddressAnnounced(peer)
ctx, cancel_lookup := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel_lookup()

for i := 0; i < b.N; i++ {
b.ResetTimer()
_, _, err = peer.lookupAddressDHT(addrs[len(peers)-1-i%len(peers)])
_, _, err = peer.lookupAddressDHT(ctx, addrs[len(peers)-1-i%len(peers)])
if err != nil {
b.Fail()
}
Expand Down
Loading