runtimeverification / runtimeverification/kontrol

Display Emitted Events Along Execution Paths in TUI

Open
#27 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement tui
Dominant language
Python
Stars
122
Forks
16
PR merge metrics
No merged PRs in 30d

Description

Background:
Many Solidity developers, myself included, utilize emitted events as a method akin to printf debugging. This aids in quickly discerning execution paths, checking the state of variables without diving into storage, and providing a clear insight into contract behavior.

Feature Description:
Introduce a way to visualize emitted events along execution paths, similar to how we currently display constraints.
Allow developers to insert event emits and view these logs directly in the TUI.

The events are stored in the <log/> cell of the <substate/> cell. They are not logged in human-readable form, so to achieve readability we should look up the event digest and data types in the ABI so that we can display the event name used in Solidity, and ideally also the emitted data in a useful format (a libary like eth-abi might be useful here: https://eth-abi.readthedocs.io/en/latest/decoding.html ).

Benefit:
This enhancement would provide an immediate and certain way to answer questions like "how far did I get?" during contract execution. It would offer a more intuitive and certain alternative to the often ambiguous reasoning derived from analyzing nodes in the execution.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the TUI displays constraints along execution paths, then inspect the substate log cell and the ABI data available for event decoding. Done means emitted events appear along the relevant paths in the TUI with Solidity event names and useful decoded data.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, solidity
Domain
blockchain, cli, devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.