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

[skip changelog] chore: drand: cleanup legacy and unused configs #12272

Merged
merged 3 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
39 changes: 9 additions & 30 deletions build/buildconstants/drand.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ type DrandEnum int
const (
DrandMainnet DrandEnum = iota + 1
DrandTestnet
DrandDevnet
DrandLocalnet
_ // kept to retain iota numbering, used to be Devnet
_ // kept to retain iota numbering, used to be Localnet
DrandIncentinet
DrandQuicknet
)
Expand All @@ -30,22 +30,6 @@ type DrandPoint struct {
}

var DrandConfigs = map[DrandEnum]DrandConfig{
DrandMainnet: {
Servers: []string{
"https://api.drand.sh",
"https://api2.drand.sh",
"https://api3.drand.sh",
"https://drand.cloudflare.com",
"https://api.drand.secureweb3.com:6875", // Storswift
},
Relays: []string{
"/dnsaddr/api.drand.sh/",
"/dnsaddr/api2.drand.sh/",
"/dnsaddr/api3.drand.sh/",
},
IsChained: true,
ChainInfoJSON: `{"public_key":"868f005eb8e6e4ca0a47c8a77ceaa5309a47978a7c71bc5cce96366b5d7a569937c529eeda66c7293784a9402801af31","period":30,"genesis_time":1595431050,"hash":"8990e7a9aaed2ffed73dbd7092123d6f289930540d7651336225dc172e51b2ce","groupHash":"176f93498eac9ca337150b46d21dd58673ea4e3581185f869672e59fa4cb390a"}`,
},
DrandQuicknet: {
Servers: []string{
"https://api.drand.sh",
Expand Down Expand Up @@ -74,22 +58,17 @@ var DrandConfigs = map[DrandEnum]DrandConfig{
IsChained: true,
ChainInfoJSON: `{"public_key":"922a2e93828ff83345bae533f5172669a26c02dc76d6bf59c80892e12ab1455c229211886f35bb56af6d5bea981024df","period":25,"genesis_time":1590445175,"hash":"84b2234fb34e835dccd048255d7ad3194b81af7d978c3bf157e3469592ae4e02","groupHash":"4dd408e5fdff9323c76a9b6f087ba8fdc5a6da907bd9217d9d10f2287d081957"}`,
},
DrandDevnet: {
Servers: []string{
"https://dev1.drand.sh",
"https://dev2.drand.sh",
},
Relays: []string{
"/dnsaddr/dev1.drand.sh/",
"/dnsaddr/dev2.drand.sh/",
},
IsChained: true,
ChainInfoJSON: `{"public_key":"8cda589f88914aa728fd183f383980b35789ce81b274e5daee1f338b77d02566ef4d3fb0098af1f844f10f9c803c1827","period":25,"genesis_time":1595348225,"hash":"e73b7dc3c4f6a236378220c0dd6aa110eb16eed26c11259606e07ee122838d4f","groupHash":"567d4785122a5a3e75a9bc9911d7ea807dd85ff76b78dc4ff06b075712898607"}`,
},

// legacy randomness sources, their ChainInfo must remain here forever
// to allow validating randomness from past epochs
DrandIncentinet: {
IsChained: true,
ChainInfoJSON: `{"public_key":"8cad0c72c606ab27d36ee06de1d5b2db1faf92e447025ca37575ab3a8aac2eaae83192f846fc9e158bc738423753d000","period":30,"genesis_time":1595873820,"hash":"80c8b872c714f4c00fdd3daa465d5514049f457f01f85a4caf68cdcd394ba039","groupHash":"d9406aaed487f7af71851b4399448e311f2328923d454e971536c05398ce2d9b"}`,
},
DrandMainnet: {
IsChained: true,
ChainInfoJSON: `{"public_key":"868f005eb8e6e4ca0a47c8a77ceaa5309a47978a7c71bc5cce96366b5d7a569937c529eeda66c7293784a9402801af31","period":30,"genesis_time":1595431050,"hash":"8990e7a9aaed2ffed73dbd7092123d6f289930540d7651336225dc172e51b2ce","groupHash":"176f93498eac9ca337150b46d21dd58673ea4e3581185f869672e59fa4cb390a"}`,
},
}

func DrandConfigSchedule() []DrandPoint {
Expand Down
2 changes: 0 additions & 2 deletions build/drand.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import (

var DrandMainnet = buildconstants.DrandMainnet // Deprecated: Use buildconstants.DrandMainnet instead
var DrandTestnet = buildconstants.DrandTestnet // Deprecated: Use buildconstants.DrandTestnet instead
var DrandDevnet = buildconstants.DrandDevnet // Deprecated: Use buildconstants.DrandDevnet instead
var DrandLocalnet = buildconstants.DrandLocalnet // Deprecated: Use buildconstants.DrandLocalnet instead
var DrandIncentinet = buildconstants.DrandIncentinet // Deprecated: Use buildconstants.DrandIncentinet instead
var DrandQuicknet = buildconstants.DrandQuicknet // Deprecated: Use buildconstants.DrandQuicknet instead

Expand Down