runtimeverification / runtimeverification/evm-semantics

Rule coverage and configuration well-formedness

Open
#2,291 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
KCL
Stars
591
Forks
156
Avg merge
2h 19m
Merged PRs (30d)
1

Description

The rules for checkBalanceUnderflow:

     rule <k> #checkBalanceUnderflow ACCT VALUE => #refund GCALL ~> #pushCallStack ~> #pushWorldState ~> #end EVMC_BALANCE_UNDERFLOW ... </k>
         <output> _ => .Bytes </output>
         <callGas> GCALL </callGas>
         <account>
           <acctID> ACCT </acctID>
           <balance> BAL </balance>
           ...
         </account>
      requires VALUE >Int BAL

    rule <k> #checkBalanceUnderflow ACCT VALUE => . ... </k>
         <account>
           <acctID> ACCT </acctID>
           <balance> BAL </balance>
           ...
         </account>
      requires VALUE <=Int BAL

only consider configurations in which the account with identifier ACCT is present.

Is this:

  • an omission, in the sense that there should be a third rule when the account is not present; or
  • a consequence of having a well-formed EVM configuration, in the sense that an account with identifier ACCT must always be present when there is an #checkBalanceUnderflow check?

Perhaps it would be a good idea if we went through the semantics to see if there are other sets of rules that are incomplete in this sense. Is there a way of understanding this automatically, perhaps on definition creation? @ehildenb @jberthold

Contributor guide

No contributing guide indexed for this repository

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

Review the two checkBalanceUnderflow rules shown in the issue and the surrounding EVM semantics. First determine whether a missing account is permitted in a well-formed configuration, then inspect whether similar rule sets are incomplete. Done means documenting the conclusion and assessing whether definition creation can detect such cases automatically.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.