sync

package
v0.15.2 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2025 License: GPL-3.0, LGPL-3.0 Imports: 23 Imported by: 0

Documentation

Overview

Copyright (C) 2019-2025, Ava Labs, Inc. All rights reserved. See the file LICENSE for licensing terms.

Copyright (C) 2019-2025, Ava Labs, Inc. All rights reserved. See the file LICENSE for licensing terms.

Copyright (C) 2019-2025, Ava Labs, Inc. All rights reserved. See the file LICENSE for licensing terms.

Index

Constants

View Source
const TrieNode message.NodeType = 2

TrieNode represents a leaf node that belongs to the atomic trie.

Variables

This section is empty.

Functions

func NewExtender

func NewExtender() *extender

Initialize initializes the sync extender with the backend and trie.

func NewLeafHandler

func NewLeafHandler() *leafHandler

NewAtomicLeafHandler returns a new uninitialzied atomicLeafHandler that can be later initialized

func NewSummaryParser

func NewSummaryParser() *summaryParser

func NewSummaryProvider

func NewSummaryProvider() *summaryProvider

Types

type Summary

type Summary struct {
	*message.BlockSyncSummary `serialize:"true"`
	AtomicRoot                common.Hash `serialize:"true"`
	// contains filtered or unexported fields
}

Summary provides the information necessary to sync a node starting at the given block.

func NewSummary

func NewSummary(blockHash common.Hash, blockNumber uint64, blockRoot common.Hash, atomicRoot common.Hash) (*Summary, error)

func (*Summary) Accept

func (*Summary) Bytes

func (a *Summary) Bytes() []byte

func (*Summary) ID

func (a *Summary) ID() ids.ID

func (*Summary) String

func (a *Summary) String() string

type Syncer

type Syncer interface {
	Start(ctx context.Context) error
	Done() <-chan error
}

Syncer represents a step in state sync, along with Start/Done methods to control and monitor progress. Error returns an error if any was encountered.

Jump to

Keyboard shortcuts

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