Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connect to eth node #1580

Open
wants to merge 113 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
51c6091
Initial commit of connect-to-eth-node.
smoelius Jan 5, 2020
87e3b44
Add web3 to install_requires.
smoelius Jan 5, 2020
56a7bab
Ignore web3 types.
smoelius Jan 5, 2020
b395920
Handle symbolic offsets.
smoelius Jan 6, 2020
d16736a
Add typeguard to install_requires.
smoelius Jan 6, 2020
6df79e6
Blacken.
smoelius Jan 6, 2020
1b50ce0
Better mypy integration.
smoelius Jan 6, 2020
5afa862
More blackening.
smoelius Jan 6, 2020
254c6c8
Limit paths that typeguard checks.
smoelius Jan 6, 2020
d58368c
Fix broken get_storage_data types.
smoelius Jan 6, 2020
ffa39b7
Blacken.
smoelius Jan 6, 2020
7d654aa
Revert some changes related to the callstack.
smoelius Jan 7, 2020
46f7a30
Delete accounts unconditionally.
smoelius Jan 7, 2020
b1a82f7
Do not throw an exception if deleted account is not in dictionary.
smoelius Jan 7, 2020
d40d143
Add constraint argument to delete_account call.
smoelius Jan 8, 2020
043f9c0
Back out typeguard.
smoelius Jan 8, 2020
5a66521
Use "not in".
smoelius Jan 8, 2020
9eff254
Fix minor indentation issue in ci.yml.
smoelius Jan 8, 2020
081f4b4
"fromDict" -> "from_dict".
smoelius Jan 8, 2020
bc0cb70
Add (failing) test_gas_check.
smoelius Jan 9, 2020
32a19ea
Fix gas check.
smoelius Jan 9, 2020
4cbad00
Merge commit '32a19ea' into dev-connect-to-eth-node
smoelius Jan 9, 2020
8b0a5ef
Use Storage.set in set_storage_data.
smoelius Jan 9, 2020
e18fd7c
Consider BitVecConstant not symbolic in dump.
smoelius Jan 9, 2020
912366b
Add tests.
smoelius Jan 9, 2020
6222aca
Merge commit '9eff254' into dev-connect-to-eth-node
smoelius Jan 10, 2020
eec85f9
Do not thrown an exception when "evm.trace" is not present.
smoelius Jan 10, 2020
51d4494
Reduce Storage warnings.
smoelius Jan 10, 2020
566620e
Address Web3 forking bug.
smoelius Jan 10, 2020
a1d5cdd
Use count_ready_states in test_dump.
smoelius Jan 10, 2020
80c0f1f
Add command line arguments.
smoelius Jan 10, 2020
ca7d215
Run truffle tests with ganache-cli as the backend.
smoelius Jan 10, 2020
1855689
Merge remote-tracking branch 'origin/master' into dev-connect-to-eth-…
smoelius Jan 10, 2020
244554a
Don't try to convert None to an int.
smoelius Jan 10, 2020
9c871cb
Separate out truffle tests.
smoelius Jan 10, 2020
468036e
Add '-p' to mkdir, and clean-up properly otherwise.
smoelius Jan 10, 2020
6c15093
Don't try to unbox over an already unboxed truffle box.
smoelius Jan 10, 2020
920d28d
Remove unused import in evm_world_state.py.
smoelius Jan 10, 2020
3f15747
Remove unused imports from test_general.py.
smoelius Jan 10, 2020
4944d67
Simplify ci.yml
smoelius Jan 10, 2020
e1bfb4b
Merge commit '4944d67' into dev-connect-to-eth-node
smoelius Jan 11, 2020
d298c19
Remove unnecessary assignment in _web3.
smoelius Jan 13, 2020
72c95b6
Do not enable uninitialized storage detector when using RPC.
smoelius Jan 13, 2020
758e8c7
Typo.
smoelius Apr 15, 2020
053b393
Do not require argv[0] when --rpc and --txvictim are given.
smoelius Apr 15, 2020
1d0cebd
Add tests.
smoelius Apr 15, 2020
ca67c9c
Merge remote-tracking branch 'origin/master' into dev-connect-to-eth-…
smoelius Apr 15, 2020
abdca9e
Typo.
smoelius Apr 15, 2020
ef328af
Address typing issues.
smoelius Apr 16, 2020
b0a38fd
Report errors in ci.yml.
smoelius Apr 16, 2020
913f31f
Add EXPECTED_TX to ci.yml.
smoelius Apr 16, 2020
2ff301e
Better variable name in ci.yml.
smoelius Apr 16, 2020
bc5085b
Fix types.
smoelius Apr 23, 2020
e0c7272
Create DefaultWorldState only once.
smoelius Apr 23, 2020
d15cddf
"--txvictim" -> "--txtarget".
smoelius Apr 23, 2020
cd3b7e6
Create accounts when not using RPC.
smoelius Apr 23, 2020
0d3254a
Add bad IP/port tests.
smoelius Apr 24, 2020
06da949
Update option description.
smoelius Apr 24, 2020
7454fa4
Raise EthereumError on connection failure.
smoelius Apr 28, 2020
fd562db
Move OverlayWorldState comment into docstring.
smoelius Apr 28, 2020
09879e1
Store newly created Storage in world_state.
smoelius Apr 28, 2020
462982a
Add error message in OverlayWorldState.get_storage.
smoelius Apr 28, 2020
a1b06de
Add constraints parameter to WorldState.get_storage_data.
smoelius Apr 30, 2020
fbebf32
Change how Storage objects are allocated.
smoelius Apr 30, 2020
ea1b2bd
Add EVMWorld.get_storage.
smoelius Apr 30, 2020
92a1849
Add storage tests.
smoelius Apr 30, 2020
b3089b7
Blacken.
smoelius Apr 30, 2020
a7d090a
Re-add EVMWorld.get_storage docstring.
smoelius Apr 30, 2020
954e92f
Correct EVMWorld.get_storage docstring.
smoelius Apr 30, 2020
a3e70e2
Add missing newline.
smoelius May 1, 2020
18bf648
Better error handling/reporting.
smoelius May 1, 2020
ee206c4
Fix error in ci.yml.
smoelius May 1, 2020
abe52bc
Add EVMWorld.get_storage_items.
smoelius May 1, 2020
53117d2
Adjust z3 options.
smoelius May 1, 2020
6ccbd49
Experimenting with Storage simplifications.
smoelius May 4, 2020
88ddfbc
Add nonce checks to test_gas_check.
smoelius May 4, 2020
556a492
Remove reference to map.
smoelius May 8, 2020
56a38f0
Reduce log messages.
smoelius May 8, 2020
a5c2ddc
Eliminate ci.yml conflicts.
smoelius May 8, 2020
af3cc7d
Merge branch 'master' into dev-connect-to-eth-node
smoelius May 8, 2020
eecd9b5
Update ci.yml
smoelius May 8, 2020
44e6c0a
Do not store constraints in Storage.
smoelius May 15, 2020
c3ae87f
Eliminate use of dirty.
smoelius May 15, 2020
747ad69
Rename Storage.data to Storage._data.
smoelius May 15, 2020
b3558fe
Merge remote-tracking branch 'origin/master' into dev-connect-to-eth-…
smoelius May 17, 2020
235d0b5
Add docstring to Storage.new_storage.
smoelius May 24, 2020
6054033
Move get_items into ArrayProxy.
smoelius May 25, 2020
8f59f39
Merge remote-tracking branch 'origin/master' into dev-connect-to-eth-…
smoelius May 25, 2020
49707bd
Merge remote-tracking branch 'origin/master' into dev-connect-to-eth-…
smoelius Jun 11, 2020
45b87b8
Correct bitvec width in add_to/sub_from_balance.
smoelius Jun 11, 2020
60daa52
Blacken.
smoelius Jun 11, 2020
b8880cf
Interpret coinbase as hex.
smoelius Jun 11, 2020
c4a0471
Fiz __getstae__/__setstate__ names.
smoelius Jun 11, 2020
15d5366
Add comment re disabling uninitialized storage detector.
smoelius Jun 11, 2020
3a01360
Set blockheader information.
smoelius Jun 11, 2020
1de8eba
Use self.get_storage.
smoelius Jun 11, 2020
91d48ed
Use self._set_storage.
smoelius Jun 11, 2020
02a540e
Nominal changes.
smoelius Jun 11, 2020
a4c599d
Callstack type has changed.
smoelius Jun 11, 2020
2215ba8
Eliminate unused imports.
smoelius Jun 12, 2020
6b3dbf3
Simplify Storage.get.
smoelius Jun 12, 2020
c29a24a
Fix bugs introduced by merge.
smoelius Jun 12, 2020
f257ec8
More merge bug fixes.
smoelius Jun 12, 2020
399dd08
Handle case where EXP's exponent is a symbolic constant.
smoelius Jun 12, 2020
7a38281
Turn off detectors in truffle maze test.
smoelius Jun 12, 2020
3446e21
Implement Storage.__copy__.
smoelius Jun 12, 2020
cc97a38
Convert gas to constant in make_VMTests.py.
smoelius Jun 12, 2020
94055f9
Coverage fixes in ci.yml.
smoelius Jun 12, 2020
8af6869
More ci.yml fixes.
smoelius Jun 12, 2020
4a23d8a
Up SMT timeout for metacoin tests.
smoelius Jun 12, 2020
3fc4264
Fix bug concerning balance width.
smoelius Jun 12, 2020
ebd8cc0
Balance width fix was incomplete.
smoelius Jun 12, 2020
cca9dbf
Eliminate new_storage method.
smoelius Jun 12, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion manticore/core/smtlib/expression.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ def __init__(
self, index_bits: int, index_max: Optional[int], value_bits: int, *operands, **kwargs
):
assert index_bits in (32, 64, 256)
assert value_bits in (8, 16, 32, 64, 256)
assert value_bits in (1, 8, 16, 32, 64, 256)
smoelius marked this conversation as resolved.
Show resolved Hide resolved
assert index_max is None or index_max >= 0 and index_max < 2 ** index_bits
self._index_bits = index_bits
self._index_max = index_max
Expand Down
11 changes: 9 additions & 2 deletions manticore/ethereum/manticore.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
from typeguard.importhook import install_import_hook

install_import_hook('manticore')

import copy
import itertools
import binascii
Expand Down Expand Up @@ -37,6 +41,7 @@
from .state import State
from ..exceptions import EthereumError, DependencyError, NoAliveStates
from ..platforms import evm
from ..platforms.evm_world_state import WorldState
from ..utils import config, log
from ..utils.deprecated import deprecated
from ..utils.helpers import PickleSerializer
Expand Down Expand Up @@ -386,7 +391,9 @@ def contract_accounts(self):
def get_account(self, name):
return self._accounts[name]

def __init__(self, workspace_url: str = None, policy: str = "random"):
def __init__(
self, world_state: WorldState = None, workspace_url: str = None, policy: str = "random"
):
"""
A Manticore EVM manager
:param workspace_url: workspace folder name
Expand All @@ -395,7 +402,7 @@ def __init__(self, workspace_url: str = None, policy: str = "random"):
# Make the constraint store
constraints = ConstraintSet()
# make the ethereum world state
world = evm.EVMWorld(constraints)
world = evm.EVMWorld(constraints, world_state=world_state)
initial_state = State(constraints, world)
super().__init__(initial_state, workspace_url=workspace_url, policy=policy)
self.subscribe("will_terminate_state", self._terminate_state_callback)
Expand Down
Loading