feat: add new configuration (#526)

* add new configuration

* update

* update

* bump version

* remove todo
This commit is contained in:
Péter Garamvölgyi 2023-10-08 13:29:09 +02:00 committed by GitHub
parent 68697b0fee
commit b3d0f164ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 118 additions and 6 deletions

View file

@ -72,6 +72,7 @@ It expects the genesis file as argument.`,
utils.GoerliFlag, utils.GoerliFlag,
utils.ScrollAlphaFlag, utils.ScrollAlphaFlag,
utils.ScrollSepoliaFlag, utils.ScrollSepoliaFlag,
utils.ScrollFlag,
}, },
Category: "BLOCKCHAIN COMMANDS", Category: "BLOCKCHAIN COMMANDS",
Description: ` Description: `

View file

@ -141,6 +141,8 @@ func remoteConsole(ctx *cli.Context) error {
path = filepath.Join(path, "scroll-alpha") path = filepath.Join(path, "scroll-alpha")
} else if ctx.GlobalBool(utils.ScrollSepoliaFlag.Name) { } else if ctx.GlobalBool(utils.ScrollSepoliaFlag.Name) {
path = filepath.Join(path, "scroll-sepolia") path = filepath.Join(path, "scroll-sepolia")
} else if ctx.GlobalBool(utils.ScrollFlag.Name) {
path = filepath.Join(path, "scroll")
} }
} }
endpoint = fmt.Sprintf("%s/geth.ipc", path) endpoint = fmt.Sprintf("%s/geth.ipc", path)

View file

@ -87,6 +87,7 @@ Remove blockchain and state databases`,
utils.GoerliFlag, utils.GoerliFlag,
utils.ScrollAlphaFlag, utils.ScrollAlphaFlag,
utils.ScrollSepoliaFlag, utils.ScrollSepoliaFlag,
utils.ScrollFlag,
}, },
Usage: "Inspect the storage size for each type of data in the database", Usage: "Inspect the storage size for each type of data in the database",
Description: `This commands iterates the entire database. If the optional 'prefix' and 'start' arguments are provided, then the iteration is limited to the given subset of data.`, Description: `This commands iterates the entire database. If the optional 'prefix' and 'start' arguments are provided, then the iteration is limited to the given subset of data.`,
@ -105,6 +106,7 @@ Remove blockchain and state databases`,
utils.GoerliFlag, utils.GoerliFlag,
utils.ScrollAlphaFlag, utils.ScrollAlphaFlag,
utils.ScrollSepoliaFlag, utils.ScrollSepoliaFlag,
utils.ScrollFlag,
}, },
} }
dbCompactCmd = cli.Command{ dbCompactCmd = cli.Command{
@ -121,6 +123,7 @@ Remove blockchain and state databases`,
utils.GoerliFlag, utils.GoerliFlag,
utils.ScrollAlphaFlag, utils.ScrollAlphaFlag,
utils.ScrollSepoliaFlag, utils.ScrollSepoliaFlag,
utils.ScrollFlag,
utils.CacheFlag, utils.CacheFlag,
utils.CacheDatabaseFlag, utils.CacheDatabaseFlag,
}, },
@ -143,6 +146,7 @@ corruption if it is aborted during execution'!`,
utils.GoerliFlag, utils.GoerliFlag,
utils.ScrollAlphaFlag, utils.ScrollAlphaFlag,
utils.ScrollSepoliaFlag, utils.ScrollSepoliaFlag,
utils.ScrollFlag,
}, },
Description: "This command looks up the specified database key from the database.", Description: "This command looks up the specified database key from the database.",
} }
@ -161,6 +165,7 @@ corruption if it is aborted during execution'!`,
utils.GoerliFlag, utils.GoerliFlag,
utils.ScrollAlphaFlag, utils.ScrollAlphaFlag,
utils.ScrollSepoliaFlag, utils.ScrollSepoliaFlag,
utils.ScrollFlag,
}, },
Description: `This command deletes the specified database key from the database. Description: `This command deletes the specified database key from the database.
WARNING: This is a low-level operation which may cause database corruption!`, WARNING: This is a low-level operation which may cause database corruption!`,
@ -180,6 +185,7 @@ WARNING: This is a low-level operation which may cause database corruption!`,
utils.GoerliFlag, utils.GoerliFlag,
utils.ScrollAlphaFlag, utils.ScrollAlphaFlag,
utils.ScrollSepoliaFlag, utils.ScrollSepoliaFlag,
utils.ScrollFlag,
}, },
Description: `This command sets a given database key to the given value. Description: `This command sets a given database key to the given value.
WARNING: This is a low-level operation which may cause database corruption!`, WARNING: This is a low-level operation which may cause database corruption!`,
@ -199,6 +205,7 @@ WARNING: This is a low-level operation which may cause database corruption!`,
utils.GoerliFlag, utils.GoerliFlag,
utils.ScrollAlphaFlag, utils.ScrollAlphaFlag,
utils.ScrollSepoliaFlag, utils.ScrollSepoliaFlag,
utils.ScrollFlag,
}, },
Description: "This command looks up the specified database key from the database.", Description: "This command looks up the specified database key from the database.",
} }
@ -217,6 +224,7 @@ WARNING: This is a low-level operation which may cause database corruption!`,
utils.GoerliFlag, utils.GoerliFlag,
utils.ScrollAlphaFlag, utils.ScrollAlphaFlag,
utils.ScrollSepoliaFlag, utils.ScrollSepoliaFlag,
utils.ScrollFlag,
}, },
Description: "This command displays information about the freezer index.", Description: "This command displays information about the freezer index.",
} }
@ -234,6 +242,7 @@ WARNING: This is a low-level operation which may cause database corruption!`,
utils.GoerliFlag, utils.GoerliFlag,
utils.ScrollAlphaFlag, utils.ScrollAlphaFlag,
utils.ScrollSepoliaFlag, utils.ScrollSepoliaFlag,
utils.ScrollFlag,
}, },
Description: "The import command imports the specific chain data from an RLP encoded stream.", Description: "The import command imports the specific chain data from an RLP encoded stream.",
} }
@ -251,6 +260,7 @@ WARNING: This is a low-level operation which may cause database corruption!`,
utils.GoerliFlag, utils.GoerliFlag,
utils.ScrollAlphaFlag, utils.ScrollAlphaFlag,
utils.ScrollSepoliaFlag, utils.ScrollSepoliaFlag,
utils.ScrollFlag,
}, },
Description: "Exports the specified chain data to an RLP encoded stream, optionally gzip-compressed.", Description: "Exports the specified chain data to an RLP encoded stream, optionally gzip-compressed.",
} }

View file

@ -148,6 +148,7 @@ var (
utils.GoerliFlag, utils.GoerliFlag,
utils.ScrollAlphaFlag, utils.ScrollAlphaFlag,
utils.ScrollSepoliaFlag, utils.ScrollSepoliaFlag,
utils.ScrollFlag,
utils.VMEnableDebugFlag, utils.VMEnableDebugFlag,
utils.NetworkIdFlag, utils.NetworkIdFlag,
utils.EthStatsURLFlag, utils.EthStatsURLFlag,

View file

@ -68,6 +68,7 @@ var (
utils.GoerliFlag, utils.GoerliFlag,
utils.ScrollAlphaFlag, utils.ScrollAlphaFlag,
utils.ScrollSepoliaFlag, utils.ScrollSepoliaFlag,
utils.ScrollFlag,
utils.CacheTrieJournalFlag, utils.CacheTrieJournalFlag,
utils.BloomFilterSizeFlag, utils.BloomFilterSizeFlag,
}, },
@ -101,6 +102,7 @@ the trie clean cache with default directory will be deleted.
utils.GoerliFlag, utils.GoerliFlag,
utils.ScrollAlphaFlag, utils.ScrollAlphaFlag,
utils.ScrollSepoliaFlag, utils.ScrollSepoliaFlag,
utils.ScrollFlag,
}, },
Description: ` Description: `
geth snapshot verify-state <state-root> geth snapshot verify-state <state-root>
@ -124,6 +126,7 @@ In other words, this command does the snapshot to trie conversion.
utils.GoerliFlag, utils.GoerliFlag,
utils.ScrollAlphaFlag, utils.ScrollAlphaFlag,
utils.ScrollSepoliaFlag, utils.ScrollSepoliaFlag,
utils.ScrollFlag,
}, },
Description: ` Description: `
geth snapshot traverse-state <state-root> geth snapshot traverse-state <state-root>
@ -149,6 +152,7 @@ It's also usable without snapshot enabled.
utils.GoerliFlag, utils.GoerliFlag,
utils.ScrollAlphaFlag, utils.ScrollAlphaFlag,
utils.ScrollSepoliaFlag, utils.ScrollSepoliaFlag,
utils.ScrollFlag,
}, },
Description: ` Description: `
geth snapshot traverse-rawstate <state-root> geth snapshot traverse-rawstate <state-root>
@ -175,6 +179,7 @@ It's also usable without snapshot enabled.
utils.GoerliFlag, utils.GoerliFlag,
utils.ScrollAlphaFlag, utils.ScrollAlphaFlag,
utils.ScrollSepoliaFlag, utils.ScrollSepoliaFlag,
utils.ScrollFlag,
utils.ExcludeCodeFlag, utils.ExcludeCodeFlag,
utils.ExcludeStorageFlag, utils.ExcludeStorageFlag,
utils.StartKeyFlag, utils.StartKeyFlag,

View file

@ -49,6 +49,7 @@ var AppHelpFlagGroups = []flags.FlagGroup{
utils.SepoliaFlag, utils.SepoliaFlag,
utils.ScrollAlphaFlag, utils.ScrollAlphaFlag,
utils.ScrollSepoliaFlag, utils.ScrollSepoliaFlag,
utils.ScrollFlag,
utils.SyncModeFlag, utils.SyncModeFlag,
utils.ExitWhenSyncedFlag, utils.ExitWhenSyncedFlag,
utils.GCModeFlag, utils.GCModeFlag,

View file

@ -177,6 +177,10 @@ var (
Name: "scroll-sepolia", Name: "scroll-sepolia",
Usage: "Scroll Sepolia test network", Usage: "Scroll Sepolia test network",
} }
ScrollFlag = cli.BoolFlag{
Name: "scroll",
Usage: "Scroll mainnet",
}
DeveloperFlag = cli.BoolFlag{ DeveloperFlag = cli.BoolFlag{
Name: "dev", Name: "dev",
Usage: "Ephemeral proof-of-authority network with a pre-funded developer account, mining enabled", Usage: "Ephemeral proof-of-authority network with a pre-funded developer account, mining enabled",
@ -864,6 +868,9 @@ func MakeDataDir(ctx *cli.Context) string {
if ctx.GlobalBool(ScrollSepoliaFlag.Name) { if ctx.GlobalBool(ScrollSepoliaFlag.Name) {
return filepath.Join(path, "scroll-sepolia") return filepath.Join(path, "scroll-sepolia")
} }
if ctx.GlobalBool(ScrollFlag.Name) {
return filepath.Join(path, "scroll")
}
return path return path
} }
Fatalf("Cannot determine default data directory, please set manually (--datadir)") Fatalf("Cannot determine default data directory, please set manually (--datadir)")
@ -922,6 +929,8 @@ func setBootstrapNodes(ctx *cli.Context, cfg *p2p.Config) {
urls = params.ScrollAlphaBootnodes urls = params.ScrollAlphaBootnodes
case ctx.GlobalBool(ScrollSepoliaFlag.Name): case ctx.GlobalBool(ScrollSepoliaFlag.Name):
urls = params.ScrollSepoliaBootnodes urls = params.ScrollSepoliaBootnodes
case ctx.GlobalBool(ScrollFlag.Name):
urls = params.ScrollMainnetBootnodes
case cfg.BootstrapNodes != nil: case cfg.BootstrapNodes != nil:
return // already set, don't apply defaults. return // already set, don't apply defaults.
} }
@ -1384,6 +1393,8 @@ func setDataDir(ctx *cli.Context, cfg *node.Config) {
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "scroll-alpha") cfg.DataDir = filepath.Join(node.DefaultDataDir(), "scroll-alpha")
case ctx.GlobalBool(ScrollSepoliaFlag.Name) && cfg.DataDir == node.DefaultDataDir(): case ctx.GlobalBool(ScrollSepoliaFlag.Name) && cfg.DataDir == node.DefaultDataDir():
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "scroll-sepolia") cfg.DataDir = filepath.Join(node.DefaultDataDir(), "scroll-sepolia")
case ctx.GlobalBool(ScrollFlag.Name) && cfg.DataDir == node.DefaultDataDir():
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "scroll")
} }
} }
@ -1587,7 +1598,7 @@ func CheckExclusive(ctx *cli.Context, args ...interface{}) {
// SetEthConfig applies eth-related command line flags to the config. // SetEthConfig applies eth-related command line flags to the config.
func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) { func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
// Avoid conflicting network flags // Avoid conflicting network flags
CheckExclusive(ctx, MainnetFlag, DeveloperFlag, RopstenFlag, RinkebyFlag, GoerliFlag, SepoliaFlag, ScrollAlphaFlag, ScrollSepoliaFlag) CheckExclusive(ctx, MainnetFlag, DeveloperFlag, RopstenFlag, RinkebyFlag, GoerliFlag, SepoliaFlag, ScrollAlphaFlag, ScrollSepoliaFlag, ScrollFlag)
CheckExclusive(ctx, LightServeFlag, SyncModeFlag, "light") CheckExclusive(ctx, LightServeFlag, SyncModeFlag, "light")
CheckExclusive(ctx, DeveloperFlag, ExternalSignerFlag) // Can't use both ephemeral unlocked and external signer CheckExclusive(ctx, DeveloperFlag, ExternalSignerFlag) // Can't use both ephemeral unlocked and external signer
if ctx.GlobalString(GCModeFlag.Name) == GCModeArchive && ctx.GlobalUint64(TxLookupLimitFlag.Name) != 0 { if ctx.GlobalString(GCModeFlag.Name) == GCModeArchive && ctx.GlobalUint64(TxLookupLimitFlag.Name) != 0 {
@ -1776,6 +1787,25 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
// disable prefetch // disable prefetch
log.Info("Prefetch disabled") log.Info("Prefetch disabled")
cfg.NoPrefetch = true cfg.NoPrefetch = true
case ctx.GlobalBool(ScrollFlag.Name):
if !ctx.GlobalIsSet(NetworkIdFlag.Name) {
cfg.NetworkId = 53435222224
}
cfg.Genesis = core.DefaultScrollMainnetGenesisBlock()
// forced for mainnet
log.Info("Setting flag", "--l1.confirmations", "finalized")
stack.Config().L1Confirmations = rpc.FinalizedBlockNumber
log.Info("Setting flag", "--l1.sync.startblock", "18305000")
stack.Config().L1DeploymentBlock = 18305000
// disable pruning
if ctx.GlobalString(GCModeFlag.Name) != GCModeArchive {
log.Crit("Must use --gcmode=archive")
}
log.Info("Pruning disabled")
cfg.NoPruning = true
// disable prefetch
log.Info("Prefetch disabled")
cfg.NoPrefetch = true
case ctx.GlobalBool(DeveloperFlag.Name): case ctx.GlobalBool(DeveloperFlag.Name):
if !ctx.GlobalIsSet(NetworkIdFlag.Name) { if !ctx.GlobalIsSet(NetworkIdFlag.Name) {
cfg.NetworkId = 1337 cfg.NetworkId = 1337
@ -2024,6 +2054,8 @@ func MakeGenesis(ctx *cli.Context) *core.Genesis {
genesis = core.DefaultScrollAlphaGenesisBlock() genesis = core.DefaultScrollAlphaGenesisBlock()
case ctx.GlobalBool(ScrollSepoliaFlag.Name): case ctx.GlobalBool(ScrollSepoliaFlag.Name):
genesis = core.DefaultScrollSepoliaGenesisBlock() genesis = core.DefaultScrollSepoliaGenesisBlock()
case ctx.GlobalBool(ScrollFlag.Name):
genesis = core.DefaultScrollMainnetGenesisBlock()
case ctx.GlobalBool(DeveloperFlag.Name): case ctx.GlobalBool(DeveloperFlag.Name):
Fatalf("Developer chains are ephemeral") Fatalf("Developer chains are ephemeral")
} }

View file

@ -460,6 +460,18 @@ func DefaultScrollSepoliaGenesisBlock() *Genesis {
} }
} }
// DefaultScrollMainnetGenesisBlock returns the Scroll mainnet genesis block.
func DefaultScrollMainnetGenesisBlock() *Genesis {
return &Genesis{
Config: params.ScrollMainnetChainConfig,
Timestamp: 0x6523abf8,
ExtraData: hexutil.MustDecode("0x4c61206573746f6e7465636f206573746173206d616c6665726d6974612e000068340d76bBa5996FC67b5f7152cb3A65f5A398C10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
GasLimit: 10000000,
Difficulty: big.NewInt(1),
Alloc: decodePrealloc(scrollMainnetAllocData),
}
}
// DeveloperGenesisBlock returns the 'geth --dev' genesis block. // DeveloperGenesisBlock returns the 'geth --dev' genesis block.
func DeveloperGenesisBlock(period uint64, gasLimit uint64, faucet common.Address) *Genesis { func DeveloperGenesisBlock(period uint64, gasLimit uint64, faucet common.Address) *Genesis {
// Override the default period to the user requested one // Override the default period to the user requested one

File diff suppressed because one or more lines are too long

View file

@ -175,6 +175,7 @@ func TestGenesisHashes(t *testing.T) {
// {DefaultSepoliaGenesisBlock(), params.SepoliaGenesisHash}, // {DefaultSepoliaGenesisBlock(), params.SepoliaGenesisHash},
// {DefaultScrollAlphaGenesisBlock(), params.ScrollAlphaGenesisHash}, // {DefaultScrollAlphaGenesisBlock(), params.ScrollAlphaGenesisHash},
{DefaultScrollSepoliaGenesisBlock(), params.ScrollSepoliaGenesisHash}, {DefaultScrollSepoliaGenesisBlock(), params.ScrollSepoliaGenesisHash},
{DefaultScrollMainnetGenesisBlock(), params.ScrollMainnetGenesisHash},
} { } {
// Test via MustCommit // Test via MustCommit
if have := c.genesis.MustCommit(rawdb.NewMemoryDatabase()).Hash(); have != c.want { if have := c.genesis.MustCommit(rawdb.NewMemoryDatabase()).Hash(); have != c.want {

View file

@ -83,13 +83,22 @@ var ScrollAlphaBootnodes = []string{
"enode://cf85bfa5828239b1f6b21758579ee8aaaba2a1fb4c658d6967c5f7ed4f040d95dee5b5cef0c77d656a191f6b0875dd03f05b30a3b2b3e15bfcf18b500d8f634c@35.155.117.77:30303", "enode://cf85bfa5828239b1f6b21758579ee8aaaba2a1fb4c658d6967c5f7ed4f040d95dee5b5cef0c77d656a191f6b0875dd03f05b30a3b2b3e15bfcf18b500d8f634c@35.155.117.77:30303",
} }
// ScrollSepoliaBootnodes are the enode URLs of the P2P bootstrap nodes running on the Scroll Alpha test network. // ScrollSepoliaBootnodes are the enode URLs of the P2P bootstrap nodes running on the Scroll Sepolia test network.
var ScrollSepoliaBootnodes = []string{ var ScrollSepoliaBootnodes = []string{
"enode://ceb1636bac5cbb262e5ad5b2cd22014bdb35ffe7f58b3506970d337a63099481814a338dbcd15f2d28757151e3ecd40ba38b41350b793cd0d910ff0436654f8c@35.85.84.250:30303", "enode://ceb1636bac5cbb262e5ad5b2cd22014bdb35ffe7f58b3506970d337a63099481814a338dbcd15f2d28757151e3ecd40ba38b41350b793cd0d910ff0436654f8c@35.85.84.250:30303",
"enode://29cee709c400533ae038a875b9ca975c8abef9eade956dcf3585e940acd5c0ae916968f514bd37d1278775aad1b7db30f7032a70202a87fd7365bd8de3c9f5fc@44.242.39.33:30303", "enode://29cee709c400533ae038a875b9ca975c8abef9eade956dcf3585e940acd5c0ae916968f514bd37d1278775aad1b7db30f7032a70202a87fd7365bd8de3c9f5fc@44.242.39.33:30303",
"enode://dd1ac5433c5c2b04ca3166f4cb726f8ff6d2da83dbc16d9b68b1ea83b7079b371eb16ef41c00441b6e85e32e33087f3b7753ea9e8b1e3f26d3e4df9208625e7f@54.148.111.168:30303", "enode://dd1ac5433c5c2b04ca3166f4cb726f8ff6d2da83dbc16d9b68b1ea83b7079b371eb16ef41c00441b6e85e32e33087f3b7753ea9e8b1e3f26d3e4df9208625e7f@54.148.111.168:30303",
} }
// ScrollMainnetBootnodes are the enode URLs of the P2P bootstrap nodes running on the Scroll mainnet.
var ScrollMainnetBootnodes = []string{
"enode://11f62f1592352bdf47fcd1521a5b4b753e31cedbff5c2ff3f5aafb028c1d774ef3fd5880d73aa871c0f571733cd0dcc93af3ad21e65281794de0c26c96aee2c0@54.186.123.248:30303",
"enode://f2fe493a112d0c5ded394e288be1e95edac0c422f60fc00b6c23ee3c39a6fd91e9c6f62289fd519da692a6f0ff0805c4466715642770c83d215a0ce8224b7eb1@44.227.91.206:30303",
"enode://5bb85c970acff2eff7327d06616434fe50489f0e994e82abdcd7b9d61ebc0e0801f2b931ad0d8b0e9cfc7eac994d729974b9930c2e13c33822406b82f08f1be2@44.237.194.52:30303",
"enode://f15a5982a9fdfc5eb88b1471aeeb4656fb8fa62339769c024af2cd7f57cca9be82d6f49d9c4c77166d706f9d7a7fc748ac7c2e4b14f661b88f9507df015d3b0a@52.35.203.107:30303",
"enode://5623eb16ae4412bead2504d419ccf58a8e3690613531951110e1aa53a65a7bdede1dc02b7b7f05119aa314d1898d1e8fb994c97b445328261624a0b8049ff580@54.70.236.187:30303",
}
var V5Bootnodes = []string{ var V5Bootnodes = []string{
// Teku team's bootnode // Teku team's bootnode
"enr:-KG4QOtcP9X1FbIMOe17QNMKqDxCpm14jcX5tiOE4_TyMrFqbmhPZHK_ZPG2Gxb1GE2xdtodOfx9-cgvNtxnRyHEmC0ghGV0aDKQ9aX9QgAAAAD__________4JpZIJ2NIJpcIQDE8KdiXNlY3AyNTZrMaEDhpehBDbZjM_L9ek699Y7vhUJ-eAdMyQW_Fil522Y0fODdGNwgiMog3VkcIIjKA", "enr:-KG4QOtcP9X1FbIMOe17QNMKqDxCpm14jcX5tiOE4_TyMrFqbmhPZHK_ZPG2Gxb1GE2xdtodOfx9-cgvNtxnRyHEmC0ghGV0aDKQ9aX9QgAAAAD__________4JpZIJ2NIJpcIQDE8KdiXNlY3AyNTZrMaEDhpehBDbZjM_L9ek699Y7vhUJ-eAdMyQW_Fil522Y0fODdGNwgiMog3VkcIIjKA",

View file

@ -36,6 +36,7 @@ var (
GoerliGenesisHash = common.HexToHash("0xbf7e331f7f7c1dd2e05159666b3bf8bc7a8a3a9eb1d518969eab529dd9b88c1a") GoerliGenesisHash = common.HexToHash("0xbf7e331f7f7c1dd2e05159666b3bf8bc7a8a3a9eb1d518969eab529dd9b88c1a")
ScrollAlphaGenesisHash = common.HexToHash("0xa4fc62b9b0643e345bdcebe457b3ae898bef59c7203c3db269200055e037afda") ScrollAlphaGenesisHash = common.HexToHash("0xa4fc62b9b0643e345bdcebe457b3ae898bef59c7203c3db269200055e037afda")
ScrollSepoliaGenesisHash = common.HexToHash("0xaa62d1a8b2bffa9e5d2368b63aae0d98d54928bd713125e3fd9e5c896c68592c") ScrollSepoliaGenesisHash = common.HexToHash("0xaa62d1a8b2bffa9e5d2368b63aae0d98d54928bd713125e3fd9e5c896c68592c")
ScrollMainnetGenesisHash = common.HexToHash("0xb0763bf0c49a41cf260a5d58113cbd4f2ae630a27ed8d7f260d57593bf4dd407")
) )
// TrustedCheckpoints associates each known checkpoint with the genesis hash of // TrustedCheckpoints associates each known checkpoint with the genesis hash of
@ -297,7 +298,6 @@ var (
}, },
} }
// TODO fix this config
ScrollSepoliaChainConfig = &ChainConfig{ ScrollSepoliaChainConfig = &ChainConfig{
ChainID: big.NewInt(534351), ChainID: big.NewInt(534351),
HomesteadBlock: big.NewInt(0), HomesteadBlock: big.NewInt(0),
@ -335,6 +335,43 @@ var (
}, },
} }
ScrollMainnetChainConfig = &ChainConfig{
ChainID: big.NewInt(53435222224),
HomesteadBlock: big.NewInt(0),
DAOForkBlock: nil,
DAOForkSupport: true,
EIP150Block: big.NewInt(0),
EIP155Block: big.NewInt(0),
EIP158Block: big.NewInt(0),
ByzantiumBlock: big.NewInt(0),
ConstantinopleBlock: big.NewInt(0),
PetersburgBlock: big.NewInt(0),
IstanbulBlock: big.NewInt(0),
MuirGlacierBlock: nil,
BerlinBlock: big.NewInt(0),
LondonBlock: big.NewInt(0),
ArrowGlacierBlock: nil,
ArchimedesBlock: big.NewInt(0),
ShanghaiBlock: big.NewInt(0),
Clique: &CliqueConfig{
Period: 3,
Epoch: 30000,
},
Scroll: ScrollConfig{
UseZktrie: true,
MaxTxPerBlock: &ScrollMaxTxPerBlock,
MaxTxPayloadBytesPerBlock: &ScrollMaxTxPayloadBytesPerBlock,
FeeVaultAddress: &rcfg.ScrollFeeVaultAddress,
EnableEIP2718: false,
EnableEIP1559: false,
L1Config: &L1Config{
L1ChainId: 1,
L1MessageQueueAddress: common.HexToAddress("0x72FF472b663Bb201B02258c4d2a34cD75867A6E3"),
NumL1MessagesPerBlock: 10,
},
},
}
// AllEthashProtocolChanges contains every protocol change (EIPs) introduced // AllEthashProtocolChanges contains every protocol change (EIPs) introduced
// and accepted by the Ethereum core developers into the Ethash consensus. // and accepted by the Ethereum core developers into the Ethash consensus.
// //

View file

@ -22,10 +22,10 @@ import (
) )
const ( const (
VersionMajor = 4 // Major version component of the current release VersionMajor = 5 // Major version component of the current release
VersionMinor = 5 // Minor version component of the current release VersionMinor = 0 // Minor version component of the current release
VersionPatch = 0 // Patch version component of the current release VersionPatch = 0 // Patch version component of the current release
VersionMeta = "sepolia" // Version metadata to append to the version string VersionMeta = "mainnet" // Version metadata to append to the version string
) )
// Version holds the textual version string. // Version holds the textual version string.