hyperledger-iroha / iroha

Iroha - A simple, enterprise-grade decentralized ledger
https://wiki.hyperledger.org/display/iroha
Apache License 2.0
438 stars 280 forks source link

[proposal] Finer metadata-level queries #5023

Open 0x009922 opened 1 month ago

0x009922 commented 1 month ago

Context

Metadata of domains/accounts/triggers etc could be a large key-value storage.

Currently there are queries to extract a single key-value entry by key (e.g. FindDomainMetadata { id, key }). Another way to retrieve metadata is to query an entity entirely (e.g. via FindDomains by an id) and access the whole metadata object.

A specific use-case when it may not be desirable: in Explorer, we display entities while not having domain-specific knowledge, e.g. when metadata is expected to be small, or large, or when it needs some special way of displaying. We need to display a key-value storage universally in an efficient way, e.g.

Ideas