Versions in this module Expand all Collapse all v1 v1.10.3 Dec 16, 2024 v1.10.2 Dec 15, 2024 Changes in this version + const BloomBitsBlocks + var DefaultGPOConfig = intelchain.GasPriceOracleConfig + var ErrFinalizedTransaction = errors.New("transaction already finalized") + func NewBloomIndexer(db core.Chain, size, confirms uint64) *core.ChainIndexer + type BloomIndexer struct + func (b *BloomIndexer) Commit() error + func (b *BloomIndexer) Process(ctx context.Context, header *block.Header) error + func (b *BloomIndexer) Reset(ctx context.Context, section uint64, lastSectionHead common.Hash) error + type DetailedBlockSignerInfo struct + BlockHash common.Hash + Committee shard.SlotList + Signers shard.SlotList + type ExecutionResult struct + Failed bool + Gas uint64 + ReturnValue string + StructLogs []StructLogRes + type Intelchain struct + BeaconChain core.BlockChain + BlockChain core.BlockChain + BloomIndexer *core.ChainIndexer + BloomRequests chan chan *bloombits.Retrieval + ChainID uint64 + CxPool *core.CxPool + EthChainID uint64 + NodeAPI NodeAPI + RPCGasCap *big.Int + ShardID uint32 + ShutdownChan chan bool + TxPool *core.TxPool + func New(nodeAPI NodeAPI, txPool *core.TxPool, cxPool *core.CxPool, shardID uint32) *Intelchain + func (itc *Intelchain) BlockByNumber(ctx context.Context, blockNum rpc.BlockNumber) (*types.Block, error) + func (itc *Intelchain) BlockByNumberOrHash(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) (*types.Block, error) + func (itc *Intelchain) BloomStatus() (uint64, uint64) + func (itc *Intelchain) ChainConfig() *params.ChainConfig + func (itc *Intelchain) ChainDb() ethdb.Database + func (itc *Intelchain) ComputeStateDB(block *types.Block, reexec uint64) (*state.DB, error) + func (itc *Intelchain) ComputeTxEnv(block *types.Block, txIndex int, reexec uint64) (core.Message, vm.Context, *state.DB, error) + func (itc *Intelchain) ComputeTxEnvEachBlockWithoutApply(block *types.Block, reexec uint64, ...) error + func (itc *Intelchain) CurrentBlock() *types.Block + func (itc *Intelchain) CurrentHeader() *block.Header + func (itc *Intelchain) EventMux() *event.TypeMux + func (itc *Intelchain) GetAccountNonce(ctx context.Context, address common.Address, blockNum rpc.BlockNumber) (uint64, error) + func (itc *Intelchain) GetAllValidatorAddresses() []common.Address + func (itc *Intelchain) GetBalance(ctx context.Context, address common.Address, ...) (*big.Int, error) + func (itc *Intelchain) GetBlock(ctx context.Context, hash common.Hash) (*types.Block, error) + func (itc *Intelchain) GetBlockSigners(ctx context.Context, blockNum rpc.BlockNumber) (shard.SlotList, *internal_bls.Mask, error) + func (itc *Intelchain) GetCurrentBadBlocks() []core.BadBlock + func (itc *Intelchain) GetCurrentStakingErrorSink() types.TransactionErrorReports + func (itc *Intelchain) GetCurrentTransactionErrorSink() types.TransactionErrorReports + func (itc *Intelchain) GetCurrentUtilityMetrics() (*network.UtilityMetric, error) + func (itc *Intelchain) GetDelegationLockingPeriodInEpoch(epoch *big.Int) int + func (itc *Intelchain) GetDelegationsByDelegator(delegator common.Address) ([]common.Address, []*staking.Delegation) + func (itc *Intelchain) GetDelegationsByDelegatorByBlock(delegator common.Address, block *types.Block) ([]common.Address, []*staking.Delegation) + func (itc *Intelchain) GetDelegationsByValidator(validator common.Address) []staking.Delegation + func (itc *Intelchain) GetDelegationsByValidatorAtBlock(validator common.Address, block *types.Block) []staking.Delegation + func (itc *Intelchain) GetDetailedBlockSignerInfo(ctx context.Context, blk *types.Block) (*DetailedBlockSignerInfo, error) + func (itc *Intelchain) GetEVM(ctx context.Context, msg core.Message, state *state.DB, header *block.Header) (*vm.EVM, error) + func (itc *Intelchain) GetElectedValidatorAddresses() []common.Address + func (itc *Intelchain) GetHeader(ctx context.Context, hash common.Hash) (*block.Header, error) + func (itc *Intelchain) GetLastCrossLinks() ([]*types.CrossLink, error) + func (itc *Intelchain) GetLatestChainHeaders() *block.HeaderPair + func (itc *Intelchain) GetLeaderAddress(coinbaseAddr common.Address, epoch *big.Int) string + func (itc *Intelchain) GetLogs(ctx context.Context, blockHash common.Hash, isEth bool) ([][]*types.Log, error) + func (itc *Intelchain) GetMedianRawStakeSnapshot() (*committee.CompletedEPoSRound, error) + func (itc *Intelchain) GetNodeMetadata() commonRPC.NodeMetadata + func (itc *Intelchain) GetPeerInfo() commonRPC.NodePeerInfo + func (itc *Intelchain) GetPendingCXReceipts() []*types.CXReceiptsProof + func (itc *Intelchain) GetPoolNonce(ctx context.Context, addr common.Address) (uint64, error) + func (itc *Intelchain) GetPoolStats() (pendingCount, queuedCount int) + func (itc *Intelchain) GetPoolTransaction(hash common.Hash) types.PoolTransaction + func (itc *Intelchain) GetPoolTransactions() (types.PoolTransactions, error) + func (itc *Intelchain) GetPreStakingBlockRewards(ctx context.Context, blk *types.Block) (PreStakingBlockRewards, error) + func (itc *Intelchain) GetReceipts(ctx context.Context, hash common.Hash) (types.Receipts, error) + func (itc *Intelchain) GetShardState() (*shard.State, error) + func (itc *Intelchain) GetStakingTransactionsCount(address, txType string) (uint64, error) + func (itc *Intelchain) GetStakingTransactionsHistory(address, txType, order string) ([]common.Hash, error) + func (itc *Intelchain) GetSuperCommittees() (*quorum.Transition, error) + func (itc *Intelchain) GetTotalStakingSnapshot() *big.Int + func (itc *Intelchain) GetTransactionsCount(address, txType string) (uint64, error) + func (itc *Intelchain) GetTransactionsHistory(address, txType, order string) ([]common.Hash, error) + func (itc *Intelchain) GetUndelegationPayouts(ctx context.Context, epoch *big.Int) (*UndelegationPayouts, error) + func (itc *Intelchain) GetValidatorInformation(addr common.Address, block *types.Block) (*staking.ValidatorRPCEnhanced, error) + func (itc *Intelchain) GetValidatorSelfDelegation(addr common.Address) *big.Int + func (itc *Intelchain) GetValidators(epoch *big.Int) (*shard.Committee, error) + func (itc *Intelchain) GetValidatorsStakeByBlockNumber(block *types.Block) (map[string]*big.Int, error) + func (itc *Intelchain) HeaderByHash(ctx context.Context, blockHash common.Hash) (*block.Header, error) + func (itc *Intelchain) HeaderByNumber(ctx context.Context, blockNum rpc.BlockNumber) (*block.Header, error) + func (itc *Intelchain) IsCommitteeSelectionBlock(header *block.Header) bool + func (itc *Intelchain) IsLeader() bool + func (itc *Intelchain) IsMaxRate(epoch *big.Int) bool + func (itc *Intelchain) IsNoEarlyUnlockEpoch(epoch *big.Int) bool + func (itc *Intelchain) IsPreStakingEpoch(epoch *big.Int) bool + func (itc *Intelchain) IsStakingEpoch(epoch *big.Int) bool + func (itc *Intelchain) ProtocolVersion() int + func (itc *Intelchain) ResendCx(ctx context.Context, txID common.Hash) (uint64, bool) + func (itc *Intelchain) SendStakingTx(ctx context.Context, signedStakingTx *staking.StakingTransaction) error + func (itc *Intelchain) SendTx(ctx context.Context, signedTx *types.Transaction) error + func (itc *Intelchain) ServiceFilter(ctx context.Context, session *bloombits.MatcherSession) + func (itc *Intelchain) SingleFlightForgetKey(key string) + func (itc *Intelchain) SingleFlightRequest(key string, fn func() (interface{}, error)) (interface{}, error) + func (itc *Intelchain) StateAndHeaderByNumber(ctx context.Context, blockNum rpc.BlockNumber) (*state.DB, *block.Header, error) + func (itc *Intelchain) StateAndHeaderByNumberOrHash(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) (*state.DB, *block.Header, error) + func (itc *Intelchain) SubscribeChainEvent(ch chan<- core.ChainEvent) event.Subscription + func (itc *Intelchain) SubscribeChainHeadEvent(ch chan<- core.ChainHeadEvent) event.Subscription + func (itc *Intelchain) SubscribeChainSideEvent(ch chan<- core.ChainSideEvent) event.Subscription + func (itc *Intelchain) SubscribeLogsEvent(ch chan<- []*types.Log) event.Subscription + func (itc *Intelchain) SubscribeNewTxsEvent(ch chan<- core.NewTxsEvent) event.Subscription + func (itc *Intelchain) SubscribeRemovedLogsEvent(ch chan<- core.RemovedLogsEvent) event.Subscription + func (itc *Intelchain) SuggestPrice(ctx context.Context) (*big.Int, error) + func (itc *Intelchain) TraceBlock(ctx context.Context, block *types.Block, config *TraceConfig) ([]*TxTraceResult, error) + func (itc *Intelchain) TraceChain(ctx context.Context, start, end *types.Block, config *TraceConfig) (*rpc.Subscription, error) + func (itc *Intelchain) TraceTx(ctx context.Context, message core.Message, vmctx vm.Context, statedb *state.DB, ...) (interface{}, error) + type NodeAPI interface + AddPendingStakingTransaction func(*staking.StakingTransaction) error + AddPendingTransaction func(newTx *types.Transaction) error + Beaconchain func() core.BlockChain + Blockchain func() core.BlockChain + GetConfig func() commonRPC.Config + GetConsensusCurViewID func() uint64 + GetConsensusInternal func() commonRPC.ConsensusInternal + GetConsensusMode func() string + GetConsensusPhase func() string + GetConsensusViewChangingID func() uint64 + GetLastSigningPower func() (float64, error) + GetLastSigningPower2 func() (float64, error) + GetNodeBootTime func() int64 + GetStakingTransactionsCount func(address, txType string) (uint64, error) + GetStakingTransactionsHistory func(address, txType, order string) ([]common.Hash, error) + GetTraceResultByHash func(hash common.Hash) (json.RawMessage, error) + GetTransactionsCount func(address, txType string) (uint64, error) + GetTransactionsHistory func(address, txType, order string) ([]common.Hash, error) + IsBackup func() bool + IsCurrentlyLeader func() bool + IsOutOfSync func(shardID uint32) bool + ListBlockedPeer func() []peer.ID + ListPeer func(topic string) []peer.ID + ListTopic func() []string + PeerConnectivity func() (int, int, int) + PendingCXReceipts func() []*types.CXReceiptsProof + ReportPlainErrorSink func() types.TransactionErrorReports + ReportStakingErrorSink func() types.TransactionErrorReports + SetNodeBackupMode func(isBackup bool) bool + ShutDown func() + SyncPeers func() map[string]int + SyncStatus func(shardID uint32) (bool, uint64, uint64) + type Oracle struct + func NewOracle(backend *Intelchain, params *intelchain.GasPriceOracleConfig) *Oracle + func (gpo *Oracle) SuggestPrice(ctx context.Context) (*big.Int, error) + type OracleBackend interface + BlockByNumber func(ctx context.Context, number rpc.BlockNumber) (*types.Block, error) + ChainConfig func() *params.ChainConfig + HeaderByNumber func(ctx context.Context, number rpc.BlockNumber) (*block.Header, error) + type PreStakingBlockRewards map[common.Address]*big.Int + type StdTraceConfig struct + Reexec *uint64 + TxHash common.Hash + type StructLogRes struct + AfterStack []string + CallerAddress common.Address + ContractAddress common.Address + Depth int + Error error + Gas uint64 + GasCost uint64 + Memory []string + Op string + Pc uint64 + Stack []string + Storage map[string]string + func FormatLogs(logs []*vm.StructLog, conf *TraceConfig) []StructLogRes + func (r *StructLogRes) FormatAfterStack() []string + func (r *StructLogRes) FormatMemory() []string + func (r *StructLogRes) FormatStack() []string + func (r *StructLogRes) FormatStorage() map[string]string + func (r *StructLogRes) GetOperatorEvent(key string) string + type TraceConfig struct + Reexec *uint64 + Timeout *string + Tracer *string + type TxTraceResult struct + Error string + Result interface{} + type UndelegationPayouts struct + Data map[common.Address]map[common.Address]*big.Int + func NewUndelegationPayouts() *UndelegationPayouts + func (u *UndelegationPayouts) SetPayoutByDelegatorAddrAndValidatorAddr(delegator, validator common.Address, amount *big.Int)