duneanalytics / duneanalytics/evm.codes

SMOD description

Open
#385 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
827
Forks
199
Avg merge
15m
Merged PRs (30d)
1

Description

https://www.evm.codes/?fork=cancun#07:

Note the overflow semantic when $−2^{255}$ is negated.

This is a controversial statement for this opcode.
There is no such statement in https://ethereum.github.io/yellowpaper/paper.pdf.

If needed, you may look deeper into implementation details:

The main point is that SDIV comment—
"Note the overflow semantic when $−2^{255}$ is negated."—
refers to an overflow case.
In contrast, SMOD does not overflow because its arithmetic logic disregards the sign of the second operand.

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

Start with the SMOD description at the linked evm.codes Cancun opcode page and compare its overflow wording with the Yellow Paper. If needed, inspect the linked opSmod and Smod implementations to understand the disputed behavior. Done means resolving whether the statement belongs in the SMOD description and updating the wording accordingly.

Written by the indexing model from the issue text.

Assessment

Domain
blockchain, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.