Interface HashableIndex
- All Superinterfaces:
StorageIndex
- All Known Subinterfaces:
ProofEntryIndex<T>
- All Known Implementing Classes:
ProofEntryIndexProxy
,ProofListIndexProxy
,ProofMapIndexProxy
public interface HashableIndex extends StorageIndex
A hashable index provides a cryptographic hash which represents the complete state of this index.
Hashable indexes enable efficient verification of their contents. Two indexes contain the same values if their index hashes are equal. This property is used in the consensus algorithm to compare the database state on different nodes.
Index hashes are also used in verifiable index views. Such views contain a subset of index elements and a proof that jointly allow to restore the index hash. The computed index hash allows to verify that the elements come from an index with a certain state.
Hashable indexes may participate in state hash aggregation.
- See Also:
- ObjectHash trait
-
Method Summary
Modifier and Type Method Description HashCode
getIndexHash()
Returns the index hash which represents the complete state of this index.Methods inherited from interface com.exonum.binding.core.storage.indices.StorageIndex
getAddress, getName
-
Method Details
-
getIndexHash
HashCode getIndexHash()Returns the index hash which represents the complete state of this index. Any modifications to the stored entries affect the index hash.How index hash is computed depends on the index data structure implementation.
-