Documentation ¶
Index ¶
- Constants
- func GetClaimStatus(rp *rocketpool.RocketPool, nodeAddress common.Address) (unclaimed []uint64, claimed []uint64, err error)
- func GetHoleskyRulesetVersion(interval uint64) uint64
- func GetMainnetRulesetVersion(interval uint64) uint64
- func GetRulesetVersion(network cfgtypes.Network, interval uint64) uint64
- func GetStartSlotForInterval(previousIntervalEvent rewards.RewardsEvent, bc RewardsBeaconClient, ...) (uint64, error)
- func NewRewardsExecutionClient(rp *rocketpool.RocketPool) *defaultRewardsExecutionClient
- type CommitteeInfo
- type GenerateTreeResult
- type ILocalFile
- type IMinipoolPerformanceFile
- type IRewardsFile
- type ISerializable
- type ISmoothingPoolMinipoolPerformance
- type IntervalDutiesInfo
- type IntervalInfo
- type LocalFile
- func (lf *LocalFile[T]) CreateCompressedFileAndCid() (string, cid.Cid, error)
- func (lf *LocalFile[T]) FileName() string
- func (lf *LocalFile[T]) Impl() T
- func (lf *LocalFile[T]) Path() string
- func (lf *LocalFile[T]) Serialize() ([]byte, error)
- func (lf *LocalFile[T]) SerializeSSZ() ([]byte, error)
- func (lf *LocalFile[T]) Write() ([]byte, error)
- func (lf *LocalFile[T]) WriteSSZ() ([]byte, error)
- type LocalMinipoolPerformanceFile
- type LocalRewardsFile
- type MinipoolInfo
- type MinipoolPerformanceFile_v1
- func (f *MinipoolPerformanceFile_v1) Deserialize(bytes []byte) error
- func (f *MinipoolPerformanceFile_v1) GetMinipoolAddresses() []common.Address
- func (f *MinipoolPerformanceFile_v1) GetSmoothingPoolPerformance(minipoolAddress common.Address) (ISmoothingPoolMinipoolPerformance, bool)
- func (f *MinipoolPerformanceFile_v1) Serialize() ([]byte, error)
- func (f *MinipoolPerformanceFile_v1) SerializeHuman() ([]byte, error)
- func (f *MinipoolPerformanceFile_v1) SerializeSSZ() ([]byte, error)
- type MinipoolPerformanceFile_v2
- func (f *MinipoolPerformanceFile_v2) Deserialize(bytes []byte) error
- func (f *MinipoolPerformanceFile_v2) GetMinipoolAddresses() []common.Address
- func (f *MinipoolPerformanceFile_v2) GetSmoothingPoolPerformance(minipoolAddress common.Address) (ISmoothingPoolMinipoolPerformance, bool)
- func (f *MinipoolPerformanceFile_v2) Serialize() ([]byte, error)
- func (f *MinipoolPerformanceFile_v2) SerializeHuman() ([]byte, error)
- func (f *MinipoolPerformanceFile_v2) SerializeSSZ() ([]byte, error)
- type NetworkRewardsInfo
- type NodeRewardsInfo_v1
- type NodeRewardsInfo_v2
- type NodeSmoothingDetails
- type QuotedBigInt
- type RewardsBeaconClient
- type RewardsExecutionClient
- type RewardsFileHeader
- type RewardsFile_v1
- func (f *RewardsFile_v1) Deserialize(bytes []byte) error
- func (f *RewardsFile_v1) GenerateMerkleTree() error
- func (f *RewardsFile_v1) GetConsensusEndBlock() uint64
- func (f *RewardsFile_v1) GetConsensusStartBlock() uint64
- func (f *RewardsFile_v1) GetEndTime() time.Time
- func (f *RewardsFile_v1) GetExecutionEndBlock() uint64
- func (f *RewardsFile_v1) GetExecutionStartBlock() uint64
- func (f *RewardsFile_v1) GetIndex() uint64
- func (f *RewardsFile_v1) GetIntervalsPassed() uint64
- func (f *RewardsFile_v1) GetMerkleProof(addr common.Address) ([]common.Hash, error)
- func (f *RewardsFile_v1) GetMerkleRoot() string
- func (f *RewardsFile_v1) GetNetworkCollateralRpl(network uint64) *big.Int
- func (f *RewardsFile_v1) GetNetworkOracleDaoRpl(network uint64) *big.Int
- func (f *RewardsFile_v1) GetNetworkRewards(network uint64) *NetworkRewardsInfo
- func (f *RewardsFile_v1) GetNetworkSmoothingPoolEth(network uint64) *big.Int
- func (f *RewardsFile_v1) GetNodeAddresses() []common.Address
- func (f *RewardsFile_v1) GetNodeCollateralRpl(addr common.Address) *big.Int
- func (f *RewardsFile_v1) GetNodeOracleDaoRpl(addr common.Address) *big.Int
- func (f *RewardsFile_v1) GetNodeSmoothingPoolEth(addr common.Address) *big.Int
- func (f *RewardsFile_v1) GetRewardsFileVersion() uint64
- func (f *RewardsFile_v1) GetStartTime() time.Time
- func (f *RewardsFile_v1) GetTotalCollateralRpl() *big.Int
- func (f *RewardsFile_v1) GetTotalNodeOperatorSmoothingPoolEth() *big.Int
- func (f *RewardsFile_v1) GetTotalNodeWeight() *big.Int
- func (f *RewardsFile_v1) GetTotalOracleDaoRpl() *big.Int
- func (f *RewardsFile_v1) GetTotalPoolStakerSmoothingPoolEth() *big.Int
- func (f *RewardsFile_v1) GetTotalProtocolDaoRpl() *big.Int
- func (f *RewardsFile_v1) HasRewardsFor(addr common.Address) bool
- func (f *RewardsFile_v1) HasRewardsForNetwork(network uint64) bool
- func (f *RewardsFile_v1) Serialize() ([]byte, error)
- func (f *RewardsFile_v1) SerializeSSZ() ([]byte, error)
- func (f *RewardsFile_v1) SetMinipoolPerformanceFileCID(cid string)
- type RewardsFile_v2
- func (f *RewardsFile_v2) Deserialize(bytes []byte) error
- func (f *RewardsFile_v2) GenerateMerkleTree() error
- func (f *RewardsFile_v2) GetConsensusEndBlock() uint64
- func (f *RewardsFile_v2) GetConsensusStartBlock() uint64
- func (f *RewardsFile_v2) GetEndTime() time.Time
- func (f *RewardsFile_v2) GetExecutionEndBlock() uint64
- func (f *RewardsFile_v2) GetExecutionStartBlock() uint64
- func (f *RewardsFile_v2) GetIndex() uint64
- func (f *RewardsFile_v2) GetIntervalsPassed() uint64
- func (f *RewardsFile_v2) GetMerkleProof(addr common.Address) ([]common.Hash, error)
- func (f *RewardsFile_v2) GetMerkleRoot() string
- func (f *RewardsFile_v2) GetNetworkCollateralRpl(network uint64) *big.Int
- func (f *RewardsFile_v2) GetNetworkOracleDaoRpl(network uint64) *big.Int
- func (f *RewardsFile_v2) GetNetworkRewards(network uint64) *NetworkRewardsInfo
- func (f *RewardsFile_v2) GetNetworkSmoothingPoolEth(network uint64) *big.Int
- func (f *RewardsFile_v2) GetNodeAddresses() []common.Address
- func (f *RewardsFile_v2) GetNodeCollateralRpl(addr common.Address) *big.Int
- func (f *RewardsFile_v2) GetNodeOracleDaoRpl(addr common.Address) *big.Int
- func (f *RewardsFile_v2) GetNodeSmoothingPoolEth(addr common.Address) *big.Int
- func (f *RewardsFile_v2) GetRewardsFileVersion() uint64
- func (f *RewardsFile_v2) GetStartTime() time.Time
- func (f *RewardsFile_v2) GetTotalCollateralRpl() *big.Int
- func (f *RewardsFile_v2) GetTotalNodeOperatorSmoothingPoolEth() *big.Int
- func (f *RewardsFile_v2) GetTotalNodeWeight() *big.Int
- func (f *RewardsFile_v2) GetTotalOracleDaoRpl() *big.Int
- func (f *RewardsFile_v2) GetTotalPoolStakerSmoothingPoolEth() *big.Int
- func (f *RewardsFile_v2) GetTotalProtocolDaoRpl() *big.Int
- func (f *RewardsFile_v2) HasRewardsFor(addr common.Address) bool
- func (f *RewardsFile_v2) HasRewardsForNetwork(network uint64) bool
- func (f *RewardsFile_v2) Serialize() ([]byte, error)
- func (f *RewardsFile_v2) SerializeSSZ() ([]byte, error)
- func (f *RewardsFile_v2) SetMinipoolPerformanceFileCID(cid string)
- type RewardsFile_v3
- func (f *RewardsFile_v3) Deserialize(bytes []byte) error
- func (f *RewardsFile_v3) GenerateMerkleTree() error
- func (f *RewardsFile_v3) GetConsensusEndBlock() uint64
- func (f *RewardsFile_v3) GetConsensusStartBlock() uint64
- func (f *RewardsFile_v3) GetEndTime() time.Time
- func (f *RewardsFile_v3) GetExecutionEndBlock() uint64
- func (f *RewardsFile_v3) GetExecutionStartBlock() uint64
- func (f *RewardsFile_v3) GetIndex() uint64
- func (f *RewardsFile_v3) GetIntervalsPassed() uint64
- func (f *RewardsFile_v3) GetMerkleProof(addr common.Address) ([]common.Hash, error)
- func (f *RewardsFile_v3) GetMerkleRoot() string
- func (f *RewardsFile_v3) GetNetworkCollateralRpl(network uint64) *big.Int
- func (f *RewardsFile_v3) GetNetworkOracleDaoRpl(network uint64) *big.Int
- func (f *RewardsFile_v3) GetNetworkRewards(network uint64) *NetworkRewardsInfo
- func (f *RewardsFile_v3) GetNetworkSmoothingPoolEth(network uint64) *big.Int
- func (f *RewardsFile_v3) GetNodeAddresses() []common.Address
- func (f *RewardsFile_v3) GetNodeCollateralRpl(addr common.Address) *big.Int
- func (f *RewardsFile_v3) GetNodeOracleDaoRpl(addr common.Address) *big.Int
- func (f *RewardsFile_v3) GetNodeSmoothingPoolEth(addr common.Address) *big.Int
- func (f *RewardsFile_v3) GetRewardsFileVersion() uint64
- func (f *RewardsFile_v3) GetStartTime() time.Time
- func (f *RewardsFile_v3) GetTotalCollateralRpl() *big.Int
- func (f *RewardsFile_v3) GetTotalNodeOperatorSmoothingPoolEth() *big.Int
- func (f *RewardsFile_v3) GetTotalNodeWeight() *big.Int
- func (f *RewardsFile_v3) GetTotalOracleDaoRpl() *big.Int
- func (f *RewardsFile_v3) GetTotalPoolStakerSmoothingPoolEth() *big.Int
- func (f *RewardsFile_v3) GetTotalProtocolDaoRpl() *big.Int
- func (f *RewardsFile_v3) HasRewardsFor(addr common.Address) bool
- func (f *RewardsFile_v3) HasRewardsForNetwork(network uint64) bool
- func (f *RewardsFile_v3) Serialize() ([]byte, error)
- func (f *RewardsFile_v3) SerializeSSZ() ([]byte, error)
- func (f *RewardsFile_v3) SetMinipoolPerformanceFileCID(cid string)
- type SlotInfo
- type SmoothingPoolMinipoolPerformance_v1
- func (p *SmoothingPoolMinipoolPerformance_v1) GetAttestationScore() *big.Int
- func (p *SmoothingPoolMinipoolPerformance_v1) GetBonusEthEarned() *big.Int
- func (p *SmoothingPoolMinipoolPerformance_v1) GetConsensusIncome() *big.Int
- func (p *SmoothingPoolMinipoolPerformance_v1) GetEffectiveCommission() *big.Int
- func (p *SmoothingPoolMinipoolPerformance_v1) GetEthEarned() *big.Int
- func (p *SmoothingPoolMinipoolPerformance_v1) GetMissedAttestationCount() uint64
- func (p *SmoothingPoolMinipoolPerformance_v1) GetMissingAttestationSlots() []uint64
- func (p *SmoothingPoolMinipoolPerformance_v1) GetPubkey() (types.ValidatorPubkey, error)
- func (p *SmoothingPoolMinipoolPerformance_v1) GetSuccessfulAttestationCount() uint64
- type SmoothingPoolMinipoolPerformance_v2
- func (p *SmoothingPoolMinipoolPerformance_v2) GetAttestationScore() *big.Int
- func (p *SmoothingPoolMinipoolPerformance_v2) GetBonusEthEarned() *big.Int
- func (p *SmoothingPoolMinipoolPerformance_v2) GetConsensusIncome() *big.Int
- func (p *SmoothingPoolMinipoolPerformance_v2) GetEffectiveCommission() *big.Int
- func (p *SmoothingPoolMinipoolPerformance_v2) GetEthEarned() *big.Int
- func (p *SmoothingPoolMinipoolPerformance_v2) GetMissedAttestationCount() uint64
- func (p *SmoothingPoolMinipoolPerformance_v2) GetMissingAttestationSlots() []uint64
- func (p *SmoothingPoolMinipoolPerformance_v2) GetPubkey() (types.ValidatorPubkey, error)
- func (p *SmoothingPoolMinipoolPerformance_v2) GetSuccessfulAttestationCount() uint64
- type SnapshotEnd
- type TotalRewards
- type TreeGenerator
- func (t *TreeGenerator) ApproximateStakerShareOfSmoothingPool() (*big.Int, error)
- func (t *TreeGenerator) ApproximateStakerShareOfSmoothingPoolWithRuleset(ruleset uint64) (*big.Int, error)
- func (t *TreeGenerator) GenerateTree() (*GenerateTreeResult, error)
- func (t *TreeGenerator) GenerateTreeWithRuleset(ruleset uint64) (*GenerateTreeResult, error)
- func (t *TreeGenerator) GetApproximatorRulesetVersion() uint64
- func (t *TreeGenerator) GetGeneratorRulesetVersion() uint64
- func (t *TreeGenerator) SaveFiles(treeResult *GenerateTreeResult, nodeTrusted bool) (cid.Cid, map[string]cid.Cid, error)
- type VersionHeader
Constants ¶
const ( SmoothingPoolDetailsBatchSize uint64 = 8 // Mainnet intervals MainnetV8Interval uint64 = 18 MainnetV9Interval uint64 = 29 MainnetV10Interval uint64 = 30 // Holesky intervals HoleskyV8Interval uint64 = 93 HoleskyV9Interval uint64 = 276 HoleskyV10Interval uint64 = 277 )
Settings
const (
FarEpoch uint64 = 18446744073709551615
)
Variables ¶
This section is empty.
Functions ¶
func GetClaimStatus ¶
func GetClaimStatus(rp *rocketpool.RocketPool, nodeAddress common.Address) (unclaimed []uint64, claimed []uint64, err error)
Gets the intervals the node can claim and the intervals that have already been claimed
func GetHoleskyRulesetVersion ¶ added in v1.15.0
func GetMainnetRulesetVersion ¶ added in v1.15.0
func GetRulesetVersion ¶ added in v1.15.0
func GetStartSlotForInterval ¶ added in v1.10.1
func GetStartSlotForInterval(previousIntervalEvent rewards.RewardsEvent, bc RewardsBeaconClient, beaconConfig beacon.Eth2Config) (uint64, error)
Gets the start slot for the given interval
func NewRewardsExecutionClient ¶ added in v1.15.0
func NewRewardsExecutionClient(rp *rocketpool.RocketPool) *defaultRewardsExecutionClient
Types ¶
type CommitteeInfo ¶
type CommitteeInfo struct { Index uint64 Positions map[int]*MinipoolInfo }
type GenerateTreeResult ¶ added in v1.15.0
type GenerateTreeResult struct { RewardsFile IRewardsFile MinipoolPerformanceFile IMinipoolPerformanceFile InvalidNetworkNodes map[common.Address]uint64 }
type ILocalFile ¶ added in v1.11.5
type IMinipoolPerformanceFile ¶ added in v1.11.0
type IMinipoolPerformanceFile interface { // Serialize a minipool performance file into bytes Serialize() ([]byte, error) SerializeSSZ() ([]byte, error) // Serialize a minipool performance file into bytes designed for human readability SerializeHuman() ([]byte, error) // Deserialize a rewards file from bytes Deserialize([]byte) error // Get all of the minipool addresses with rewards in this file // NOTE: the order of minipool addresses is not guaranteed to be stable, so don't rely on it GetMinipoolAddresses() []common.Address // Get a minipool's smoothing pool performance if it was present GetSmoothingPoolPerformance(minipoolAddress common.Address) (ISmoothingPoolMinipoolPerformance, bool) }
Interface for version-agnostic minipool performance
func DeserializeMinipoolPerformanceFile ¶ added in v1.11.0
func DeserializeMinipoolPerformanceFile(bytes []byte) (IMinipoolPerformanceFile, error)
Deserializes a byte array into a rewards file interface
type IRewardsFile ¶ added in v1.11.0
type IRewardsFile interface { // Serialize a rewards file into bytes Serialize() ([]byte, error) SerializeSSZ() ([]byte, error) // Deserialize a rewards file from bytes Deserialize([]byte) error // Getters for general interval info GetRewardsFileVersion() uint64 GetIndex() uint64 GetTotalNodeWeight() *big.Int GetMerkleRoot() string GetIntervalsPassed() uint64 GetTotalProtocolDaoRpl() *big.Int GetTotalOracleDaoRpl() *big.Int GetTotalCollateralRpl() *big.Int GetTotalNodeOperatorSmoothingPoolEth() *big.Int GetTotalPoolStakerSmoothingPoolEth() *big.Int GetExecutionStartBlock() uint64 GetConsensusStartBlock() uint64 GetExecutionEndBlock() uint64 GetConsensusEndBlock() uint64 GetStartTime() time.Time GetEndTime() time.Time // Get all of the node addresses with rewards in this file // NOTE: the order of node addresses is not guaranteed to be stable, so don't rely on it GetNodeAddresses() []common.Address // Getters for into about specific node's rewards HasRewardsFor(common.Address) bool GetNodeCollateralRpl(common.Address) *big.Int GetNodeOracleDaoRpl(common.Address) *big.Int GetNodeSmoothingPoolEth(common.Address) *big.Int GetMerkleProof(common.Address) ([]common.Hash, error) // Getters for network info HasRewardsForNetwork(network uint64) bool GetNetworkCollateralRpl(network uint64) *big.Int GetNetworkOracleDaoRpl(network uint64) *big.Int GetNetworkSmoothingPoolEth(network uint64) *big.Int // Sets the CID of the minipool performance file corresponding to this rewards file SetMinipoolPerformanceFileCID(cid string) // Generate the Merkle Tree and its root from the rewards file's proofs GenerateMerkleTree() error }
Interface for version-agnostic rewards files
func DeserializeRewardsFile ¶ added in v1.11.0
func DeserializeRewardsFile(bytes []byte) (IRewardsFile, error)
Deserializes a byte array into a rewards file interface
type ISerializable ¶ added in v1.15.0
type ISerializable interface { // Converts the underlying interface to a byte slice Serialize() ([]byte, error) SerializeSSZ() ([]byte, error) }
Interface for local rewards or minipool performance files
type ISmoothingPoolMinipoolPerformance ¶ added in v1.11.0
type ISmoothingPoolMinipoolPerformance interface { GetPubkey() (types.ValidatorPubkey, error) GetSuccessfulAttestationCount() uint64 GetMissedAttestationCount() uint64 GetMissingAttestationSlots() []uint64 GetEthEarned() *big.Int GetBonusEthEarned() *big.Int GetEffectiveCommission() *big.Int GetConsensusIncome() *big.Int GetAttestationScore() *big.Int }
Minipool stats
type IntervalDutiesInfo ¶
type IntervalInfo ¶
type IntervalInfo struct { Index uint64 `json:"index"` TreeFilePath string `json:"treeFilePath"` TreeFileExists bool `json:"treeFileExists"` MerkleRootValid bool `json:"merkleRootValid"` MerkleRoot common.Hash `json:"merkleRoot"` CID string `json:"cid"` StartTime time.Time `json:"startTime"` EndTime time.Time `json:"endTime"` NodeExists bool `json:"nodeExists"` CollateralRplAmount *QuotedBigInt `json:"collateralRplAmount"` ODaoRplAmount *QuotedBigInt `json:"oDaoRplAmount"` SmoothingPoolEthAmount *QuotedBigInt `json:"smoothingPoolEthAmount"` MerkleProof []common.Hash `json:"merkleProof"` TotalNodeWeight *big.Int `json:"-"` }
Information about an interval
func GetIntervalInfo ¶
func GetIntervalInfo(rp *rocketpool.RocketPool, cfg *config.RocketPoolConfig, nodeAddress common.Address, interval uint64, opts *bind.CallOpts) (info IntervalInfo, err error)
Gets the information for an interval including the file status, the validity, and the node's rewards
func (*IntervalInfo) DownloadRewardsFile ¶ added in v1.11.3
func (i *IntervalInfo) DownloadRewardsFile(cfg *config.RocketPoolConfig, isDaemon bool) error
Downloads the rewards file for this interval
type LocalFile ¶ added in v1.11.5
type LocalFile[T ISerializable] struct { // contains filtered or unexported fields }
A wrapper around ISerializable representing a local rewards file or minipool performance file. Can be used with anything that can be serialzed to bytes or parsed from bytes.
func NewLocalFile ¶ added in v1.11.5
func NewLocalFile[T ISerializable](ilf T, fullpath string) *LocalFile[T]
NewLocalFile creates the wrapper, but doesn't write to disk. This should be used when generating new trees / performance files.
func (*LocalFile[T]) CreateCompressedFileAndCid ¶ added in v1.11.5
Computes the CID that would be used if we compressed the file with zst, added the ipfs extension to the filename (.zst), and uploaded it to ipfs in an empty directory, as web3storage did, once upon a time.
N.B. This function will also save the compressed file to disk so it can later be uploaded to ipfs
func (*LocalFile[T]) Impl ¶ added in v1.11.5
func (lf *LocalFile[T]) Impl() T
Returns the underlying interface, IRewardsFile for rewards file, IMinipoolPerformanceFile for performance, etc.
func (*LocalFile[T]) SerializeSSZ ¶ added in v1.15.0
Converts the underlying interface to a byte slice by calling its SerializeSSZ function
type LocalMinipoolPerformanceFile ¶ added in v1.11.5
type LocalMinipoolPerformanceFile = LocalFile[IMinipoolPerformanceFile]
func ReadLocalMinipoolPerformanceFile ¶ added in v1.11.5
func ReadLocalMinipoolPerformanceFile(path string) (*LocalMinipoolPerformanceFile, error)
Reads an existing MinipoolPerformanceFile from disk and wraps it in a LocalFile
type LocalRewardsFile ¶ added in v1.11.5
type LocalRewardsFile = LocalFile[IRewardsFile]
Type aliases
func ReadLocalRewardsFile ¶ added in v1.11.5
func ReadLocalRewardsFile(path string) (*LocalRewardsFile, error)
Reads an existing RewardsFile from disk and wraps it in a LocalFile
type MinipoolInfo ¶
type MinipoolInfo struct { Address common.Address `json:"address"` ValidatorPubkey types.ValidatorPubkey `json:"pubkey"` ValidatorIndex string `json:"index"` NodeAddress common.Address `json:"nodeAddress"` NodeIndex uint64 `json:"-"` Fee *big.Int `json:"-"` MissedAttestations uint64 `json:"-"` GoodAttestations uint64 `json:"-"` MissingAttestationSlots map[uint64]bool `json:"missingAttestationSlots"` WasActive bool `json:"-"` StartSlot uint64 `json:"-"` EndSlot uint64 `json:"-"` AttestationScore *QuotedBigInt `json:"attestationScore"` CompletedAttestations map[uint64]bool `json:"-"` AttestationCount int `json:"attestationCount"` TotalFee *big.Int `json:"-"` MinipoolBonus *big.Int `json:"-"` NodeOperatorBond *big.Int `json:"-"` ConsensusIncome *QuotedBigInt `json:"consensusIncome"` }
type MinipoolPerformanceFile_v1 ¶ added in v1.11.0
type MinipoolPerformanceFile_v1 struct { Index uint64 `json:"index"` Network string `json:"network"` StartTime time.Time `json:"startTime,omitempty"` EndTime time.Time `json:"endTime,omitempty"` ConsensusStartBlock uint64 `json:"consensusStartBlock,omitempty"` ConsensusEndBlock uint64 `json:"consensusEndBlock,omitempty"` ExecutionStartBlock uint64 `json:"executionStartBlock,omitempty"` ExecutionEndBlock uint64 `json:"executionEndBlock,omitempty"` MinipoolPerformance map[common.Address]*SmoothingPoolMinipoolPerformance_v1 `json:"minipoolPerformance"` }
func (*MinipoolPerformanceFile_v1) Deserialize ¶ added in v1.11.0
func (f *MinipoolPerformanceFile_v1) Deserialize(bytes []byte) error
Deserialize a minipool performance file from bytes
func (*MinipoolPerformanceFile_v1) GetMinipoolAddresses ¶ added in v1.11.0
func (f *MinipoolPerformanceFile_v1) GetMinipoolAddresses() []common.Address
Get all of the minipool addresses with rewards in this file NOTE: the order of minipool addresses is not guaranteed to be stable, so don't rely on it
func (*MinipoolPerformanceFile_v1) GetSmoothingPoolPerformance ¶ added in v1.11.0
func (f *MinipoolPerformanceFile_v1) GetSmoothingPoolPerformance(minipoolAddress common.Address) (ISmoothingPoolMinipoolPerformance, bool)
Get a minipool's smoothing pool performance if it was present
func (*MinipoolPerformanceFile_v1) Serialize ¶ added in v1.11.0
func (f *MinipoolPerformanceFile_v1) Serialize() ([]byte, error)
Serialize a minipool performance file into bytes
func (*MinipoolPerformanceFile_v1) SerializeHuman ¶ added in v1.11.0
func (f *MinipoolPerformanceFile_v1) SerializeHuman() ([]byte, error)
Serialize a minipool performance file into bytes designed for human readability
func (*MinipoolPerformanceFile_v1) SerializeSSZ ¶ added in v1.15.0
func (f *MinipoolPerformanceFile_v1) SerializeSSZ() ([]byte, error)
type MinipoolPerformanceFile_v2 ¶ added in v1.11.0
type MinipoolPerformanceFile_v2 struct { RewardsFileVersion uint64 `json:"rewardsFileVersion"` RulesetVersion uint64 `json:"rulesetVersion"` Index uint64 `json:"index"` Network string `json:"network"` StartTime time.Time `json:"startTime,omitempty"` EndTime time.Time `json:"endTime,omitempty"` ConsensusStartBlock uint64 `json:"consensusStartBlock,omitempty"` ConsensusEndBlock uint64 `json:"consensusEndBlock,omitempty"` ExecutionStartBlock uint64 `json:"executionStartBlock,omitempty"` ExecutionEndBlock uint64 `json:"executionEndBlock,omitempty"` MinipoolPerformance map[common.Address]*SmoothingPoolMinipoolPerformance_v2 `json:"minipoolPerformance"` BonusScalar *QuotedBigInt `json:"bonusScalar,omitempty"` }
func (*MinipoolPerformanceFile_v2) Deserialize ¶ added in v1.11.0
func (f *MinipoolPerformanceFile_v2) Deserialize(bytes []byte) error
Deserialize a minipool performance file from bytes
func (*MinipoolPerformanceFile_v2) GetMinipoolAddresses ¶ added in v1.11.0
func (f *MinipoolPerformanceFile_v2) GetMinipoolAddresses() []common.Address
Get all of the minipool addresses with rewards in this file NOTE: the order of minipool addresses is not guaranteed to be stable, so don't rely on it
func (*MinipoolPerformanceFile_v2) GetSmoothingPoolPerformance ¶ added in v1.11.0
func (f *MinipoolPerformanceFile_v2) GetSmoothingPoolPerformance(minipoolAddress common.Address) (ISmoothingPoolMinipoolPerformance, bool)
Get a minipool's smoothing pool performance if it was present
func (*MinipoolPerformanceFile_v2) Serialize ¶ added in v1.11.0
func (f *MinipoolPerformanceFile_v2) Serialize() ([]byte, error)
Serialize a minipool performance file into bytes
func (*MinipoolPerformanceFile_v2) SerializeHuman ¶ added in v1.11.0
func (f *MinipoolPerformanceFile_v2) SerializeHuman() ([]byte, error)
Serialize a minipool performance file into bytes designed for human readability
func (*MinipoolPerformanceFile_v2) SerializeSSZ ¶ added in v1.15.0
func (f *MinipoolPerformanceFile_v2) SerializeSSZ() ([]byte, error)
type NetworkRewardsInfo ¶
type NetworkRewardsInfo struct { CollateralRpl *QuotedBigInt `json:"collateralRpl"` OracleDaoRpl *QuotedBigInt `json:"oracleDaoRpl"` SmoothingPoolEth *QuotedBigInt `json:"smoothingPoolEth"` }
Rewards per network
type NodeRewardsInfo_v1 ¶ added in v1.11.0
type NodeRewardsInfo_v1 struct { RewardNetwork uint64 `json:"rewardNetwork"` CollateralRpl *QuotedBigInt `json:"collateralRpl"` OracleDaoRpl *QuotedBigInt `json:"oracleDaoRpl"` SmoothingPoolEth *QuotedBigInt `json:"smoothingPoolEth"` SmoothingPoolEligibilityRate float64 `json:"smoothingPoolEligibilityRate"` MerkleData []byte `json:"-"` MerkleProof []string `json:"merkleProof"` }
Node operator rewards
type NodeRewardsInfo_v2 ¶ added in v1.11.0
type NodeRewardsInfo_v2 struct { RewardNetwork uint64 `json:"rewardNetwork"` CollateralRpl *QuotedBigInt `json:"collateralRpl"` OracleDaoRpl *QuotedBigInt `json:"oracleDaoRpl"` SmoothingPoolEth *QuotedBigInt `json:"smoothingPoolEth"` MerkleData []byte `json:"-"` MerkleProof []string `json:"merkleProof"` }
Node operator rewards
type NodeSmoothingDetails ¶
type NodeSmoothingDetails struct { Address common.Address IsEligible bool IsOptedIn bool StatusChangeTime time.Time Minipools []*MinipoolInfo EligibleSeconds *big.Int StartSlot uint64 EndSlot uint64 SmoothingPoolEth *big.Int RewardsNetwork uint64 // v2 Fields OptInTime time.Time OptOutTime time.Time // v10 Fields BonusEth *big.Int EligibleBorrowedEth *big.Int RplStake *big.Int }
Details about a node for the Smoothing Pool
type QuotedBigInt ¶
func NewQuotedBigInt ¶
func NewQuotedBigInt(x int64) *QuotedBigInt
func QuotedBigIntFromBigInt ¶ added in v1.15.0
func QuotedBigIntFromBigInt(x *big.Int) *QuotedBigInt
func (*QuotedBigInt) MarshalJSON ¶
func (b *QuotedBigInt) MarshalJSON() ([]byte, error)
func (*QuotedBigInt) UnmarshalJSON ¶
func (b *QuotedBigInt) UnmarshalJSON(p []byte) error
type RewardsBeaconClient ¶ added in v1.15.0
type RewardsBeaconClient interface { GetBeaconBlock(slot string) (beacon.BeaconBlock, bool, error) GetCommitteesForEpoch(epoch *uint64) (beacon.Committees, error) GetAttestations(slot string) ([]beacon.AttestationInfo, bool, error) GetEth2Config() (beacon.Eth2Config, error) GetBeaconHead() (beacon.BeaconHead, error) }
RewardsBeaconClient defines and interface that contains only the functions from beacon.Client required for rewards generation. This facade makes it easier to perform dependency injection in tests.
type RewardsExecutionClient ¶ added in v1.15.0
type RewardsExecutionClient interface { GetNetworkEnabled(networkId *big.Int, opts *bind.CallOpts) (bool, error) HeaderByNumber(context.Context, *big.Int) (*ethtypes.Header, error) GetRewardsEvent(index uint64, rocketRewardsPoolAddresses []common.Address, opts *bind.CallOpts) (bool, rewards.RewardsEvent, error) GetRewardSnapshotEvent(previousRewardsPoolAddresses []common.Address, interval uint64, opts *bind.CallOpts) (rewards.RewardsEvent, error) GetRewardIndex(opts *bind.CallOpts) (*big.Int, error) }
RewardsExecutionClient defines and interface that contains only the functions from rocketpool.RocketPool required for rewards generation. This facade makes it easier to perform dependency injection in tests.
type RewardsFileHeader ¶ added in v1.11.0
type RewardsFileHeader struct { // Serialized fields RewardsFileVersion uint64 `json:"rewardsFileVersion"` RulesetVersion uint64 `json:"rulesetVersion,omitempty"` Index uint64 `json:"index"` Network string `json:"network"` StartTime time.Time `json:"startTime,omitempty"` EndTime time.Time `json:"endTime"` ConsensusStartBlock uint64 `json:"consensusStartBlock,omitempty"` ConsensusEndBlock uint64 `json:"consensusEndBlock"` ExecutionStartBlock uint64 `json:"executionStartBlock,omitempty"` ExecutionEndBlock uint64 `json:"executionEndBlock"` IntervalsPassed uint64 `json:"intervalsPassed"` MerkleRoot string `json:"merkleRoot,omitempty"` MinipoolPerformanceFileCID string `json:"minipoolPerformanceFileCid,omitempty"` TotalRewards *TotalRewards `json:"totalRewards"` NetworkRewards map[uint64]*NetworkRewardsInfo `json:"networkRewards"` // Non-serialized fields MerkleTree *merkletree.MerkleTree `json:"-"` }
General version-agnostic information about a rewards file
type RewardsFile_v1 ¶ added in v1.11.0
type RewardsFile_v1 struct { *RewardsFileHeader NodeRewards map[common.Address]*NodeRewardsInfo_v1 `json:"nodeRewards"` MinipoolPerformanceFile MinipoolPerformanceFile_v1 `json:"-"` }
JSON struct for a complete rewards file
func (*RewardsFile_v1) Deserialize ¶ added in v1.11.0
func (f *RewardsFile_v1) Deserialize(bytes []byte) error
Deserialize a rewards file from bytes
func (*RewardsFile_v1) GenerateMerkleTree ¶ added in v1.15.0
func (f *RewardsFile_v1) GenerateMerkleTree() error
Generates a merkle tree from the provided rewards map
func (*RewardsFile_v1) GetConsensusEndBlock ¶ added in v1.15.0
func (f *RewardsFile_v1) GetConsensusEndBlock() uint64
Get the the consensus end block
func (*RewardsFile_v1) GetConsensusStartBlock ¶ added in v1.15.0
func (f *RewardsFile_v1) GetConsensusStartBlock() uint64
Get the the consensus start block
func (*RewardsFile_v1) GetEndTime ¶ added in v1.15.0
func (f *RewardsFile_v1) GetEndTime() time.Time
Get the end time
func (*RewardsFile_v1) GetExecutionEndBlock ¶ added in v1.15.0
func (f *RewardsFile_v1) GetExecutionEndBlock() uint64
Get the the execution end block
func (*RewardsFile_v1) GetExecutionStartBlock ¶ added in v1.15.0
func (f *RewardsFile_v1) GetExecutionStartBlock() uint64
Get the the execution start block
func (*RewardsFile_v1) GetIndex ¶ added in v1.15.0
func (f *RewardsFile_v1) GetIndex() uint64
Get the rewards file index
func (*RewardsFile_v1) GetIntervalsPassed ¶ added in v1.15.0
func (f *RewardsFile_v1) GetIntervalsPassed() uint64
Get the number of intervals that have passed
func (*RewardsFile_v1) GetMerkleProof ¶ added in v1.15.0
func (*RewardsFile_v1) GetMerkleRoot ¶ added in v1.15.0
func (f *RewardsFile_v1) GetMerkleRoot() string
Get the merkle root
func (*RewardsFile_v1) GetNetworkCollateralRpl ¶ added in v1.15.0
func (f *RewardsFile_v1) GetNetworkCollateralRpl(network uint64) *big.Int
func (*RewardsFile_v1) GetNetworkOracleDaoRpl ¶ added in v1.15.0
func (f *RewardsFile_v1) GetNetworkOracleDaoRpl(network uint64) *big.Int
func (*RewardsFile_v1) GetNetworkRewards ¶ added in v1.15.0
func (f *RewardsFile_v1) GetNetworkRewards(network uint64) *NetworkRewardsInfo
Get network rewards for a specific network
func (*RewardsFile_v1) GetNetworkSmoothingPoolEth ¶ added in v1.15.0
func (f *RewardsFile_v1) GetNetworkSmoothingPoolEth(network uint64) *big.Int
func (*RewardsFile_v1) GetNodeAddresses ¶ added in v1.11.0
func (f *RewardsFile_v1) GetNodeAddresses() []common.Address
Get all of the node addresses with rewards in this file NOTE: the order of node addresses is not guaranteed to be stable, so don't rely on it
func (*RewardsFile_v1) GetNodeCollateralRpl ¶ added in v1.15.0
func (f *RewardsFile_v1) GetNodeCollateralRpl(addr common.Address) *big.Int
func (*RewardsFile_v1) GetNodeOracleDaoRpl ¶ added in v1.15.0
func (f *RewardsFile_v1) GetNodeOracleDaoRpl(addr common.Address) *big.Int
func (*RewardsFile_v1) GetNodeSmoothingPoolEth ¶ added in v1.15.0
func (f *RewardsFile_v1) GetNodeSmoothingPoolEth(addr common.Address) *big.Int
func (*RewardsFile_v1) GetRewardsFileVersion ¶ added in v1.15.0
func (f *RewardsFile_v1) GetRewardsFileVersion() uint64
Get the rewards file version
func (*RewardsFile_v1) GetStartTime ¶ added in v1.15.0
func (f *RewardsFile_v1) GetStartTime() time.Time
Get the start time
func (*RewardsFile_v1) GetTotalCollateralRpl ¶ added in v1.15.0
func (f *RewardsFile_v1) GetTotalCollateralRpl() *big.Int
Get the total rpl sent to stakers
func (*RewardsFile_v1) GetTotalNodeOperatorSmoothingPoolEth ¶ added in v1.15.0
func (f *RewardsFile_v1) GetTotalNodeOperatorSmoothingPoolEth() *big.Int
Get the total smoothing pool eth sent to node operators
func (*RewardsFile_v1) GetTotalNodeWeight ¶ added in v1.15.0
func (f *RewardsFile_v1) GetTotalNodeWeight() *big.Int
Get the TotalNodeWeight (only added in v3)
func (*RewardsFile_v1) GetTotalOracleDaoRpl ¶ added in v1.15.0
func (f *RewardsFile_v1) GetTotalOracleDaoRpl() *big.Int
Get the total RPL sent to the pDAO
func (*RewardsFile_v1) GetTotalPoolStakerSmoothingPoolEth ¶ added in v1.15.0
func (f *RewardsFile_v1) GetTotalPoolStakerSmoothingPoolEth() *big.Int
Get the total Eth sent to pool stakers from the SP
func (*RewardsFile_v1) GetTotalProtocolDaoRpl ¶ added in v1.15.0
func (f *RewardsFile_v1) GetTotalProtocolDaoRpl() *big.Int
Get the total RPL sent to the pDAO
func (*RewardsFile_v1) HasRewardsFor ¶ added in v1.15.0
func (f *RewardsFile_v1) HasRewardsFor(addr common.Address) bool
func (*RewardsFile_v1) HasRewardsForNetwork ¶ added in v1.15.0
func (f *RewardsFile_v1) HasRewardsForNetwork(network uint64) bool
Getters for network info
func (*RewardsFile_v1) Serialize ¶ added in v1.11.0
func (f *RewardsFile_v1) Serialize() ([]byte, error)
Serialize a rewards file into bytes
func (*RewardsFile_v1) SerializeSSZ ¶ added in v1.15.0
func (f *RewardsFile_v1) SerializeSSZ() ([]byte, error)
func (*RewardsFile_v1) SetMinipoolPerformanceFileCID ¶ added in v1.11.0
func (f *RewardsFile_v1) SetMinipoolPerformanceFileCID(cid string)
Sets the CID of the minipool performance file corresponding to this rewards file
type RewardsFile_v2 ¶ added in v1.11.0
type RewardsFile_v2 struct { *RewardsFileHeader NodeRewards map[common.Address]*NodeRewardsInfo_v2 `json:"nodeRewards"` MinipoolPerformanceFile MinipoolPerformanceFile_v2 `json:"-"` }
JSON struct for a complete rewards file
func (*RewardsFile_v2) Deserialize ¶ added in v1.11.0
func (f *RewardsFile_v2) Deserialize(bytes []byte) error
Deserialize a rewards file from bytes
func (*RewardsFile_v2) GenerateMerkleTree ¶ added in v1.15.0
func (f *RewardsFile_v2) GenerateMerkleTree() error
Generates a merkle tree from the provided rewards map
func (*RewardsFile_v2) GetConsensusEndBlock ¶ added in v1.15.0
func (f *RewardsFile_v2) GetConsensusEndBlock() uint64
Get the the consensus end block
func (*RewardsFile_v2) GetConsensusStartBlock ¶ added in v1.15.0
func (f *RewardsFile_v2) GetConsensusStartBlock() uint64
Get the the consensus start block
func (*RewardsFile_v2) GetEndTime ¶ added in v1.15.0
func (f *RewardsFile_v2) GetEndTime() time.Time
Get the end time
func (*RewardsFile_v2) GetExecutionEndBlock ¶ added in v1.15.0
func (f *RewardsFile_v2) GetExecutionEndBlock() uint64
Get the the execution end block
func (*RewardsFile_v2) GetExecutionStartBlock ¶ added in v1.15.0
func (f *RewardsFile_v2) GetExecutionStartBlock() uint64
Get the the execution start block
func (*RewardsFile_v2) GetIndex ¶ added in v1.15.0
func (f *RewardsFile_v2) GetIndex() uint64
Get the rewards file index
func (*RewardsFile_v2) GetIntervalsPassed ¶ added in v1.15.0
func (f *RewardsFile_v2) GetIntervalsPassed() uint64
Get the number of intervals that have passed
func (*RewardsFile_v2) GetMerkleProof ¶ added in v1.15.0
func (*RewardsFile_v2) GetMerkleRoot ¶ added in v1.15.0
func (f *RewardsFile_v2) GetMerkleRoot() string
Get the merkle root
func (*RewardsFile_v2) GetNetworkCollateralRpl ¶ added in v1.15.0
func (f *RewardsFile_v2) GetNetworkCollateralRpl(network uint64) *big.Int
func (*RewardsFile_v2) GetNetworkOracleDaoRpl ¶ added in v1.15.0
func (f *RewardsFile_v2) GetNetworkOracleDaoRpl(network uint64) *big.Int
func (*RewardsFile_v2) GetNetworkRewards ¶ added in v1.15.0
func (f *RewardsFile_v2) GetNetworkRewards(network uint64) *NetworkRewardsInfo
Get network rewards for a specific network
func (*RewardsFile_v2) GetNetworkSmoothingPoolEth ¶ added in v1.15.0
func (f *RewardsFile_v2) GetNetworkSmoothingPoolEth(network uint64) *big.Int
func (*RewardsFile_v2) GetNodeAddresses ¶ added in v1.11.0
func (f *RewardsFile_v2) GetNodeAddresses() []common.Address
Get all of the node addresses with rewards in this file NOTE: the order of node addresses is not guaranteed to be stable, so don't rely on it
func (*RewardsFile_v2) GetNodeCollateralRpl ¶ added in v1.15.0
func (f *RewardsFile_v2) GetNodeCollateralRpl(addr common.Address) *big.Int
func (*RewardsFile_v2) GetNodeOracleDaoRpl ¶ added in v1.15.0
func (f *RewardsFile_v2) GetNodeOracleDaoRpl(addr common.Address) *big.Int
func (*RewardsFile_v2) GetNodeSmoothingPoolEth ¶ added in v1.15.0
func (f *RewardsFile_v2) GetNodeSmoothingPoolEth(addr common.Address) *big.Int
func (*RewardsFile_v2) GetRewardsFileVersion ¶ added in v1.15.0
func (f *RewardsFile_v2) GetRewardsFileVersion() uint64
Get the rewards file version
func (*RewardsFile_v2) GetStartTime ¶ added in v1.15.0
func (f *RewardsFile_v2) GetStartTime() time.Time
Get the start time
func (*RewardsFile_v2) GetTotalCollateralRpl ¶ added in v1.15.0
func (f *RewardsFile_v2) GetTotalCollateralRpl() *big.Int
Get the total rpl sent to stakers
func (*RewardsFile_v2) GetTotalNodeOperatorSmoothingPoolEth ¶ added in v1.15.0
func (f *RewardsFile_v2) GetTotalNodeOperatorSmoothingPoolEth() *big.Int
Get the total smoothing pool eth sent to node operators
func (*RewardsFile_v2) GetTotalNodeWeight ¶ added in v1.15.0
func (f *RewardsFile_v2) GetTotalNodeWeight() *big.Int
Get the TotalNodeWeight (only added in v3)
func (*RewardsFile_v2) GetTotalOracleDaoRpl ¶ added in v1.15.0
func (f *RewardsFile_v2) GetTotalOracleDaoRpl() *big.Int
Get the total RPL sent to the pDAO
func (*RewardsFile_v2) GetTotalPoolStakerSmoothingPoolEth ¶ added in v1.15.0
func (f *RewardsFile_v2) GetTotalPoolStakerSmoothingPoolEth() *big.Int
Get the total Eth sent to pool stakers from the SP
func (*RewardsFile_v2) GetTotalProtocolDaoRpl ¶ added in v1.15.0
func (f *RewardsFile_v2) GetTotalProtocolDaoRpl() *big.Int
Get the total RPL sent to the pDAO
func (*RewardsFile_v2) HasRewardsFor ¶ added in v1.15.0
func (f *RewardsFile_v2) HasRewardsFor(addr common.Address) bool
func (*RewardsFile_v2) HasRewardsForNetwork ¶ added in v1.15.0
func (f *RewardsFile_v2) HasRewardsForNetwork(network uint64) bool
Getters for network info
func (*RewardsFile_v2) Serialize ¶ added in v1.11.0
func (f *RewardsFile_v2) Serialize() ([]byte, error)
Serialize a rewards file into bytes
func (*RewardsFile_v2) SerializeSSZ ¶ added in v1.15.0
func (f *RewardsFile_v2) SerializeSSZ() ([]byte, error)
func (*RewardsFile_v2) SetMinipoolPerformanceFileCID ¶ added in v1.11.0
func (f *RewardsFile_v2) SetMinipoolPerformanceFileCID(cid string)
Sets the CID of the minipool performance file corresponding to this rewards file
type RewardsFile_v3 ¶ added in v1.11.3
type RewardsFile_v3 struct { *RewardsFileHeader NodeRewards map[common.Address]*NodeRewardsInfo_v2 `json:"nodeRewards"` MinipoolPerformanceFile MinipoolPerformanceFile_v2 `json:"-"` }
JSON struct for a complete rewards file
func (*RewardsFile_v3) Deserialize ¶ added in v1.11.3
func (f *RewardsFile_v3) Deserialize(bytes []byte) error
Deserialize a rewards file from bytes
func (*RewardsFile_v3) GenerateMerkleTree ¶ added in v1.15.0
func (f *RewardsFile_v3) GenerateMerkleTree() error
Generates a merkle tree from the provided rewards map
func (*RewardsFile_v3) GetConsensusEndBlock ¶ added in v1.15.0
func (f *RewardsFile_v3) GetConsensusEndBlock() uint64
Get the consensus end block
func (*RewardsFile_v3) GetConsensusStartBlock ¶ added in v1.15.0
func (f *RewardsFile_v3) GetConsensusStartBlock() uint64
Get the consensus start block
func (*RewardsFile_v3) GetEndTime ¶ added in v1.15.0
func (f *RewardsFile_v3) GetEndTime() time.Time
Get the end time
func (*RewardsFile_v3) GetExecutionEndBlock ¶ added in v1.15.0
func (f *RewardsFile_v3) GetExecutionEndBlock() uint64
Get the execution end block
func (*RewardsFile_v3) GetExecutionStartBlock ¶ added in v1.15.0
func (f *RewardsFile_v3) GetExecutionStartBlock() uint64
Get the execution start block
func (*RewardsFile_v3) GetIndex ¶ added in v1.15.0
func (f *RewardsFile_v3) GetIndex() uint64
Get the rewards file index
func (*RewardsFile_v3) GetIntervalsPassed ¶ added in v1.15.0
func (f *RewardsFile_v3) GetIntervalsPassed() uint64
Get the number of intervals that have passed
func (*RewardsFile_v3) GetMerkleProof ¶ added in v1.15.0
func (*RewardsFile_v3) GetMerkleRoot ¶ added in v1.15.0
func (f *RewardsFile_v3) GetMerkleRoot() string
Get the merkle root
func (*RewardsFile_v3) GetNetworkCollateralRpl ¶ added in v1.15.0
func (f *RewardsFile_v3) GetNetworkCollateralRpl(network uint64) *big.Int
func (*RewardsFile_v3) GetNetworkOracleDaoRpl ¶ added in v1.15.0
func (f *RewardsFile_v3) GetNetworkOracleDaoRpl(network uint64) *big.Int
func (*RewardsFile_v3) GetNetworkRewards ¶ added in v1.15.0
func (f *RewardsFile_v3) GetNetworkRewards(network uint64) *NetworkRewardsInfo
Get network rewards for a specific network
func (*RewardsFile_v3) GetNetworkSmoothingPoolEth ¶ added in v1.15.0
func (f *RewardsFile_v3) GetNetworkSmoothingPoolEth(network uint64) *big.Int
func (*RewardsFile_v3) GetNodeAddresses ¶ added in v1.11.3
func (f *RewardsFile_v3) GetNodeAddresses() []common.Address
Get all of the node addresses with rewards in this file NOTE: the order of node addresses is not guaranteed to be stable, so don't rely on it
func (*RewardsFile_v3) GetNodeCollateralRpl ¶ added in v1.15.0
func (f *RewardsFile_v3) GetNodeCollateralRpl(addr common.Address) *big.Int
func (*RewardsFile_v3) GetNodeOracleDaoRpl ¶ added in v1.15.0
func (f *RewardsFile_v3) GetNodeOracleDaoRpl(addr common.Address) *big.Int
func (*RewardsFile_v3) GetNodeSmoothingPoolEth ¶ added in v1.15.0
func (f *RewardsFile_v3) GetNodeSmoothingPoolEth(addr common.Address) *big.Int
func (*RewardsFile_v3) GetRewardsFileVersion ¶ added in v1.15.0
func (f *RewardsFile_v3) GetRewardsFileVersion() uint64
Get the rewards file version
func (*RewardsFile_v3) GetStartTime ¶ added in v1.15.0
func (f *RewardsFile_v3) GetStartTime() time.Time
Get the start time
func (*RewardsFile_v3) GetTotalCollateralRpl ¶ added in v1.15.0
func (f *RewardsFile_v3) GetTotalCollateralRpl() *big.Int
Get the total rpl sent to stakers
func (*RewardsFile_v3) GetTotalNodeOperatorSmoothingPoolEth ¶ added in v1.15.0
func (f *RewardsFile_v3) GetTotalNodeOperatorSmoothingPoolEth() *big.Int
Get the total smoothing pool eth sent to node operators
func (*RewardsFile_v3) GetTotalNodeWeight ¶ added in v1.15.0
func (f *RewardsFile_v3) GetTotalNodeWeight() *big.Int
Get the TotalNodeWeight (only added in v3)
func (*RewardsFile_v3) GetTotalOracleDaoRpl ¶ added in v1.15.0
func (f *RewardsFile_v3) GetTotalOracleDaoRpl() *big.Int
Get the total RPL sent to the pDAO
func (*RewardsFile_v3) GetTotalPoolStakerSmoothingPoolEth ¶ added in v1.15.0
func (f *RewardsFile_v3) GetTotalPoolStakerSmoothingPoolEth() *big.Int
Get the total Eth sent to pool stakers from the SP
func (*RewardsFile_v3) GetTotalProtocolDaoRpl ¶ added in v1.15.0
func (f *RewardsFile_v3) GetTotalProtocolDaoRpl() *big.Int
Get the total RPL sent to the pDAO
func (*RewardsFile_v3) HasRewardsFor ¶ added in v1.15.0
func (f *RewardsFile_v3) HasRewardsFor(addr common.Address) bool
func (*RewardsFile_v3) HasRewardsForNetwork ¶ added in v1.15.0
func (f *RewardsFile_v3) HasRewardsForNetwork(network uint64) bool
Getters for network info
func (*RewardsFile_v3) Serialize ¶ added in v1.11.3
func (f *RewardsFile_v3) Serialize() ([]byte, error)
Serialize a rewards file into bytes
func (*RewardsFile_v3) SerializeSSZ ¶ added in v1.15.0
func (f *RewardsFile_v3) SerializeSSZ() ([]byte, error)
Serialize as SSZ
func (*RewardsFile_v3) SetMinipoolPerformanceFileCID ¶ added in v1.11.3
func (f *RewardsFile_v3) SetMinipoolPerformanceFileCID(cid string)
Sets the CID of the minipool performance file corresponding to this rewards file
type SlotInfo ¶
type SlotInfo struct { Index uint64 Committees map[uint64]*CommitteeInfo }
type SmoothingPoolMinipoolPerformance_v1 ¶ added in v1.11.0
type SmoothingPoolMinipoolPerformance_v1 struct { Pubkey string `json:"pubkey"` StartSlot uint64 `json:"startSlot,omitempty"` EndSlot uint64 `json:"endSlot,omitempty"` ActiveFraction float64 `json:"activeFraction,omitempty"` SuccessfulAttestations uint64 `json:"successfulAttestations"` MissedAttestations uint64 `json:"missedAttestations"` ParticipationRate float64 `json:"participationRate"` MissingAttestationSlots []uint64 `json:"missingAttestationSlots"` EthEarned float64 `json:"ethEarned"` }
Minipool stats
func (*SmoothingPoolMinipoolPerformance_v1) GetAttestationScore ¶ added in v1.15.0
func (p *SmoothingPoolMinipoolPerformance_v1) GetAttestationScore() *big.Int
func (*SmoothingPoolMinipoolPerformance_v1) GetBonusEthEarned ¶ added in v1.15.0
func (p *SmoothingPoolMinipoolPerformance_v1) GetBonusEthEarned() *big.Int
func (*SmoothingPoolMinipoolPerformance_v1) GetConsensusIncome ¶ added in v1.15.0
func (p *SmoothingPoolMinipoolPerformance_v1) GetConsensusIncome() *big.Int
func (*SmoothingPoolMinipoolPerformance_v1) GetEffectiveCommission ¶ added in v1.15.0
func (p *SmoothingPoolMinipoolPerformance_v1) GetEffectiveCommission() *big.Int
func (*SmoothingPoolMinipoolPerformance_v1) GetEthEarned ¶ added in v1.11.0
func (p *SmoothingPoolMinipoolPerformance_v1) GetEthEarned() *big.Int
func (*SmoothingPoolMinipoolPerformance_v1) GetMissedAttestationCount ¶ added in v1.11.0
func (p *SmoothingPoolMinipoolPerformance_v1) GetMissedAttestationCount() uint64
func (*SmoothingPoolMinipoolPerformance_v1) GetMissingAttestationSlots ¶ added in v1.11.0
func (p *SmoothingPoolMinipoolPerformance_v1) GetMissingAttestationSlots() []uint64
func (*SmoothingPoolMinipoolPerformance_v1) GetPubkey ¶ added in v1.11.0
func (p *SmoothingPoolMinipoolPerformance_v1) GetPubkey() (types.ValidatorPubkey, error)
func (*SmoothingPoolMinipoolPerformance_v1) GetSuccessfulAttestationCount ¶ added in v1.11.0
func (p *SmoothingPoolMinipoolPerformance_v1) GetSuccessfulAttestationCount() uint64
type SmoothingPoolMinipoolPerformance_v2 ¶ added in v1.11.0
type SmoothingPoolMinipoolPerformance_v2 struct { Pubkey string `json:"pubkey"` SuccessfulAttestations uint64 `json:"successfulAttestations"` MissedAttestations uint64 `json:"missedAttestations"` AttestationScore *QuotedBigInt `json:"attestationScore"` MissingAttestationSlots []uint64 `json:"missingAttestationSlots"` EthEarned *QuotedBigInt `json:"ethEarned"` ConsensusIncome *QuotedBigInt `json:"consensusIncome,omitempty"` BonusEthEarned *QuotedBigInt `json:"bonusEthEarned,omitempty"` EffectiveCommission *QuotedBigInt `json:"effectiveCommission,omitempty"` }
Minipool stats
func (*SmoothingPoolMinipoolPerformance_v2) GetAttestationScore ¶ added in v1.15.0
func (p *SmoothingPoolMinipoolPerformance_v2) GetAttestationScore() *big.Int
func (*SmoothingPoolMinipoolPerformance_v2) GetBonusEthEarned ¶ added in v1.15.0
func (p *SmoothingPoolMinipoolPerformance_v2) GetBonusEthEarned() *big.Int
func (*SmoothingPoolMinipoolPerformance_v2) GetConsensusIncome ¶ added in v1.15.0
func (p *SmoothingPoolMinipoolPerformance_v2) GetConsensusIncome() *big.Int
func (*SmoothingPoolMinipoolPerformance_v2) GetEffectiveCommission ¶ added in v1.15.0
func (p *SmoothingPoolMinipoolPerformance_v2) GetEffectiveCommission() *big.Int
func (*SmoothingPoolMinipoolPerformance_v2) GetEthEarned ¶ added in v1.11.0
func (p *SmoothingPoolMinipoolPerformance_v2) GetEthEarned() *big.Int
func (*SmoothingPoolMinipoolPerformance_v2) GetMissedAttestationCount ¶ added in v1.11.0
func (p *SmoothingPoolMinipoolPerformance_v2) GetMissedAttestationCount() uint64
func (*SmoothingPoolMinipoolPerformance_v2) GetMissingAttestationSlots ¶ added in v1.11.0
func (p *SmoothingPoolMinipoolPerformance_v2) GetMissingAttestationSlots() []uint64
func (*SmoothingPoolMinipoolPerformance_v2) GetPubkey ¶ added in v1.11.0
func (p *SmoothingPoolMinipoolPerformance_v2) GetPubkey() (types.ValidatorPubkey, error)
func (*SmoothingPoolMinipoolPerformance_v2) GetSuccessfulAttestationCount ¶ added in v1.11.0
func (p *SmoothingPoolMinipoolPerformance_v2) GetSuccessfulAttestationCount() uint64
type SnapshotEnd ¶ added in v1.15.0
type TotalRewards ¶
type TotalRewards struct { ProtocolDaoRpl *QuotedBigInt `json:"protocolDaoRpl"` TotalCollateralRpl *QuotedBigInt `json:"totalCollateralRpl"` TotalOracleDaoRpl *QuotedBigInt `json:"totalOracleDaoRpl"` TotalSmoothingPoolEth *QuotedBigInt `json:"totalSmoothingPoolEth"` PoolStakerSmoothingPoolEth *QuotedBigInt `json:"poolStakerSmoothingPoolEth"` NodeOperatorSmoothingPoolEth *QuotedBigInt `json:"nodeOperatorSmoothingPoolEth"` TotalNodeWeight *QuotedBigInt `json:"totalNodeWeight,omitempty"` }
Total cumulative rewards for an interval
type TreeGenerator ¶ added in v1.7.1
type TreeGenerator struct {
// contains filtered or unexported fields
}
func NewTreeGenerator ¶ added in v1.7.1
func NewTreeGenerator(logger *log.ColorLogger, logPrefix string, rp RewardsExecutionClient, cfg *config.RocketPoolConfig, bc beacon.Client, index uint64, startTime time.Time, endTime time.Time, snapshotEnd *SnapshotEnd, elSnapshotHeader *types.Header, intervalsPassed uint64, state *state.NetworkState) (*TreeGenerator, error)
func (*TreeGenerator) ApproximateStakerShareOfSmoothingPool ¶ added in v1.7.1
func (t *TreeGenerator) ApproximateStakerShareOfSmoothingPool() (*big.Int, error)
func (*TreeGenerator) ApproximateStakerShareOfSmoothingPoolWithRuleset ¶ added in v1.7.2
func (t *TreeGenerator) ApproximateStakerShareOfSmoothingPoolWithRuleset(ruleset uint64) (*big.Int, error)
func (*TreeGenerator) GenerateTree ¶ added in v1.7.1
func (t *TreeGenerator) GenerateTree() (*GenerateTreeResult, error)
func (*TreeGenerator) GenerateTreeWithRuleset ¶ added in v1.7.2
func (t *TreeGenerator) GenerateTreeWithRuleset(ruleset uint64) (*GenerateTreeResult, error)
func (*TreeGenerator) GetApproximatorRulesetVersion ¶ added in v1.7.2
func (t *TreeGenerator) GetApproximatorRulesetVersion() uint64
func (*TreeGenerator) GetGeneratorRulesetVersion ¶ added in v1.7.2
func (t *TreeGenerator) GetGeneratorRulesetVersion() uint64
func (*TreeGenerator) SaveFiles ¶ added in v1.15.0
func (t *TreeGenerator) SaveFiles(treeResult *GenerateTreeResult, nodeTrusted bool) (cid.Cid, map[string]cid.Cid, error)
type VersionHeader ¶ added in v1.11.0
type VersionHeader struct {
RewardsFileVersion uint64 `json:"rewardsFileVersion,omitempty"`
}
Small struct to test version information for rewards files during deserialization