-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Conversation
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.
✅ All reviewers have approved. |
(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.
? 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
errors are from other EIPS |
The commit 6e42bea (as a parent of a8c9d46) contains errors. |
@g11tech, apologies for the delay in resolving your asks, was dealing with some health issues, good now, ty! |
@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. |
catch up
@eth-bot rerun |
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. |
There was a problem hiding this 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...
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: