Repository: ethereum/web3.py

Issue:
Deploying a contract is broken with `PyEVMBackend()`
* Version: 5.0.0b3
* Python: 3.6
* OS: osx
* `pip freeze` output

```
appnope==0.1.0
asn1crypto==0.24.0
attrdict==2.0.0
backcall==0.1.0
certifi==2018.11.29
cffi==1.11.5
chardet==3.0.4
cryptography==2.4.2
cytoolz==0.9.0.1
decorator==4.3.0
eth-abi==2.0.0b4
eth-account==0.3.0
eth-bloom==1.0.3
eth-hash==0.2.0
eth-keyfile==0.5.1
eth-keys==0.2.1
eth-rlp==0.1.2
eth-tester==0.1.0b36
eth-typing==2.0.0
eth-utils==1.4.1
hexbytes==0.1.0
idna==2.8
ipython==7.2.0
ipython-genutils==0.2.0
jedi==0.13.2
lru-dict==1.1.6
mypy-extensions==0.4.1
parsimonious==0.8.1
parso==0.3.1
pexpect==4.6.0
pickleshare==0.7.5
prompt-toolkit==2.0.7
ptyprocess==0.6.0
py-ecc==1.4.7
py-evm==0.2.0a39
py-geth==2.0.1
pycparser==2.19
pycryptodome==3.7.2
pyethash==0.1.27
Pygments==2.3.1
requests==2.21.0
rlp==1.1.0
semantic-version==2.6.0
six==1.12.0
toolz==0.9.0
traitlets==4.3.2
trie==1.3.8
urllib3==1.24.1
wcwidth==0.1.7
web3==5.0.0a3
websockets==7.0
```


### What was wrong?

Trying to deploy a contract is broken when using `PyEVMBackend()` for `Web3.EthereumTesterProvider`.

```python
w3 = Web3(Web3.EthereumTesterProvider(PyEVMBackend()))
contract_factory = w3.eth.contract(abi=abi, bytecode=bytecode)
tx_hash = contract_factory.constructor().transact()
```
The final line breaks and raises this error...
```python
~/ethereum/py-ethpm/trash-venv/lib/python3.6/site-packages/eth/validation.py in validate_canonical_address(value, title)
    139     if not isinstance(value, bytes) or not len(value) == 20:
    140         raise ValidationError(
--> 141             "{title} {0} is not a valid canonical address".format(value, title=title)
    142         )
    143

ValidationError: Storage Address 0x7E5F4552091A69125d5DfCb7b8C2659029395Bdf is not a valid canonical address
```

### How can it be fixed?
No clue, I spent a fair amount of time digging around `eth-tester` to try and resolve, but no luck. My best guess is that it's a result of the recent `eth-tester` and `py-evm` upgrades. The same code works fine if `Web3.EthereumTesterProvider()` is instantiated as empty (aka with implicit `MockBackend`)




Discussion:
Very likely that some normalization was accidentally removed.  Full-ish stacktrace might make it a bit clearer where/why but somewhere a `hex` address is making it's way into the backend that should have been converted to a `bytes` address (canonical format).

Find the spot in your stacktrace where we exit the `eth-tester` code and transition into the `py-evm` code and trace your way up from there to figure out how the `hex` formatted address is making it's way through.

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -7,7 +7,7 @@
 
 extras_require = {
     'tester': [
-        "eth-tester[py-evm]==0.1.0-beta.36",
+        "eth-tester[py-evm]==0.1.0-beta.37",
         "py-geth>=2.0.1,<3.0.0",
     ],
     'testrpc': ["eth-testrpc>=1.3.3,<2.0.0"],
diff --git a/web3/main.py b/web3/main.py
--- a/web3/main.py
+++ b/web3/main.py
@@ -19,7 +19,6 @@
 )
 from web3._utils.decorators import (
     combomethod,
-    deprecated_for,
 )
 from web3._utils.empty import (
     empty,
@@ -162,11 +161,6 @@ def keccak(primitive=None, text=None, hexstr=None):
             )
         )
 
-    @combomethod
-    @deprecated_for("solidityKeccak")
-    def soliditySha3(cls, abi_types, values):
-        return cls.solidityKeccak(abi_types, values)
-
     @combomethod
     def solidityKeccak(cls, abi_types, values):
         """
diff --git a/web3/providers/eth_tester/main.py b/web3/providers/eth_tester/main.py
--- a/web3/providers/eth_tester/main.py
+++ b/web3/providers/eth_tester/main.py
@@ -30,12 +30,23 @@ class EthereumTesterProvider(BaseProvider):
     api_endpoints = None
 
     def __init__(self, ethereum_tester=None, api_endpoints=None):
+        # do not import eth_tester until runtime, it is not a default dependency
+        from eth_tester import EthereumTester
+        from eth_tester.backends.base import BaseChainBackend
         if ethereum_tester is None:
-            # do not import eth_tester until runtime, it is not a default dependency
-            from eth_tester import EthereumTester
             self.ethereum_tester = EthereumTester()
-        else:
+        elif isinstance(ethereum_tester, EthereumTester):
             self.ethereum_tester = ethereum_tester
+        elif isinstance(ethereum_tester, BaseChainBackend):
+            self.ethereum_tester = EthereumTester(ethereum_tester)
+        else:
+            raise TypeError(
+                "Expected ethereum_tester to be of type `eth_tester.EthereumTester` or "
+                "a subclass of `eth_tester.backends.base.BaseChainBackend`, "
+                f"instead received {type(ethereum_tester)}. "
+                "If you would like a custom eth-tester instance to test with, see the "
+                "eth-tester documentation. https://github.com/ethereum/eth-tester."
+            )
 
         if api_endpoints is None:
             # do not import eth_tester derivatives until runtime, it is not a default dependency


Test patch: