Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add EIP: EVM arbitrary precision decimal math #7904

Merged
merged 46 commits into from
Apr 14, 2024
Merged

Add EIP: EVM arbitrary precision decimal math #7904

merged 46 commits into from
Apr 14, 2024

Conversation

1m1-github
Copy link
Contributor

When opening a pull request to submit a new EIP, please use the suggested template: https://github.com/ethereum/EIPs/blob/master/eip-template.md

We have a GitHub bot that automatically merges some PRs. It will merge yours immediately if certain criteria are met:

  • The PR edits only existing draft PRs.
  • The build passes.
  • Your GitHub username or email address is listed in the 'author' header of all affected PRs, inside .
  • If matching on email address, the email address is the one publicly listed on your GitHub profile.

1m1 and others added 6 commits October 21, 2023 21:39
i know that the reference implementation is not abstract enough. it is running code, which should be clear. rather showcase the capability and if interest, write the tech specs for other clients.
@github-actions github-actions bot added c-new Creates a brand new proposal s-draft This EIP is a Draft t-core labels Oct 22, 2023
@eth-bot
Copy link
Collaborator

eth-bot commented Oct 22, 2023

✅ All reviewers have approved.

@eth-bot eth-bot changed the title Decimal math for EVM Add EIP: EVM+ Oct 22, 2023
@eth-bot eth-bot added e-consensus Waiting on editor consensus e-review Waiting on editor to review labels Oct 22, 2023
@github-actions github-actions bot added the w-ci Waiting on CI to pass label Oct 22, 2023
(sorry, to the hackathon ppl, I don't why I forgot to add the main files to the assets. no sleep. adding now. had a link to the same.
@github-actions github-actions bot added w-ci Waiting on CI to pass and removed w-ci Waiting on CI to pass labels Oct 23, 2023
EIPS/eip-EVM+.md Outdated Show resolved Hide resolved
EIPS/eip-EVM+.md Outdated Show resolved Hide resolved
@github-actions github-actions bot removed the w-ci Waiting on CI to pass label Oct 23, 2023
1m1-github and others added 4 commits October 22, 2023 19:32
?

Co-authored-by: Andrew B Coathup <28278242+abcoathup@users.noreply.github.com>
example Yul smart contracts to show simplicity provided by new OPCODEs
Add EIP: eth/69 - available-blocks-extended protocol
EIPS/eip-7543.md Outdated

it is crucial to have accurate gas costs to avoid energy attacks on nodes.

to this end, i have wrapped the underlying uint256 lib with gas accumulation, as found in the reference implementation in ../assets/eip-EVM+/uint256_wrapped.go. this gives a bottom-up approach to calculating gas, by running the OPCODE.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
to this end, i have wrapped the underlying uint256 lib with gas accumulation, as found in the reference implementation in ../assets/eip-EVM+/uint256_wrapped.go. this gives a bottom-up approach to calculating gas, by running the OPCODE.
to this end, the underlying uint256 lib can be wrapped with gas accumulation, as found in the reference implementation in ../assets/eip-EVM+/uint256_wrapped.go. this gives a bottom-up approach to calculating gas, by running the OPCODE.

EIPS/eip-7543.md Outdated

this gives an embedded gas calcuation, which works well for complex OPCODEs (see gasEVMPlusEmulate in ../assets/eip-EVM+/gasEVMPlusEmulate.go).

to remove the double gas, a future EIP would suggest the following: allow contract code to run whilst accumulating gas (at runtime) and panicking in case of limit breach, without requiring the cost in advance. this only works for contract code that is pure, defined as code that only depends on the user input and the inner bytecode of the contract. pure contracts cannot use state from the chain, nor make calls to other contracts. pure mathematical functions would e.g. be pure contracts. pure contracts are fully deterministic given the input, allowing a user to estimate gas costs offline (cheaper) and the EVM to panic at runtime, without knowing gas in advance.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may be this section needs to be re-written in a "clearner" consistent way. TODO needs to be added as a todo markup

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo markup? could not find here: https://eips.ethereum.org/EIPS/eip-1

@github-actions github-actions bot added the w-ci Waiting on CI to pass label Nov 14, 2023
@1m1-github
Copy link
Contributor Author

errors are from other EIPS

Copy link

The commit 6e42bea (as a parent of a8c9d46) contains errors.
Please inspect the Run Summary for details.

@github-actions github-actions bot removed the w-ci Waiting on CI to pass label Jan 15, 2024
@1m1-github
Copy link
Contributor Author

@g11tech, apologies for the delay in resolving your asks, was dealing with some health issues, good now, ty!

@1m1-github
Copy link
Contributor Author

@abcoathup @Pandapip1 @g11tech

hi. i got the opportunity to present this EIP (and the corresponding win at EthOnline) on the Feb-23rd at EthDenver. do you think it might be possible to get this PR merged? thank you, it would be awesome for the talk.

@1m1-github
Copy link
Contributor Author

@eth-bot rerun

Copy link

There has been no activity on this pull request for 2 weeks. It will be closed after 3 months of inactivity. If you would like to move this PR forward, please respond to any outstanding feedback or add a comment indicating that you have addressed all required feedback and are ready for a review.

@github-actions github-actions bot added the w-stale Waiting on activity label Apr 14, 2024
@eth-bot eth-bot enabled auto-merge (squash) April 14, 2024 03:18
Copy link
Collaborator

@eth-bot eth-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All Reviewers Have Approved; Performing Automatic Merge...

@eth-bot eth-bot merged commit 560ea93 into ethereum:master Apr 14, 2024
10 checks passed
@1m1-github 1m1-github changed the title Add EIP: EVM decimal math Add EIP: EVM arbitrary precision decimal math Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-new Creates a brand new proposal e-consensus Waiting on editor consensus e-review Waiting on editor to review s-draft This EIP is a Draft t-core w-stale Waiting on activity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants