Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Figure out why Phragmen is taking so long for staking #4313

Closed
@gavofyork

Description

At the end of every era, the chain stalls for some substantial period of time. This is likely due to Phragmen taking too long to execute, coupled with a timeout during block authoring that discards blocks if they take too long to evaluate when executed using wasmi (the slow interpreter).

We need to profile the wasmi execution of this using real data from the chain to confirm that it is taking longer than a few seconds to execute and see what of the algorithm is most problematic (trie i/o, general CPU, memory allocations, crypto), and whether there's a hidden O(N**2) complexity that we didn't see before.

Metadata

Assignees

No one assigned

    Labels

    I4-annoyanceThe client behaves within expectations, however this “expected behaviour” itself is at issue.I8-footprintAn enhancement to provide a smaller (system load, memory, network or disk) footprint.U1-asapNo need to stop dead in your tracks, however issue should be addressed as soon as possible.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions