Documentation
¶
Overview ¶
Package miner implements Ethereum block creation and mining.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = Config{ GasCeil: 20000000, GasFloor: 15000000, GasPrice: big.NewInt(params.GWei), Recommit: &defaultRecommit, DelayLeftOver: &defaultDelayLeftOver, MaxWaitProposalInSecs: &defaultMaxWaitProposalInSecs, Mev: DefaultMevConfig, }
DefaultConfig contains default settings for miner.
View Source
var DefaultMevConfig = MevConfig{ Enabled: &defaultMevEnabled, GreedyMergeTx: &defaultGreedyMergeTx, BuilderFeeCeil: &defaultBuilderFeeCeil, SentryURL: "", Builders: nil, ValidatorCommission: &defaultValidatorCommission, BidSimulationLeftOver: &defaultBidSimulationLeftOver, NoInterruptLeftOver: &defaultNoInterruptLeftOver, MaxBidsPerBuilder: &defaultMaxBidsPerBuilder, }
Functions ¶
func ApplyDefaultMinerConfig ¶
func ApplyDefaultMinerConfig(cfg *Config)
Types ¶
type BuilderConfig ¶
type Config ¶
type Config struct {
Etherbase common.Address `toml:",omitempty"` // Public address for block mining rewards
ExtraData hexutil.Bytes `toml:",omitempty"` // Block extra data set by the miner
DelayLeftOver *time.Duration `toml:",omitempty"` // Time reserved to finalize a block(calculate root, distribute income...)
GasFloor uint64 // Target gas floor for mined blocks.
GasCeil uint64 // Target gas ceiling for mined blocks.
GasPrice *big.Int // Minimum gas price for mining a transaction
Recommit *time.Duration `toml:",omitempty"` // The time interval for miner to re-create mining work.
VoteEnable bool // Whether to vote when mining
MaxWaitProposalInSecs *uint64 `toml:",omitempty"` // The maximum time to wait for the proposal to be done, it's aimed to prevent validator being slashed when restarting
DisableVoteAttestation bool // Whether to skip assembling vote attestation
Mev MevConfig // Mev configuration
NoVerify bool // Disable remote mining solution verification(only useful in ethash).
}
Config is the configuration parameters of mining.
type MevConfig ¶
type MevConfig struct {
Enabled *bool `toml:",omitempty"` // Whether to enable Mev or not
GreedyMergeTx *bool `toml:",omitempty"` // Whether to merge local transactions to the bid
BuilderFeeCeil *string `toml:",omitempty"` // The maximum builder fee of a bid
SentryURL string // The url of Mev sentry
Builders []BuilderConfig // The list of builders
ValidatorCommission *uint64 `toml:",omitempty"` // 100 means the validator claims 1% from block reward
BidSimulationLeftOver *time.Duration `toml:",omitempty"`
NoInterruptLeftOver *time.Duration `toml:",omitempty"`
MaxBidsPerBuilder *uint32 `toml:",omitempty"` // Maximum number of bids allowed per builder per block
}
Click to show internal directories.
Click to hide internal directories.