solana/ledger
steviez 01cd55a27a
Change SlotMeta is_connected bool to bitflags (#29001)
We currently use the is_connected field to be able to signal to
ReplayStage that a slot has replayable updates. It was discovered that
this functionality is effectively broken, and that is_connected is never
true. In order to convey this information to ReplayStage more
effectively, we need extra state information so this PR changes the
existing bool to bitflags with two bits.

From a compatibility standpoint, the is_connected bool was already
occupying one byte in the serialized SlotMeta in blockstore. Thus, the
change from a bool to bitflags still "fits" in that one byte allotment.

In consideration of a case where a client may wish to downgrade software
and use the same ledger, deserializing the bitflags into a bool could
fail if the new bit is set. As such, this PR introduces the second bit
field, but does not set it anywhere. Once clusters have mass adopted a
software version with this PR, a subsequent change to actually set and
use the new field can be introduced.
2022-12-01 14:42:35 -06:00
..
benches clippy for rust 1.65.0 (#28765) 2022-11-09 19:39:38 +00:00
src Change SlotMeta is_connected bool to bitflags (#29001) 2022-12-01 14:42:35 -06:00
tests clippy for rust 1.65.0 (#28765) 2022-11-09 19:39:38 +00:00
.gitignore
Cargo.toml update to spl-token-2022 0.5.0 2022-11-28 11:30:41 -08:00
build.rs adds crds-value for broadcasting duplicate shreds through gossip (#14133) 2020-12-18 14:32:43 +00:00