Skip to content

Memoize getScriptsHashesNeeded for subtransactions in Dijkstra era #5840

@lehins

Description

@lehins

getScriptsHashesNeeded isn't completely free, since it iterates over scriptsNeeded and constructs a Set of all hashes.
It so happens that this conversion is called twice for all subtransactions:

  • once in SUBUTXOW
  • and another in UTXOW

It will make sense to memoize this computation by adding a field to DijkstraStAnnSubTx:

    , dsastScriptsHashesNeeded :: Set ScriptHash

and using it instead in those rules.

That will also require addition to DijkstraEreUTxO of this new accessor:

  scriptsHashesNeededStAnnTx :: StAnnTx SubTx era -> Set ScriptHash

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions