aboutsummaryrefslogtreecommitdiffstats
path: root/params
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2018-09-20 19:11:14 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-09-20 19:14:48 +0800
commitaf89093116d2a4657c79d55f61b4293753b52588 (patch)
tree73a0b04eb9e3965be98219649f12595d9a26379c /params
parentf89dce0126f92eb5f3245f6b8e8b1e3ac13641b3 (diff)
downloaddexon-af89093116d2a4657c79d55f61b4293753b52588.tar
dexon-af89093116d2a4657c79d55f61b4293753b52588.tar.gz
dexon-af89093116d2a4657c79d55f61b4293753b52588.tar.bz2
dexon-af89093116d2a4657c79d55f61b4293753b52588.tar.lz
dexon-af89093116d2a4657c79d55f61b4293753b52588.tar.xz
dexon-af89093116d2a4657c79d55f61b4293753b52588.tar.zst
dexon-af89093116d2a4657c79d55f61b4293753b52588.zip
les, light, params: update light client CHTs
Diffstat (limited to 'params')
-rw-r--r--params/config.go39
1 files changed, 39 insertions, 0 deletions
diff --git a/params/config.go b/params/config.go
index c4dfa8b4b..b0f6b7df1 100644
--- a/params/config.go
+++ b/params/config.go
@@ -46,6 +46,15 @@ var (
Ethash: new(EthashConfig),
}
+ // MainnetTrustedCheckpoint contains the light client trusted checkpoint for the main network.
+ MainnetTrustedCheckpoint = &TrustedCheckpoint{
+ Name: "mainnet",
+ SectionIndex: 193,
+ SectionHead: common.HexToHash("0xc2d574295ecedc4d58530ae24c31a5a98be7d2b3327fba0dd0f4ed3913828a55"),
+ CHTRoot: common.HexToHash("0x5d1027dfae688c77376e842679ceada87fd94738feb9b32ef165473bfbbb317b"),
+ BloomRoot: common.HexToHash("0xd38be1a06aabd568e10957fee4fcc523bc64996bcf31bae3f55f86e0a583919f"),
+ }
+
// TestnetChainConfig contains the chain parameters to run a node on the Ropsten test network.
TestnetChainConfig = &ChainConfig{
ChainID: big.NewInt(3),
@@ -61,6 +70,15 @@ var (
Ethash: new(EthashConfig),
}
+ // TestnetTrustedCheckpoint contains the light client trusted checkpoint for the Ropsten test network.
+ TestnetTrustedCheckpoint = &TrustedCheckpoint{
+ Name: "testnet",
+ SectionIndex: 123,
+ SectionHead: common.HexToHash("0xa372a53decb68ce453da12bea1c8ee7b568b276aa2aab94d9060aa7c81fc3dee"),
+ CHTRoot: common.HexToHash("0x6b02e7fada79cd2a80d4b3623df9c44384d6647fc127462e1c188ccd09ece87b"),
+ BloomRoot: common.HexToHash("0xf2d27490914968279d6377d42868928632573e823b5d1d4a944cba6009e16259"),
+ }
+
// RinkebyChainConfig contains the chain parameters to run a node on the Rinkeby test network.
RinkebyChainConfig = &ChainConfig{
ChainID: big.NewInt(4),
@@ -79,6 +97,15 @@ var (
},
}
+ // RinkebyTrustedCheckpoint contains the light client trusted checkpoint for the Rinkeby test network.
+ RinkebyTrustedCheckpoint = &TrustedCheckpoint{
+ Name: "rinkeby",
+ SectionIndex: 91,
+ SectionHead: common.HexToHash("0x435b7b2d8a7922f3b9a522f2fb02730e95e0e1782f0f5443894d5415bba37154"),
+ CHTRoot: common.HexToHash("0x0664bf7ecccfb6775c4eca6f0f264fb5282a22754a2135a1ac4bff2ef02898dd"),
+ BloomRoot: common.HexToHash("0x2a64df2400c3a2cb6400639bb6ed29389abdb4d93e2e525aa7c21f38767cd96f"),
+ }
+
// AllEthashProtocolChanges contains every protocol change (EIPs) introduced
// and accepted by the Ethereum core developers into the Ethash consensus.
//
@@ -97,6 +124,18 @@ var (
TestRules = TestChainConfig.Rules(new(big.Int))
)
+// TrustedCheckpoint represents a set of post-processed trie roots (CHT and
+// BloomTrie) associated with the appropriate section index and head hash. It is
+// used to start light syncing from this checkpoint and avoid downloading the
+// entire header chain while still being able to securely access old headers/logs.
+type TrustedCheckpoint struct {
+ Name string `json:"-"`
+ SectionIndex uint64 `json:"sectionIndex"`
+ SectionHead common.Hash `json:"sectionHead"`
+ CHTRoot common.Hash `json:"chtRoot"`
+ BloomRoot common.Hash `json:"bloomRoot"`
+}
+
// ChainConfig is the core config which determines the blockchain settings.
//
// ChainConfig is stored in the database on a per block basis. This means