Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Jason Carver
    @carver
    @KPrasch the new eth-tester is released: https://github.com/ethereum/eth-tester/blob/master/CHANGELOG
    Bryant Eisenbach
    @fubuloubu
    ✨✨✨
    Jason Carver
    @carver
    and a bonus release, devnum 36, with an upgraded rlp and eth-keys: https://github.com/ethereum/eth-tester/blob/master/CHANGELOG
    Nick Gheorghita
    @njgheorghita
    new eth-tester release, devnum 37, with updated PyEVMBackendthat subclasses from BaseChainBackend: https://github.com/ethereum/eth-tester/blob/master/CHANGELOG
    Alex
    @nuevoalex
    Any ETA on updating eth-tester to the newest py-evm?
    Jason Carver
    @carver
    Ah, thanks for pinging. Opened ethereum/eth-tester#157 -- this seems pretty bountiable, we'll see if we can get someone on that.
    Alex
    @nuevoalex
    No problem! Thanks!
    Voith Mascarenhas
    @voith
    I have implemeted eth_sign using eth-tester in my testrpc tool.
    https://github.com/voith/eth-tester-rpc/pull/40/
    @carver I can add this code to eth-tester if you think its worth it.
    Also my tool run integrations tests for web3. The eth_sign test in web3 passed successfully.
    Bryant Eisenbach
    @fubuloubu
    I feel like accounts can sign locally with web3?
    awesome job tho!
    Voith Mascarenhas
    @voith
    @fubuloubu the purpose of the tool that I’m building is to support ethereum’s JsonRPC calls.
    I’m currently using it to test some code in the UI that uses metamask to interact with the blockchain. One such test needed eth_sign, which is why I implemented it.
    Bryant Eisenbach
    @fubuloubu
    is that how MetaMask does it? it sends the call to the ether node, and then back to the wallet plugin?
    I thought eth_sign just went through the web3 library and didn't touch the node, but I was wrong about that.
    Jason Carver
    @carver
    @voith Yeah, adding eth_sign seems fine. I mostly consider it deprecated because it's not a well-defined standard so it's got pretty sloppy adherence (geth, web3.js, and trezor all have slightly different implementations of message signing, last I checked, which affect some but not all inputs)
    Although it's concerning that the eth_sign tests in web3.py passed, because IIRC it should be possible to send a message that's not hashed before adding that preamble. I commented on that PR you linked.
    Voith Mascarenhas
    @voith
    @carver Thanks for the feedback. I will take a look at the implementation in eth-account.
    @fubuloubu You are right. Metamask doesn’t make a call to the node when it calls eth_sign. I just verified
    A collegaue at work asked me to implement eth_sign. I guess he uses the tool for testing both frontend and backend.
    Thanks for the feedback guys
    Bryant Eisenbach
    @fubuloubu
    Yeah, I think personal_sign actually makes a call out to the node, but eth_sign stays local. Okay, I'm not crazy!
    @carver @pipermerriam I added #160 and #161
    Upgrading py-evm versions was easy turns out
    mallyx3
    @mallyx3

    hello. I am working with eth-tester and would like to use the py-evm backend. I wanted to write some eth-tester source code that would allow me to remove a transaction from the transaction list in a previous block and then recalculate the entire state from that block to the canonical head as if that transaction never existed. However i do not want it to mine the blocks again with new headers. It will just revert the state to the state at the start of that block, and apply transactions until the latest block and then just continue with that state.

    to my understanding, eth-tester API is essentially a passthrough to functions in the py-evm backend. To my knowledge, there is no API in py-evm that allows me to remove a transaction from the transaction list.

    I was wondering if I could store a db in eth-tester of all transactions in a block, and remove it from there, and then use EthereumTester.call(transaction, block_number='latest') on all transactions to achieve this result?

    Bryant Eisenbach
    @fubuloubu
    There's snapshots?
    Voith Mascarenhas
    @voith
    mallyx3
    @mallyx3
    thanks guys. I think i have ran into another problem using eth_tester
    im trying to create an app with 3 nodes that keep sending transactions using the EthereumTester object
    i however am not automining and control when i mine blocks
    but for some reason, some transactions that are successfully sent are not included in the mined block
    mallyx3
    @mallyx3
    it seems to be that when there are more than 6 transactions included in a block
    they are not included in the transaction list
    Jason Carver
    @carver
    Just did another release with support for py-evm v0.3.0-alpha.1
    Bryant Eisenbach
    @fubuloubu
    Woo!
    WORAPOB BOONPRAPAI
    @SAYONG
    Hello everyone, I'm using eth-tester and py-evm backend.
    My use case is I want to have a large pre-existing state before testcases got execute.
    My question is can eth-tester export chain state to file and can import it later?
    Jacques Wagener
    @jacqueswww
    @SAYONG if you are using pytest you can use a fixture with the correct scoping
    ie. it will generate once for the whole test run
    WORAPOB BOONPRAPAI
    @SAYONG
    @jacqueswww Thanks for your reply.
    The fixture will generate transactions data every time it run the new test right?
    but the pre-existing chian data is quite large (~10k - 100k transactions), it would take a lot time to generate.
    What I want to do is generate all blocks once and can reuse it every time run test again.
    Jacques Wagener
    @jacqueswww
    yes, so would be a fixture for the whole test
    I am not aware of a dump to disk for eth-tester
    WORAPOB BOONPRAPAI
    @SAYONG
    No problem, I'll continue dig int to it :)
    Voith Mascarenhas
    @voith
    @SAYONG eth-tester by default uses the MemoryDb(eth.db.backends.memory.MemoryDB) backend for storage. You can change this by setting environment variable CHAIN_DB_BACKEND_CLASS to LevelDb(eth.db.backends.level.LevelDB) backend. You’ll have to play around it a bit to get it to work with a pre-filled state.
    You can start by looking at this code: https://github.com/ethereum/eth-tester/blob/c1a2aee7cb66a85f005369fe6e4a4b6f84c4abf6/eth_tester/backends/pyevm/main.py#L174
    Jacques Wagener
    @jacqueswww
    cool!
    WORAPOB BOONPRAPAI
    @SAYONG
    @voith Thanks, I'll try it out
    Bryant Eisenbach
    @fubuloubu
    Is levelDB faster?
    (like a lot faster?)
    Voith Mascarenhas
    @voith
    @fubuloubu I don’t know about the performance of levelDb.
    But in order to solve the problem of pre-filled state, we need a persistent db. The default MemoryDB doesn’t persist data.
    Also IMO, levelDbcannot be faster than MemoryDb as levelDb writes to disk.
    Bryant Eisenbach
    @fubuloubu
    Fair