Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrDisallowRevertToArchival = errors.New(
"node has been run with pruner enabled before, it is not safe to convert to an archival" +
"Run with --experimental-pruning enabled or consider re-initializing the store")
ErrDisallowRevertToArchival is returned when a node has been run with pruner enabled before and launching it with archival mode.
Functions ¶
func ConvertFromArchivalToPruned ¶
func ConvertFromArchivalToPruned(ctx context.Context, ds datastore.Datastore, isArchival bool) (bool, error)
ConvertFromArchivalToPruned ensures that a node has not been run with pruning enabled before cannot revert to archival mode. It returns true only if the node is converting to pruned mode for the first time.
Types ¶
type Option ¶
type Option func(*params)
Option is a function that configures light availability Parameters
func WithArchivalMode ¶
func WithArchivalMode() Option
WithArchivalMode is a functional option to tell the full availability implementation that the node wants to sync *all* blocks, not just those within the sampling window.
type ShareAvailability ¶
type ShareAvailability struct {
// contains filtered or unexported fields
}
ShareAvailability implements share.Availability using the full data square recovery technique. It is considered "full" because it is required to download enough shares to fully reconstruct the data square.
func NewShareAvailability ¶
func NewShareAvailability( store *store.Store, getter shwap.Getter, opts ...Option, ) *ShareAvailability
NewShareAvailability creates a new full ShareAvailability.
func (*ShareAvailability) Prune ¶
func (fa *ShareAvailability) Prune(ctx context.Context, eh *header.ExtendedHeader) error
func (*ShareAvailability) SharesAvailable ¶
func (fa *ShareAvailability) SharesAvailable(ctx context.Context, header *header.ExtendedHeader) error
SharesAvailable reconstructs the data committed to the given Root by requesting enough Shares from the network.