GithubHelp home page GithubHelp logo

Comments (21)

ralexstokes avatar ralexstokes commented on June 13, 2024 3

@gitcoinbot i do not have a WIP PR yet but i will soon.

from casper.

djrtwo avatar djrtwo commented on June 13, 2024 3

Purity of contracts defined by this purity checker need to give a deterministic output only on the parameters pass in, not on the state of the blockchain at the time. An example could be something like the following:

def true_if_even_gas():
    return GAS % 2 == 0

This function is not deterministic on its inputs but rather on the state of the context of its execution. If a validator's signature had such a triviality, they could sign a message that would validate as True in one context but not in another. Thus opening up the potential of being able to sign nefarious messages and not get slashed for it.

from casper.

ralexstokes avatar ralexstokes commented on June 13, 2024 3

@gitcoinbot refer #169

from casper.

ralexstokes avatar ralexstokes commented on June 13, 2024 1

@gitcoinbot checking in

from casper.

djrtwo avatar djrtwo commented on June 13, 2024 1

@gitcoinbot This is completed

from casper.

ralexstokes avatar ralexstokes commented on June 13, 2024 1

@gitcoinbot we are working to close out this bounty

from casper.

paulhauner avatar paulhauner commented on June 13, 2024

When playing around with tests today, I noticed the following items are not currently blacklisted:

  • 0xfb CREATE2
  • A bunch of unused opcodes (I mention this because some of the unused opcodes are blacklisted in the current implementation)

I assume these will get fixed when it migrates to LLL. I just wanted to put them somewhere for reference.

from casper.

ChihChengLiang avatar ChihChengLiang commented on June 13, 2024

maybe try pytest xfail feature? so we can get that test work when GAS opcode implemented.

A xfail means that you expect a test to fail for some reason. A common example is a test for a feature not yet implemented, or a bug not yet fixed.
https://docs.pytest.org/en/documentation-restructure/how-to/skipping.html

from casper.

gitcoinbot avatar gitcoinbot commented on June 13, 2024

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


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

from casper.

gitcoinbot avatar gitcoinbot commented on June 13, 2024

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.
  • Q: I will incorporate the changes detailed in this PR description and some of the comments on this issue. The changes all seem pretty straightforward.

from casper.

gitcoinbot avatar gitcoinbot commented on June 13, 2024

@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

from casper.

gitcoinbot avatar gitcoinbot commented on June 13, 2024

@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

from casper.

gitcoinbot avatar gitcoinbot commented on June 13, 2024

@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

from casper.

ralexstokes avatar ralexstokes commented on June 13, 2024

@paulhauner nice catch on these opcodes! my take is this:

we should leave CREATE2 alone for now as it is still reserved.

and the other reserved opcodes i can find are 0x46-0x4f which are all in the "block information" family of opcodes. I'm guessing those were included in the original purity checker as they will always be impure no matter what.

the rest of the opcodes in the original purity checker are included in the Metropolis yellow paper opcode table.

from casper.

ralexstokes avatar ralexstokes commented on June 13, 2024

@djrtwo trying to come up with a good rationale why we need to add this opcode.

if we want to take the view that the purity checker is looking for purity with respect to the incoming transaction, i would say that GAS is pure. the reasoning is that the mutable data here gaslimit will be just another parameter to the valcode execution so we get referential transparency.

does anyone see this differently? do i misunderstand the semantics of purity checker?

it is straightforward to add an additional opcode here and i can do so if it makes sense

i would also point out the meta-issue (possibly a convo to have in another thread) about how and why the purity checker could change -- this touches on some of the stuff @paulhauner was getting at in his comment as well

from casper.

gitcoinbot avatar gitcoinbot commented on June 13, 2024

@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

from casper.

vs77bb avatar vs77bb commented on June 13, 2024

@djrtwo @ralexstokes Awesome!

from casper.

gitcoinbot avatar gitcoinbot commented on June 13, 2024

@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

from casper.

vs77bb avatar vs77bb commented on June 13, 2024

Hi @ralexstokes if you can 'Submit Work' for this one too, that'd be great.

from casper.

gitcoinbot avatar gitcoinbot commented on June 13, 2024

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


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

  1. @ralexstokes

@gdipri01 please take a look at the submitted work:


from casper.

gitcoinbot avatar gitcoinbot commented on June 13, 2024

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


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

from casper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.