-
-
Notifications
You must be signed in to change notification settings - Fork 335
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support gnosis beacon chain with --network gnosis
Showing
7 changed files
with
89 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import {gnosisChainConfig} from "@chainsafe/lodestar-config/networks"; | ||
|
||
export const chainConfig = gnosisChainConfig; | ||
|
||
/* eslint-disable max-len */ | ||
|
||
// eth1.providerUrls suggestion: https://rpc.gnosischain.com | ||
export const depositContractDeployBlock = 19469077; | ||
export const genesisFileUrl = null; | ||
export const bootnodesFileUrl = null; | ||
|
||
export const bootEnrs = [ | ||
// Gnosis Chain Team | ||
"enr:-IS4QGmLwm7gFd0L0CEisllrb1op3v-wAGSc7_pwSMGgN3bOS9Fz7m1dWbwuuPHKqeETz9MbhjVuoWk0ohkyRv98kVoBgmlkgnY0gmlwhGjtlgaJc2VjcDI1NmsxoQLMdh0It9fJbuiLydZ9fpF6MRzgNle0vODaDiMqhbC7WIN1ZHCCIyg", | ||
"enr:-IS4QFUVG3dvLPCUEI7ycRvFm0Ieg_ITa5tALmJ9LI7dJ6ieT3J4fF9xLRjOoB4ApV-Rjp7HeLKzyTWG1xRdbFBNZPQBgmlkgnY0gmlwhErP5weJc2VjcDI1NmsxoQOBbaJBvx0-w_pyZUhQl9A510Ho2T0grE0K8JevzES99IN1ZHCCIyg", | ||
"enr:-Ku4QOQk8V-Hu2gxFzRXmLYIO4AvWDZhoMFwTf3n3DYm_mbsWv0ZitoqiN6JZUUj6Li6e1Jk1w2zFSVHKPMUP1g5tsgBh2F0dG5ldHOIAAAAAAAAAACEZXRoMpD5Jd3FAAAAZP__________gmlkgnY0gmlwhC1PTpmJc2VjcDI1NmsxoQL1Ynt5PoA0UOcHa1Rfn98rmnRlLzNuWTePPP4m4qHVroN1ZHCCKvg", | ||
"enr:-Ku4QFaTwgoms-EiiRIfHUH3FXprWUFgjHg4UuWvilqoUQtDbmTszVIxUEOwQUmA2qkiP-T9wXjc_rVUuh9cU7WgwbgBh2F0dG5ldHOIAAAAAAAAAACEZXRoMpD5Jd3FAAAAZP__________gmlkgnY0gmlwhC0hBmCJc2VjcDI1NmsxoQOpsg1XCrXmCwZKcSTcycLwldoKUMHPUpMEVGeg_EEhuYN1ZHCCKvg", | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* eslint-disable @typescript-eslint/naming-convention */ | ||
import {fromHexString as b} from "@chainsafe/ssz"; | ||
import {PresetName} from "@chainsafe/lodestar-params"; | ||
import {IChainConfig} from "../types.js"; | ||
import {chainConfig as mainnet} from "../presets/mainnet.js"; | ||
|
||
/* eslint-disable max-len */ | ||
|
||
export const gnosisChainConfig: IChainConfig = { | ||
...mainnet, | ||
|
||
// NOTE: Only add diff values | ||
PRESET_BASE: PresetName.gnosis, | ||
|
||
SECONDS_PER_SLOT: 5, | ||
SECONDS_PER_ETH1_BLOCK: 6, | ||
ETH1_FOLLOW_DISTANCE: 1024, | ||
CHURN_LIMIT_QUOTIENT: 4096, | ||
|
||
// Ethereum Goerli testnet | ||
DEPOSIT_CHAIN_ID: 100, | ||
DEPOSIT_NETWORK_ID: 100, | ||
DEPOSIT_CONTRACT_ADDRESS: b("0x0b98057ea310f4d31f2a452b414647007d1645d9"), | ||
|
||
// Dec 8, 2021, 13:00 UTC | ||
MIN_GENESIS_TIME: 1638968400, | ||
MIN_GENESIS_ACTIVE_VALIDATOR_COUNT: 4096, | ||
GENESIS_FORK_VERSION: b("0x00000064"), | ||
GENESIS_DELAY: 6000, | ||
|
||
// Forking | ||
ALTAIR_FORK_VERSION: b("0x01000064"), | ||
ALTAIR_FORK_EPOCH: 512, | ||
// Bellatrix | ||
BELLATRIX_FORK_VERSION: b("0x02000064"), | ||
BELLATRIX_FORK_EPOCH: Infinity, | ||
// Sharding | ||
SHARDING_FORK_VERSION: b("0x03000064"), | ||
SHARDING_FORK_EPOCH: Infinity, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export enum PresetName { | ||
mainnet = "mainnet", | ||
minimal = "minimal", | ||
gnosis = "gnosis", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import {BeaconPreset} from "../../interface/index.js"; | ||
import {preset as presetMainnet} from "../mainnet/index.js"; | ||
|
||
// Note: 1.0.0 has no meaning and is a placeholder | ||
export const commit = "v1.0.0"; | ||
|
||
/* eslint-disable @typescript-eslint/naming-convention */ | ||
export const preset: BeaconPreset = { | ||
...presetMainnet, | ||
|
||
/// NOTE: Only add diff values | ||
|
||
// phase0 | ||
BASE_REWARD_FACTOR: 25, | ||
SLOTS_PER_EPOCH: 16, | ||
|
||
// altair | ||
EPOCHS_PER_SYNC_COMMITTEE_PERIOD: 512, | ||
}; |