core

package
v1.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2025 License: MIT Imports: 27 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BeaconStrategy added in v1.5.0

func BeaconStrategy() gethCommon.Address

func ComputeBalanceDeviationSync added in v1.5.0

func ComputeBalanceDeviationSync(ctx context.Context, eth *ethclient.Client, state *spec.VersionedBeaconState, eigenpod common.Address) (*big.Float, error)

func FindStaleEigenpods added in v1.5.0

func FindStaleEigenpods(ctx context.Context, eth *ethclient.Client, nodeUrl string, beacon utils.BeaconClient, chainId *big.Int, verbose bool, tolerance float64) (map[string][]utils.ValidatorWithIndex, error)

func FracMul added in v1.5.0

func FracMul(a *big.Int, x *big.Int, y *big.Int) *big.Int

multiply by a fraction

func GenerateCheckpointProof

func GenerateCheckpointProof(ctx context.Context, eigenpodAddress string, eth *ethclient.Client, chainId *big.Int, beaconClient utils.BeaconClient, verbose bool) (*eigenpodproofs.VerifyCheckpointProofsCallParams, error)

func GenerateCheckpointProofForState

func GenerateCheckpointProofForState(ctx context.Context, eigenpodAddress string, beaconState *spec.VersionedBeaconState, header *v1.BeaconBlockHeader, eth *ethclient.Client, currentCheckpointTimestamp uint64, proofs *eigenpodproofs.EigenPodProofs, verbose bool) (*eigenpodproofs.VerifyCheckpointProofsCallParams, error)

func GenerateValidatorProof

func GenerateValidatorProof(ctx context.Context, eigenpodAddress string, eth *ethclient.Client, chainId *big.Int, beaconClient utils.BeaconClient, validatorIndex *big.Int, verbose bool) (*eigenpodproofs.VerifyValidatorFieldsCallParams, uint64, error)

*

  • Generates a .ProveValidatorContainers() proof for all eligible validators on the pod. If `validatorIndex` is set, it will only generate a proof
  • against that validator, regardless of the validator's state.

func GenerateValidatorProofAtState

func GenerateValidatorProofAtState(ctx context.Context, proofs *eigenpodproofs.EigenPodProofs, eigenpodAddress string, beaconState *spec.VersionedBeaconState, eth *ethclient.Client, chainId *big.Int, header *v1.BeaconBlockHeader, blockTimestamp uint64, forSpecificValidatorIndex *big.Int, verbose bool) (*eigenpodproofs.VerifyValidatorFieldsCallParams, error)

func LoadCheckpointProofFromFile

func LoadCheckpointProofFromFile(path string) (*eigenpodproofs.VerifyCheckpointProofsCallParams, error)

, out, owner *string, forceCheckpoint bool

func LoadConsolidationRequestFromFile added in v1.5.0

func LoadConsolidationRequestFromFile(path string) ([]EigenPod.IEigenPodTypesConsolidationRequest, error)

func LoadWithdrawalRequestFromFile added in v1.5.0

func LoadWithdrawalRequestFromFile(path string) ([]EigenPod.IEigenPodTypesWithdrawalRequest, error)

func PodManagerContracts added in v1.5.0

func PodManagerContracts() map[uint64]string

func SubmitCheckpointProof

func SubmitCheckpointProof(ctx context.Context, owner, eigenpodAddress string, chainId *big.Int, proof *eigenpodproofs.VerifyCheckpointProofsCallParams, eth *ethclient.Client, batchSize uint64, noPrompt bool, noSend bool, verbose bool) ([]*types.Transaction, error)

func SubmitCheckpointProofBatch

func SubmitCheckpointProofBatch(ctx context.Context, owner, eigenpodAddress string, chainId *big.Int, proof *eigenpodproofs.ValidatorBalancesRootProof, balanceProofs []*eigenpodproofs.BalanceProof, eth *ethclient.Client, noSend bool, verbose bool) (*types.Transaction, error)

func SubmitConsolidationRequests added in v1.5.0

func SubmitConsolidationRequests(
	ctx context.Context,
	owner, eigenpodAddress string,
	chainId *big.Int,
	eth *ethclient.Client,
	requests []EigenPod.IEigenPodTypesConsolidationRequest,
	predeployFee *big.Int,
	noSend bool,
	verbose bool,
) (*types.Transaction, error)

SubmitConsolidationRequests submits consolidation requests via EigenPod.requestConsolidation

Parameters:

  • requests are consolidation requests submitted as a single transaction
  • predeployFee is the msg.value to send with the transaction. This should be the current predeploy fee multiplied by len(requests).

func SubmitValidatorProof

func SubmitValidatorProof(ctx context.Context, owner, eigenpodAddress string, chainId *big.Int, eth *ethclient.Client, batchSize uint64, proofs *eigenpodproofs.VerifyValidatorFieldsCallParams, oracleBeaconTimesetamp uint64, noPrompt bool, noSend bool, verbose bool) ([]*types.Transaction, [][]*big.Int, error)

func SubmitValidatorProofChunk

func SubmitValidatorProofChunk(ctx context.Context, ownerAccount *utils.Owner, eigenPod *EigenPod.EigenPod, chainId *big.Int, eth *ethclient.Client, indices []*big.Int, validatorFields [][][32]byte, stateRootProofs *eigenpodproofs.StateRootProof, validatorFieldsProofs [][]byte, oracleBeaconTimesetamp uint64, verbose bool) (*types.Transaction, error)

func SubmitWithdrawalRequests added in v1.5.0

func SubmitWithdrawalRequests(
	ctx context.Context,
	owner, eigenpodAddress string,
	chainId *big.Int,
	eth *ethclient.Client,
	requests []EigenPod.IEigenPodTypesWithdrawalRequest,
	predeployFee *big.Int,
	noSend bool,
	verbose bool,
) (*types.Transaction, error)

SubmitWithdrawalRequests submits withdrawal requests via EigenPod.requestWithdrawal

Parameters:

  • requests are withdrawal requests to be submitted as a single transaction
  • predeployFee is the msg.value to send with the transaction. This should be the current predeploy fee multiplied by len(requests).

Types

type EigenpodStatus

type EigenpodStatus struct {
	Validators map[string]utils.Validator

	ActiveCheckpoint *utils.Checkpoint

	NumberValidatorsToCheckpoint int

	CurrentTotalSharesETH *big.Float
	Status                int

	// if you completed a new checkpoint right now, how many shares would you get?
	//
	//  this is computed as:
	// 		- If checkpoint is already started:
	// 			sum(beacon chain balances) + currentCheckpoint.podBalanceGwei + pod.withdrawableRestakedExecutionLayerGwei()
	// 		- If no checkpoint is started:
	// 			total_shares_after_checkpoint = sum(validator[i].regular_balance) + (balanceOf(pod) rounded down to gwei) - withdrawableRestakedExecutionLayerGwei
	TotalSharesAfterCheckpointGwei *big.Float
	TotalSharesAfterCheckpointETH  *big.Float

	PodOwner       gethCommon.Address
	ProofSubmitter gethCommon.Address

	// Whether the checkpoint would need to be started with the `--force` flag.
	// This would be due to the pod not having any uncheckpointed native ETH
	MustForceCheckpoint bool
}

func GetStatus

func GetStatus(ctx context.Context, eigenpodAddress string, eth *ethclient.Client, beaconClient utils.BeaconClient) EigenpodStatus

type SerializableCredentialProof

type SerializableCredentialProof struct {
	ValidatorProofs       *eigenpodproofs.VerifyValidatorFieldsCallParams
	OracleBeaconTimestamp uint64
}

func LoadValidatorProofFromFile

func LoadValidatorProofFromFile(path string) (*SerializableCredentialProof, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL