Skip to content

Change TransactionAuthenticator::get_public_key to return Arc<>` #2302

@igamigo

Description

@igamigo

One thing related to this that I found while implementing 0xMiden/miden-client#1626 is that most DBs (that could back authenticators) will give you an owned value when looking up keys, so this API forces some sort of internal cache that leaks per unique key. This is not too bad, just cumbersome compared to the overhead of just cloning (although I'm assuming public keys will never be too large, not enough that the cloning would introduce significant performance overhead versus the actual execution I guess)

Originally posted by @igamigo in #2145 (comment)

Unless we want to force users to implement in-memory caches to comply with the API, Bobbin's suggestion of using Arc is a good tradeoff here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions