trailofbits / manticore

Symbolic execution tool
https://blog.trailofbits.com/2017/04/27/manticore-symbolic-execution-for-humans/
GNU Affero General Public License v3.0
3.7k stars 470 forks source link

Implement EVM refunds #1251

Open feliam opened 6 years ago

feliam commented 6 years ago

The issue There is not support for refunds and gas does not affect balances. For example writing a zero to a storage slot that previously had a non-zero value will refund some gas at the end of the transaction, to some extent.

Task Description Implement ant test all aspects of refund and gas spending(gas vs balance) in manticore EVM implementation. Research, implement the all needed parts at every related instruction and add tests for everything.

Acceptance criteria A transaction should spend the gas x price from the caller account balance when appropiate. The refund should be calculated and added to the balance when needed. All should accept both symbolic and concrete gas/refunds avoiding concretization or explaining why it is unavoidable. Integration examples that showcase the change in the balance should be included. Unittest for the changed intructions for different forks should be added

Required Skill Experience with Python 3.6 Experience with Solidity smart contracts Experience with EVM bytecode smart contracts Experience with yellow papering.

No experience with Slither is required, but it would be a plus

gitcoinbot commented 6 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 100.0 DAI (100.0 USD @ $1.0/DAI) attached to it as part of the ECF fund.

gitcoinbot commented 5 years ago

@jalextowle Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

gitcoinbot commented 5 years ago

@jalextowle Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

jalextowle commented 5 years ago

I am still working on this issue. No WIP PR at the moment because I haven’t tested much.

gitcoinbot commented 5 years ago

@jalextowle Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

gitcoinbot commented 5 years ago

@jalextowle Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

gitcoinbot commented 5 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


@jalextowle due to inactivity, we have escalated this issue to Gitcoin's moderation team. Let us know if you believe this has been done in error!

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

bobjiang commented 5 years ago

@jalextowle Bob Jiang from Gitcoin Team reminds you: are you still working on this issue?

jalextowle commented 5 years ago

No. I thought that I had pressed work stopped, but maybe I didn’t. I realized that I didn’t have time to work on this at the moment with my current work schedule

On Sun, Jan 20, 2019 at 8:24 PM Bob Jiang notifications@github.com wrote:

@jalextowle https://github.com/jalextowle Bob Jiang from Gitcoin Team reminds you: are you still working on this issue?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/trailofbits/manticore/issues/1251#issuecomment-455929310, or mute the thread https://github.com/notifications/unsubscribe-auth/AhNsQfrSjEMRxElzTEC-MjIBOlb7qXl2ks5vFSTWgaJpZM4YNDo2 .

janus commented 5 years ago

@feliam Is this issue still open?

feliam commented 5 years ago

Yes we do not have support for refunds nor the gas * price affect the balance. Both still need fix.

janus commented 5 years ago

@feliam I would like to attempt this task, would you accept that?

feliam commented 5 years ago

I accept. Bear in mind you'll need a way to test this after is done.

spm32 commented 5 years ago

@janus are you still interested in working on this task?

janus commented 5 years ago

@ceresstation Yes, I am!