2021-03-23 09:00:07 +00:00
|
|
|
package params
|
|
|
|
|
|
|
|
import (
|
2021-03-26 18:05:42 +00:00
|
|
|
"crypto/ecdsa"
|
2021-03-23 09:00:07 +00:00
|
|
|
"math/big"
|
|
|
|
"time"
|
|
|
|
|
2023-01-13 18:12:18 +00:00
|
|
|
libcommon "github.com/ledgerwatch/erigon-lib/common"
|
2023-04-13 11:19:02 +00:00
|
|
|
"github.com/ledgerwatch/erigon-lib/common/hexutility"
|
2021-03-23 09:00:07 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// MiningConfig is the configuration parameters of mining.
|
|
|
|
type MiningConfig struct {
|
2022-01-04 17:37:36 +00:00
|
|
|
Enabled bool
|
|
|
|
EnabledPOS bool
|
|
|
|
Noverify bool // Disable remote mining solution verification(only useful in ethash).
|
2023-01-13 18:12:18 +00:00
|
|
|
Etherbase libcommon.Address `toml:",omitempty"` // Public address for block mining rewards
|
2022-01-04 17:37:36 +00:00
|
|
|
SigKey *ecdsa.PrivateKey // ECDSA private key for signing blocks
|
|
|
|
Notify []string `toml:",omitempty"` // HTTP URL list to be notified of new work packages(only useful in ethash).
|
2023-04-13 11:19:02 +00:00
|
|
|
ExtraData hexutility.Bytes `toml:",omitempty"` // Block extra data set by the miner
|
2022-01-05 09:36:24 +00:00
|
|
|
GasLimit uint64 // Target gas limit for mined blocks.
|
2022-01-04 17:37:36 +00:00
|
|
|
GasPrice *big.Int // Minimum gas price for mining a transaction
|
|
|
|
Recommit time.Duration // The time interval for miner to re-create mining work.
|
2021-03-23 09:00:07 +00:00
|
|
|
}
|