Gazelle hates exp/constraints for some inexplicable reason.
> build aborted: no such package '@org_golang_x_exp//constraints': BUILD file not found in directory 'constraints' of external repository @org_golang_x_exp.
- Adds unit test running cargen over a fake blockstore.
- Covers the CAR splitting code path.
- Ensures resulting CARs decode and contain expected CIDs.
- Fix last CAR not being flushed
- Fix wrong epoch number in file name
- Print error message in edge case where block exceeds CAR length (splitting fails)
Splitting pure Go and Cgo code into separate Go files
allows other packages to depend on blockstore mocks.
This is useful for writing test scenarios for external
components that consume data from blockstore.
When splitHandle moves data from old to new CAR,
it fails to flush the write cache of the old car,
and seeks past the end of the file.
Regression introduced by a319031b
Compiling the rocksdb binding isn't as straight-forward
as installing rocksdb headers:
$ go build ./...
# github.com/linxGnu/grocksdb
../../go/pkg/mod/github.com/linx!gnu/grocksdb@v1.7.7/cache.go:84:2: could not determine kind of name for C.rocksdb_lru_cache_options_set_num_shard_bits
Adding an optional build tag to compile radiance with rocksdb
support, otherwise remove the blockstore command. This keeps
everything else working with CGO_ENABLED=0.
Some time along Solana mainnet-beta history,
the legacy data shred header was extended
from 86 bytes to 88 bytes.
We don't know when exactly this change has happened.
Or whether the shred version is self-describing.
For now, add a simple switch by slot number.
Adds structs that appear in the GenesisConfig object
Adds handwritten serde for runtime structs because
binary doesn't properly support bincode-fixedint-le
Updates blockstore dump YAML schema to reflect that
slices of shreds map to slices of entries.
Adds a new "entry_batches" wrapper list that annotates
each slice of entries with shred range and encoded size.