Add pulsechain-devnet poc config

This commit is contained in:
Shane Bammel 2023-02-26 13:52:40 -06:00
parent 000c914d82
commit bbe15afcde
6 changed files with 95 additions and 0 deletions

File diff suppressed because one or more lines are too long

View File

@ -490,6 +490,16 @@ func PulsechainTestnetGenesisBlock() *types.Genesis {
} }
} }
func PulsechainDevnetGenesisBlock() *types.Genesis {
return &types.Genesis{
Config: params.PulsechainDevnetChainConfig,
ExtraData: hexutil.MustDecode("0x0000000000000000000000000000000000000000000000000000000000000000123463a4B065722E99115D6c222f267d9cABb5240000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
GasLimit: 30000000,
Difficulty: big.NewInt(131072),
Alloc: readPrealloc("allocs/pulsechain-devnet.json"),
}
}
// Pre-calculated version of: // Pre-calculated version of:
// //
// DevnetSignPrivateKey = crypto.HexToECDSA(sha256.Sum256([]byte("erigon devnet key"))) // DevnetSignPrivateKey = crypto.HexToECDSA(sha256.Sum256([]byte("erigon devnet key")))
@ -712,6 +722,8 @@ func GenesisBlockByChainName(chain string) *types.Genesis {
return PulsechainGenesisBlock() return PulsechainGenesisBlock()
case networkname.PulsechainTestnetChainName: case networkname.PulsechainTestnetChainName:
return PulsechainTestnetGenesisBlock() return PulsechainTestnetGenesisBlock()
case networkname.PulsechainDevnetChainName:
return PulsechainDevnetGenesisBlock()
default: default:
return nil return nil
} }

View File

@ -14,6 +14,7 @@ const (
BorE2ETestChain2ValName = "bor-e2e-test-2Val" BorE2ETestChain2ValName = "bor-e2e-test-2Val"
ChiadoChainName = "chiado" ChiadoChainName = "chiado"
PulsechainChainName = "pulsechain" PulsechainChainName = "pulsechain"
PulsechainDevnetChainName = "pulsechain-devnet"
PulsechainTestnetChainName = "pulsechain-testnet" PulsechainTestnetChainName = "pulsechain-testnet"
) )
@ -29,5 +30,6 @@ var All = []string{
GnosisChainName, GnosisChainName,
ChiadoChainName, ChiadoChainName,
PulsechainChainName, PulsechainChainName,
PulsechainDevnetChainName,
PulsechainTestnetChainName, PulsechainTestnetChainName,
} }

View File

@ -0,0 +1,30 @@
{
"ChainName": "l1_chain",
"chainId": 32382,
"homesteadBlock": 0,
"daoForkSupport": true,
"eip150Block": 0,
"eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"eip155Block": 0,
"eip158Block": 0,
"byzantiumBlock": 0,
"constantinopleBlock": 0,
"petersburgBlock": 0,
"istanbulBlock": 0,
"muirGlacierBlock": 0,
"berlinBlock": 0,
"londonBlock": 0,
"terminalBlockHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"arrowGlacierBlock": 0,
"grayGlacierBlock": 0,
"ethash": {},
"terminalTotalDifficulty": 393216,
"terminalTotalDifficultyPassed": false,
"primordialPulseBlock": 10,
"pulseChain": {
"treasury": {
"addr": "0x123463a4b065722e99115d6c222f267d9cabb524",
"balance": "0xC9F2C9CD04674EDEA40000000"
}
}
}

View File

@ -73,6 +73,7 @@ var (
GnosisGenesisHash = libcommon.HexToHash("0x4f1dd23188aab3a76b463e4af801b52b1248ef073c648cbdc4c9333d3da79756") GnosisGenesisHash = libcommon.HexToHash("0x4f1dd23188aab3a76b463e4af801b52b1248ef073c648cbdc4c9333d3da79756")
ChiadoGenesisHash = libcommon.HexToHash("0xada44fd8d2ecab8b08f256af07ad3e777f17fb434f8f8e678b312f576212ba9a") ChiadoGenesisHash = libcommon.HexToHash("0xada44fd8d2ecab8b08f256af07ad3e777f17fb434f8f8e678b312f576212ba9a")
PulsechainGenesisHash = libcommon.HexToHash("0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3") PulsechainGenesisHash = libcommon.HexToHash("0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3")
PulsechainDevnetGenesisHash = libcommon.HexToHash("0xdbc883fdd1357c5340e4bb624a3dd9af4788602a23af0a42080b31a382c9fba8")
PulsechainTetnetGenesisHash = libcommon.HexToHash("0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3") PulsechainTetnetGenesisHash = libcommon.HexToHash("0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3")
) )
@ -152,6 +153,8 @@ var (
PulsechainChainConfig = readChainSpec("chainspecs/pulsechain.json") PulsechainChainConfig = readChainSpec("chainspecs/pulsechain.json")
PulsechainDevnetChainConfig = readChainSpec("chainspecs/pulsechain-devnet.json")
PulsechainTestnetChainConfig = readChainSpec("chainspecs/pulsechain-testnet.json") PulsechainTestnetChainConfig = readChainSpec("chainspecs/pulsechain-testnet.json")
CliqueSnapshot = NewSnapshotConfig(10, 1024, 16384, true, "") CliqueSnapshot = NewSnapshotConfig(10, 1024, 16384, true, "")
@ -242,6 +245,8 @@ func ChainConfigByChainName(chain string) *chain.Config {
return ChiadoChainConfig return ChiadoChainConfig
case networkname.PulsechainChainName: case networkname.PulsechainChainName:
return PulsechainChainConfig return PulsechainChainConfig
case networkname.PulsechainDevnetChainName:
return PulsechainDevnetChainConfig
case networkname.PulsechainTestnetChainName: case networkname.PulsechainTestnetChainName:
return PulsechainTestnetChainConfig return PulsechainTestnetChainConfig
default: default:
@ -273,6 +278,8 @@ func GenesisHashByChainName(chain string) *libcommon.Hash {
return &ChiadoGenesisHash return &ChiadoGenesisHash
case networkname.PulsechainChainName: case networkname.PulsechainChainName:
return &PulsechainGenesisHash return &PulsechainGenesisHash
case networkname.PulsechainDevnetChainName:
return &PulsechainDevnetGenesisHash
case networkname.PulsechainTestnetChainName: case networkname.PulsechainTestnetChainName:
return &PulsechainTetnetGenesisHash return &PulsechainTetnetGenesisHash
default: default:

View File

@ -86,6 +86,8 @@ func NewNodConfigUrfave(ctx *cli.Context, logger log.Logger) *nodecfg.Config {
logger.Info("Starting Erigon on Bor Devnet...") logger.Info("Starting Erigon on Bor Devnet...")
case networkname.PulsechainChainName: case networkname.PulsechainChainName:
logger.Info("Starting Erigon on PulseChain...") logger.Info("Starting Erigon on PulseChain...")
case networkname.PulsechainDevnetChainName:
logger.Info("Starting Erigon on PulseChain Devnet...")
case networkname.PulsechainTestnetChainName: case networkname.PulsechainTestnetChainName:
logger.Info("Starting Erigon on PulseChain Testnet...") logger.Info("Starting Erigon on PulseChain Testnet...")
case "", networkname.MainnetChainName: case "", networkname.MainnetChainName: