mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-05 23:57:04 +00:00
Remove the abci responses type - prune legacy responses (#8673)
Closes #8069 * Type `ABCIResponses` was just wrapping type `ResponseFinalizeBlock`. This patch removes the former. * Did some renaming to avoid confusion on the data structure we are working with. * We also remove any stale ABCIResponses we may have in the state store at the time of pruning **IMPORTANT**: There is an undesirable side-effect of the unwrapping. An empty `ResponseFinalizeBlock` yields a 0-length proto-buf serialized buffer. This was not the case with `ABCIResponses`. I have added an interim solution, but open for suggestions on more elegant ones.
This commit is contained in:
@@ -650,8 +650,14 @@ func (bs *BlockStore) Close() error {
|
||||
|
||||
// key prefixes
|
||||
// NB: Before modifying these, cross-check them with those in
|
||||
// internal/state/store.go
|
||||
// TODO(thane): Move these and the ones in internal/state/store.go to their own package.
|
||||
// * internal/store/store.go [0..4, 13]
|
||||
// * internal/state/store.go [5..8, 14]
|
||||
// * internal/evidence/pool.go [9..10]
|
||||
// * light/store/db/db.go [11..12]
|
||||
// TODO(thane): Move all these to their own package.
|
||||
// TODO: what about these (they already collide):
|
||||
// * scripts/scmigrate/migrate.go [3] --> Looks OK, as it is also called "SeenCommit"
|
||||
// * internal/p2p/peermanager.go [1]
|
||||
const (
|
||||
// prefixes are unique across all tm db's
|
||||
prefixBlockMeta = int64(0)
|
||||
@@ -659,7 +665,7 @@ const (
|
||||
prefixBlockCommit = int64(2)
|
||||
prefixSeenCommit = int64(3)
|
||||
prefixBlockHash = int64(4)
|
||||
prefixExtCommit = int64(9) // 5..8 are used by state/store
|
||||
prefixExtCommit = int64(13)
|
||||
)
|
||||
|
||||
func blockMetaKey(height int64) []byte {
|
||||
|
||||
Reference in New Issue
Block a user