Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 2019 14:02
    cburgdorf opened #1721
  • Jan 31 2019 14:00
    cburgdorf commented #1719
  • Jan 31 2019 13:45
    cburgdorf synchronize #1719
  • Jan 31 2019 13:40
    cburgdorf commented #1719
  • Jan 31 2019 13:38
    cburgdorf edited #1719
  • Jan 31 2019 13:35
    cburgdorf synchronize #1719
  • Jan 29 2019 13:39
    cburgdorf unlabeled #1306
  • Jan 28 2019 13:34
    Bhargavasomu commented #1670
  • Jan 28 2019 12:55
    Bhargavasomu synchronize #1670
  • Jan 28 2019 12:48
    Bhargavasomu synchronize #1670
  • Jan 26 2019 12:11
    cburgdorf closed #1315
  • Jan 26 2019 08:53
    Bhargavasomu commented #1315
  • Jan 25 2019 16:09

    pipermerriam on master

    Implement get_transaction_recei… (compare)

  • Jan 25 2019 16:09
    pipermerriam closed #1705
  • Jan 25 2019 12:27
    veox commented #1646
  • Jan 24 2019 17:52
    Bhargavasomu commented #1705
  • Jan 24 2019 17:39
    Bhargavasomu synchronize #1705
  • Jan 24 2019 17:26
    Bhargavasomu synchronize #1705
  • Jan 24 2019 16:39

    pipermerriam on master

    Remove last occurrences of apos… (compare)

  • Jan 24 2019 16:39
    pipermerriam closed #1720
Voith Mascarenhas
@voith
:tada:
Bryant Eisenbach
@fubuloubu
Thanks for the fix to ethereum/py-evm#1865
Jason Carver
@carver
:+1:
Jacques Wagener
@jacqueswww
:clap:
Chris Calderon
@SerpentChris
If I want to make a chain to use for testing a smart contract, can I use the Chain class instead of the MiningChain class?
Christoph Burgdorf
@cburgdorf
@SerpentChris You need the MiningChain class when you want to build blocks incrementally instead of importing blocks in one go.
Jason Carver
@carver
For testing, you might be interested in using web3.py with eth-tester (which uses py-evm under the hood)
Bryant Eisenbach
@fubuloubu
is Python 3.8 in the works for this project and eth-tester?
Jason Carver
@carver
I don't think there should be any problems w/ running it in py3.8. Do you know of anything? Obviously we'll want to add tests at some point, but it's not an active project that I know of @fubuloubu
Jason Carver
@carver
nm, I see in ethereum/vyper#1678 that there's some problem with the blake2b library
Bryant Eisenbach
@fubuloubu
We were trying to upgrade, but I think it's just been premature. Is it just me, or has 3.7/3.8 moved a lot faster than previous release?
Monir Shaker
@Moniroaf
i have some problems to compile the app.py i conudn't call the contract from the file sol ?!!
pinnaculum
@pinnaculum
congrats on py-evm this is huge
Noel Maersk
@veox

18 days later, ACD is noisy because of the difficulty bomb. :/

TL;DR: There might be an out-of-schedule call on Friday.

(I suggest you wonderful busy folk don't waste time on reading it all.)
Jason Carver
@carver
whoops, thanks for pointing it out (twice now!)
Noel Maersk
@veox
Heh, that's not what I meant by the comment, but thanks for fixing. :)
Jason Carver
@carver
:p
Griffin Ichiba Hotchkiss
@gichiba
Happy thanksgiving, americans! I'm looking to be pointed in the right direction with how to play with py-evm... I want to do essentially what is done in this exercise: https://easythereentropy.wordpress.com/2014/06/04/understanding-the-ethereum-trie/ -- but using py-evm instead of pythereum, and using the nice boilerplate project template that you have in the cookbooks. My question is where in the py-evm API or source would I find the logic that does the same thing trie.py does in pyethereum? Or, perhaps I'm totally going about this the wrong way, in which case my question is even more general: What's a good starting place for simple DB/State/Trie understanding of the evm?
Jason Carver
@carver
Yeah, if you just want to play around with tries, check out https://github.com/ethereum/py-trie @gichiba
I just noticed an "early release" warning on the README of py-trie. That could be removed now. It is the library that py-evm uses, and has gone through a solid amount of testing at this point. It could be optimized a lot more, but I'm not generally concerned about correctness, at least for evm-specific configurations (like always using 32-byte keys).
Griffin Ichiba Hotchkiss
@gichiba
Thanks @carver !
Jason Carver
@carver
I'm preparing py-evm for the Istanbul fix release today. The previous release incorrectly included an ice age delay.
Jason Carver
@carver
@/all py-evm with the fixed Istanbul (and a couple other things) is released:
https://py-evm.readthedocs.io/en/latest/release_notes.html#py-evm-0-3-0-alpha-9-2019-12-02
Noel Maersk
@veox

I have a feeling someone'll have to take over PR #1885 from me, or provide a lot of guidance.

The current lint failures are all for improper definitions/returns in low-level API classes: AccountDatabaseAPI, OpcodeAPI, VirtualMachineAPI; and some related abstract classes.

Take a look at this CI job most errors are an either-or choice, and I don't know which one is "correct".

There's also

eth/chains/base.py:250: error: Unexpected keyword argument "chain_context" for "VirtualMachineAPI"
eth/abc.py:2270: note: "VirtualMachineAPI" defined here

which means something unexpected may be happening.

Jason Carver
@carver
I'm on mobile now, but if you cc me on the PR, I'll take a look
Noel Maersk
@veox
@carver I went AFK immediately after posting y-day, sorry. Maybe it was a little too panicky. I'll cc you in a sec.
Jason Carver
@carver
@/all critical Istanbul bugfix release: https://py-evm.readthedocs.io/en/latest/release_notes.html#py-evm-0-3-0-alpha-10-2019-12-09
Trinity release coming shortly
Kjetil Vaagen
@KjetilVaa
Does anyone have any experience with Clique consensus who can help?
Noel Maersk
@veox
@KjetilVaa Very little. Anything specific?
Alan Justino da Silva
@alanjds
Hi. How near the py-evm is of the Golang version?
I mean, is it "safe" or is better to interface with the Golang via RPCs?
Jason Carver
@carver
It's in alpha, so it's not production-ready. @alanjds
Also, if you want to run a node, check out trinity which uses py-evm under the hood, but also handles all the peering, json-rpc, etc (also in alpha, of course)
Alan Justino da Silva
@alanjds

It's in alpha, so it's not production-ready. @alanjds
Also, if you want to run a node, check out trinity which uses py-evm under the hood, but also handles all the peering, json-rpc, etc (also in alpha, of course)

Tkx, @carver. I will take a look.

Jason Carver
@carver
@/all posted a new release, for the last known Istanbul bug
https://py-evm.readthedocs.io/en/latest/release_notes.html#py-evm-0-3-0-alpha-11-2019-12-12
Bryant Eisenbach
@fubuloubu
famous last words lol
Jason Carver
@carver
heh
Voith Mascarenhas
@voith
:tada:
Christoph Burgdorf
@cburgdorf
@KjetilVaa What is your question regarding Clique?
Christoph Burgdorf
@cburgdorf
Related: We've just released a new Py-EVM version that refactors consensus handling to make it more flexible and sound.
https://py-evm.readthedocs.io/en/latest/release_notes.html#py-evm-0-3-0-alpha-13-2020-01-13
Suraj Singla
@surajsingla333
Hi all, I am creating a python script that will list all the peer nodes connected to the bootnode which I will provide. Can anyone help me with how I can list all the peer nodes using trinity?
Thanks
Eth-Gitter-Bridge
@Eth-Gitter-Bridge
<carver> (asked and answered on the trinity channel)
Peteris Erins
@Pet3ris
Hi There, is there a way to get the current executing computation/transaction from a State object? In particular I'd love to access the current stack contents, memory contents that seem to be embedded in the computation.
Eth-Gitter-Bridge
@Eth-Gitter-Bridge

<Christoph> @Pet3ris I'm afraid I can not answer this without diving into the code myself. One thing I suggest is to run py-evm with log level 0 to get full tracing output. Then you'll see output such as: https://gist.github.com/cburgdorf/41ce3a9c9502d2f194c9e54454e6a689

You can search for the output in Py-EVM and sprinkle the code paths with breakpoint() statements and then use the debugger to examine from there. That's how I'd approach it.

Peteris Erins
@Pet3ris
Hi @Eth-Gitter-Bridge, thanks for your comment. I'm already using the debugger unfortunately and digging into the code. I just wasn't able to find a way to access the ongoing computation. I've found a way to access the Execution Environment, simply vm.state.coinbase etc., but I'd like to find something like vm.current_transaction.computation.stack and vm.current_transaction.computation.memory to get other elements
Jason Carver
@carver
@Pet3ris do you mean in between transactions or mid-transaction? There's no concept of a "current transaction", the VM is not stateful in that way. But if you're curious in between transactions, there are more options besides breakpoints. If you can share an example showing what you are trying to inspect, I can help more.
Peteris Erins
@Pet3ris
@carver yep - what I'm trying to do is to monkey patch the debug2 function to inspect intermediate EVM state
for example, I can get anything from the ExecutionContext like so:
        def debug2(self, message: str, *args: Any, **kwargs: Any) -> None:
            if self.debug:
                if "COMPUTATION STARTING" in message:
                    ExtendedDebugLoggerWithBytecode.collected = []
                print(len(ExtendedDebugLoggerWithBytecode.collected))
                ExtendedDebugLoggerWithBytecode.collected.append((message, args, kwargs))

                print(self.evm)
                print(self.evm.chain)
                print(self.evm.chain.get_vm().state)
                print(self.evm.chain.get_vm().state.block_number)
                ExtendedDebugLoggerWithBytecode.block_number = (
                    self.evm.chain.get_vm().state.block_number
                )
                print(self.evm.chain.get_vm().state.coinbase)
Jason Carver
@carver

Okay, so the part I'm still missing a bit is "why". Are you trying to answer a single question about the stack or memory? Or is there some other kind of motivation?
Right now, I've got:

  1. (some need?)
  2. Plan to patch the logger so that it outputs a bunch of information at each step (including stack and memory)
  3. Desire to access the computation of a "currently running transaction" from a logging context

So I'm wondering if there might be a different approach than 2. In general, the architecture is going to fight arbitrary inspection of some arbitrary thing that's currently happening. You'll usually need a reference to the object you want to know about. So 3 is going to be a pain. Assuming 2 is fixed, you might consider patching into the Computation object to generate logs from there instead. Or patching into the Executor to save a reference to the most recent generated computation somewhere. Both of these will have subtleties.

If 2 isn't fixed, then it depends a lot on what 1 is. Maybe if you're trying to answer a single question, then it could make sense to drop a conditional breakpoint in somewhere, or craft a transaction that generates the final state you want, etc, etc.

Peteris Erins
@Pet3ris
@carver it's for debugging transactions