Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 08:23
    nicedinner opened #2041
  • Oct 25 21:23
    kclowes edited #2040
  • Oct 25 21:22
    kclowes opened #2040
  • Oct 25 21:20
    kclowes opened #2039
  • Oct 18 09:27
    flying-sheep commented #1920
  • Oct 18 09:11
    flying-sheep commented #1920
  • Oct 18 09:10
    flying-sheep commented #1920
  • Oct 18 09:08
    flying-sheep commented #1920
  • Oct 13 19:16

    fselmo on v0.5.0-alpha.1

    (compare)

  • Oct 13 19:15

    fselmo on master

    Compile release notes Add MuirGlacier, Berlin, London… Bump version: 0.5.0-alpha.0 → 0… (compare)

  • Oct 12 22:57

    fselmo on master

    [#2037] `validate` and `intrins… Suggestions from PR #2038: - R… (compare)

  • Oct 12 22:57
    fselmo closed #2038
  • Oct 12 22:57
    fselmo closed #2037
  • Oct 12 22:49
    fselmo synchronize #2038
  • Oct 12 22:46
    fselmo synchronize #2038
  • Oct 12 22:42
    fselmo synchronize #2038
  • Oct 12 22:35
    fselmo synchronize #2038
  • Oct 12 22:03
    fselmo synchronize #2038
  • Oct 12 21:59
    fselmo edited #2038
  • Oct 12 21:59
    fselmo edited #2038
Peteris Erins
@Pet3ris
Are OutOfGas exceptions raised in internal calls using apply_message? (https://github.com/ethereum/py-evm/blob/master/eth/vm/forks/frontier/computation.py#L52). I'm only seeing an OutOfGas handler for apply_create_message.
Peteris Erins
@Pet3ris
Found it - it seems like OutOfGas exceptions are still caught under apply_message as VMError
junning-tong
@junning-tong
Hi I just started contributing to this repo.
pytest tests throw exceptions below. Any ideas?
=================================================================================================== test session starts ===================================================================================================
platform darwin -- Python 3.6.13, pytest-5.4.3, py-1.10.0, pluggy-0.13.1
plugins: Faker-6.5.0, asyncio-0.10.0, forked-1.2.0, cov-2.5.1, xdist-1.31.0, timeout-1.4.2, hypothesis-5.49.0
timeout: 300.0s
timeout method: signal
timeout func_only: False
collected 36221 items / 1 skipped / 36220 selected                                                                                                                                                                        

....

.Killed: 9
Eth-Gitter-Bridge
@Eth-Gitter-Bridge
<carver, Jason Carver> Ah, yeah, thanks for closing that thread in here @Pet3ris - I can see how that would be confusing reading through it, because OOG is caught explicitly in only one of them
<carver, Jason Carver> @junning-tong the test suite is very big, you probably don't want to run it all at once. Try starting off with something like pytest tests/core. If you want more, then tox will set other specific test subsets up. You can see those options listed in tox -l or look at the circleCI config to see which ones we run on every pull request.
junning-tong
@junning-tong

Hi I did a simple implementation of Code_Merlization ethereum/py-evm#1958
https://gist.github.com/junning-tong/6a28319d5e742037758470a053b575ca

Is anyone else working on this?
If not, I'd like to refine my current implementation and start adding test cases.

Voith Mascarenhas
@voith
Hey @junning-tong I replied to thread on the issue.
Eth-Gitter-Bridge
@Eth-Gitter-Bridge
<carver, Jason Carver> py-evm with support for Berlin is released in v0.4.0-alpha.1: https://py-evm.readthedocs.io/en/latest/release_notes.html#py-evm-0-4-0-alpha-1-2021-03-22
Voith Mascarenhas
@voith
:tada:
Eth-Gitter-Bridge
@Eth-Gitter-Bridge
<carver, Jason Carver> It was missing the block numbers for goerli and ropsten, and some little type glitches, so I did a fast follow release: of v0.4.0-alpha.2
Eth-Gitter-Bridge
@Eth-Gitter-Bridge
<carver, Jason Carver> There is a bug in alpha.2 that crashes when trying to get receipts from the chain. A fix is pushed into master, but I'm going to try to get trinity stable before the next py-evm release. (Unless someone is stuck on that bug right now. Please speak up if you are!)
El De-dog-lo
@fubuloubu
when is py-evm going into beta?
it's been 84 years....
Voith Mascarenhas
@voith
:laughing:
Eth-Gitter-Bridge
@Eth-Gitter-Bridge
<carver, Jason Carver> 😆
Eth-Gitter-Bridge
@Eth-Gitter-Bridge
<carver, Jason Carver> https://py-evm.readthedocs.io/en/latest/release_notes.html#py-evm-0-4-0-alpha-3-2021-03-24 includes the last changes necessary to get trinity released with Berlin support, which should happen tomorrow
Woocash7
@Woocash7
Hey, I'm going through https://py-evm.readthedocs.io/en/latest/guides/understanding_the_mining_process.html but stucked on "chain.mine_block()" because it does not throw error, but returns "AttributeError: 'Test Chain' object has no attribute 'mine_block'". Can you help me to solver this?
Eth-Gitter-Bridge
@Eth-Gitter-Bridge
<carver, Jason Carver> Which code are you running? The final code block?
Woocash7
@Woocash7
I'm running py-evm 0.4.0-alpha.3 exactly this code with python3.8:
from eth import constants, Chain
from eth.vm.forks.frontier import FrontierVM
from eth.vm.forks.homestead import HomesteadVM
from eth.chains.mainnet import HOMESTEAD_MAINNET_BLOCK

from eth.db.atomic import AtomicDB
from eth.chains.mainnet import MAINNET_GENESIS_HEADER

chain_class = Chain.configure(
    __name__='Test Chain',
    vm_configuration=(
        (constants.GENESIS_BLOCK_NUMBER, FrontierVM),
        (HOMESTEAD_MAINNET_BLOCK, HomesteadVM),
    ),
)

chain = chain_class.from_genesis_header(AtomicDB(), MAINNET_GENESIS_HEADER)

chain.mine_block()
Eth-Gitter-Bridge
@Eth-Gitter-Bridge
<carver, Jason Carver> Yup, you need a MiningChain instead of a Chain
<carver, Jason Carver> The example in the doc you linked uses a mining chain, so I'm not sure how to improve the docs. But if you see a way, let us know!
Woocash7
@Woocash7
You are right, I missed it because had tunnel vision and looking for bug in other place. Thanks a lot!
Eth-Gitter-Bridge
@Eth-Gitter-Bridge
<carver, Jason Carver> 👍
Thomas Johnson
@ThomasJ02_twitter
Is there an example anywhere of how to fork mainnet at a specific block and interact with the fork using py-evm (i.e., like ganache's fork feature)?
Peteris Erins
@Pet3ris

This may be a silly question but is there a reason that new accounts cannot create contracts in py-evm? In particular, it seems that contract creation always uses the sender nonce - 1 which results in a encoding error if the sender nonce is 0.

The code where this happens is here: https://github.com/ethereum/py-evm/blob/44e0ee4cb1756522ffe294a379d4735a25701003/eth/vm/forks/frontier/state.py#L68.

@ThomasJ02_twitter - there is no in-memory fork officially for py-evm/eth-tester yet
but what you can do is use HTTPProvider to connect to a forked ganache node without any special config. Brownie bakes this in nicely.
Ah, I see - there is an increment_nonce operation on a preceding line - nevermind :)
Guido Vranken
@guidovranken
Hi, how can I modify the example at https://py-evm.readthedocs.io/en/latest/cookbook/index.html to run some bytecode in the Berlin VM?
Michael Burr
@stnbu

I am working my way through the docs and here, https://py-evm.readthedocs.io/en/latest/guides/understanding_the_mining_process.html ... I do not get a eth.exceptions.ValidationError but instead get:

  File "/path/py-evm/eth/db/account.py", line 325, in _get_encoded_account
    raise MissingAccountTrieNode(*exc.args) from exc
eth.vm.interrupt.MissingAccountTrieNode: State trie database is missing node for hash 0x..., which is needed to look up account with address hash 0x... at root hash 0x... -- (b'...', b'...', b'...')

I am using the following code with version v0.3.0-alpha.9

from eth import constants
from eth.chains.base import MiningChain
from eth.vm.forks.byzantium import ByzantiumVM
from eth.db.atomic import AtomicDB
from eth.chains.mainnet import MAINNET_GENESIS_HEADER

chain_class = MiningChain.configure(
    __name__='TestChain',
    vm_configuration=((constants.GENESIS_BLOCK_NUMBER, ByzantiumVM),)
)
genesis_header = MAINNET_GENESIS_HEADER.copy(gas_limit=3141592)
chain = chain_class.from_genesis_header(AtomicDB(), genesis_header)
chain.mine_block()
any hints?
Eth-Gitter-Bridge
@Eth-Gitter-Bridge
<carver, Jason Carver> Hm looks like you're trying to verify the main net genesis header against byzantium rules. It would have to be frontier, or you'd have to modify the header. Examples for those should be in the linked chain cookbook
Michael Burr
@stnbu
that makes sense. the example in the docs is missing the chain_class = MiningChain bit. I'll see if I can make the appropriate changes.
Eth-Gitter-Bridge
@Eth-Gitter-Bridge
<carver, Jason Carver> Near the top of the page is a link to a separate chain cookbook
<carver, Jason Carver> That defines the chain class iirc
<carver, Jason Carver> (I agree that could be clearer, though)
Michael Burr
@stnbu
this https://py-evm.readthedocs.io/en/latest/cookbook/index.html#using-the-chain-object shows an example of instantiating Chain, but not MiningChain. If I get enough clarity, I'll see if I can submit an PR.
Michael Burr
@stnbu
same results using FrontierVM https://pastebin.com/EzzDzAEW ... I should stew on it for a while. I appricate the help.
Eth-Gitter-Bridge
@Eth-Gitter-Bridge
<carver, Jason Carver> Maybe start with the script at the very end of the guide: "What follows is the complete script that ..."
<carver, Jason Carver> That one should be working, has the MiningChain, etc. Then we can work backwards from there to find the first intermediate step that seems broken.
Eth-Gitter-Bridge
@Eth-Gitter-Bridge
<carver, Jason Carver> Looks like the plan is to move this channel over to this at some point soon:
https://discord.gg/b7H4GVuAGP
<carver, Jason Carver> We'll keep monitoring this channel for a while, and there will be more reminders before this channel goes dark. But for anyone who prefers, they can head over to Discord now.
Matthias Lohr
@MatthiasLohr
Hi, short question here, since I couldn't find anything to that topic online: Is it possible, to access Py-EVM remotely? For example, I want to have to processes, one providing the blockchain using Py-EVM, and another process (the client), which accesses the Py-EVM blockchain via Web3 "remotely" (same host, but another process)?
Eth-Gitter-Bridge
@Eth-Gitter-Bridge
<carver, Jason Carver> Nope, there is nothing like that in py-evm, it's designed to be used directly through programmatic APIs
Matthias Lohr
@MatthiasLohr
Ok, thanks for your reply. I added some "bridge" for that, which was quite easy and works like a charm for now.
Eth-Gitter-Bridge
@Eth-Gitter-Bridge
<carver> Great, if you're interested in getting that upstream, @MatthiasLohr - we'd be happy to take a look
<carver> @keri @Felipe Selmo (fselmo) Ok, the London tests don't pass. Still something pretty fundamental since there are 5391 failures. It looks like most failures are about gas usage, so I think it's something other than EIP-1559, but I haven't dug in yet. Seems like a good exercise for everyone to take a look. ethereum/py-evm#2021
You can fetch this branch for local runs. It allows you to run pytest tests/json-fixtures/blockchain/test_blockchain.py --fork London --maxfail 3. The branch should skip the slow tests, and let you see a couple failures before exiting (rather than wait for the full suite, which can be quite long, even when skipping slow tests)
Eth-Gitter-Bridge
@Eth-Gitter-Bridge
<Keri Clowes (kclowes)> I have a suspicion it might be 3529. I’ll take a look on Monday!
ramaguruprakash
@ramaguruprakash
Hi, I am new to this project. What is the best way to get started to contribute?
Eth-Gitter-Bridge
@Eth-Gitter-Bridge
<carver, Jason Carver> New ethereum/tests v10.1 out