Skip to content

[#917] Use RPC revealing in runOperationsNonEmptyHelper

Description

Problem: runOperationsNonEmptyHelper uses an implementation of revealKeyUnlessRevealed that calls octez-client. We recently implemented injection of reveal operations via RPC. It makes sense to re-use this mechanism to reduce dependence on octez-client.

Solution: a bit involved:

  • Replace revealKey with getPublicKey in HasTezosClient
  • Move Morley.Client.Action.Common.revealKeyUnlessRevealed to TezosClient.Impl
  • Implement key revealing in runOperationsNonEmptyHelper via prepending the reveal operation to the batch.
  • Rename Morley.Client.Action.Reveal.revealKey* to *Op, since those inject raw revelation operations
  • Introduce utility versions of Morley.Client.Action.Reveal.revealKey* that get the key using getPublicKey.

Related issue(s)

Resolves #917 (closed), also, somewhat surprisingly, resolves #915 (closed)

Checklist for your Merge Request

Related changes (conditional)

  • Tests (see short guidelines)

    • If I added new functionality, I added tests covering it.
    • If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
  • Documentation

    • I checked whether I should update the docs and did so if necessary:
    • I updated changelog files of all affected packages released to Hackage if my changes are externally visible.

Stylistic guide (mandatory)

Edited by Nikolay Yakimov

Merge request reports