diff --git a/cmd/clef/main.go b/cmd/clef/main.go index f9b00e4a1..50f7891a4 100644 --- a/cmd/clef/main.go +++ b/cmd/clef/main.go @@ -100,7 +100,7 @@ var ( chainIdFlag = &cli.Int64Flag{ Name: "chainid", Value: params.MainnetChainConfig.ChainID.Int64(), - Usage: "Chain id to use for signing (1=mainnet, 5=Goerli)", + Usage: "Chain id to use for signing (142536=mainnet, 5=Goerli)", // 수정 지점 1 -> 142536 } rpcPortFlag = &cli.IntFlag{ Name: "http.port", diff --git a/cmd/devp2p/nodesetcmd.go b/cmd/devp2p/nodesetcmd.go index 6fbc185ad..3c9df5134 100644 --- a/cmd/devp2p/nodesetcmd.go +++ b/cmd/devp2p/nodesetcmd.go @@ -236,6 +236,10 @@ func ethFilter(args []string) (nodeFilter, error) { filter = forkid.NewStaticFilter(params.SepoliaChainConfig, core.DefaultSepoliaGenesisBlock().ToBlock()) case "holesky": filter = forkid.NewStaticFilter(params.HoleskyChainConfig, core.DefaultHoleskyGenesisBlock().ToBlock()) + // 수정 시작 지점 + // case "kpuniverse": + // filter = forkid.NewStaticFilter(params.KPUniverseChainConfig, core.DefaultKPUniverseGenesisBlock().ToBlock()) + // 수정 종료 지점 default: return nil, fmt.Errorf("unknown network %q", args[0]) } diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 159c47ca0..38494fa87 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -135,11 +135,18 @@ var ( Value: ethconfig.Defaults.NetworkId, Category: flags.EthCategory, } + // 수정 시작 지점 MainnetFlag = &cli.BoolFlag{ Name: "mainnet", - Usage: "Ethereum mainnet", + Usage: "KPUniverse mainnet", Category: flags.EthCategory, } + // MainnetFlag = &cli.BoolFlag{ + // Name: "mainnet", + // Usage: "Ethereum mainnet", + // Category: flags.EthCategory, + // } + // 수정 종료 지점 GoerliFlag = &cli.BoolFlag{ Name: "goerli", Usage: "Görli network: pre-configured proof-of-authority test network", diff --git a/core/genesis.go b/core/genesis.go index aec867441..30dd9e49a 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -531,6 +531,7 @@ func (g *Genesis) MustCommit(db ethdb.Database, triedb *trie.Database) *types.Bl return block } +// 수정 필요(하지만 allocdata 어떤 식으로 저장되어 있는지 감이 안옴) // DefaultGenesisBlock returns the Ethereum main net genesis block. func DefaultGenesisBlock() *Genesis { return &Genesis{ @@ -580,6 +581,20 @@ func DefaultHoleskyGenesisBlock() *Genesis { } } +// 수정 시작 지점 +// DefaultKPUniverseGenesisBlock returns the KPUniverse network genesis block. +// func DefaultKPUniverseGenesisBlock() *Genesis { +// return &Genesis{ +// Config: params.KPUniverseChainConfig, +// Nonce: 0, // 뭔지 모름 +// GasLimit: 0x17d7840, +// Difficulty: big.NewInt(0x01), +// Timestamp: 1706689319, // 갱신 필요 +// Alloc: decodePrealloc(kpuniverseAllocData), +// } +// } +// 수정 종료 지점 + // DeveloperGenesisBlock returns the 'geth --dev' genesis block. func DeveloperGenesisBlock(gasLimit uint64, faucet *common.Address) *Genesis { // Override the default period to the user requested one diff --git a/params/bootnodes.go b/params/bootnodes.go index e33e2c526..d6433d666 100644 --- a/params/bootnodes.go +++ b/params/bootnodes.go @@ -19,15 +19,23 @@ package params import "github.com/ethereum/go-ethereum/common" // MainnetBootnodes are the enode URLs of the P2P bootstrap nodes running on -// the main Ethereum network. -var MainnetBootnodes = []string{ // 수정 필요 - // Ethereum Foundation Go Bootnodes - "enode://d860a01f9722d78051619d1e2351aba3f43f943f6f00718d1b9baa4101932a1f5011f16bb2b1bb35db20d6fe28fa0bf09636d26a87d31de9ec6203eeedb1f666@18.138.108.67:30303", // bootnode-aws-ap-southeast-1-001 - "enode://22a8232c3abc76a16ae9d6c3b164f98775fe226f0917b0ca871128a74a8e9630b458460865bab457221f1d448dd9791d24c4e5d88786180ac185df813a68d4de@3.209.45.79:30303", // bootnode-aws-us-east-1-001 - "enode://2b252ab6a1d0f971d9722cb839a42cb81db019ba44c08754628ab4a823487071b5695317c8ccd085219c3a03af063495b2f1da8d18218da2d6a82981b45e6ffc@65.108.70.101:30303", // bootnode-hetzner-hel - "enode://4aeb4ab6c14b23e2c4cfdce879c04b0748a20d8e9b59e25ded2a08143e265c6c25936e74cbc8e641e3312ca288673d91f2f93f8e277de3cfa444ecdaaf982052@157.90.35.166:30303", // bootnode-hetzner-fsn +// 수정 시작 지점 +// the main KPUniverse network. +var MainnetBootnodes = []string{ // 갱신 필요 + // KPUniverse Foundation Go Bootnodes + "enode://93b213e977588db8cf3e9921e052d69327dc2401e9ab4a6235ac7a3cadb197fb8a6e7c0a8e029979ca5030b71cc94307ef55597f20250cb107e938c045ea7563@203.234.103.157:30303", // kp_node2 } +// the main Ethereum network. +// var MainnetBootnodes = []string{ // 수정 필요 +// // Ethereum Foundation Go Bootnodes +// "enode://d860a01f9722d78051619d1e2351aba3f43f943f6f00718d1b9baa4101932a1f5011f16bb2b1bb35db20d6fe28fa0bf09636d26a87d31de9ec6203eeedb1f666@18.138.108.67:30303", // bootnode-aws-ap-southeast-1-001 +// "enode://22a8232c3abc76a16ae9d6c3b164f98775fe226f0917b0ca871128a74a8e9630b458460865bab457221f1d448dd9791d24c4e5d88786180ac185df813a68d4de@3.209.45.79:30303", // bootnode-aws-us-east-1-001 +// "enode://2b252ab6a1d0f971d9722cb839a42cb81db019ba44c08754628ab4a823487071b5695317c8ccd085219c3a03af063495b2f1da8d18218da2d6a82981b45e6ffc@65.108.70.101:30303", // bootnode-hetzner-hel +// "enode://4aeb4ab6c14b23e2c4cfdce879c04b0748a20d8e9b59e25ded2a08143e265c6c25936e74cbc8e641e3312ca288673d91f2f93f8e277de3cfa444ecdaaf982052@157.90.35.166:30303", // bootnode-hetzner-fsn +// } +// 수정 종료 지점 + // HoleskyBootnodes are the enode URLs of the P2P bootstrap nodes running on the // Holesky test network. var HoleskyBootnodes = []string{ diff --git a/params/config.go b/params/config.go index cbc3d0c0f..2af822854 100644 --- a/params/config.go +++ b/params/config.go @@ -25,8 +25,11 @@ import ( ) // Genesis hashes to enforce below configs on. -var ( // 수정 필요(첫 geth 실행 후) - MainnetGenesisHash = common.HexToHash("0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3") +var ( + // 수정 시작 지점(갱신 필요) + MainnetGenesisHash = common.HexToHash("0xc59c5c89e3d807258a6654f8c143eb807b57d2fe03b953ebdec05ca82888cea7") + // MainnetGenesisHash = common.HexToHash("0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3") + // 수정 종료 지점 HoleskyGenesisHash = common.HexToHash("0xb5f7f912443c940f21fd611f12828d75b534364ed9e95ca4e307729a4661bde4") SepoliaGenesisHash = common.HexToHash("0x25a5cc106eea7138acab33231d7160d69cb777ee0c2c553fcddf5138993e6dd9") GoerliGenesisHash = common.HexToHash("0xbf7e331f7f7c1dd2e05159666b3bf8bc7a8a3a9eb1d518969eab529dd9b88c1a") @@ -37,29 +40,55 @@ func newUint64(val uint64) *uint64 { return &val } var ( MainnetTerminalTotalDifficulty, _ = new(big.Int).SetString("58_750_000_000_000_000_000_000", 0) + // 수정 시작 지점 // MainnetChainConfig is the chain parameters to run a node on the main network. - MainnetChainConfig = &ChainConfig{ // 수정 필요 - ChainID: big.NewInt(1), - HomesteadBlock: big.NewInt(1_150_000), - DAOForkBlock: big.NewInt(1_920_000), + MainnetChainConfig = &ChainConfig{ + ChainID: big.NewInt(142536), + HomesteadBlock: big.NewInt(0), + DAOForkBlock: nil, DAOForkSupport: true, - EIP150Block: big.NewInt(2_463_000), - EIP155Block: big.NewInt(2_675_000), - EIP158Block: big.NewInt(2_675_000), - ByzantiumBlock: big.NewInt(4_370_000), - ConstantinopleBlock: big.NewInt(7_280_000), - PetersburgBlock: big.NewInt(7_280_000), - IstanbulBlock: big.NewInt(9_069_000), - MuirGlacierBlock: big.NewInt(9_200_000), - BerlinBlock: big.NewInt(12_244_000), - LondonBlock: big.NewInt(12_965_000), - ArrowGlacierBlock: big.NewInt(13_773_000), - GrayGlacierBlock: big.NewInt(15_050_000), - TerminalTotalDifficulty: MainnetTerminalTotalDifficulty, // 58_750_000_000_000_000_000_000 + 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: big.NewInt(0), + BerlinBlock: big.NewInt(0), + LondonBlock: big.NewInt(0), + ArrowGlacierBlock: big.NewInt(0), + GrayGlacierBlock: big.NewInt(0), + TerminalTotalDifficulty: big.NewInt(0), TerminalTotalDifficultyPassed: true, - ShanghaiTime: newUint64(1681338455), + MergeNetsplitBlock: nil, + ShanghaiTime: newUint64(1707288397), // 갱신 필요 Ethash: new(EthashConfig), } + // MainnetChainConfig is the chain parameters to run a node on the main network. + // MainnetChainConfig = &ChainConfig{ // 수정 필요 + // ChainID: big.NewInt(1), + // HomesteadBlock: big.NewInt(1_150_000), + // DAOForkBlock: big.NewInt(1_920_000), + // DAOForkSupport: true, + // EIP150Block: big.NewInt(2_463_000), + // EIP155Block: big.NewInt(2_675_000), + // EIP158Block: big.NewInt(2_675_000), + // ByzantiumBlock: big.NewInt(4_370_000), + // ConstantinopleBlock: big.NewInt(7_280_000), + // PetersburgBlock: big.NewInt(7_280_000), + // IstanbulBlock: big.NewInt(9_069_000), + // MuirGlacierBlock: big.NewInt(9_200_000), + // BerlinBlock: big.NewInt(12_244_000), + // LondonBlock: big.NewInt(12_965_000), + // ArrowGlacierBlock: big.NewInt(13_773_000), + // GrayGlacierBlock: big.NewInt(15_050_000), + // TerminalTotalDifficulty: MainnetTerminalTotalDifficulty, // 58_750_000_000_000_000_000_000 + // TerminalTotalDifficultyPassed: true, + // ShanghaiTime: newUint64(1681338455), + // Ethash: new(EthashConfig), + // } + // 수정 종료 지점 // HoleskyChainConfig contains the chain parameters to run a node on the Holesky test network. HoleskyChainConfig = &ChainConfig{ ChainID: big.NewInt(17000), @@ -314,6 +343,7 @@ var NetworkNames = map[string]string{ GoerliChainConfig.ChainID.String(): "goerli", SepoliaChainConfig.ChainID.String(): "sepolia", HoleskyChainConfig.ChainID.String(): "holesky", + // KPUniverseChainConfig.ChainID.String(): "kpuniverse", } // ChainConfig is the core config which determines the blockchain settings.