Documentation ¶
Index ¶
Constants ¶
const DefaultBeaconID = "default"
DefaultBeaconID is the value used when beacon id has an empty value. This value should not be changed for backward-compatibility reasons
const DefaultChainHash = "default"
DefaultChainHash is the value used when chain hash has an empty value on requests from clients. This value should not be changed for backward-compatibility reasons
const LogsToSkip = 300
LogsToSkip is used to reduce log verbosity when doing bulk processes, issuing logs only every LogsToSkip steps this is currently set so that when processing past beacons it will give a log every ~2 seconds
const MultiBeaconFolder = "multibeacon"
MultiBeaconFolder is the name of the folder where the multi-beacon data is stored
Variables ¶
var ( COMMIT = "" BUILDDATE = "" )
Set via -ldflags. Example:
go install -ldflags "-X common.BUILDDATE=`date -u +%d/%m/%Y@%H:%M:%S` -X common.GITCOMMIT=`git rev-parse HEAD`
See the Makefile and the Dockerfile in the root directory of the repo
var ErrInvalidChainHash = errors.New("incorrect chain hash")
ErrInvalidChainHash means there was an error or a mismatch with the chain hash
var ErrNotPartOfGroup = errors.New("this node is not part of the group")
ErrNotPartOfGroup indicates that this node is not part of the group for a specific beacon ID
var ErrPeerNotFound = errors.New("peer not found")
ErrPeerNotFound indicates that a peer is not part of any group that this node knows of
Functions ¶
func CompareBeaconIDs ¶
CompareBeaconIDs indicates if two different beacon ids are equivalent or not. It handles default values too.
func GetCanonicalBeaconID ¶
GetCanonicalBeaconID returns the correct beacon id.
func IsDefaultBeaconID ¶
IsDefaultBeaconID indicates if the beacon id received is the default one or not. There is a direct relationship between an empty string and the reserved id "default". Internally, empty string is translated to "default" so we can create the beacon folder with a valid name.
Types ¶
type Version ¶
func GetAppVersion ¶
func GetAppVersion() Version
func (Version) IsCompatible ¶
func (Version) ToProto ¶
func (v Version) ToProto() *pbcommon.NodeVersion