Documentation ¶
Index ¶
- type Chain
- func (c *Chain) AccountDB() (*state2.StateDB, error)
- func (c *Chain) AccountDBForTrie(trieRoot common.Hash) (*state2.StateDB, error)
- func (c *Chain) AddBlock(b *block.Block) bool
- func (c *Chain) CalculateEpochMetaData(statedb *state2.StateDB, slotNumber uint64, parentHeaderHash common.Hash) (*metadata.EpochMetaData, error)
- func (c *Chain) Config() *params.ChainConfig
- func (c *Chain) CurrentBlock() *block.Block
- func (c *Chain) CurrentFinalizedBlock() *block.Block
- func (c *Chain) EVMCall(contractAddress common.Address, data []byte) ([]byte, error)
- func (c *Chain) GetAttestorsBySlotNumber(trieRoot common.Hash, slotNumber uint64, parentHeaderHash common.Hash) ([][]byte, error)
- func (c *Chain) GetBlock(headerHash common.Hash) (*block.Block, error)
- func (c *Chain) GetBlockByNumber(number uint64) *block.Block
- func (c *Chain) GetBlockBySlotNumber(n uint64) (*block.Block, error)
- func (c *Chain) GetBlockHashBySlotNumber(n uint64) common.Hash
- func (c *Chain) GetBlockMetaData(headerHash common.Hash) (*metadata.BlockMetaData, error)
- func (c *Chain) GetEpochHeaderHashes(epoch uint64) (*protos.EpochBlockHashesMetaData, error)
- func (c *Chain) GetEpochMetaData(trieRoot common.Hash, slotNumber uint64, parentHeaderHash common.Hash) (*metadata.EpochMetaData, error)
- func (c *Chain) GetFinalizedHeaderHash() (common.Hash, error)
- func (c *Chain) GetLastBlock() *block.Block
- func (c *Chain) GetLogsByHash(headerHash common.Hash) ([][]*types.Log, error)
- func (c *Chain) GetMaxPossibleSlotNumber() uint64
- func (c *Chain) GetNonce(address common.Address) (uint64, error)
- func (c *Chain) GetReceiptsByHash(headerHash common.Hash, isProtocolTransaction bool) types.Receipts
- func (c *Chain) GetSlotLeaderDilithiumPKBySlotNumber(trieRoot common.Hash, slotNumber uint64, parentHeaderHash common.Hash) ([]byte, error)
- func (c *Chain) GetSlotValidatorsMetaDataBySlotNumber(trieRoot common.Hash, slotNumber uint64, parentHeaderHash common.Hash) (*metadata.SlotValidatorsMetaData, error)
- func (c *Chain) GetStartingNonFinalizedEpoch() (uint64, error)
- func (c *Chain) GetStateContext() (*state.StateContext, error)
- func (c *Chain) GetStateContext2(slotNumber uint64, blockProposer []byte, parentHeaderHash common.Hash, ...) (*state.StateContext, error)
- func (c *Chain) GetTotalStakeAmount() (*big.Int, error)
- func (c *Chain) GetTransactionMetaDataByHash(txHash common.Hash) (*protos.Transaction, common.Hash, uint64, uint64)
- func (c *Chain) GetTransactionPool() *pool.TransactionPool
- func (c *Chain) GetVMConfig() *vm.Config
- func (c *Chain) GetValidators() (*metadata.EpochMetaData, error)
- func (c *Chain) Height() uint64
- func (c *Chain) Load() error
- func (c *Chain) StateAt(root common.Hash) (*state2.StateDB, error)
- func (c *Chain) ValidateAttestTransaction(protoTx *protos.ProtocolTransaction, ...) error
- func (c *Chain) ValidateCoinBaseTransaction(protoTx *protos.ProtocolTransaction, ...) error
- func (c *Chain) ValidateProtocolTransaction(protoTx *protos.ProtocolTransaction, ...) error
- func (c *Chain) ValidateTransaction(protoTx *protos.Transaction) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chain ¶
type Chain struct {
// contains filtered or unexported fields
}
func (*Chain) AccountDBForTrie ¶
func (*Chain) CalculateEpochMetaData ¶
func (*Chain) Config ¶
func (c *Chain) Config() *params.ChainConfig
func (*Chain) CurrentBlock ¶
func (*Chain) CurrentFinalizedBlock ¶
func (*Chain) GetAttestorsBySlotNumber ¶
func (*Chain) GetBlockBySlotNumber ¶
func (*Chain) GetBlockHashBySlotNumber ¶
func (*Chain) GetBlockMetaData ¶
func (*Chain) GetEpochHeaderHashes ¶
func (c *Chain) GetEpochHeaderHashes(epoch uint64) (*protos.EpochBlockHashesMetaData, error)
func (*Chain) GetEpochMetaData ¶
func (*Chain) GetFinalizedHeaderHash ¶
func (*Chain) GetLastBlock ¶
func (*Chain) GetLogsByHash ¶
func (*Chain) GetMaxPossibleSlotNumber ¶
func (*Chain) GetReceiptsByHash ¶
func (*Chain) GetSlotLeaderDilithiumPKBySlotNumber ¶
func (*Chain) GetSlotValidatorsMetaDataBySlotNumber ¶
func (c *Chain) GetSlotValidatorsMetaDataBySlotNumber(trieRoot common.Hash, slotNumber uint64, parentHeaderHash common.Hash) (*metadata.SlotValidatorsMetaData, error)
GetSlotValidatorsMetaDataBySlotNumber returns a map of all the validators for a specific slot number. The value of map is 1 for slot leader and 0 for the attestors.
func (*Chain) GetStartingNonFinalizedEpoch ¶
func (*Chain) GetStateContext ¶
func (c *Chain) GetStateContext() (*state.StateContext, error)
func (*Chain) GetStateContext2 ¶
func (*Chain) GetTransactionMetaDataByHash ¶
func (*Chain) GetTransactionPool ¶
func (c *Chain) GetTransactionPool() *pool.TransactionPool
func (*Chain) GetVMConfig ¶
GetVMConfig returns the chain VM config.
func (*Chain) GetValidators ¶
func (c *Chain) GetValidators() (*metadata.EpochMetaData, error)
func (*Chain) ValidateAttestTransaction ¶
func (c *Chain) ValidateAttestTransaction(protoTx *protos.ProtocolTransaction, validatorsType *metadata.SlotValidatorsMetaData, partialBlockSigningHash common.Hash, slotNumber, parentSlotNumber uint64) error
func (*Chain) ValidateCoinBaseTransaction ¶
func (c *Chain) ValidateCoinBaseTransaction(protoTx *protos.ProtocolTransaction, validatorsType *metadata.SlotValidatorsMetaData, blockSigningHash common.Hash, slotNumber, parentSlotNumber uint64, isGenesis bool) error
func (*Chain) ValidateProtocolTransaction ¶
func (c *Chain) ValidateProtocolTransaction(protoTx *protos.ProtocolTransaction, slotValidatorsMetaData *metadata.SlotValidatorsMetaData, blockSigningHash common.Hash, slotNumber, parentSlotNumber uint64, isGenesis bool) error
func (*Chain) ValidateTransaction ¶
func (c *Chain) ValidateTransaction(protoTx *protos.Transaction) error
Click to show internal directories.
Click to hide internal directories.