Documentation ¶
Index ¶
- Constants
- Variables
- func DatFileName(from, to uint64, fType string) string
- func FileName(from, to uint64, fileType string) string
- func Hex2InfoHash(in string) (infoHash metainfo.Hash)
- func IdxFileName(from, to uint64, fType string) string
- func IsCorrectFileName(name string) bool
- func IsCorrectHistoryFileName(name string) bool
- func SegmentFileName(from, to uint64, t Type) string
- func TmpFiles(dir string) (res []string, err error)
- type FileInfo
- func FilesWithExt(dir, expectExt string) ([]FileInfo, error)
- func FilterExt(in []FileInfo, expectExt string) (out []FileInfo)
- func IdxFiles(dir string) (res []FileInfo, err error)
- func ParseDir(dir string) (res []FileInfo, err error)
- func ParseFileName(dir, fileName string) (res FileInfo, ok bool)
- func Segments(dir string) (res []FileInfo, err error)
- type IdxType
- type TorrentUrls
- type Type
- type WebSeedUrls
- type WebSeedsFromProvider
Constants ¶
View Source
const Erigon2MergeLimit = 500_000
View Source
const Erigon2MinSegmentSize = 1_000
View Source
const Erigon2RecentMergeLimit = 100_000 //nolint
Use-cases:
- produce and seed snapshots earlier on chain tip. reduce depnedency on "good peers with history" at p2p-network. Some networks have no much archive peers, also ConsensusLayer clients are not-good(not-incentivised) at serving history.
- avoiding having too much files: more files(shards) - means "more metadata", "more lookups for non-indexed queries", "more dictionaries", "more bittorrent connections", ... less files - means small files will be removed after merge (no peers for this files).
View Source
const Erigon3SeedableSteps = 32
Variables ¶
View Source
var BlockSnapshotTypes = []Type{Headers, Bodies, Transactions}
View Source
var BorSnapshotTypes = []Type{BorEvents, BorSpans}
View Source
var (
ErrInvalidFileName = fmt.Errorf("invalid compressed file name")
)
Functions ¶
func DatFileName ¶
func Hex2InfoHash ¶
func IdxFileName ¶
func IsCorrectFileName ¶
func SegmentFileName ¶
Types ¶
type FileInfo ¶
FileInfo - parsed file metadata
func FilesWithExt ¶
func ParseFileName ¶
func (FileInfo) NeedTorrentFile ¶
func (FileInfo) TorrentFileExists ¶
type TorrentUrls ¶
type WebSeedUrls ¶
type WebSeedsFromProvider ¶
Each provider can provide only 1 WebSeed url per file but overall BitTorrent protocol allowing multiple
Click to show internal directories.
Click to hide internal directories.