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

Migrate purity checker to vyper LLL #69

Closed
djrtwo opened this issue Apr 1, 2018 · 18 comments
Closed

Migrate purity checker to vyper LLL #69

djrtwo opened this issue Apr 1, 2018 · 18 comments

Comments

@djrtwo
Copy link
Contributor

djrtwo commented Apr 1, 2018

Issue

Purity checker is currently written in the deprecated Serpent. We need to make updates to it but should stop relying on Serpent compiler

Proposed implementation

  • Migrate current purity checker from serpent to vyper LLL
  • Port contract to this repo
  • Add sanity check testing to pytest build
  • Compile Purity Checker from source instead of using bytecode in the testing setup

Example Vyper LLL and compile techniques here https://github.com/ethereum/casper/blob/master/tests/utils/valcodes.py

@djrtwo
Copy link
Contributor Author

djrtwo commented Apr 1, 2018

This should be handled before #66

@vbuterin vbuterin changed the title Migrate purity checker to vyper Migrate purity checker to vyper LLL Apr 8, 2018
@djrtwo
Copy link
Contributor Author

djrtwo commented Apr 19, 2018

@ralexstokes might be picking this one up

@ChihChengLiang
Copy link
Contributor

ChihChengLiang commented Apr 19, 2018

These are some test cases rewritten in vyper.

# when submitted to purity checker, these should return True
success_cases = [
    """
    @public
    def foo(x:int128) -> int128:
        return x * 2
    """,
    """
    @public
    def phooey(h:bytes32, v:uint256, r:uint256, s:uint256) -> address:
        return ecrecover(h, v, r, s)
    """
]
# when submitted to purity checker, these should return False
failed_cases = [
    """
    horse: int128

    @public
    def foo() -> int128:
        return self.horse
    """,
    """
    @public
    def foo() -> int128:
        return block.number
    """
]

@gitcoinbot
Copy link

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


This issue now has a funding of 110.0 DAI (110.0 USD @ $1.0/DAI) attached to it.

@gitcoinbot
Copy link

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


Work has been started.

  1. @ralexstokes

has committed to working on this project to be completed 5 months, 4 weeks from now.

@gitcoinbot
Copy link

gitcoinbot commented May 9, 2018

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


Work has been started.

These users each claimed they can complete the work by 4 months, 1 week from now. Please review their questions below:

  1. ralexstokes has started work.

@gitcoinbot
Copy link

@ralexstokes 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!

  • warning (3 days)
  • escalation to mods (6 days)

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

@gitcoinbot
Copy link

@ralexstokes 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!

  • warning (3 days)
  • escalation to mods (6 days)

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

@ralexstokes
Copy link
Member

@gitcoinbot refer #143

@gitcoinbot
Copy link

@ralexstokes. 👋 thanks for the atMention, but you need to install @gitcoinbot on this repo for me to be able to respond. More details in the documentation.

✌️
@gitcoinbot

@gitcoinbot
Copy link

@ralexstokes 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!

  • warning (3 days)
  • escalation to mods (6 days)

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

@ralexstokes
Copy link
Member

ralexstokes commented May 25, 2018

Leaving a note that we should make sure that external accounts are impure.

Edit: this is handled and there are tests covering this functionality.

@vs77bb
Copy link

vs77bb commented May 25, 2018

Snoozed the Gitcoin Bot warnings, @ralexstokes. Thanks for the responses 😄

@djrtwo
Copy link
Contributor Author

djrtwo commented Jun 14, 2018

This is complete. How do we pay out @ralexstokes?

@vs77bb
Copy link

vs77bb commented Jun 18, 2018

@djrtwo Expect payout in the next day or two. Great work @ralexstokes!

@vs77bb
Copy link

vs77bb commented Jun 20, 2018

@ralexstokes Can you click 'Submit Work' on Gitcoin here?

If you need a bit of mainnet ETH, let me know on Gitcoin Slack or try the Gitcoin Faucet and we'll get some your way 🙂

@gitcoinbot
Copy link

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


Work for 300.0 DAI (300.0 USD @ $1.0/DAI) has been submitted by:

  1. @ralexstokes

@gdipri01 please take a look at the submitted work:


@gitcoinbot
Copy link

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


The funding of 300.0 DAI (300.0 USD @ $1.0/DAI) attached to this issue has been approved & issued to @ralexstokes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants
@djrtwo @ralexstokes @ChihChengLiang @vs77bb @gitcoinbot and others