github.com/MetalBlockchain/metalgo@v1.11.9/snow/engine/snowman/block/state_summary.go (about)

     1  // Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved.
     2  // See the file LICENSE for licensing terms.
     3  
     4  package block
     5  
     6  import (
     7  	"context"
     8  
     9  	"github.com/MetalBlockchain/metalgo/ids"
    10  )
    11  
    12  // StateSummary represents all the information needed to download, verify, and
    13  // rebuild its state.
    14  type StateSummary interface {
    15  	// ID uniquely identifies this state summary, regardless of the chain state.
    16  	ID() ids.ID
    17  
    18  	// Height uniquely identifies this an accepted state summary.
    19  	Height() uint64
    20  
    21  	// Bytes returns a byte slice than can be used to reconstruct this summary.
    22  	Bytes() []byte
    23  
    24  	// Accept triggers the VM to start state syncing to this summary.
    25  	//
    26  	// It returns the state sync mode selected by the VM.
    27  	Accept(context.Context) (StateSyncMode, error)
    28  }