Skip to content

Conversation

@lehins
Copy link
Collaborator

@lehins lehins commented Nov 20, 2025

Description

Description

Current implementation of ticking in ImpSpec is a bit naive, since it calls TICK rule for every slot. This is not only slow, but it also does not match the reality. On an actual running node TICK is called on every block, which happens on average every 1/activeSlotCoefficient number of slots. On mainnet this is about every 20 slots or every 20 seconds.

Switching to this approach makes imp tests significantly faster, namely about 80% faster on the example of Conway imp tests (Running Conway imp tests on my laptop went from 6.5 minutes to 1.5 minute)

Checklist

  • Commits in meaningful sequence and with useful messages.
  • Tests added or updated when needed.
  • CHANGELOG.md files updated for packages with externally visible changes.
    NOTE: New section is never added with the code changes. (See RELEASING.md).
  • Versions updated in .cabal and CHANGELOG.md files when necessary, according to the
    versioning process.
  • Version bounds in .cabal files updated when necessary.
    NOTE: If bounds change in a cabal file, that package itself must have a version increase. (See RELEASING.md).
  • Code formatted (use scripts/fourmolize.sh).
  • Cabal files formatted (use scripts/cabal-format.sh).
  • CDDL files are up to date (use scripts/gen-cddl.sh)
  • hie.yaml updated (use scripts/gen-hie.sh).
  • Self-reviewed the diff.

@lehins lehins requested a review from a team as a code owner November 20, 2025 06:01
@lehins lehins requested a review from neilmayhew November 20, 2025 06:01
Current implementation of ticking in ImpSpec is a bit naive, since it
calls `TICK` rule for every slot. This is not only slow, but it also
does not match the reality. On an actual running node TICK is called
on every block, which happens on average every `1/activeSlotCoefficient`
number of slots. On mainnet this is about every 20 slots or every 20
seconds.

Switching to this approach makes imp tests significantly faster, namely
about 80% faster on the example of Conway imp tests.
@lehins lehins force-pushed the lehins/speedup-imp-tests branch from 0748db1 to 709a0eb Compare November 20, 2025 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants