Compare commits

...

10 Commits

Author SHA1 Message Date
j75689
880667e77f fix: bug in determining breathe block 2023-12-12 12:23:56 +08:00
j75689
f599fee78c fix: add TokenHubContract bytecode 2023-12-12 01:50:49 +08:00
j75689
eb93010928 fix: add BerlinBlock and LondonBlock to rialto 2023-12-12 01:50:49 +08:00
j75689
d94cb56ae9 fix: upgrade config 2023-12-12 01:50:49 +08:00
j75689
0438b61114 fix: hardfork setting for rialto 2023-12-12 01:50:49 +08:00
j75689
c73b11055e fix: _hertz_upgrade_block_ 2023-12-12 01:50:49 +08:00
j75689
54f334a95f fix: HertzBlock setup 2023-12-12 01:50:48 +08:00
j75689
f2e38fec9a fix: add ShanghaiTime, KeplerTime 2023-12-12 01:50:48 +08:00
j75689
d1118313ce fix: add _rialto_upgrade_height_ 2023-12-12 01:50:48 +08:00
j75689
288b4f9926 test: bytecode template for rialto net 2023-12-12 01:50:48 +08:00
3 changed files with 33 additions and 25 deletions

View File

@@ -1178,7 +1178,7 @@ func (p *Parlia) Finalize(chain consensus.ChainHeaderReader, header *types.Heade
if p.chainConfig.IsFeynman(header.Number, header.Time) {
// TODO: revert this
// if time.Unix(int64(parent.Time), 0).Day() < time.Unix(int64(header.Time), 0).Day() {
if time.Unix(int64(header.Time), 0).Minute() > time.Unix(int64(parent.Time), 0).Minute() {
if time.Unix(int64(header.Time), 0).Minute() != time.Unix(int64(parent.Time), 0).Minute() {
if err := p.updateValidatorSetV2(state, header, cx, txs, receipts, systemTxs, usedGas, false); err != nil {
return err
}
@@ -1262,7 +1262,7 @@ func (p *Parlia) FinalizeAndAssemble(chain consensus.ChainHeaderReader, header *
if p.chainConfig.IsFeynman(header.Number, header.Time) {
// TODO: revert this
// if time.Unix(int64(parent.Time), 0).Day() < time.Unix(int64(header.Time), 0).Day() {
if time.Unix(int64(header.Time), 0).Minute() > time.Unix(int64(parent.Time), 0).Minute() {
if time.Unix(int64(header.Time), 0).Minute() != time.Unix(int64(parent.Time), 0).Minute() {
if err := p.updateValidatorSetV2(state, header, cx, &txs, &receipts, nil, &header.GasUsed, true); err != nil {
return nil, nil, err
}

File diff suppressed because one or more lines are too long

View File

@@ -218,7 +218,7 @@ var (
}
RialtoChainConfig = &ChainConfig{
ChainID: big.NewInt(1417),
ChainID: big.NewInt(714),
HomesteadBlock: big.NewInt(0),
EIP150Block: big.NewInt(0),
EIP155Block: big.NewInt(0),
@@ -228,23 +228,26 @@ var (
PetersburgBlock: big.NewInt(0),
IstanbulBlock: big.NewInt(0),
MuirGlacierBlock: big.NewInt(0),
RamanujanBlock: big.NewInt(400),
RamanujanBlock: big.NewInt(0),
NielsBlock: big.NewInt(0),
MirrorSyncBlock: big.NewInt(400),
BrunoBlock: big.NewInt(400),
EulerBlock: big.NewInt(400),
GibbsBlock: big.NewInt(400),
MirrorSyncBlock: big.NewInt(1),
BrunoBlock: big.NewInt(1),
EulerBlock: big.NewInt(2),
GibbsBlock: big.NewInt(3),
NanoBlock: nil,
MoranBlock: nil,
PlanckBlock: nil,
LubanBlock: nil,
PlatoBlock: nil,
BerlinBlock: nil,
HertzBlock: nil,
HertzfixBlock: nil,
MoranBlock: big.NewInt(4),
PlanckBlock: big.NewInt(5),
LubanBlock: big.NewInt(6),
PlatoBlock: big.NewInt(7),
BerlinBlock: _hertz_upgrade_block_,
LondonBlock: _hertz_upgrade_block_,
HertzBlock: _hertz_upgrade_block_,
HertzfixBlock: _hertz_upgrade_block_,
// TODO
FeynmanTime: nil,
ShanghaiTime: _rialto_upgrade_height_,
KeplerTime: _rialto_upgrade_height_,
FeynmanTime: _rialto_upgrade_height_,
Parlia: &ParliaConfig{
Period: 3,