Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Apr 09 20:23
    Pet3ris closed #2001
  • Apr 09 20:23
    Pet3ris commented #2001
  • Apr 09 20:18
    Pet3ris opened #2001
  • Apr 07 18:05

    carver on v0.4.0-alpha.4

    (compare)

  • Apr 07 18:05

    carver on master

    Compile release notes Bump version: 0.4.0-alpha.3 → 0… (compare)

  • Apr 05 23:00
    akshgpt7 commented #1995
  • Apr 02 20:16
    kclowes closed #2000
  • Apr 02 20:16
    kclowes commented #2000
  • Apr 02 16:09
    kclowes review_requested #2000
  • Apr 02 16:08
    kclowes opened #2000
  • Apr 02 15:56

    kclowes on master

    Update blake2b-py version requi… Add python 3.9 tests Merge pull request #1999 from k… (compare)

  • Apr 02 15:56
    kclowes closed #1999
  • Apr 02 15:29
    kclowes synchronize #1999
  • Apr 02 15:27
    kclowes commented #1999
  • Apr 01 21:47
    kclowes commented #1999
  • Apr 01 21:39
    kclowes synchronize #1999
  • Apr 01 21:24
    kclowes synchronize #1999
  • Apr 01 20:54
    carver commented #1999
  • Apr 01 19:19
    kclowes commented #1999
  • Apr 01 17:05
    carver commented #1999
Eth-Gitter-Bridge
@Eth-Gitter-Bridge
<Griffin Ichiba Hotchkiss> Wait... when you look at that line linked above, do you see a different value than
# keccak(b'')
BLANK_HASH = b"\xc5\xd2F\x01\x86\xf7#<\x92~}\xb2\xdc\xc7\x03\xc0\xe5\x00\xb6S\xca\x82';{\xfa\xd8\x04]\x85\xa4p"
Eth-Gitter-Bridge
@Eth-Gitter-Bridge
<Griffin Ichiba Hotchkiss> I suppose I'm just asking about how raw bytes are displayed and accepted in python, and why the constant above isn't just a uniform set of \x hex values, since it's a hash
Eth-Gitter-Bridge
@Eth-Gitter-Bridge
<Griffin Ichiba Hotchkiss> Ok, I think I was able to find a satisfactory answer, so disregard my messages above! I was confused that Python allows bytes to be expressed in ascii characters, so some byte sequences below 128 are written in ascii, while anything above (and quite a few below) that range are escaped and written in hex...
Voith Mascarenhas
@voith

I suppose I’m just asking about how raw bytes are displayed and accepted in python,

That is correct.

Eth-Gitter-Bridge
@Eth-Gitter-Bridge
<carver, Jason Carver> FWIW, python can understand all the hex from \x00 to \xff, it just defaults to showing the representation as ascii, if it doesn't need to be escaped. See:
In [15]: b'\x41'                                                
Out[15]: b'A'
Peteris Erins
@Pet3ris
Running into an interesting issue when trying to adapt py-evm for forking. ethereum/py-evm#1960. I'm trying to override balances, but they seem to "bounce back" in account db in a very mysterious way. Anyone aware why this would happen?
Giuseppe Cerami
@Peppece
Hello everyone! I noticed there’s very few activity going on in the repo. Is the project on pause or something? I am asking just of curiosity of course
*out of curiosity
Eth-Gitter-Bridge
@Eth-Gitter-Bridge
<carver, Jason Carver> No pause, it's just doing the job we need it to do. I suppose we should take it as a sign that we can release a stable version soon.
Voith Mascarenhas
@voith
:tada:
Giuseppe Cerami
@Peppece
oh ok, good news
Benjamin Z
@benjyz
is there a gitter to discuss/propose EIPS?
Hudson Jameson
@Souptacular
Bridge test - pyevm to discord
Samuel Montgomery-Blinn
@montsamu
(Removed question that was actually meant for trinity.)
mleinadm
@mleinadm
is it possible to build ethereum smart contracts in python instead of solidity?
arjuna sky kok
@arjunaskykok_gitlab

is it possible to build ethereum smart contracts in python instead of solidity?

Vyper? https://vyper.readthedocs.io/en/stable/

Btw, there is a dependency issue with py-evm: ethereum/py-evm#1968
Giuseppe Cerami
@Peppece
Hello, just read #1970
I have implemented #1926 with pr #1937 so I was wondering where I should go from here, since #1926 is one of the issues mentioned in #1970
Eth-Gitter-Bridge
@Eth-Gitter-Bridge
<carver, Jason Carver> There hasn't been a full review of the PR yet. One thing to note is that before it's merged, it will need to be tested against the ethereum/tests repo. Someone will pull in the latest and mark all the tests of new features as skippable for now, and then you can mark the related tests to not be skipped in the PR.
<carver, Jason Carver> Also, you can now drop all the commits from Alex and rebase on master instead
Giuseppe Cerami
@Peppece
great, will do
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!)
Just some guy
@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 :)