Skip to content

Commit c8d8996

Browse files
committed
config: update tip11 height
1 parent 216afa9 commit c8d8996

2 files changed

Lines changed: 12 additions & 7 deletions

File tree

core/genesis.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,15 +257,15 @@ func (g *Genesis) ToFastBlock(db etruedb.Database) *types.Block {
257257
statedb.SetState(addr, key, value)
258258
}
259259
}
260-
consensus.OnceInitImpawnState(g.Config,statedb,new(big.Int).SetUint64(g.Number))
260+
consensus.OnceInitImpawnState(g.Config, statedb, new(big.Int).SetUint64(g.Number))
261261
if consensus.IsTIP8(new(big.Int).SetUint64(g.Number), g.Config, nil) {
262262
impl := vm.NewImpawnImpl()
263263
hh := g.Number
264264
if hh != 0 {
265265
hh = hh - 1
266266
}
267267
for _, member := range g.Committee {
268-
err := impl.InsertSAccount2(hh,g.Config.TIP10.FastNumber.Uint64(), member.Coinbase, member.Publickey, big.NewInt(1000000000000000000), big.NewInt(100), true)
268+
err := impl.InsertSAccount2(hh, g.Config.TIP10.FastNumber.Uint64(), member.Coinbase, member.Publickey, params.ElectionMinLimitForStaking, big.NewInt(100), true)
269269
if err != nil {
270270
log.Error("ToFastBlock InsertSAccount", "error", err)
271271
}
@@ -275,7 +275,7 @@ func (g *Genesis) ToFastBlock(db etruedb.Database) *types.Block {
275275
if err != nil {
276276
log.Error("ToFastBlock DoElections", "error", err)
277277
}
278-
err = impl.Shift(1,g.Config.TIP10.FastNumber.Uint64())
278+
err = impl.Shift(1, g.Config.TIP10.FastNumber.Uint64())
279279
if err != nil {
280280
log.Error("ToFastBlock Shift", "error", err)
281281
}
@@ -583,7 +583,7 @@ func DefaultSingleNodeGenesisBlock() *Genesis {
583583
common.HexToAddress("0x3c2e0a65a023465090aaedaa6ed2975aec9ef7f9"): {Balance: i},
584584
common.HexToAddress("0x7c357530174275dd30e46319b89f71186256e4f7"): {Balance: i},
585585
common.HexToAddress("0xeeb69c67751e9f4917b605840fa9a28be4517871"): {Balance: i},
586-
common.HexToAddress("0x9810a954bb88fdc251374d666ed7e06748ea672d"): {Balance: i},
586+
common.HexToAddress("0x76ea2f3a002431fede1141b660dbb75c26ba6d97"): {Balance: i},
587587
},
588588
Committee: []*types.CommitteeMember{
589589
{Coinbase: common.HexToAddress("0x76ea2f3a002431fede1141b660dbb75c26ba6d97"), Publickey: key1},

params/config.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ var (
6262
TIP8: &BlockConfig{FastNumber: big.NewInt(0), CID: big.NewInt(293)},
6363
TIP9: &BlockConfig{SnailNumber: big.NewInt(47000)},
6464
TIP10: &BlockConfig{FastNumber: big.NewInt(6520000), CID: big.NewInt(302)},
65-
TIP11: &BlockConfig{FastNumber: big.NewInt(9878855), CID: big.NewInt(400)},
65+
TIP11: &BlockConfig{FastNumber: big.NewInt(8996000)},
6666
}
6767

6868
// MainnetTrustedCheckpoint contains the light client trusted checkpoint for the main network.
@@ -100,6 +100,7 @@ var (
100100
TIP8: &BlockConfig{FastNumber: big.NewInt(0), CID: big.NewInt(215)},
101101
TIP9: &BlockConfig{SnailNumber: big.NewInt(38648)},
102102
TIP10: &BlockConfig{FastNumber: big.NewInt(5034600), CID: big.NewInt(229)},
103+
TIP11: &BlockConfig{FastNumber: big.NewInt(7552000)},
103104
}
104105

105106
// TestnetTrustedCheckpoint contains the light client trusted checkpoint for the Ropsten test network.
@@ -137,6 +138,7 @@ var (
137138
TIP8: &BlockConfig{FastNumber: big.NewInt(0), CID: big.NewInt(0)},
138139
TIP9: &BlockConfig{SnailNumber: big.NewInt(20)},
139140
TIP10: &BlockConfig{FastNumber: big.NewInt(40000), CID: big.NewInt(117)},
141+
TIP11: &BlockConfig{FastNumber: big.NewInt(0)},
140142
}
141143

142144
SingleNodeChainConfig = &ChainConfig{
@@ -152,6 +154,7 @@ var (
152154
TIP8: &BlockConfig{FastNumber: big.NewInt(100), CID: big.NewInt(-1)},
153155
TIP9: &BlockConfig{SnailNumber: big.NewInt(20)},
154156
TIP10: &BlockConfig{FastNumber: big.NewInt(0), CID: big.NewInt(1)},
157+
TIP11: &BlockConfig{FastNumber: big.NewInt(0)},
155158
}
156159

157160
// TestnetTrustedCheckpoint contains the light client trusted checkpoint for the Ropsten test network.
@@ -169,13 +172,15 @@ var (
169172
// This configuration is intentionally not using keyed fields to force anyone
170173
// adding flags to the config to also have to set these fields.
171174
AllMinervaProtocolChanges = &ChainConfig{ChainID: chainId, Minerva: new(MinervaConfig), TIP3: &BlockConfig{FastNumber: big.NewInt(0)},
172-
TIP5: nil, TIP7: nil, TIP8: nil, TIP9: nil, TIP10: nil}
175+
TIP5: nil, TIP7: nil, TIP8: nil, TIP9: nil, TIP10: nil, TIP11: &BlockConfig{FastNumber: big.NewInt(0)},
176+
}
173177

174178
// This configuration is intentionally not using keyed fields to force anyone
175179
// adding flags to the config to also have to set these fields.
176180

177181
TestChainConfig = &ChainConfig{ChainID: chainId, Minerva: &MinervaConfig{MinimumDifficulty, MinimumFruitDifficulty, DurationLimit}, TIP3: &BlockConfig{FastNumber: big.NewInt(0)},
178-
TIP5: nil, TIP7: nil, TIP8: nil, TIP9: nil, TIP10: nil}
182+
TIP5: nil, TIP7: nil, TIP8: nil, TIP9: nil, TIP10: nil, TIP11: &BlockConfig{FastNumber: big.NewInt(0)},
183+
}
179184
)
180185

181186
// TrustedCheckpoint represents a set of post-processed trie roots (CHT and

0 commit comments

Comments
 (0)