datacommittee

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	Translator translator.Translator
	// contains filtered or unexported fields
}

Backend implements the DAC integration

func New

func New(
	logger *log.Logger,
	l1RPCURL string,
	dataCommitteeAddr common.Address,
	privKey *ecdsa.PrivateKey,
	dataCommitteeClientFactory client.Factory,
	translator translator.Translator,
) (*Backend, error)

New creates an instance of Backend

func (*Backend) GetSequence

func (d *Backend) GetSequence(_ context.Context, hashes []common.Hash, _ []byte) ([][]byte, error)

GetSequence retrieves backend data by querying committee members for each hash concurrently.

func (*Backend) Init

func (d *Backend) Init() error

Init loads the DAC to be cached when needed

func (*Backend) PostSequenceBanana

func (d *Backend) PostSequenceBanana(ctx context.Context, sequence etherman.SequenceBanana) ([]byte, error)

PostSequenceBanana submits a sequence to the data committee and collects the signed response from them.

func (*Backend) PostSequenceElderberry

func (d *Backend) PostSequenceElderberry(ctx context.Context, batchesData [][]byte) ([]byte, error)

PostSequenceElderberry submits batches and collects signatures from committee members.

type DataCommittee

type DataCommittee struct {
	AddressesHash      common.Hash
	Members            []DataCommitteeMember
	RequiredSignatures uint64
}

DataCommittee represents a specific committee

type DataCommitteeMember

type DataCommitteeMember struct {
	Addr common.Address
	URL  string
}

DataCommitteeMember represents a member of the Data Committee

Jump to

Keyboard shortcuts

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