Skip to content

Commit

Permalink
Merge pull request #88 from SiaFoundation/anagami-reset
Browse files Browse the repository at this point in the history
Reset anagami network
  • Loading branch information
n8maninger authored Aug 21, 2024
2 parents 6bd5795 + f495292 commit e59f706
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 71 deletions.
77 changes: 26 additions & 51 deletions chain/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,57 +106,6 @@ func Mainnet() (*consensus.Network, types.Block) {
return n, b
}

// TestnetAnagami returns the chain parameters and genesis block for the "Anagami"
// testnet chain.
func TestnetAnagami() (*consensus.Network, types.Block) {
n := &consensus.Network{
Name: "anagami",

InitialCoinbase: types.Siacoins(300000),
MinimumCoinbase: types.Siacoins(300000),
InitialTarget: types.BlockID{3: 1},
}

n.HardforkDevAddr.Height = 1
n.HardforkDevAddr.OldAddress = types.Address{}
n.HardforkDevAddr.NewAddress = types.Address{}

n.HardforkTax.Height = 2

n.HardforkStorageProof.Height = 3

n.HardforkOak.Height = 5
n.HardforkOak.FixHeight = 8
n.HardforkOak.GenesisTimestamp = time.Unix(1702300000, 0) // Dec 11, 2023 @ 13:06 GMT

n.HardforkASIC.Height = 13
n.HardforkASIC.OakTime = 10 * time.Minute
n.HardforkASIC.OakTarget = n.InitialTarget

n.HardforkFoundation.Height = 21
n.HardforkFoundation.PrimaryAddress, _ = types.ParseAddress("addr:5949fdf56a7c18ba27f6526f22fd560526ce02a1bd4fa3104938ab744b69cf63b6b734b8341f")
n.HardforkFoundation.FailsafeAddress = n.HardforkFoundation.PrimaryAddress

n.HardforkV2.AllowHeight = 2016 // ~2 weeks in
n.HardforkV2.RequireHeight = 2016 + 288 // ~2 days later

b := types.Block{
Timestamp: n.HardforkOak.GenesisTimestamp,
Transactions: []types.Transaction{{
SiacoinOutputs: []types.SiacoinOutput{{
Address: n.HardforkFoundation.PrimaryAddress,
Value: types.Siacoins(1).Mul64(1e12),
}},
SiafundOutputs: []types.SiafundOutput{{
Address: n.HardforkFoundation.PrimaryAddress,
Value: 10000,
}},
}},
}

return n, b
}

// TestnetZen returns the chain parameters and genesis block for the "Zen"
// testnet chain.
func TestnetZen() (*consensus.Network, types.Block) {
Expand Down Expand Up @@ -207,3 +156,29 @@ func TestnetZen() (*consensus.Network, types.Block) {

return n, b
}

// TestnetAnagami returns the chain parameters and genesis block for the "Anagami"
// testnet chain.
func TestnetAnagami() (*consensus.Network, types.Block) {
// use a modified version of Zen
n, genesis := TestnetZen()

n.Name = "anagami"
n.HardforkOak.GenesisTimestamp = time.Date(2024, time.August, 22, 0, 0, 0, 0, time.UTC)
n.HardforkV2.AllowHeight = 2016 // ~2 weeks in
n.HardforkV2.RequireHeight = 2016 + 288 // ~2 days later

n.HardforkFoundation.PrimaryAddress = parseAddr("addr:241352c83da002e61f57e96b14f3a5f8b5de22156ce83b753ea495e64f1affebae88736b2347")
n.HardforkFoundation.FailsafeAddress = types.VoidAddress

// move the genesis airdrops for easier testing
genesis.Transactions[0].SiacoinOutputs = []types.SiacoinOutput{{
Address: parseAddr("addr:241352c83da002e61f57e96b14f3a5f8b5de22156ce83b753ea495e64f1affebae88736b2347"),
Value: types.Siacoins(1).Mul64(1e12),
}}
genesis.Transactions[0].SiafundOutputs = []types.SiafundOutput{{
Address: parseAddr("addr:241352c83da002e61f57e96b14f3a5f8b5de22156ce83b753ea495e64f1affebae88736b2347"),
Value: 10000,
}}
return n, genesis
}
27 changes: 7 additions & 20 deletions syncer/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,16 @@ package syncer
var (
// AnagamiBootstrapPeers is a list of peers for the Anagami network.
AnagamiBootstrapPeers = []string{
"147.135.16.182:9781",
"98.180.237.163:9981",
"98.180.237.163:11981",
"98.180.237.163:10981",
"94.130.139.59:9801",
"84.86.11.238:9801",
"69.131.14.86:9981",
"68.108.89.92:9981",
"62.30.63.93:9981",
"46.173.150.154:9111",
"195.252.198.117:9981",
"174.174.206.214:9981",
"172.58.232.54:9981",
"172.58.229.31:9981",
"172.56.200.90:9981",
"172.56.162.155:9981",
"163.172.13.180:9981",
"154.47.25.194:9981",
"138.201.19.49:9981",
"100.34.20.44:9981",
"15.204.160.10:9781",
"141.95.66.81:9781",
"51.81.242.140:9781",
"15.204.101.216:9781",
"40.160.12.62:9781",
}

// MainnetBootstrapPeers is a list of peers for the Mainnet network.
MainnetBootstrapPeers = []string{
"40.160.12.62:9881",
"108.227.62.195:9981",
"139.162.81.190:9991",
"144.217.7.188:9981",
Expand Down Expand Up @@ -60,6 +46,7 @@ var (

// ZenBootstrapPeers is a list of peers for the Zen network.
ZenBootstrapPeers = []string{
"40.160.12.62:9881",
"141.94.161.198:9881",
"15.204.141.235:9881",
"51.79.16.87:9881",
Expand Down

0 comments on commit e59f706

Please sign in to comment.