params

package
v0.0.0-...-8ad5b9e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 4, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultFeeReductionDenominator = 50       // Bounds the reduction amount the various fees may have in Mive.
	DefaultBlockGasLimitMultiplier = 100      // Bounds the maximum gas limit a Mive block may have.
	DefaultMinBlockGasLimit        = 30000000 // Minimum gas limit for a Mive block.
)
View Source
const (
	VersionMajor = 0        // Major version component of the current release
	VersionMinor = 1        // Minor version component of the current release
	VersionPatch = 0        // Patch version component of the current release
	VersionMeta  = "stable" // Version metadata to append to the version string
)

Variables

View Source
var (
	// DefaultBeaconAddress is the default beacon address, which has suffix "315e" (a variant of "mive").
	DefaultBeaconAddress = common.HexToAddress("0x000000000000000000000000000000000000315e")

	// BeneficiaryAddress is the address that will receive tx fees.
	// TODO
	BeneficiaryAddress = common.HexToAddress("0x0000000000000000000000000000000000000000")
)
View Source
var (
	// MainnetChainConfig is the chain parameters to run a node on the main network.
	MainnetChainConfig = &ChainConfig{
		Eth: params.MainnetChainConfig,
		Mive: &MiveChainConfig{
			GenesisBlock:  new(big.Int),
			BeaconAddress: DefaultBeaconAddress,
		},
	}
)
View Source
var Version = func() string {
	return fmt.Sprintf("%d.%d.%d", VersionMajor, VersionMinor, VersionPatch)
}()

Version holds the textual version string.

View Source
var VersionWithMeta = func() string {
	v := Version
	if VersionMeta != "" {
		v += "-" + VersionMeta
	}
	return v
}()

VersionWithMeta holds the textual version string including the metadata.

Functions

func VersionWithCommit

func VersionWithCommit(gitCommit, gitDate string) string

Types

type ChainConfig

type ChainConfig struct {
	Eth  *params.ChainConfig `json:"eth,omitempty"`
	Mive *MiveChainConfig    `json:"mive,omitempty"`
}

func (*ChainConfig) BlockGasLimitMultiplier

func (c *ChainConfig) BlockGasLimitMultiplier() uint64

BlockGasLimitMultiplier bounds the maximum gas limit a Mive block may have.

func (*ChainConfig) CheckCompatible

func (c *ChainConfig) CheckCompatible(newcfg *ChainConfig, height uint64, time uint64) *params.ConfigCompatError

CheckCompatible checks whether scheduled fork transitions have been imported with a mismatching chain configuration.

func (*ChainConfig) CheckConfigForkOrder

func (c *ChainConfig) CheckConfigForkOrder() error

CheckConfigForkOrder checks that we don't "skip" any forks.

func (*ChainConfig) Description

func (c *ChainConfig) Description() string

Description returns a human-readable description of ChainConfig.

func (*ChainConfig) FeeReductionDenominator

func (c *ChainConfig) FeeReductionDenominator() uint64

FeeReductionDenominator bounds the reduction amount the various fees may have in Mive.

func (*ChainConfig) MinBlockGasLimit

func (c *ChainConfig) MinBlockGasLimit() uint64

MinBlockGasLimit is the minimum gas limit for a Mive block.

type MiveChainConfig

type MiveChainConfig struct {
	// Genesis block at which Mive starts indexing and executing.
	// For any specific network, it should not be changed after Mive launched.
	GenesisBlock *big.Int `json:"genesisBlock,omitempty"`

	// Beacon address that will be observed by Mive for transactions sent to it.
	// These transactions will be interpreted and executed by the Mive EVM.
	// For any specific network, it should not be changed after Mive launched.
	BeaconAddress common.Address `json:"beaconAddress"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL