Documentation
¶
Index ¶
- Constants
- Variables
- func ChallengeExit(rp *rocketpool.RocketPool, exitChallenge []ExitChallenge, ...) (*types.Transaction, error)
- func ChallengeMegapool(rp *rocketpool.RocketPool, megapoolAddress common.Address, ...) (common.Hash, error)
- func ChallengeMinipools(rp *rocketpool.RocketPool, minipoolAddresses []common.Address, ...) (common.Hash, error)
- func ClaimChallengeReward(rp *rocketpool.RocketPool, challengeId *big.Int, opts *bind.TransactOpts) (common.Hash, error)
- func DissolveWithProof(rp *rocketpool.RocketPool, megapoolAddress common.Address, validatorId uint32, ...) (*types.Transaction, error)
- func EncodeFinalBalanceProofBundleV1(withdrawalProof WithdrawalProof, validatorProof ValidatorProof, ...) ([]byte, error)
- func EncodeFinalBalanceProofBundleV2(withdrawalProof WithdrawalProof, validatorProof ValidatorProof, ...) ([]byte, error)
- func EncodeValidatorProofBundleV1(validatorProof ValidatorProof, slotProof SlotProof) ([]byte, error)
- func EstimateChallengeExitGas(rp *rocketpool.RocketPool, exitChallenge []ExitChallenge, ...) (gaslimit.Limits, error)
- func EstimateChallengeMegapoolGas(rp *rocketpool.RocketPool, megapoolAddress common.Address, ...) (gaslimit.Limits, error)
- func EstimateChallengeMinipoolsGas(rp *rocketpool.RocketPool, minipoolAddresses []common.Address, ...) (gaslimit.Limits, error)
- func EstimateClaimChallengeRewardGas(rp *rocketpool.RocketPool, challengeId *big.Int, opts *bind.TransactOpts) (gaslimit.Limits, error)
- func EstimateDissolveWithProof(rp *rocketpool.RocketPool, megapoolAddress common.Address, validatorId uint32, ...) (gaslimit.Limits, error)
- func EstimateFinaliseChallengeGas(rp *rocketpool.RocketPool, challengeId *big.Int, opts *bind.TransactOpts) (gaslimit.Limits, error)
- func EstimateNotifyExitGas(rp *rocketpool.RocketPool, megapoolAddress common.Address, validatorId uint32, ...) (gaslimit.Limits, error)
- func EstimateNotifyFinalBalance(rp *rocketpool.RocketPool, megapoolAddress common.Address, validatorId uint32, ...) (gaslimit.Limits, error)
- func EstimateNotifyNotExitGas(rp *rocketpool.RocketPool, megapoolAddress common.Address, validatorId uint32, ...) (gaslimit.Limits, error)
- func EstimatePenaliseGas(rp *rocketpool.RocketPool, megapoolAddress common.Address, block *big.Int, ...) (gaslimit.Limits, error)
- func EstimateReleaseChallengeBondGas(rp *rocketpool.RocketPool, challengeId *big.Int, opts *bind.TransactOpts) (gaslimit.Limits, error)
- func EstimateRespondWithParticipationGas(rp *rocketpool.RocketPool, challengeId *big.Int, validatorId uint32, ...) (gaslimit.Limits, error)
- func EstimateRespondWithValidatorGas(rp *rocketpool.RocketPool, challengeId *big.Int, validatorId uint32, ...) (gaslimit.Limits, error)
- func EstimateStakeGas(rp *rocketpool.RocketPool, megapoolAddress common.Address, validatorId uint32, ...) (gaslimit.Limits, error)
- func FinaliseChallenge(rp *rocketpool.RocketPool, challengeId *big.Int, opts *bind.TransactOpts) (common.Hash, error)
- func GetBeaconStateVerifierVersion(rp *rocketpool.RocketPool, opts *bind.CallOpts) (uint8, error)
- func GetChallengeBondCandidates(rp *rocketpool.RocketPool, node common.Address, ...) ([]*big.Int, error)
- func GetDelegate(rp *rocketpool.RocketPool, opts *bind.CallOpts) (common.Address, error)
- func GetDelegateExpired(rp *rocketpool.RocketPool, opts *bind.CallOpts) (bool, error)
- func GetEffectiveDelegate(rp *rocketpool.RocketPool, opts *bind.CallOpts) (common.Address, error)
- func GetMegapoolDelegateExpiry(rp *rocketpool.RocketPool, delegateAddress common.Address, opts *bind.CallOpts) (uint64, error)
- func GetMegapoolDeployed(rp *rocketpool.RocketPool, nodeAddress common.Address, opts *bind.CallOpts) (bool, error)
- func GetMegapoolExpectedAddress(rp *rocketpool.RocketPool, nodeAddress common.Address, opts *bind.CallOpts) (common.Address, error)
- func GetUseLatestDelegate(rp *rocketpool.RocketPool, opts *bind.CallOpts) (bool, error)
- func GetValidatorCount(rp *rocketpool.RocketPool, opts *bind.CallOpts) (uint32, error)
- func NotifyExit(rp *rocketpool.RocketPool, megapoolAddress common.Address, validatorId uint32, ...) (*types.Transaction, error)
- func NotifyFinalBalance(rp *rocketpool.RocketPool, megapoolAddress common.Address, validatorId uint32, ...) (*types.Transaction, error)
- func NotifyNotExit(rp *rocketpool.RocketPool, megapoolAddress common.Address, validatorId uint32, ...) (*types.Transaction, error)
- func Penalise(rp *rocketpool.RocketPool, megapoolAddress common.Address, block *big.Int, ...) (common.Hash, error)
- func ReleaseChallengeBond(rp *rocketpool.RocketPool, challengeId *big.Int, opts *bind.TransactOpts) (common.Hash, error)
- func RespondWithParticipation(rp *rocketpool.RocketPool, challengeId *big.Int, validatorId uint32, ...) (common.Hash, error)
- func RespondWithValidator(rp *rocketpool.RocketPool, challengeId *big.Int, validatorId uint32, ...) (common.Hash, error)
- func Stake(rp *rocketpool.RocketPool, megapoolAddress common.Address, validatorId uint32, ...) (*types.Transaction, error)
- func UsesProofBundles(rp *rocketpool.RocketPool, opts *bind.CallOpts) (bool, error)
- func VerifyExit(rp *rocketpool.RocketPool, validatorIndex *big.Int, withdrawableEpoch *big.Int, ...) (bool, error)
- func VerifyValidator(rp *rocketpool.RocketPool, proof ValidatorProof, opts *bind.CallOpts) (bool, error)
- func VerifyWithdrawal(rp *rocketpool.RocketPool, validatorIndex *big.Int, withdrawalSlot uint64, ...) (bool, error)
- type ExitChallenge
- type FinalBalanceProof
- type FinalBalanceProofBundleV1
- type FinalBalanceProofBundleV2
- type Megapool
- type MegapoolV1
- type MegapoolV2
- type MegapoolValidatorInfo
- type NextWithdrawalIndexProof
- type ParticipationProof
- type PerformanceChallenge
- type PerformanceChallengeDefense
- type PerformanceChallengeStatus
- func (s PerformanceChallengeStatus) CanClaimReward(caller common.Address) bool
- func (s PerformanceChallengeStatus) CanDefend(caller common.Address, timestamp uint64) bool
- func (s PerformanceChallengeStatus) CanFinalise(timestamp uint64) bool
- func (s PerformanceChallengeStatus) CanReleaseBond(timestamp uint64) bool
- type ProvedValidator
- type RewardSplit
- type SlotProof
- type ValidatorBalanceProof
- type ValidatorInfo
- type ValidatorInfoWithPubkey
- type ValidatorProof
- type ValidatorProofBundleV1
- type Withdrawal
- type WithdrawalProof
Constants ¶
const MaxPerformanceChallengeValidators = 32
MaxPerformanceChallengeValidators is the contract's per-list limit.
Variables ¶
var ( ValidatorProofVersion1 = big.NewInt(1) FinalBalanceProofVersion1 = big.NewInt(1) FinalBalanceProofVersion2 = big.NewInt(2) )
Proof versions accepted by BeaconStateVerifier on v1.4.1-dev.
var BeaconStateVerifierLock sync.Mutex
var ValidatorBatchSize = uint32(50)
Functions ¶
func ChallengeExit ¶
func ChallengeExit(rp *rocketpool.RocketPool, exitChallenge []ExitChallenge, opts *bind.TransactOpts) (*types.Transaction, error)
Used to challenge a validator that is exiting without an exit notification
func ChallengeMegapool ¶ added in v1.24.0
func ChallengeMegapool(rp *rocketpool.RocketPool, megapoolAddress common.Address, validatorIds []uint32, startEpoch uint64, participation []*big.Int, slotTimestamp uint64, slotProof SlotProof, opts *bind.TransactOpts) (common.Hash, error)
Challenge the megapool
func ChallengeMinipools ¶ added in v1.24.4
func ChallengeMinipools(rp *rocketpool.RocketPool, minipoolAddresses []common.Address, startEpoch uint64, participation []*big.Int, slotTimestamp uint64, slotProof SlotProof, opts *bind.TransactOpts) (common.Hash, error)
ChallengeMinipools challenges the target-vote performance of a minipool list.
func ClaimChallengeReward ¶ added in v1.24.4
func ClaimChallengeReward(rp *rocketpool.RocketPool, challengeId *big.Int, opts *bind.TransactOpts) (common.Hash, error)
ClaimChallengeReward credits the recorded defender with recoverable staked RPL after the burn.
func DissolveWithProof ¶
func DissolveWithProof(rp *rocketpool.RocketPool, megapoolAddress common.Address, validatorId uint32, slotTimestamp uint64, proofVersion *big.Int, proofData []byte, opts *bind.TransactOpts) (*types.Transaction, error)
Dissolve a validator using a proof that it used wrong credentials
func EncodeFinalBalanceProofBundleV1 ¶ added in v1.24.0
func EncodeFinalBalanceProofBundleV1(withdrawalProof WithdrawalProof, validatorProof ValidatorProof, slotProof SlotProof) ([]byte, error)
func EncodeFinalBalanceProofBundleV2 ¶ added in v1.24.0
func EncodeFinalBalanceProofBundleV2( withdrawalProof WithdrawalProof, validatorProof ValidatorProof, slotProof SlotProof, previousNextWithdrawalIndexProof NextWithdrawalIndexProof, validatorBalanceProof ValidatorBalanceProof, ) ([]byte, error)
func EncodeValidatorProofBundleV1 ¶ added in v1.24.0
func EncodeValidatorProofBundleV1(validatorProof ValidatorProof, slotProof SlotProof) ([]byte, error)
func EstimateChallengeExitGas ¶
func EstimateChallengeExitGas(rp *rocketpool.RocketPool, exitChallenge []ExitChallenge, opts *bind.TransactOpts) (gaslimit.Limits, error)
Estimate the gas to call ChallengeExit
func EstimateChallengeMegapoolGas ¶ added in v1.24.0
func EstimateChallengeMegapoolGas(rp *rocketpool.RocketPool, megapoolAddress common.Address, validatorIds []uint32, startEpoch uint64, participation []*big.Int, slotTimestamp uint64, slotProof SlotProof, opts *bind.TransactOpts) (gaslimit.Limits, error)
Estimate the gas to call ChallengeMegapool
func EstimateChallengeMinipoolsGas ¶ added in v1.24.4
func EstimateChallengeMinipoolsGas(rp *rocketpool.RocketPool, minipoolAddresses []common.Address, startEpoch uint64, participation []*big.Int, slotTimestamp uint64, slotProof SlotProof, opts *bind.TransactOpts) (gaslimit.Limits, error)
EstimateChallengeMinipoolsGas estimates the gas to challenge a minipool list.
func EstimateClaimChallengeRewardGas ¶ added in v1.24.4
func EstimateClaimChallengeRewardGas(rp *rocketpool.RocketPool, challengeId *big.Int, opts *bind.TransactOpts) (gaslimit.Limits, error)
func EstimateDissolveWithProof ¶
func EstimateDissolveWithProof(rp *rocketpool.RocketPool, megapoolAddress common.Address, validatorId uint32, slotTimestamp uint64, proofVersion *big.Int, proofData []byte, opts *bind.TransactOpts) (gaslimit.Limits, error)
Estimate the gas to call DissolveWithProof
func EstimateFinaliseChallengeGas ¶ added in v1.24.0
func EstimateFinaliseChallengeGas(rp *rocketpool.RocketPool, challengeId *big.Int, opts *bind.TransactOpts) (gaslimit.Limits, error)
Estimate the gas to call FinaliseChallenge
func EstimateNotifyExitGas ¶
func EstimateNotifyExitGas(rp *rocketpool.RocketPool, megapoolAddress common.Address, validatorId uint32, slotTimestamp uint64, proofVersion *big.Int, proofData []byte, opts *bind.TransactOpts) (gaslimit.Limits, error)
Estimate the gas to call NotifyExit
func EstimateNotifyFinalBalance ¶
func EstimateNotifyFinalBalance(rp *rocketpool.RocketPool, megapoolAddress common.Address, validatorId uint32, slotTimestamp uint64, proofVersion *big.Int, proofData []byte, opts *bind.TransactOpts) (gaslimit.Limits, error)
Estimate the gas to call NotifyFinalBalance
func EstimateNotifyNotExitGas ¶
func EstimateNotifyNotExitGas(rp *rocketpool.RocketPool, megapoolAddress common.Address, validatorId uint32, slotTimestamp uint64, proofVersion *big.Int, proofData []byte, opts *bind.TransactOpts) (gaslimit.Limits, error)
Estimate the gas to call NotifyNotExit
func EstimatePenaliseGas ¶
func EstimatePenaliseGas(rp *rocketpool.RocketPool, megapoolAddress common.Address, block *big.Int, amount *big.Int, opts *bind.TransactOpts) (gaslimit.Limits, error)
func EstimateReleaseChallengeBondGas ¶ added in v1.24.4
func EstimateReleaseChallengeBondGas(rp *rocketpool.RocketPool, challengeId *big.Int, opts *bind.TransactOpts) (gaslimit.Limits, error)
func EstimateRespondWithParticipationGas ¶ added in v1.24.0
func EstimateRespondWithParticipationGas(rp *rocketpool.RocketPool, challengeId *big.Int, validatorId uint32, offset uint64, challengeLeaf *big.Int, challengeWitness []common.Hash, slotTimestamp uint64, validatorProof ValidatorProof, participationProof ParticipationProof, slotProof SlotProof, opts *bind.TransactOpts) (gaslimit.Limits, error)
Estimate the gas to call RespondWithParticipation
func EstimateRespondWithValidatorGas ¶ added in v1.24.0
func EstimateRespondWithValidatorGas(rp *rocketpool.RocketPool, challengeId *big.Int, validatorId uint32, slotTimestamp uint64, validatorProof ValidatorProof, slotProof SlotProof, opts *bind.TransactOpts) (gaslimit.Limits, error)
Estimate the gas to call RespondWithValidator
func EstimateStakeGas ¶
func EstimateStakeGas(rp *rocketpool.RocketPool, megapoolAddress common.Address, validatorId uint32, slotTimestamp uint64, proofVersion *big.Int, proofData []byte, opts *bind.TransactOpts) (gaslimit.Limits, error)
Estimate the gas of Stake
func FinaliseChallenge ¶ added in v1.24.0
func FinaliseChallenge(rp *rocketpool.RocketPool, challengeId *big.Int, opts *bind.TransactOpts) (common.Hash, error)
func GetBeaconStateVerifierVersion ¶ added in v1.20.8
func GetBeaconStateVerifierVersion(rp *rocketpool.RocketPool, opts *bind.CallOpts) (uint8, error)
func GetChallengeBondCandidates ¶ added in v1.24.4
func GetChallengeBondCandidates(rp *rocketpool.RocketPool, node common.Address, interval, fromBlock, toBlock *big.Int, opts *bind.CallOpts) ([]*big.Int, error)
GetChallengeBondCandidates finds bonds proposed by this node and defeated challenges of either pool type. Defeat events do not identify the responder; callers must filter these candidates using getChallengeBondDetails.
func GetDelegate ¶
func GetDelegate(rp *rocketpool.RocketPool, opts *bind.CallOpts) (common.Address, error)
Returns the address of the megapool's stored delegate
func GetDelegateExpired ¶
func GetDelegateExpired(rp *rocketpool.RocketPool, opts *bind.CallOpts) (bool, error)
Returns true if the megapools current delegate has expired
func GetEffectiveDelegate ¶
func GetEffectiveDelegate(rp *rocketpool.RocketPool, opts *bind.CallOpts) (common.Address, error)
Returns the delegate which will be used when calling this megapool taking into account useLatestDelegate setting
func GetMegapoolDelegateExpiry ¶
func GetMegapoolDelegateExpiry(rp *rocketpool.RocketPool, delegateAddress common.Address, opts *bind.CallOpts) (uint64, error)
Get a megapool delegate expiration block
func GetMegapoolDeployed ¶
func GetMegapoolDeployed(rp *rocketpool.RocketPool, nodeAddress common.Address, opts *bind.CallOpts) (bool, error)
Get a megapool deployment state
func GetMegapoolExpectedAddress ¶
func GetMegapoolExpectedAddress(rp *rocketpool.RocketPool, nodeAddress common.Address, opts *bind.CallOpts) (common.Address, error)
Get a megapool expected address
func GetUseLatestDelegate ¶
func GetUseLatestDelegate(rp *rocketpool.RocketPool, opts *bind.CallOpts) (bool, error)
Returns true if this megapool always uses the latest delegate contract
func GetValidatorCount ¶
func GetValidatorCount(rp *rocketpool.RocketPool, opts *bind.CallOpts) (uint32, error)
func NotifyExit ¶
func NotifyExit(rp *rocketpool.RocketPool, megapoolAddress common.Address, validatorId uint32, slotTimestamp uint64, proofVersion *big.Int, proofData []byte, opts *bind.TransactOpts) (*types.Transaction, error)
Notify the megapool that one of its validators is exiting
func NotifyFinalBalance ¶
func NotifyFinalBalance(rp *rocketpool.RocketPool, megapoolAddress common.Address, validatorId uint32, slotTimestamp uint64, proofVersion *big.Int, proofData []byte, opts *bind.TransactOpts) (*types.Transaction, error)
Notify the megapool of the final balance of an exited validator
func NotifyNotExit ¶
func NotifyNotExit(rp *rocketpool.RocketPool, megapoolAddress common.Address, validatorId uint32, slotTimestamp uint64, proofVersion *big.Int, proofData []byte, opts *bind.TransactOpts) (*types.Transaction, error)
Used to prove a validator is not exiting after a challenge-exit
func Penalise ¶
func Penalise(rp *rocketpool.RocketPool, megapoolAddress common.Address, block *big.Int, amount *big.Int, opts *bind.TransactOpts) (common.Hash, error)
func ReleaseChallengeBond ¶ added in v1.24.4
func ReleaseChallengeBond(rp *rocketpool.RocketPool, challengeId *big.Int, opts *bind.TransactOpts) (common.Hash, error)
ReleaseChallengeBond unlocks the proposer's recorded bond independently of exit finalisation.
func RespondWithParticipation ¶ added in v1.24.0
func RespondWithParticipation(rp *rocketpool.RocketPool, challengeId *big.Int, validatorId uint32, offset uint64, challengeLeaf *big.Int, challengeWitness []common.Hash, slotTimestamp uint64, validatorProof ValidatorProof, participationProof ParticipationProof, slotProof SlotProof, opts *bind.TransactOpts) (common.Hash, error)
Respond to a performance challenge with a proof that the validator did participate in one of the challenged epochs
func RespondWithValidator ¶ added in v1.24.0
func RespondWithValidator(rp *rocketpool.RocketPool, challengeId *big.Int, validatorId uint32, slotTimestamp uint64, validatorProof ValidatorProof, slotProof SlotProof, opts *bind.TransactOpts) (common.Hash, error)
Respond to a performance challenge with proof that a listed validator activated after the challenge's start epoch.
func Stake ¶
func Stake(rp *rocketpool.RocketPool, megapoolAddress common.Address, validatorId uint32, slotTimestamp uint64, proofVersion *big.Int, proofData []byte, opts *bind.TransactOpts) (*types.Transaction, error)
Progress the prelaunch megapool to staking
func UsesProofBundles ¶ added in v1.24.0
func UsesProofBundles(rp *rocketpool.RocketPool, opts *bind.CallOpts) (bool, error)
UsesProofBundles selects the transaction format from the deployed manager version. The consensus fork determines the proof witnesses independently.
func VerifyExit ¶ added in v1.18.7
func VerifyValidator ¶ added in v1.18.7
func VerifyValidator(rp *rocketpool.RocketPool, proof ValidatorProof, opts *bind.CallOpts) (bool, error)
func VerifyWithdrawal ¶ added in v1.18.7
func VerifyWithdrawal(rp *rocketpool.RocketPool, validatorIndex *big.Int, withdrawalSlot uint64, withdrawalNum *big.Int, withdrawal Withdrawal, slot uint64, proof [][32]byte, opts *bind.CallOpts) (bool, error)
Types ¶
type ExitChallenge ¶
type FinalBalanceProof ¶
type FinalBalanceProofBundleV1 ¶ added in v1.24.0
type FinalBalanceProofBundleV1 struct {
WithdrawalProof WithdrawalProof `json:"withdrawalProof"`
ValidatorProof ValidatorProof `json:"validatorProof"`
SlotProof SlotProof `json:"slotProof"`
}
type FinalBalanceProofBundleV2 ¶ added in v1.24.0
type FinalBalanceProofBundleV2 struct {
WithdrawalProof WithdrawalProof `json:"withdrawalProof"`
ValidatorProof ValidatorProof `json:"validatorProof"`
SlotProof SlotProof `json:"slotProof"`
PreviousNextWithdrawalIndexProof NextWithdrawalIndexProof `json:"previousNextWithdrawalIndexProof"`
ValidatorBalanceProof ValidatorBalanceProof `json:"validatorBalanceProof"`
}
type Megapool ¶
type Megapool interface {
GetContract() *rocketpool.Contract
GetAddress() common.Address
GetVersion() uint8
GetValidatorCount(opts *bind.CallOpts) (uint32, error)
GetActiveValidatorCount(opts *bind.CallOpts) (uint32, error)
GetLockedValidatorCount(opts *bind.CallOpts) (uint32, error)
GetExitingValidatorCount(opts *bind.CallOpts) (uint32, error)
GetSoonestWithdrawableEpoch(opts *bind.CallOpts) (uint32, error)
GetValidatorInfo(validatorId uint32, opts *bind.CallOpts) (ValidatorInfo, error)
GetValidatorPubkey(validatorId uint32, opts *bind.CallOpts) (rptypes.ValidatorPubkey, error)
GetValidatorInfoAndPubkey(validatorId uint32, opts *bind.CallOpts) (ValidatorInfoWithPubkey, error)
GetLastDistributionTime(opts *bind.CallOpts) (uint64, error)
GetAssignedValue(opts *bind.CallOpts) (*big.Int, error)
GetDebt(opts *bind.CallOpts) (*big.Int, error)
GetRefundValue(opts *bind.CallOpts) (*big.Int, error)
GetNodeBond(opts *bind.CallOpts) (*big.Int, error)
GetNodeQueuedBond(opts *bind.CallOpts) (*big.Int, error)
GetUserCapital(opts *bind.CallOpts) (*big.Int, error)
CalculatePendingRewards(opts *bind.CallOpts) (RewardSplit, error)
CalculateRewards(amount *big.Int, opts *bind.CallOpts) (RewardSplit, error)
GetPendingRewards(opts *bind.CallOpts) (*big.Int, error)
GetNodeAddress(opts *bind.CallOpts) (common.Address, error)
EstimateDequeueGas(validatorId uint32, opts *bind.TransactOpts) (gaslimit.Limits, error)
Dequeue(validatorId uint32, opts *bind.TransactOpts) (common.Hash, error)
EstimateDistributeGas(opts *bind.TransactOpts) (gaslimit.Limits, error)
Distribute(opts *bind.TransactOpts) (common.Hash, error)
EstimateDissolveValidatorGas(validatorId uint32, opts *bind.TransactOpts) (gaslimit.Limits, error)
DissolveValidator(validatorId uint32, opts *bind.TransactOpts) (common.Hash, error)
EstimateClaimRefundGas(opts *bind.TransactOpts) (gaslimit.Limits, error)
ClaimRefund(opts *bind.TransactOpts) (common.Hash, error)
EstimateRepayDebtGas(opts *bind.TransactOpts) (gaslimit.Limits, error)
RepayDebt(opts *bind.TransactOpts) (common.Hash, error)
EstimateReduceBondGas(amount *big.Int, opts *bind.TransactOpts) (gaslimit.Limits, error)
ReduceBond(amount *big.Int, opts *bind.TransactOpts) (common.Hash, error)
GetWithdrawalCredentials(opts *bind.CallOpts) (common.Hash, error)
GetNewValidatorBondRequirement(opts *bind.CallOpts) (*big.Int, error)
EstimateRequestUnstakeRPL(opts *bind.TransactOpts) (gaslimit.Limits, error)
RequestUnstakeRPL(opts *bind.TransactOpts) (common.Hash, error)
EstimateSetUseLatestDelegateGas(setting bool, opts *bind.TransactOpts) (gaslimit.Limits, error)
SetUseLatestDelegate(setting bool, opts *bind.TransactOpts) (common.Hash, error)
GetUseLatestDelegate(opts *bind.CallOpts) (bool, error)
GetDelegate(opts *bind.CallOpts) (common.Address, error)
GetDelegateExpired(rp *rocketpool.RocketPool, opts *bind.CallOpts) (bool, error)
GetEffectiveDelegate(opts *bind.CallOpts) (common.Address, error)
EstimateDelegateUpgradeGas(opts *bind.TransactOpts) (gaslimit.Limits, error)
DelegateUpgrade(opts *bind.TransactOpts) (common.Hash, error)
GetMegapoolPubkeys(opts *bind.CallOpts) ([]rptypes.ValidatorPubkey, error)
}
func NewMegaPoolV1 ¶
func NewMegaPoolV1(rp *rocketpool.RocketPool, address common.Address, opts *bind.CallOpts) (Megapool, error)
Create new megapool contract
func NewMegapool ¶ added in v1.24.0
func NewMegapool(rp *rocketpool.RocketPool, address common.Address, opts *bind.CallOpts) (Megapool, error)
Create a megapool binding for the contract version deployed at the given address
type MegapoolV1 ¶
type MegapoolV1 interface {
Megapool
}
type MegapoolV2 ¶ added in v1.24.0
type MegapoolV2 interface {
Megapool
}
func NewMegaPoolV2 ¶ added in v1.24.0
func NewMegaPoolV2(rp *rocketpool.RocketPool, address common.Address, opts *bind.CallOpts) (MegapoolV2, error)
Create new megapool contract
type MegapoolValidatorInfo ¶ added in v1.23.0
type MegapoolValidatorInfo struct {
Pubkey []byte `abi:"pubkey"`
ValidatorInfo ValidatorInfo `abi:"validatorInfo"`
MegapoolAddress common.Address `abi:"megapoolAddress"`
ValidatorId uint32 `abi:"validatorId"`
}
func GetValidatorInfo ¶
func GetValidatorInfo(rp *rocketpool.RocketPool, index uint32, opts *bind.CallOpts) (MegapoolValidatorInfo, error)
type NextWithdrawalIndexProof ¶ added in v1.24.0
type ParticipationProof ¶ added in v1.24.0
type PerformanceChallenge ¶ added in v1.24.4
type PerformanceChallenge struct {
ChallengeId *big.Int
MegapoolAddress common.Address
NodeAddress common.Address
MinipoolAddresses []common.Address
ValidatorIds []uint32
StartEpoch uint64
Participation []*big.Int
}
PerformanceChallenge contains the data needed to reconstruct a challenge proof.
func GetMegapoolPerformanceChallenges ¶ added in v1.24.4
func GetMegapoolPerformanceChallenges(rp *rocketpool.RocketPool, address common.Address, interval, fromBlock, toBlock *big.Int, opts *bind.CallOpts) ([]PerformanceChallenge, error)
GetMegapoolPerformanceChallenges reads challenge events, including events from previous deployments of rocketNetworkParticipation. A nil fromBlock scans from the first challenge, so overdue unresolved challenges are included.
func GetPerformanceChallenges ¶ added in v1.24.4
func GetPerformanceChallenges(rp *rocketpool.RocketPool, challengeId, interval, fromBlock, toBlock *big.Int, opts *bind.CallOpts) ([]PerformanceChallenge, error)
GetPerformanceChallenges discovers both challenge types across upgrades. challengeId optionally limits the event query to one challenge.
type PerformanceChallengeDefense ¶ added in v1.24.4
type PerformanceChallengeDefense struct {
ChallengeId *big.Int
ValidatorId uint32
MinipoolAddress common.Address
SlotTimestamp uint64
Validator ValidatorProof
Slot SlotProof
Participation *ParticipationProof
Offset uint64
ChallengeLeaf *big.Int
ChallengeWitness []common.Hash
}
PerformanceChallengeDefense represents either permitted proof for either pool type. A nonzero MinipoolAddress selects the minipool entry point; otherwise ValidatorId identifies a member of the challenged megapool.
func (PerformanceChallengeDefense) EstimateGas ¶ added in v1.24.4
func (d PerformanceChallengeDefense) EstimateGas(rp *rocketpool.RocketPool, opts *bind.TransactOpts) (gaslimit.Limits, error)
func (PerformanceChallengeDefense) Submit ¶ added in v1.24.4
func (d PerformanceChallengeDefense) Submit(rp *rocketpool.RocketPool, opts *bind.TransactOpts) (common.Hash, error)
type PerformanceChallengeStatus ¶ added in v1.24.4
type PerformanceChallengeStatus struct {
Proposer common.Address
Responder common.Address
BondAmount *big.Int
ResponseDeadline *big.Int
BondSettled bool
Responded bool
Finalised bool
}
func GetPerformanceChallengeStatus ¶ added in v1.24.4
func GetPerformanceChallengeStatus(rp *rocketpool.RocketPool, challengeId *big.Int, opts *bind.CallOpts) (PerformanceChallengeStatus, error)
GetPerformanceChallengeStatus reads the snapshotted deadline and the two terminal flags. Bond settlement is independent of challenge finalisation.
func (PerformanceChallengeStatus) CanClaimReward ¶ added in v1.24.4
func (s PerformanceChallengeStatus) CanClaimReward(caller common.Address) bool
func (PerformanceChallengeStatus) CanDefend ¶ added in v1.24.4
func (s PerformanceChallengeStatus) CanDefend(caller common.Address, timestamp uint64) bool
func (PerformanceChallengeStatus) CanFinalise ¶ added in v1.24.4
func (s PerformanceChallengeStatus) CanFinalise(timestamp uint64) bool
func (PerformanceChallengeStatus) CanReleaseBond ¶ added in v1.24.4
func (s PerformanceChallengeStatus) CanReleaseBond(timestamp uint64) bool
type ProvedValidator ¶
type ProvedValidator struct {
Pubkey []byte `json:"pubkey" ssz-size:"48"`
WithdrawalCredentials [32]byte `json:"withdrawal_credentials" ssz-size:"32"`
EffectiveBalance uint64 `json:"effective_balance"`
Slashed bool `json:"slashed"`
ActivationEligibilityEpoch uint64 `json:"activation_eligibility_epoch"`
ActivationEpoch uint64 `json:"activation_epoch"`
ExitEpoch uint64 `json:"exit_epoch"`
WithdrawableEpoch uint64 `json:"withdrawable_epoch"`
}
type RewardSplit ¶
type ValidatorBalanceProof ¶ added in v1.24.0
type ValidatorInfo ¶
type ValidatorInfo struct {
LastAssignmentTime uint32 `abi:"lastAssignmentTime"`
LastRequestedValue uint32 `abi:"lastRequestedValue"`
LastRequestedBond uint32 `abi:"lastRequestedBond"`
DepositValue uint32 `abi:"depositValue"`
Staked bool `abi:"staked"`
Exited bool `abi:"exited"`
InQueue bool `abi:"inQueue"`
InPrestake bool `abi:"inPrestake"`
ExpressUsed bool `abi:"expressUsed"`
Dissolved bool `abi:"dissolved"`
Exiting bool `abi:"exiting"`
Locked bool `abi:"locked"`
ExitBalance uint64 `abi:"exitBalance"`
LockedTime uint64 `abi:"lockedTime"`
}
type ValidatorInfoWithPubkey ¶
type ValidatorInfoWithPubkey struct {
Pubkey []byte `abi:"pubkey"`
ValidatorInfo `abi:"validatorInfo"`
}
type ValidatorProof ¶
type ValidatorProof struct {
ValidatorIndex *big.Int `json:"validatorIndex"`
Validator ProvedValidator `json:"validator"`
Witnesses [][32]byte `json:"witnesses"`
}
type ValidatorProofBundleV1 ¶ added in v1.24.0
type ValidatorProofBundleV1 struct {
ValidatorProof ValidatorProof `json:"validatorProof"`
SlotProof SlotProof `json:"slotProof"`
}
type Withdrawal ¶
type WithdrawalProof ¶
type WithdrawalProof struct {
WithdrawalSlot uint64 `json:"withdrawalSlot"`
WithdrawalNum uint16 `json:"withdrawalNum"`
Withdrawal Withdrawal `json:"withdrawal"`
Witnesses [][32]byte `json:"witnesses"`
}