Skip to content

Commit

Permalink
feat: add first class Dria support
Browse files Browse the repository at this point in the history
  • Loading branch information
dennis-tra committed Jan 29, 2025
1 parent 9a4fdbc commit 5c62f24
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ A network agnostic DHT crawler and monitor. The crawler connects to [DHT](https:
- [Avail](https://www.availproject.org/) - [_Mainnet_](https://docs.availproject.org/docs/networks#mainnet) | [_Turing_](https://docs.availproject.org/docs/networks#turing-testnet) | _<small>Light Client + Full Node versions</small>_
- [Celestia](https://celestia.org/) - [_Mainnet_](https://blog.celestia.org/celestia-mainnet-is-live/) | [_Mocha_](https://docs.celestia.org/nodes/mocha-testnet) | [_Arabica_](https://github.com/celestiaorg/celestia-node/blob/9c0a5fb0626ada6e6cdb8bcd816d01a3aa5043ad/nodebuilder/p2p/bootstrap.go#L40)
- [Pactus](https://pactus.org)
- [Dria](https://dria.co/)

The crawler was:

Expand Down
9 changes: 9 additions & 0 deletions config/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -359,4 +359,13 @@ var (
"enr:-IS4QGG6moBhLW1oXz84NaKEHaRcim64qzFn1hAG80yQyVGNLoKqzJe887kEjthr7rJCNlt6vdVMKMNoUC9OCeNK-EMDgmlkgnY0gmlwhKRc9-KJc2VjcDI1NmsxoQLJhXByb3LmxHQaqgLDtIGUmpANXaBbFw3ybZWzGqb9-IN1ZHCCE4k",
"enr:-IS4QA5hpJikeDFf1DD1_Le6_ylgrLGpdwn3SRaneGu9hY2HUI7peHep0f28UUMzbC0PvlWjN8zSfnqMG07WVcCyBhADgmlkgnY0gmlwhKRc9-KJc2VjcDI1NmsxoQJMpHmGj1xSP1O-Mffk_jYIHVcg6tY5_CjmWVg1gJEsPIN1ZHCCE4o",
}

// BootstrapPeersDria extracted from:
// https://github.com/firstbatchxyz/dkn-compute-node/blob/b4f21e19197df48d4224c466109df3ff7c85ff50/p2p/src/network.rs#L47
BootstrapPeersDria = []string{
"/ip4/44.206.245.139/tcp/4001/p2p/16Uiu2HAm4q3LZU2T9kgjKK4ysy6KZYKLq8KiXQyae4RHdF7uqSt4",
"/ip4/18.234.39.91/tcp/4001/p2p/16Uiu2HAmJqegPzwuGKWzmb5m3RdSUJ7NhEGWB5jNCd3ca9zdQ9dU",
"/ip4/54.242.44.217/tcp/4001/p2p/16Uiu2HAmR2sAoh9F8jT9AZup9y79Mi6NEFVUbwRvahqtWamfabkz",
"/ip4/52.201.242.227/tcp/4001/p2p/16Uiu2HAmFEUCy1s1gjyHfc8jey4Wd9i5bSDnyFDbWTnbrF2J3KFb",
}
)
5 changes: 5 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const (
NetworkAvailTuringLC Network = "AVAIL_TURING_LC"
NetworkAvailTuringFN Network = "AVAIL_TURING_FN"
NetworkPactus Network = "PACTUS"
NetworkDria Network = "DRIA"
)

func Networks() []Network {
Expand All @@ -64,6 +65,7 @@ func Networks() []Network {
NetworkAvailTuringLC,
NetworkAvailTuringFN,
NetworkPactus,
NetworkDria,
}
}

Expand Down Expand Up @@ -429,6 +431,9 @@ func ConfigureNetwork(network string) (*cli.StringSlice, *cli.StringSlice, error
case NetworkAvailTuringFN:
bootstrapPeers = cli.NewStringSlice(BootstrapPeersAvailTuringFullNode...)
protocols = cli.NewStringSlice("/Avail/kad")
case NetworkDria:
bootstrapPeers = cli.NewStringSlice(BootstrapPeersDria...)
protocols = cli.NewStringSlice("/dria/kad/0.2")
case NetworkIPFS, NetworkAmino:
bps := []string{}
for _, maddr := range kaddht.DefaultBootstrapPeers {
Expand Down

0 comments on commit 5c62f24

Please sign in to comment.