challenger

package
v0.0.0-...-5cda5f8 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: MIT Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FallbackGasTipCap = big.NewInt(1500000000)
)

Functions

This section is empty.

Types

type Challenger

type Challenger struct {
	Ctx              context.Context
	Cfg              *ChallengerConfig
	EigenDaContract  *bindings.BVMEigenDataLayrChain
	RawEigenContract *bind.BoundContract
	WalletAddr       ethc.Address
	EigenABI         *abi.ABI
	GraphClient      *graphView.GraphClient
	GraphqlClient    *graphql.Client
	DtlEigenClient   client.DtlClient
	LevelDBStore     *db.Store
	// contains filtered or unexported fields
}

func NewChallenger

func NewChallenger(ctx context.Context, cfg *ChallengerConfig) (*Challenger, error)

func (*Challenger) ChallengeProveFraud

func (c *Challenger) ChallengeProveFraud(ctx context.Context, fraudStoreNumber *big.Int, fraudProof *FraudProof, searchData rc.IDataLayrServiceManagerDataStoreSearchData, disclosureProofs rc.BVMEigenDataLayrChainDisclosureProofs) (*types.Transaction, error)

func (*Challenger) GetEigenLayerNode

func (c *Challenger) GetEigenLayerNode() (int, error)

func (*Challenger) IsMaxPriorityFeePerGasNotFoundError

func (c *Challenger) IsMaxPriorityFeePerGasNotFoundError(err error) bool

func (*Challenger) SendTransaction

func (c *Challenger) SendTransaction(ctx context.Context, tx *types.Transaction) error

func (*Challenger) ServiceInit

func (c *Challenger) ServiceInit() error

func (*Challenger) Start

func (c *Challenger) Start() error

func (*Challenger) Stop

func (c *Challenger) Stop()

func (*Challenger) UpdateGasPrice

func (c *Challenger) UpdateGasPrice(ctx context.Context, tx *types.Transaction) (*types.Transaction, error)

type ChallengerConfig

type ChallengerConfig struct {
	L1Client                  *ethclient.Client
	L2Client                  *l2ethclient.Client
	L1ChainID                 *big.Int
	EigenContractAddr         ethc.Address
	Logger                    *logging.Logger
	PrivKey                   *ecdsa.PrivateKey
	GraphProvider             string
	RetrieverSocket           string
	DtlClientUrl              string
	KzgConfig                 KzgConfig
	LastStoreNumber           uint64
	Timeout                   time.Duration
	PollInterval              time.Duration
	CompensatePollInterval    time.Duration
	DbPath                    string
	CheckerBatchIndex         uint64
	UpdateBatchIndexStep      uint64
	NeedReRollupBatch         string
	ChallengerCheckEnable     bool
	ReRollupToolEnable        bool
	DataCompensateEnable      bool
	SignerFn                  SignerFn
	ResubmissionTimeout       time.Duration
	NumConfirmations          uint64
	SafeAbortNonceTooLowCount uint64
	Metrics                   metrics.ChallengerMetrics

	EnableHsm  bool
	HsmAPIName string
	HsmCreden  string
	HsmAddress string
}

type DataLayrDisclosureProof

type DataLayrDisclosureProof struct {
	Header                    []byte
	Polys                     [][]byte
	MultirevealProofs         []datalayr.MultiRevealProof
	BatchPolyEquivalenceProof [4]*big.Int
	StartingChunkIndex        int
}

func (*DataLayrDisclosureProof) ToDisclosureProofs

type Fraud

type Fraud struct {
	StartingIndex int
}

type FraudProof

type FraudProof struct {
	DataLayrDisclosureProof
	StartingSymbolIndex int
}

type KzgConfig

type KzgConfig struct {
	G1Path    string
	G2Path    string
	TableDir  string
	NumWorker int
	Order     uint64 // Order is the total size of SRS
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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