Create a cache to map a public key to its owning UUID

Description

Public keys can be assigned to external UUIDs (usually used to associate them with a particular account). Once a key has been created, a common operation is to find out what UUID (if any) a public key is assigned to. This information is stored in the pk_hash_to_external_id table, but is not currently exposed through code anywhere.

A requirement here is to cache the result of the lookup in the database table, to ensure large numbers of database queries are not carried out in the event that a key is requested multiple times. This requires a little care as a key should not be looked up multiple times if it does not exist at all in the database table (this just means that the key is not assigned to an external UUID and instead belongs to the node identity).

This is useful for accounts and for certain enterprise features.

Status

Assignee

James Paton

Reporter

James Higgs

Labels

Feature Team

Kernel Group

Story Points

2

Fix versions

Ported to...

Corda 4.3
Corda Enterprise 4.3

Priority

Medium

Sprint

None

Affects versions

Configure