Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Add miner lookup using DHT #2

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
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
14 changes: 14 additions & 0 deletions active_miners.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
select
distinct on (pac.miner_id) pac.height,
pac.miner_id,
m.peer_id
from
power_actor_claims pac
join
miner_infos m on m.miner_id = pac.miner_id
where
pac.height between current_height() - 40320 and current_height()
and m.peer_id != 'null'
order by
pac.miner_id,
pac.height desc
16 changes: 13 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,18 @@ go 1.16
require (
github.com/go-pg/pg/v10 v10.9.1
github.com/hsanjuan/go-ipfs-geoip v0.0.0-20210518135708-d277da3d94c3
github.com/hsanjuan/ipfs-lite v1.1.20-0.20210429175040-2574e7dda788
github.com/libp2p/go-libp2p-core v0.8.5
github.com/multiformats/go-multiaddr v0.3.1
github.com/hsanjuan/ipfs-lite v1.2.0
github.com/ipfs/go-datastore v0.5.1
github.com/ipfs/go-ipfs-blockstore v1.1.2 // indirect
github.com/ipfs/go-ipns v0.1.2
github.com/ipfs/go-log/v2 v2.5.0
github.com/libp2p/go-libp2p v0.17.0
github.com/libp2p/go-libp2p-core v0.13.0
github.com/libp2p/go-libp2p-kad-dht v0.15.0
github.com/libp2p/go-libp2p-noise v0.3.0
github.com/libp2p/go-libp2p-record v0.1.3
github.com/libp2p/go-libp2p-tls v0.3.1
github.com/multiformats/go-multiaddr v0.4.1
github.com/multiformats/go-multiaddr-dns v0.3.1

)
Loading