mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-29 08:03:48 +00:00
* feat(beacon): introduce soft blocks * feat: update api.go * chore(ci): update CI * feat: update L1Origin * feat: update `verifyHeader` * test: update tests * feat: update consensus * feat: update consensus * feat: update genesis * feat: remove timestamp check in prepareWork * feat: merge changes in #281 * Update eth/catalyst/api.go Co-authored-by: maskpp <maskpp266@gmail.com> * Update internal/ethapi/taiko_preconf.go Co-authored-by: maskpp <maskpp266@gmail.com> * fix consensus test * revert commit f1df58 * fix consensus test (#349) * Update eth/catalyst/api.go Co-authored-by: maskpp <maskpp266@gmail.com> * feat: add back timestamp check in worker * add genesis * temp fix for old l1origin * nil value * feat: rename to `L1OriginLegacy` * feat: change `common.Big0` as the default value for legacy l1Origin, to make `IsSoftblock` return `false` * feat(beacon): change the reorg log level (#350) * use debug log level to avoid logging too many logs when frequently soft block reorg. * use debug log level to avoid logging too many logs when frequently soft block reorg. * feat: check --taiko flag --------- Co-authored-by: David <david@taiko.xyz> * add rlp optional flag (#353) * fix lint * fix test case * feat(l1Origin): remove the reverted l1Origins (#355) * remove the reverted l1Origins * feat: add more comments --------- Co-authored-by: David <david@taiko.xyz> * only forward txs * chore: update ci --------- Co-authored-by: maskpp <maskpp266@gmail.com> Co-authored-by: Jeffery Walsh <cyberhorsey@gmail.com>
69 lines
2.4 KiB
Go
69 lines
2.4 KiB
Go
package params
|
|
|
|
import (
|
|
"math/big"
|
|
|
|
"github.com/ethereum/go-ethereum/common"
|
|
)
|
|
|
|
func u64(val uint64) *uint64 { return &val }
|
|
|
|
// Network IDs
|
|
var (
|
|
TaikoMainnetNetworkID = big.NewInt(167000)
|
|
TaikoInternalL2ANetworkID = big.NewInt(167001)
|
|
TaikoInternalL2BNetworkID = big.NewInt(167002)
|
|
SnaefellsjokullNetworkID = big.NewInt(167003)
|
|
AskjaNetworkID = big.NewInt(167004)
|
|
GrimsvotnNetworkID = big.NewInt(167005)
|
|
EldfellNetworkID = big.NewInt(167006)
|
|
JolnirNetworkID = big.NewInt(167007)
|
|
KatlaNetworkID = big.NewInt(167008)
|
|
HeklaNetworkID = big.NewInt(167009)
|
|
PreconfDevnetNetworkID = big.NewInt(167010)
|
|
)
|
|
|
|
var networkIDToChainConfig = map[*big.Int]*ChainConfig{
|
|
TaikoMainnetNetworkID: TaikoChainConfig,
|
|
TaikoInternalL2ANetworkID: TaikoChainConfig,
|
|
TaikoInternalL2BNetworkID: TaikoChainConfig,
|
|
SnaefellsjokullNetworkID: TaikoChainConfig,
|
|
AskjaNetworkID: TaikoChainConfig,
|
|
GrimsvotnNetworkID: TaikoChainConfig,
|
|
EldfellNetworkID: TaikoChainConfig,
|
|
JolnirNetworkID: TaikoChainConfig,
|
|
KatlaNetworkID: TaikoChainConfig,
|
|
HeklaNetworkID: TaikoChainConfig,
|
|
PreconfDevnetNetworkID: TaikoChainConfig,
|
|
MainnetChainConfig.ChainID: MainnetChainConfig,
|
|
SepoliaChainConfig.ChainID: SepoliaChainConfig,
|
|
TestChainConfig.ChainID: TestChainConfig,
|
|
NonActivatedConfig.ChainID: NonActivatedConfig,
|
|
}
|
|
|
|
func NetworkIDToChainConfigOrDefault(networkID *big.Int) *ChainConfig {
|
|
if config, ok := networkIDToChainConfig[networkID]; ok {
|
|
return config
|
|
}
|
|
|
|
return AllEthashProtocolChanges
|
|
}
|
|
|
|
var TaikoChainConfig = &ChainConfig{
|
|
ChainID: TaikoInternalL2ANetworkID, // Use Internal Devnet network ID by default.
|
|
HomesteadBlock: common.Big0,
|
|
EIP150Block: common.Big0,
|
|
EIP155Block: common.Big0,
|
|
EIP158Block: common.Big0,
|
|
ByzantiumBlock: common.Big0,
|
|
ConstantinopleBlock: common.Big0,
|
|
PetersburgBlock: common.Big0,
|
|
IstanbulBlock: common.Big0,
|
|
BerlinBlock: common.Big0,
|
|
LondonBlock: common.Big0,
|
|
ShanghaiTime: u64(0),
|
|
MergeNetsplitBlock: nil,
|
|
TerminalTotalDifficulty: common.Big0,
|
|
TerminalTotalDifficultyPassed: true,
|
|
Taiko: true,
|
|
}
|