Closed hernandp closed 6 years ago
Can you try running with py3.6? Seems like there are a lot of compatibility issues with 3.7
Tried 3.6.0, 3.6.5, 3.6.6RC1 using pyenv and I'm getting the same errors.
I was getting the same error and running virtualenv
and 3.6.6 ended up working for me.
What I'm detecting is that the following function makes a bunch of tests to fail due to self.blocks
array being empty (so this returns None,None and in the caller the null type cannot be used with the multiplication operation and everything falls down).
def get_tx_pos(self, transaction):
decoded_tx = rlp.decode(utils.decode_hex(transaction), Transaction)
for blknum in self.blocks:
block = self.blocks[blknum]
for txindex in range(0, len(block.transaction_set)):
tx = block.transaction_set[txindex]
if (decoded_tx.hash == tx.hash):
return blknum, txindex
return None, None
This is I think a manifestation of a general problem.
This array self.blocks
is updated on the childChain.apply_deposit
method , which is a handler for the 'Deposit' event.
This method is never called on my system, as if no events were emitted.
I put breakpoints on the filter_loop
method which scans for the related events, but none of the suscribed ones ever arrive.
Additional info on the behavior described above. Ganache-Cli with verbose output shows eth_newFilter and eth_getFilterLogs called from code, but without results. (Note that I made 0 to latest as block range just to try):
eth_newFilter
> {
> "jsonrpc": "2.0",
> "method": "eth_newFilter",
> "params": [
> {
> "topics": [
> "0xf0537507c0bb9b823a1e4f5522ed9f25512618d4d169c9eb70a5ee2e9fb8bd57"
> ],
> "address": "0x30D399A57Ccaf412C6756d5b379A89f244Be6850",
> "fromBlock": "0x0",
> "toBlock": "latest"
> }
> ],
> "id": 264
> }
< {
< "id": 264,
< "jsonrpc": "2.0",
< "result": "0x1a7"
< }
eth_getFilterLogs
> {
> "jsonrpc": "2.0",
> "method": "eth_getFilterLogs",
> "params": [
> "0x1a7"
> ],
> "id": 265
> }
< {
< "id": 265,
< "jsonrpc": "2.0",
< "result": []
< }
UPDATE
Works on Ganache 1.2.1. 😄
Closing, let's make sure to add a note to use Ganache 1.2.1+
I am not aware how to control which Ganache I am using... It would be very nice if the README had some more accurate installation instructions...
ganache-cli --version
> unknown
Issue Type
Current Behavior
11 Tests are failing. Header is:
Failure list follows:
Expected Behavior
I expect all tests to pass.
Steps to Reproduce
activate
make
command (successfully)Suggested Fix
Motivation for Change
I expect all tests to succeed.
System Specs
pip freeze
):