Documentation ¶
Index ¶
- Constants
- Variables
- func CheckParamsTask(ctx context.Context, redisClient rueidis.Client, ...) error
- func GetCurrentEpoch(ctx context.Context, redisClient rueidis.Client) (int64, error)
- func GetCurrentEpochFromVSL(settlement *vsl.SettlementCaller) (int64, error)
- func GetNetworkBlockStart(ctx context.Context, redisClient rueidis.Client, network string) (uint64, error)
- func InitVSLClient() (ethereum.Client, error)
- func PullNetworkParamsFromVSL(networkParams *vsl.NetworkParamsCaller, epoch uint64) (string, error)
- func UpdateBlockStart(ctx context.Context, redisClient rueidis.Client, network string, ...) error
- func UpdateCurrentEpoch(ctx context.Context, redisClient rueidis.Client, epoch int64) error
- type NetworkCoreWorkerDiskSpacePerMonth
- type NetworkParamsData
- type NetworkStartBlock
- type NetworkTolerance
- type StartBlock
Constants ¶
const NumberOfMonthsToCover = 4
NumberOfMonthsToCover the number of months that a Node should cover data for
Variables ¶
var CurrentNetworkCoreWorkerDiskSpacePerMonth = NetworkCoreWorkerDiskSpacePerMonth{}
CurrentNetworkCoreWorkerDiskSpacePerMonth the disk space required for the network's core worker to store a month worth of data The data is calculated based on the average disk space usage during 2024 Q1. Actually usage may vary depending on the network's activity.
var CurrentNetworkStartBlock = NetworkStartBlock{}
CurrentNetworkStartBlock should be updated each epoch from vsl
var CurrentNetworkTolerance = NetworkTolerance{}
CurrentNetworkTolerance should be updated each epoch from vsl
Functions ¶
func CheckParamsTask ¶ added in v0.5.25
func GetCurrentEpoch ¶ added in v0.5.25
GetCurrentEpoch Get the current epoch from redis cache
func GetCurrentEpochFromVSL ¶ added in v0.5.25
func GetCurrentEpochFromVSL(settlement *vsl.SettlementCaller) (int64, error)
GetCurrentEpochFromVSL Get the current epoch from VSL blockchain
func GetNetworkBlockStart ¶ added in v0.5.25
func GetNetworkBlockStart(ctx context.Context, redisClient rueidis.Client, network string) (uint64, error)
GetNetworkBlockStart Get the current network block start from redis cache
func InitVSLClient ¶ added in v0.5.25
InitVSLClient initializes the VSL client
func PullNetworkParamsFromVSL ¶ added in v0.5.25
func PullNetworkParamsFromVSL(networkParams *vsl.NetworkParamsCaller, epoch uint64) (string, error)
PullNetworkParamsFromVSL pulls the network parameters from the VSL
Types ¶
type NetworkCoreWorkerDiskSpacePerMonth ¶ added in v0.4.42
type NetworkParamsData ¶ added in v0.5.25
type NetworkParamsData struct { NetworkTolerance NetworkTolerance `json:"network_tolerance"` NetworkStartBlock NetworkStartBlock `json:"network_start_block"` NetworkCoreWorkerDiskSpacePerMonth NetworkCoreWorkerDiskSpacePerMonth `json:"network_core_worker_disk_space_per_month"` }
NetworkParamsData contains the network parameters
func (*NetworkParamsData) UnmarshalJSON ¶ added in v0.5.25
func (npd *NetworkParamsData) UnmarshalJSON(data []byte) error
UnmarshalJSON defines a custom UnmarshalJSON method for NetworkParamsData
type NetworkStartBlock ¶
type NetworkStartBlock map[network.Network]*StartBlock