Documentation ¶
Index ¶
- type DBStorage
- func (d *DBStorage) AddGeneratedProof(ctx context.Context, proof *state.Proof, dbTx db.Txer) error
- func (d *DBStorage) AddSequence(ctx context.Context, sequence state.Sequence, dbTx db.Txer) error
- func (d *DBStorage) BeginTx(ctx context.Context, options *sql.TxOptions) (db.Txer, error)
- func (d *DBStorage) CheckProofContainsCompleteSequences(ctx context.Context, proof *state.Proof, dbTx db.Txer) (bool, error)
- func (d *DBStorage) CheckProofExistsForBatch(ctx context.Context, batchNumber uint64, dbTx db.Txer) (bool, error)
- func (d *DBStorage) CleanupGeneratedProofs(ctx context.Context, batchNumber uint64, dbTx db.Txer) error
- func (d *DBStorage) CleanupLockedProofs(ctx context.Context, duration string, dbTx db.Txer) (int64, error)
- func (d *DBStorage) DeleteGeneratedProofs(ctx context.Context, batchNumber uint64, batchNumberFinal uint64, dbTx db.Txer) error
- func (d *DBStorage) DeleteUngeneratedProofs(ctx context.Context, dbTx db.Txer) error
- func (d *DBStorage) GetProofReadyToVerify(ctx context.Context, lastVerfiedBatchNumber uint64, dbTx db.Txer) (*state.Proof, error)
- func (d *DBStorage) GetProofsToAggregate(ctx context.Context, dbTx db.Txer) (*state.Proof, *state.Proof, error)
- func (d *DBStorage) UpdateGeneratedProof(ctx context.Context, proof *state.Proof, dbTx db.Txer) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBStorage ¶
DBStorage implements the Storage interface
func NewDBStorage ¶
NewDBStorage creates a new DBStorage instance
func (*DBStorage) AddGeneratedProof ¶
AddGeneratedProof adds a generated proof to the storage
func (*DBStorage) AddSequence ¶
AddSequence stores the sequence information to allow the aggregator verify sequences.
func (*DBStorage) CheckProofContainsCompleteSequences ¶
func (d *DBStorage) CheckProofContainsCompleteSequences( ctx context.Context, proof *state.Proof, dbTx db.Txer, ) (bool, error)
CheckProofContainsCompleteSequences checks if a recursive proof contains complete sequences
func (*DBStorage) CheckProofExistsForBatch ¶
func (d *DBStorage) CheckProofExistsForBatch(ctx context.Context, batchNumber uint64, dbTx db.Txer) (bool, error)
CheckProofExistsForBatch checks if the batch is already included in any proof
func (*DBStorage) CleanupGeneratedProofs ¶
func (d *DBStorage) CleanupGeneratedProofs(ctx context.Context, batchNumber uint64, dbTx db.Txer) error
CleanupGeneratedProofs deletes from the storage the generated proofs up to the specified batch number included.
func (*DBStorage) CleanupLockedProofs ¶
func (d *DBStorage) CleanupLockedProofs(ctx context.Context, duration string, dbTx db.Txer) (int64, error)
CleanupLockedProofs deletes from the storage the proofs locked in generating state for more than the provided threshold.
func (*DBStorage) DeleteGeneratedProofs ¶
func (d *DBStorage) DeleteGeneratedProofs( ctx context.Context, batchNumber uint64, batchNumberFinal uint64, dbTx db.Txer, ) error
DeleteGeneratedProofs deletes from the storage the generated proofs falling inside the batch numbers range.
func (*DBStorage) DeleteUngeneratedProofs ¶
DeleteUngeneratedProofs deletes ungenerated proofs. This method is meant to be use during aggregator boot-up sequence
func (*DBStorage) GetProofReadyToVerify ¶
func (d *DBStorage) GetProofReadyToVerify( ctx context.Context, lastVerfiedBatchNumber uint64, dbTx db.Txer, ) (*state.Proof, error)
GetProofReadyToVerify return the proof that is ready to verify