Documentation ¶
Index ¶
- Variables
- func BitAtVector(b []byte, i int) bool
- func BitAtVectorReversed(b []byte, i int) bool
- func ConvertPeerIDStringToEnodeID(pidStr string) (enode.ID, error)
- func CustodyColumnSubnets(nodeId enode.ID, custodySubnetCount uint64, ...) (map[uint64]bool, error)
- func CustodyColumnSubnetsSlice(nodeId enode.ID, custodySubnetCount uint64, ...) ([]uint64, error)
- func CustodyColumns(nodeId enode.ID, custodySubnetCount uint64, numberOfColumns uint64, ...) (map[uint64]bool, error)
- func CustodyColumnsSlice(nodeId enode.ID, custodySubnetCount uint64, numberOfColumns uint64, ...) ([]uint64, error)
- func DecodeENR(raw string) (*enr.Record, error)
- func FormatAddCommas(n uint64) template.HTML
- func FormatAddCommasFormated(num float64, precision uint) template.HTML
- func FormatAmount(amount *big.Int, unit string, digits int) template.HTML
- func FormatAmountFormatted(amount *big.Int, unit string, digits int, maxPreCommaDigitsBeforeTrim int, ...) template.HTML
- func FormatBigAmount(amount *hexutil.Big, unit string, digits int) template.HTML
- func FormatBigNumberAddCommasFormated(val hexutil.Big, precision uint) template.HTML
- func FormatBitlist(b []byte, v []types.NamedValidator) template.HTML
- func FormatBytesAmount(amount []byte, unit string, digits int) template.HTML
- func FormatETH(num string) string
- func FormatETHAddCommasFromGwei(gwei uint64) template.HTML
- func FormatETHFromGwei(gwei uint64) string
- func FormatETHFromGweiShort(gwei uint64) string
- func FormatEthAddress(address []byte) template.HTML
- func FormatEthAddressLink(address []byte) template.HTML
- func FormatEthBlockHashLink(blockHash []byte) template.HTML
- func FormatEthBlockLink(blockNum uint64) template.HTML
- func FormatEthTransactionLink(hash []byte, width uint64) template.HTML
- func FormatFloat(num float64, precision int) string
- func FormatFullETHFromGwei(gwei uint64) string
- func FormatGraffiti(graffiti []byte) template.HTML
- func FormatGraffitiString(graffiti string) string
- func FormatParticipation(v float64) template.HTML
- func FormatRecentTimeShort(ts time.Time) template.HTML
- func FormatSlashedValidator(index uint64, name string) template.HTML
- func FormatValidator(index uint64, name string) template.HTML
- func FormatValidatorNameWithIndex(index uint64, name string) template.HTML
- func FormatValidatorWithIndex(index uint64, name string) template.HTML
- func FormatWithdawalCredentials(hash []byte) template.HTML
- func GetExplorerVersion() string
- func GetKeyValuesFromENR(r *enr.Record) map[string]interface{}
- func GetNodeIDFromENR(r *enr.Record) enode.ID
- func GetRedactedUrl(requrl string) string
- func GetTemplateFuncs() template.FuncMap
- func GraffitiToString(graffiti []byte) string
- func HandleSubroutinePanic(identifier string)
- func IncludeHTML(path string) template.HTML
- func IncludeJSON(obj any, escapeHTML bool) template.HTML
- func LogError(err error, errorMsg interface{}, callerSkip int, ...)
- func LogFatal(err error, errorMsg interface{}, callerSkip int, ...)
- func MustParseHex(hexString string) []byte
- func ReadConfig(cfg *types.Config, path string) error
- func SliceContains(list []string, target string) bool
- func SyncCommitteeParticipation(bits []byte, syncCommitteeSize uint64) float64
- func WaitForCtrlC()
- type LogWriter
- type LogWriterHook
Constants ¶
This section is empty.
Variables ¶
var BuildRelease string
var BuildVersion string
var Buildtime string
var Config *types.Config
Config is the globally accessible configuration
var GWEI *big.Int = big.NewInt(1000000000)
Functions ¶
func BitAtVector ¶
func BitAtVectorReversed ¶
func ConvertPeerIDStringToEnodeID ¶ added in v1.12.1
ConvertPeerIDStringToEnodeID converts a libp2p peer ID string to an enode.ID.
func CustodyColumnSubnets ¶ added in v1.12.1
func CustodyColumnSubnetsSlice ¶ added in v1.12.1
func CustodyColumns ¶ added in v1.12.1
func CustodyColumns(nodeId enode.ID, custodySubnetCount uint64, numberOfColumns uint64, dataColumnSidecarSubnetCount uint64) (map[uint64]bool, error)
CustodyColumns computes the columns the node should custody. https://github.com/ethereum/consensus-specs/blob/dev/specs/_features/eip7594/das-core.md#helper-functions
func CustodyColumnsSlice ¶ added in v1.12.1
func FormatAddCommas ¶
func FormatAddCommasFormated ¶
func FormatAmountFormatted ¶
func FormatBigAmount ¶
func FormatBitlist ¶
func FormatBitlist(b []byte, v []types.NamedValidator) template.HTML
func FormatBytesAmount ¶
func FormatETHFromGwei ¶
func FormatETHFromGweiShort ¶
func FormatEthAddress ¶
func FormatEthAddressLink ¶
func FormatEthBlockHashLink ¶
func FormatEthBlockLink ¶
func FormatFloat ¶
func FormatFullETHFromGwei ¶
func FormatGraffiti ¶
func FormatGraffitiString ¶
FormatGraffitiString formats (and escapes) the graffiti
func FormatParticipation ¶
func FormatValidatorNameWithIndex ¶ added in v1.13.0
func GetExplorerVersion ¶
func GetExplorerVersion() string
func GetKeyValuesFromENR ¶ added in v1.11.2
func GetRedactedUrl ¶
func GetTemplateFuncs ¶
GetTemplateFuncs will get the template functions
func GraffitiToString ¶
func HandleSubroutinePanic ¶
func HandleSubroutinePanic(identifier string)
func IncludeJSON ¶ added in v1.12.1
IncludeJSON adds json to the page
func LogError ¶
func LogError(err error, errorMsg interface{}, callerSkip int, additionalInfos ...map[string]interface{})
LogError logs an error with callstack info that skips callerSkip many levels with arbitrarily many additional infos. callerSkip equal to 0 gives you info directly where LogError is called.
func LogFatal ¶
func LogFatal(err error, errorMsg interface{}, callerSkip int, additionalInfos ...map[string]interface{})
LogFatal logs a fatal error with callstack info that skips callerSkip many levels with arbitrarily many additional infos. callerSkip equal to 0 gives you info directly where LogFatal is called.
func MustParseHex ¶
MustParseHex will parse a string into hex
func ReadConfig ¶
ReadConfig will process a configuration
func SliceContains ¶
sliceContains reports whether the provided string is present in the given slice of strings.
Types ¶
type LogWriter ¶
type LogWriter struct {
// contains filtered or unexported fields
}
func InitLogger ¶
func InitLogger() (*LogWriter, logrus.FieldLogger)
type LogWriterHook ¶
WriterHook is a hook that writes logs of specified LogLevels to specified Writer
func (*LogWriterHook) Fire ¶
func (hook *LogWriterHook) Fire(entry *logrus.Entry) error
Fire will be called when some logging function is called with current hook It will format log entry to string and write it to appropriate writer
func (*LogWriterHook) Levels ¶
func (hook *LogWriterHook) Levels() []logrus.Level