meer

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: ISC Imports: 68 Imported by: 0

Documentation

Overview

It is called by go generate and used to automatically generate pre-computed Copyright 2017-2024 The qitmeer developers This file is auto generate by : go run mkalloc.go

It is called by go generate and used to automatically generate pre-computed Copyright 2017-2024 The qitmeer developers This file is auto generate by : go run mkalloc.go

Index

Constants

View Source
const (
	RELEASE_CONTRACT_ADDR = "0x1000000000000000000000000000000000000000"
	// 2022/08/17 20:35:36 MmQitmeerMainNetGuardAddressXd7b76q burn amount 514790066054534
	GuardAddress = "MmQitmeerMainNetGuardAddressXd7b76q"
	// 2022/08/17 20:35:36 MmQitmeerMainNetHonorAddressXY9JH2y burn amount 408011208230864
	HonorAddress = "MmQitmeerMainNetHonorAddressXY9JH2y"

	// record the records size
	SlotPositionOfRecordsSize = 0

	// record the field value
	SlotPositionOfRecordFieldValue = 1
)
View Source
const MainNetGenesisHash = "0x6cff8746d87573e2667d0784ea8753c7ee1dfc67cdb24971fe5f34743b0208fc"
View Source
const MixNetGenesisHash = "0x8e9755f323ddcdaf2bc1c010ddb895450d1a23eef67ed98287bcade4c8a0d959"
View Source
const PrivNetGenesisHash = "0x528b2448923b0d08dc20c692eeb5f42d758e28804c6d341bfb3de9f452290db4"
View Source
const QngJs = `` /* 6599-byte string literal not displayed */
View Source
const TestNetGenesisHash = "0x1c67a198c1a593b9f85bca881cbf5cbe047ab44d08a3571f66473adbe889f1f7"

Variables

View Source
var (
	// ClientIdentifier is a hard coded identifier to report into the network.
	ClientIdentifier = "meereth"
)
View Source
var (
	SysContractDeployerAddress = common.Address{}
)
View Source
var (
	// Version is the version of MeerEvm
	Version = "meervm-v0.0.2"
)

Functions

func BuildBurnBalance added in v1.2.0

func BuildBurnBalance(burnStr string) map[common.Hash]common.Hash

func BuildEVMBlock added in v1.2.0

func BuildEVMBlock(block *qtypes.SerializedBlock) (*mmeer.Block, error)

func ChainConfig added in v1.0.20

func ChainConfig() *params.ChainConfig

func Cleanup

func Cleanup(cfg *config.Config)

func CurrentGenesis added in v1.2.0

func CurrentGenesis() *core.Genesis

func DecodeAlloc added in v1.2.0

func DecodeAlloc(network *qparams.Params) types.GenesisAlloc

func DecodePrealloc

func DecodePrealloc(data string) types.GenesisAlloc

func DeleteBlockNumber

func DeleteBlockNumber(db ethdb.KeyValueWriter, hash common.Hash)

func DoDecodeAlloc added in v1.2.0

func DoDecodeAlloc(network *qparams.Params, genesisStr string, burnStr string) types.GenesisAlloc

func Exist added in v1.2.0

func Exist(cfg *config.Config) bool

func Genesis added in v1.0.21

func Genesis(net protocol.Network, alloc types.GenesisAlloc) *core.Genesis

func MakeConfig

func MakeConfig(cfg *config.Config) (*eth.Config, error)

func MakeParams

func MakeParams(cfg *config.Config) (*eth.Config, []string, error)

func MakePreState

func MakePreState(db ethdb.Database, accounts core.GenesisAlloc) *state.StateDB

func NewTransactorWithChainID

func NewTransactorWithChainID(addr common.Address, chainID *big.Int) (*bind.TransactOpts, error)

func QngGenesis added in v1.0.21

func QngGenesis(alloc types.GenesisAlloc) *core.Genesis

func QngMixnetGenesis added in v1.0.21

func QngMixnetGenesis(alloc types.GenesisAlloc) *core.Genesis

func QngPrivnetGenesis added in v1.0.21

func QngPrivnetGenesis(alloc types.GenesisAlloc) *core.Genesis

func QngTestnetGenesis added in v1.0.21

func QngTestnetGenesis(alloc types.GenesisAlloc) *core.Genesis

func ReadBlockNumber

func ReadBlockNumber(db ethdb.KeyValueReader, hash common.Hash) *uint64

func UpdateAlloc

func UpdateAlloc(genesis *core.Genesis, contracts []Contract) error

func UseLogger

func UseLogger(logger l.Logger)

UseLogger uses a specified Logger to output package logging info.

func WriteBlockNumber

func WriteBlockNumber(db ethdb.KeyValueWriter, hash common.Hash, number uint64)

Types

type Alloc

func Apply

func Apply(genesis *core.Genesis, txs []*GenTransaction) (Alloc, error)

func (Alloc) OnAccount

func (g Alloc) OnAccount(addr *common.Address, dumpAccount state.DumpAccount)

func (Alloc) OnRoot

func (g Alloc) OnRoot(common.Hash)

type Backend

type Backend interface {
	BlockChain() *core.BlockChain
	TxPool() *txpool.TxPool
}

type BurnDetail added in v1.2.0

type BurnDetail struct {
	Order  int64  `json:"order"`
	Height int64  `json:"height"`
	From   string `json:"from"`
	Amount int64  `json:"amount"`
	Time   int64  `json:"time"`
}

type Contract

type Contract struct {
	ABI   string `json:"abi"`
	BIN   string `json:"bin"`
	Input string `json:"input"`
}

type GenTransaction

type GenTransaction struct {
	*types.Transaction
	From common.Address
}

type GenesisData

type GenesisData struct {
	Genesis   core.Genesis `json:"genesis"`
	Contracts []Contract   `json:"contracts"`
}

type MeerChain

type MeerChain struct {
	service.Service
	// contains filtered or unexported fields
}

func NewMeerChain

func NewMeerChain(consensus model.Consensus) (*MeerChain, error)

func (*MeerChain) APIs added in v1.2.0

func (b *MeerChain) APIs() []api.API

func (*MeerChain) CheckConnectBlock

func (b *MeerChain) CheckConnectBlock(block *mmeer.Block) error

func (*MeerChain) CheckSanity added in v1.2.0

func (b *MeerChain) CheckSanity(vt *mmeer.VMTx) error

func (*MeerChain) ConnectBlock

func (b *MeerChain) ConnectBlock(block *mmeer.Block) (uint64, error)

func (*MeerChain) ETHChain

func (b *MeerChain) ETHChain() *eth.ETHChain

func (*MeerChain) Genesis added in v1.2.0

func (b *MeerChain) Genesis() *hash.Hash

func (*MeerChain) GetBalance added in v1.2.0

func (b *MeerChain) GetBalance(addre string) (int64, error)

func (*MeerChain) GetBlockIDByTxHash added in v1.2.0

func (b *MeerChain) GetBlockIDByTxHash(txhash *hash.Hash) uint64

func (*MeerChain) GetCurHeader added in v1.2.0

func (b *MeerChain) GetCurHeader() *types.Header

func (*MeerChain) MeerPool

func (b *MeerChain) MeerPool() *MeerPool

func (*MeerChain) PrepareEnvironment added in v1.0.21

func (b *MeerChain) PrepareEnvironment(state model.BlockState) (*types.Header, error)

func (*MeerChain) RegisterAPIs

func (b *MeerChain) RegisterAPIs(apis []api.API)

func (*MeerChain) RewindTo added in v1.0.21

func (b *MeerChain) RewindTo(state model.BlockState) error

func (*MeerChain) Start

func (b *MeerChain) Start() error

func (*MeerChain) Stop

func (b *MeerChain) Stop() error

func (*MeerChain) VerifyTx added in v1.2.0

func (b *MeerChain) VerifyTx(tx *mmeer.VMTx) (int64, error)

type MeerChainInfo added in v1.2.0

type MeerChainInfo struct {
	MeerVer   string `json:"meerver"`
	EvmVer    string `json:"evmver"`
	ChainID   uint64 `json:"chainid"`
	NetworkID uint64 `json:"networkid"`
	IPC       string `json:"ipc,omitempty"`
	HTTP      string `json:"http,omitempty"`
	WS        string `json:"ws,omitempty"`
}

type MeerPool

type MeerPool struct {
	// contains filtered or unexported fields
}

func (*MeerPool) AddTx

func (m *MeerPool) AddTx(tx *qtypes.Tx, local bool) (int64, error)

func (*MeerPool) AnnounceNewTransactions

func (m *MeerPool) AnnounceNewTransactions(txs []*types.Transaction) error

func (*MeerPool) BuildPayload added in v1.0.20

func (m *MeerPool) BuildPayload(args *miner.BuildPayloadArgs) (*miner.Payload, error)

func (*MeerPool) Close

func (m *MeerPool) Close()

func (*MeerPool) GetSealingBlockAsync

func (m *MeerPool) GetSealingBlockAsync(parent common.Hash, timestamp uint64, coinbase common.Address, random common.Hash, noTxs bool) (chan *types.Block, error)

func (*MeerPool) GetSealingBlockSync

func (m *MeerPool) GetSealingBlockSync(parent common.Hash, timestamp uint64, coinbase common.Address, random common.Hash, noTxs bool) (*types.Block, error)

func (*MeerPool) GetSize

func (m *MeerPool) GetSize() int64

func (*MeerPool) GetTxs

func (m *MeerPool) GetTxs() ([]*qtypes.Tx, []*hash.Hash, error)

func (*MeerPool) HasTx added in v1.0.21

func (m *MeerPool) HasTx(h *hash.Hash, all bool) bool

all: contain txs in pending and queue

func (*MeerPool) Hashrate

func (m *MeerPool) Hashrate() uint64

func (*MeerPool) Mining

func (m *MeerPool) Mining() bool

func (*MeerPool) Pending

func (m *MeerPool) Pending() (*types.Block, types.Receipts, *state.StateDB)

func (*MeerPool) PendingBlock

func (m *MeerPool) PendingBlock() *types.Block

func (*MeerPool) PendingBlockAndReceipts

func (m *MeerPool) PendingBlockAndReceipts() (*types.Block, types.Receipts)

func (*MeerPool) RemoveTx

func (m *MeerPool) RemoveTx(tx *qtypes.Tx) error

func (*MeerPool) ResetTemplate

func (m *MeerPool) ResetTemplate() error

func (*MeerPool) SetEtherbase

func (m *MeerPool) SetEtherbase(addr common.Address)

func (*MeerPool) SetExtra

func (m *MeerPool) SetExtra(extra []byte) error

func (*MeerPool) SetGasCeil

func (m *MeerPool) SetGasCeil(ceil uint64)

func (*MeerPool) SetGasTip added in v1.2.0

func (m *MeerPool) SetGasTip(tip *big.Int) error

func (*MeerPool) SetNotify added in v1.2.0

func (m *MeerPool) SetNotify(notify model.Notify)

func (*MeerPool) SetRecommitInterval

func (m *MeerPool) SetRecommitInterval(interval time.Duration)

func (*MeerPool) SetTxPool added in v1.2.0

func (m *MeerPool) SetTxPool(tp model.TxPool)

func (*MeerPool) Start

func (m *MeerPool) Start()

func (*MeerPool) Stop

func (m *MeerPool) Stop()

func (*MeerPool) SubscribePendingLogs

func (m *MeerPool) SubscribePendingLogs(ch chan<- []*types.Log) event.Subscription

type NetGenesisData

type NetGenesisData struct {
	Network string      `json:"network"`
	Data    GenesisData `json:"data"`
}

type PublicMeerChainAPI added in v1.2.0

type PublicMeerChainAPI struct {
	// contains filtered or unexported fields
}

func NewPublicMeerChainAPI added in v1.2.0

func NewPublicMeerChainAPI(mc *MeerChain) *PublicMeerChainAPI

func (*PublicMeerChainAPI) GetMeerChainInfo added in v1.2.0

func (api *PublicMeerChainAPI) GetMeerChainInfo() (interface{}, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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