github.com/cryptotooltop/go-ethereum@v0.0.0-20231103184714-151d1922f3e5/eth/ethconfig/gen_config.go (about) 1 // Code generated by github.com/fjl/gencodec. DO NOT EDIT. 2 3 package ethconfig 4 5 import ( 6 "math/big" 7 "time" 8 9 "github.com/scroll-tech/go-ethereum/common" 10 "github.com/scroll-tech/go-ethereum/consensus/ethash" 11 "github.com/scroll-tech/go-ethereum/core" 12 "github.com/scroll-tech/go-ethereum/eth/downloader" 13 "github.com/scroll-tech/go-ethereum/eth/gasprice" 14 "github.com/scroll-tech/go-ethereum/miner" 15 "github.com/scroll-tech/go-ethereum/params" 16 ) 17 18 // MarshalTOML marshals as TOML. 19 func (c Config) MarshalTOML() (interface{}, error) { 20 type Config struct { 21 Genesis *core.Genesis `toml:",omitempty"` 22 NetworkId uint64 23 SyncMode downloader.SyncMode 24 EthDiscoveryURLs []string 25 SnapDiscoveryURLs []string 26 NoPruning bool 27 NoPrefetch bool 28 TxLookupLimit uint64 `toml:",omitempty"` 29 Whitelist map[uint64]common.Hash `toml:"-"` 30 LightServ int `toml:",omitempty"` 31 LightIngress int `toml:",omitempty"` 32 LightEgress int `toml:",omitempty"` 33 LightPeers int `toml:",omitempty"` 34 LightNoPrune bool `toml:",omitempty"` 35 LightNoSyncServe bool `toml:",omitempty"` 36 SyncFromCheckpoint bool `toml:",omitempty"` 37 UltraLightServers []string `toml:",omitempty"` 38 UltraLightFraction int `toml:",omitempty"` 39 UltraLightOnlyAnnounce bool `toml:",omitempty"` 40 SkipBcVersionCheck bool `toml:"-"` 41 DatabaseHandles int `toml:"-"` 42 DatabaseCache int 43 DatabaseFreezer string 44 TrieCleanCache int 45 TrieCleanCacheJournal string `toml:",omitempty"` 46 TrieCleanCacheRejournal time.Duration `toml:",omitempty"` 47 TrieDirtyCache int 48 TrieTimeout time.Duration 49 SnapshotCache int 50 Preimages bool 51 Miner miner.Config 52 Ethash ethash.Config 53 TxPool core.TxPoolConfig 54 GPO gasprice.Config 55 EnablePreimageRecording bool 56 DocRoot string `toml:"-"` 57 RPCGasCap uint64 58 RPCEVMTimeout time.Duration 59 RPCTxFeeCap float64 60 Checkpoint *params.TrustedCheckpoint `toml:",omitempty"` 61 CheckpointOracle *params.CheckpointOracleConfig `toml:",omitempty"` 62 OverrideArrowGlacier *big.Int `toml:",omitempty"` 63 MPTWitness int 64 CheckCircuitCapacity bool 65 EnableRollupVerify bool 66 MaxBlockRange int64 67 } 68 var enc Config 69 enc.Genesis = c.Genesis 70 enc.NetworkId = c.NetworkId 71 enc.SyncMode = c.SyncMode 72 enc.EthDiscoveryURLs = c.EthDiscoveryURLs 73 enc.SnapDiscoveryURLs = c.SnapDiscoveryURLs 74 enc.NoPruning = c.NoPruning 75 enc.NoPrefetch = c.NoPrefetch 76 enc.TxLookupLimit = c.TxLookupLimit 77 enc.Whitelist = c.Whitelist 78 enc.LightServ = c.LightServ 79 enc.LightIngress = c.LightIngress 80 enc.LightEgress = c.LightEgress 81 enc.LightPeers = c.LightPeers 82 enc.LightNoPrune = c.LightNoPrune 83 enc.LightNoSyncServe = c.LightNoSyncServe 84 enc.SyncFromCheckpoint = c.SyncFromCheckpoint 85 enc.UltraLightServers = c.UltraLightServers 86 enc.UltraLightFraction = c.UltraLightFraction 87 enc.UltraLightOnlyAnnounce = c.UltraLightOnlyAnnounce 88 enc.SkipBcVersionCheck = c.SkipBcVersionCheck 89 enc.DatabaseHandles = c.DatabaseHandles 90 enc.DatabaseCache = c.DatabaseCache 91 enc.DatabaseFreezer = c.DatabaseFreezer 92 enc.TrieCleanCache = c.TrieCleanCache 93 enc.TrieCleanCacheJournal = c.TrieCleanCacheJournal 94 enc.TrieCleanCacheRejournal = c.TrieCleanCacheRejournal 95 enc.TrieDirtyCache = c.TrieDirtyCache 96 enc.TrieTimeout = c.TrieTimeout 97 enc.SnapshotCache = c.SnapshotCache 98 enc.Preimages = c.Preimages 99 enc.Miner = c.Miner 100 enc.Ethash = c.Ethash 101 enc.TxPool = c.TxPool 102 enc.GPO = c.GPO 103 enc.EnablePreimageRecording = c.EnablePreimageRecording 104 enc.DocRoot = c.DocRoot 105 enc.RPCGasCap = c.RPCGasCap 106 enc.RPCEVMTimeout = c.RPCEVMTimeout 107 enc.RPCTxFeeCap = c.RPCTxFeeCap 108 enc.Checkpoint = c.Checkpoint 109 enc.CheckpointOracle = c.CheckpointOracle 110 enc.OverrideArrowGlacier = c.OverrideArrowGlacier 111 enc.MPTWitness = c.MPTWitness 112 enc.CheckCircuitCapacity = c.CheckCircuitCapacity 113 enc.EnableRollupVerify = c.EnableRollupVerify 114 enc.MaxBlockRange = c.MaxBlockRange 115 return &enc, nil 116 } 117 118 // UnmarshalTOML unmarshals from TOML. 119 func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error { 120 type Config struct { 121 Genesis *core.Genesis `toml:",omitempty"` 122 NetworkId *uint64 123 SyncMode *downloader.SyncMode 124 EthDiscoveryURLs []string 125 SnapDiscoveryURLs []string 126 NoPruning *bool 127 NoPrefetch *bool 128 TxLookupLimit *uint64 `toml:",omitempty"` 129 Whitelist map[uint64]common.Hash `toml:"-"` 130 LightServ *int `toml:",omitempty"` 131 LightIngress *int `toml:",omitempty"` 132 LightEgress *int `toml:",omitempty"` 133 LightPeers *int `toml:",omitempty"` 134 LightNoPrune *bool `toml:",omitempty"` 135 LightNoSyncServe *bool `toml:",omitempty"` 136 SyncFromCheckpoint *bool `toml:",omitempty"` 137 UltraLightServers []string `toml:",omitempty"` 138 UltraLightFraction *int `toml:",omitempty"` 139 UltraLightOnlyAnnounce *bool `toml:",omitempty"` 140 SkipBcVersionCheck *bool `toml:"-"` 141 DatabaseHandles *int `toml:"-"` 142 DatabaseCache *int 143 DatabaseFreezer *string 144 TrieCleanCache *int 145 TrieCleanCacheJournal *string `toml:",omitempty"` 146 TrieCleanCacheRejournal *time.Duration `toml:",omitempty"` 147 TrieDirtyCache *int 148 TrieTimeout *time.Duration 149 SnapshotCache *int 150 Preimages *bool 151 Miner *miner.Config 152 Ethash *ethash.Config 153 TxPool *core.TxPoolConfig 154 GPO *gasprice.Config 155 EnablePreimageRecording *bool 156 DocRoot *string `toml:"-"` 157 RPCGasCap *uint64 158 RPCEVMTimeout *time.Duration 159 RPCTxFeeCap *float64 160 Checkpoint *params.TrustedCheckpoint `toml:",omitempty"` 161 CheckpointOracle *params.CheckpointOracleConfig `toml:",omitempty"` 162 OverrideArrowGlacier *big.Int `toml:",omitempty"` 163 MPTWitness *int 164 CheckCircuitCapacity *bool 165 EnableRollupVerify *bool 166 MaxBlockRange *int64 167 } 168 var dec Config 169 if err := unmarshal(&dec); err != nil { 170 return err 171 } 172 if dec.Genesis != nil { 173 c.Genesis = dec.Genesis 174 } 175 if dec.NetworkId != nil { 176 c.NetworkId = *dec.NetworkId 177 } 178 if dec.SyncMode != nil { 179 c.SyncMode = *dec.SyncMode 180 } 181 if dec.EthDiscoveryURLs != nil { 182 c.EthDiscoveryURLs = dec.EthDiscoveryURLs 183 } 184 if dec.SnapDiscoveryURLs != nil { 185 c.SnapDiscoveryURLs = dec.SnapDiscoveryURLs 186 } 187 if dec.NoPruning != nil { 188 c.NoPruning = *dec.NoPruning 189 } 190 if dec.NoPrefetch != nil { 191 c.NoPrefetch = *dec.NoPrefetch 192 } 193 if dec.TxLookupLimit != nil { 194 c.TxLookupLimit = *dec.TxLookupLimit 195 } 196 if dec.Whitelist != nil { 197 c.Whitelist = dec.Whitelist 198 } 199 if dec.LightServ != nil { 200 c.LightServ = *dec.LightServ 201 } 202 if dec.LightIngress != nil { 203 c.LightIngress = *dec.LightIngress 204 } 205 if dec.LightEgress != nil { 206 c.LightEgress = *dec.LightEgress 207 } 208 if dec.LightPeers != nil { 209 c.LightPeers = *dec.LightPeers 210 } 211 if dec.LightNoPrune != nil { 212 c.LightNoPrune = *dec.LightNoPrune 213 } 214 if dec.LightNoSyncServe != nil { 215 c.LightNoSyncServe = *dec.LightNoSyncServe 216 } 217 if dec.SyncFromCheckpoint != nil { 218 c.SyncFromCheckpoint = *dec.SyncFromCheckpoint 219 } 220 if dec.UltraLightServers != nil { 221 c.UltraLightServers = dec.UltraLightServers 222 } 223 if dec.UltraLightFraction != nil { 224 c.UltraLightFraction = *dec.UltraLightFraction 225 } 226 if dec.UltraLightOnlyAnnounce != nil { 227 c.UltraLightOnlyAnnounce = *dec.UltraLightOnlyAnnounce 228 } 229 if dec.SkipBcVersionCheck != nil { 230 c.SkipBcVersionCheck = *dec.SkipBcVersionCheck 231 } 232 if dec.DatabaseHandles != nil { 233 c.DatabaseHandles = *dec.DatabaseHandles 234 } 235 if dec.DatabaseCache != nil { 236 c.DatabaseCache = *dec.DatabaseCache 237 } 238 if dec.DatabaseFreezer != nil { 239 c.DatabaseFreezer = *dec.DatabaseFreezer 240 } 241 if dec.TrieCleanCache != nil { 242 c.TrieCleanCache = *dec.TrieCleanCache 243 } 244 if dec.TrieCleanCacheJournal != nil { 245 c.TrieCleanCacheJournal = *dec.TrieCleanCacheJournal 246 } 247 if dec.TrieCleanCacheRejournal != nil { 248 c.TrieCleanCacheRejournal = *dec.TrieCleanCacheRejournal 249 } 250 if dec.TrieDirtyCache != nil { 251 c.TrieDirtyCache = *dec.TrieDirtyCache 252 } 253 if dec.TrieTimeout != nil { 254 c.TrieTimeout = *dec.TrieTimeout 255 } 256 if dec.SnapshotCache != nil { 257 c.SnapshotCache = *dec.SnapshotCache 258 } 259 if dec.Preimages != nil { 260 c.Preimages = *dec.Preimages 261 } 262 if dec.Miner != nil { 263 c.Miner = *dec.Miner 264 } 265 if dec.Ethash != nil { 266 c.Ethash = *dec.Ethash 267 } 268 if dec.TxPool != nil { 269 c.TxPool = *dec.TxPool 270 } 271 if dec.GPO != nil { 272 c.GPO = *dec.GPO 273 } 274 if dec.EnablePreimageRecording != nil { 275 c.EnablePreimageRecording = *dec.EnablePreimageRecording 276 } 277 if dec.DocRoot != nil { 278 c.DocRoot = *dec.DocRoot 279 } 280 if dec.RPCGasCap != nil { 281 c.RPCGasCap = *dec.RPCGasCap 282 } 283 if dec.RPCEVMTimeout != nil { 284 c.RPCEVMTimeout = *dec.RPCEVMTimeout 285 } 286 if dec.RPCTxFeeCap != nil { 287 c.RPCTxFeeCap = *dec.RPCTxFeeCap 288 } 289 if dec.Checkpoint != nil { 290 c.Checkpoint = dec.Checkpoint 291 } 292 if dec.CheckpointOracle != nil { 293 c.CheckpointOracle = dec.CheckpointOracle 294 } 295 if dec.OverrideArrowGlacier != nil { 296 c.OverrideArrowGlacier = dec.OverrideArrowGlacier 297 } 298 if dec.MPTWitness != nil { 299 c.MPTWitness = *dec.MPTWitness 300 } 301 if dec.CheckCircuitCapacity != nil { 302 c.CheckCircuitCapacity = *dec.CheckCircuitCapacity 303 } 304 if dec.EnableRollupVerify != nil { 305 c.EnableRollupVerify = *dec.EnableRollupVerify 306 } 307 if dec.MaxBlockRange != nil { 308 c.MaxBlockRange = *dec.MaxBlockRange 309 } 310 return nil 311 }