This project is no longer supported. You might try Py-EVM
ethereum / pyethereum Goto Github PK
View Code? Open in Web Editor NEWNext generation cryptocurrency network
Next generation cryptocurrency network
This project is no longer supported. You might try Py-EVM
trie.py uses recursion. Depending on the depth of the tree the update
method might fail with a "RuntimeError: maximum recursion depth exceeded", e.g.:
The following program
import sys
from pyethereum import trie
def build_deep_trie():
t = trie.Trie("db")
for i in range(1, 300):
t.update("a" * i, "x")
if __name__ == "__main__":
build_deep_trie()
bails out with
...
File "/home/ralf/r/pyethereum/pyethereum/trie.py", line 289, in _update_kv_node
self._update(curr_val, key[len(curr_key):], value)])
File "/home/ralf/r/pyethereum/pyethereum/trie.py", line 244, in _update
return self._update_diverge_node(node, key, value)
File "/home/ralf/r/pyethereum/pyethereum/trie.py", line 264, in _update_diverge_node
node[key[0]] = self._update(node[key[0]], key[1:], value)
File "/home/ralf/r/pyethereum/pyethereum/trie.py", line 246, in _update
return self._update_kv_node(node, key, value)
File "/home/ralf/r/pyethereum/pyethereum/trie.py", line 289, in _update_kv_node
self._update(curr_val, key[len(curr_key):], value)])
File "/home/ralf/r/pyethereum/pyethereum/trie.py", line 244, in _update
return self._update_diverge_node(node, key, value)
File "/home/ralf/r/pyethereum/pyethereum/trie.py", line 264, in _update_diverge_node
node[key[0]] = self._update(node[key[0]], key[1:], value)
File "/home/ralf/r/pyethereum/pyethereum/trie.py", line 246, in _update
return self._update_kv_node(node, key, value)
File "/home/ralf/r/pyethereum/pyethereum/trie.py", line 289, in _update_kv_node
self._update(curr_val, key[len(curr_key):], value)])
File "/home/ralf/r/pyethereum/pyethereum/trie.py", line 244, in _update
return self._update_diverge_node(node, key, value)
File "/home/ralf/r/pyethereum/pyethereum/trie.py", line 264, in _update_diverge_node
node[key[0]] = self._update(node[key[0]], key[1:], value)
File "/home/ralf/r/pyethereum/pyethereum/trie.py", line 246, in _update
return self._update_kv_node(node, key, value)
File "/home/ralf/r/pyethereum/pyethereum/trie.py", line 289, in _update_kv_node
self._update(curr_val, key[len(curr_key):], value)])
File "/home/ralf/r/pyethereum/pyethereum/trie.py", line 244, in _update
return self._update_diverge_node(node, key, value)
File "/home/ralf/r/pyethereum/pyethereum/trie.py", line 264, in _update_diverge_node
node[key[0]] = self._update(node[key[0]], key[1:], value)
File "/home/ralf/r/pyethereum/pyethereum/trie.py", line 223, in _update
(node_type, node) = self._inspect_node(node)
File "/home/ralf/r/pyethereum/pyethereum/trie.py", line 142, in _inspect_node
content = self._rlp_decode(node)
File "/home/ralf/r/pyethereum/pyethereum/trie.py", line 210, in _rlp_decode
return rlp.decode(node)
File "/home/ralf/r/pyethereum/pyethereum/rlp.py", line 59, in decode
return __decode(s)[0]
File "/home/ralf/r/pyethereum/pyethereum/rlp.py", line 40, in __decode
obj, pos = __decode(s, pos)
RuntimeError: maximum recursion depth exceeded
required to get cpp client compatibility
Hey fellows,
I am trying to debug the code
on windows , and have some
problems including leveldb
package, Tried to Google it , no good
alternatives for windows.
Can you suggest me
some king of solution here ?
Thanks in advance.
After fixing the top 2 tie tests, I see the following additional test failure:
$ python ./runtest.py
Traceback (most recent call last):
File "./runtest.py", line 60, in <module>
update(reals[i][0],reals[i][1])
File "./runtest.py", line 49, in update
ops.append([k,v,t.root.encode('hex')])
AttributeError: 'list' object has no attribute 'encode'
Setting a break point at the failing line (http://paste.ubuntu.com/6879844/), I
can see the following:
$ python ./runtest.py
> /s/muharem/src/e/pyethereum/runtest.py(52)update()
-> print("encode bombed out!")
(Pdb) type(t.root)
<type 'list'>
(Pdb) t.root
[' dogglesworth', 'cat']
See also: #7
to_dict returns rlp encoded values. would have written a test, but then there's #25
>>> from pyethereum import trie
>>> t=trie.Trie("db")
>>> t.update("foo", "bar")
'\xca\x84 foo\x84\x83bar'
>>> t.to_dict()
{'foo': '\x83bar'}
I'm trying to figure out what I can do with this code. In vain.
Some examples (e.g. in README.md) would be nice.
(Also some comments in the code. I'll happily add some of that once I have a better understanding of what's going on.)
Hey I am playing around with
the protocol , can you give
me please any python peer
which is stable and usually
is online ?
Thanks.
Here's what I see:
$ python ./runtest.py
Traceback (most recent call last):
File "./runtest.py", line 34, in <module>
t0.update(k,x[k])
TypeError: string indices must be integers
This is on ubuntu 12.10
Linux dwtf 3.11.0-15-generic #25-Ubuntu SMP Thu Jan 30 17:22:01 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
$ python --version
Python 2.7.5+
blocks.py
------------
def serialize(self):
encode_int(self.number)
I don't see it in any other client (cpp, go) nor in the paper,
is it a mistake or you planing to change something ?
The
if value is None:
self.root = self.delete(self.root, key)
check is superfluous, since the function makes sure that value is a str/unicode object.
After running the install procedure as described in the README.rst
pip install -r requirements.txt
I got the following error:
Command /usr/bin/python -c "import setuptools, tokenize;file='/tmp/pip_build_nick/leveldb/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-wAWmaa-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_nick/leveldb
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in
load_entry_point('pip==1.5.4', 'console_scripts', 'pip')()
File "/usr/lib/python2.7/dist-packages/pip/init.py", line 185, in main
return command.main(cmd_args)
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 161, in main
text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 42: ordinal not in range(128)
currently we don't get compatibility with the cpp client. the state.roots after adding the premine accounts differ. I tried to isolate the problem: https://github.com/ethereum/pyethereum/blob/master/tests/test_chain.py#L88
from the YP it looks like empty trie roots would be represented as '\x00'*32
in the cpp client. if so it would not match the empty string that we use.
YP: https://raw.githubusercontent.com/ethereum/latexpaper/master/Paper.tex
0256 , SHA3RLP(), 0160 , stateRoot, 0256 , 2**22 , 0, 0, 1000000, 0, 0, (), SHA3(42), (), ()
Where 0256 refers to the parent and state and transaction root hashes, a 256-bit hash which is all zeroes; and the implementation looks like it would implement it just like this: https://github.com/ethereum/cpp-ethereum/libethereum/BlockInfo.cpp#L64
h256() << sha3EmptyList << h160() << stateRoot << h256() << c_genesisDifficulty << 0 << 0 << 1000000 << 0 << (uint)0 << string() << sha3(bytes(1, 42));
also the default for an account looks different in cpp
['', '', h256(), sha3('')]
rather than ['', '', '', '']
currently in pyethereum.
The current abstraction model comes at the cost of 430 lines of code.
wc -l signals.py dispatch/*.py
29 signals.py
10 dispatch/init.py
323 dispatch/dispatcher.py
69 dispatch/weakref_backports.py
431 total
I would have written a test for this one, but then there's #25.
trie "forgets" values:
>>> from pyethereum import trie
>>> t=trie.Trie("db")
>>> t.update("aaa", "aaa")
'\xca\x84 aaa\x84\x83aaa'
>>> t.update("aa", "aa")
"R\x06\xf1f\r\x7fk\xcbT\xa8=\xda\xe9{\xce\x95nV~'F\xdaz\x8a\xf3\xb4\xb3D\xf9u:&"
>>> t.get("aaa")
>>>
DB.get is used inside _rlp_decode. it catches KeyErrors and returns the BLANK_NODE instead. This masks possible problems since this error should not happen, but it's now being ignored silently.
it would be nice to have automatic tests with travis ci. I can provide patches for that, but I do think we need at least a setup.py and a common top level namespace.
why not merge #24?
Let's use them for:
See more here:
https://mail.python.org/pipermail/python-list/2013-November/660401.html
The web-gui apparently is a node.js
package. It should be documented how to built and run it. Furthermore it would be possible to create a buildout.cfg
to build it via buildout (e.g. locally install node.js, create run-script etc...).
@vbuterin @chenhouwu @heikoheiko what's your take on this?
I have to add, I am totally convinced about hosting it in the py
ethereum repo (this is to some extent also true for the serpent
-library part: If people want to use the library, they will need to checkout the whole client...)
jravelmbpx8:pyethereum jravel$ sudo python setup.py install
Password:
running install
running bdist_egg
running egg_info
writing requirements to pyethereum.egg-info/requires.txt
writing pyethereum.egg-info/PKG-INFO
writing top-level names to pyethereum.egg-info/top_level.txt
writing dependency_links to pyethereum.egg-info/dependency_links.txt
writing entry points to pyethereum.egg-info/entry_points.txt
reading manifest file 'pyethereum.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'tests/*.txt'
writing manifest file 'pyethereum.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.9-intel/egg
running install_lib
running build_py
creating build/bdist.macosx-10.9-intel/egg
creating build/bdist.macosx-10.9-intel/egg/pyethereum
copying build/lib/pyethereum/init.py -> build/bdist.macosx-10.9-intel/egg/pyethereum
copying build/lib/pyethereum/apiclient.py -> build/bdist.macosx-10.9-intel/egg/pyethereum
copying build/lib/pyethereum/apiserver.py -> build/bdist.macosx-10.9-intel/egg/pyethereum
copying build/lib/pyethereum/blocks.py -> build/bdist.macosx-10.9-intel/egg/pyethereum
copying build/lib/pyethereum/chainmanager.py -> build/bdist.macosx-10.9-intel/egg/pyethereum
copying build/lib/pyethereum/common.py -> build/bdist.macosx-10.9-intel/egg/pyethereum
copying build/lib/pyethereum/db.py -> build/bdist.macosx-10.9-intel/egg/pyethereum
creating build/bdist.macosx-10.9-intel/egg/pyethereum/dispatch
copying build/lib/pyethereum/dispatch/init.py -> build/bdist.macosx-10.9-intel/egg/pyethereum/dispatch
copying build/lib/pyethereum/dispatch/dispatcher.py -> build/bdist.macosx-10.9-intel/egg/pyethereum/dispatch
copying build/lib/pyethereum/dispatch/weakref_backports.py -> build/bdist.macosx-10.9-intel/egg/pyethereum/dispatch
copying build/lib/pyethereum/eth.py -> build/bdist.macosx-10.9-intel/egg/pyethereum
copying build/lib/pyethereum/indexdb.py -> build/bdist.macosx-10.9-intel/egg/pyethereum
copying build/lib/pyethereum/opcodes.py -> build/bdist.macosx-10.9-intel/egg/pyethereum
copying build/lib/pyethereum/packeter.py -> build/bdist.macosx-10.9-intel/egg/pyethereum
copying build/lib/pyethereum/peer.py -> build/bdist.macosx-10.9-intel/egg/pyethereum
copying build/lib/pyethereum/peermanager.py -> build/bdist.macosx-10.9-intel/egg/pyethereum
copying build/lib/pyethereum/processblock.py -> build/bdist.macosx-10.9-intel/egg/pyethereum
copying build/lib/pyethereum/pyethtool.py -> build/bdist.macosx-10.9-intel/egg/pyethereum
copying build/lib/pyethereum/rlp.py -> build/bdist.macosx-10.9-intel/egg/pyethereum
copying build/lib/pyethereum/signals.py -> build/bdist.macosx-10.9-intel/egg/pyethereum
copying build/lib/pyethereum/stoppable.py -> build/bdist.macosx-10.9-intel/egg/pyethereum
copying build/lib/pyethereum/tcpserver.py -> build/bdist.macosx-10.9-intel/egg/pyethereum
copying build/lib/pyethereum/test.py -> build/bdist.macosx-10.9-intel/egg/pyethereum
copying build/lib/pyethereum/transactions.py -> build/bdist.macosx-10.9-intel/egg/pyethereum
copying build/lib/pyethereum/trie.py -> build/bdist.macosx-10.9-intel/egg/pyethereum
copying build/lib/pyethereum/utils.py -> build/bdist.macosx-10.9-intel/egg/pyethereum
creating build/bdist.macosx-10.9-intel/egg/tests
copying build/lib/tests/init.py -> build/bdist.macosx-10.9-intel/egg/tests
copying build/lib/tests/test_chain.py -> build/bdist.macosx-10.9-intel/egg/tests
copying build/lib/tests/test_contracts.py -> build/bdist.macosx-10.9-intel/egg/tests
copying build/lib/tests/utils.py -> build/bdist.macosx-10.9-intel/egg/tests
creating build/bdist.macosx-10.9-intel/egg/tools
copying build/lib/tools/init.py -> build/bdist.macosx-10.9-intel/egg/tools
copying build/lib/tools/fixture_to_example.py -> build/bdist.macosx-10.9-intel/egg/tools
copying build/lib/tools/pyethtool_cli.py -> build/bdist.macosx-10.9-intel/egg/tools
byte-compiling build/bdist.macosx-10.9-intel/egg/pyethereum/init.py to init.pyc
byte-compiling build/bdist.macosx-10.9-intel/egg/pyethereum/apiclient.py to apiclient.pyc
byte-compiling build/bdist.macosx-10.9-intel/egg/pyethereum/apiserver.py to apiserver.pyc
byte-compiling build/bdist.macosx-10.9-intel/egg/pyethereum/blocks.py to blocks.pyc
byte-compiling build/bdist.macosx-10.9-intel/egg/pyethereum/chainmanager.py to chainmanager.pyc
byte-compiling build/bdist.macosx-10.9-intel/egg/pyethereum/common.py to common.pyc
byte-compiling build/bdist.macosx-10.9-intel/egg/pyethereum/db.py to db.pyc
byte-compiling build/bdist.macosx-10.9-intel/egg/pyethereum/dispatch/init.py to init.pyc
byte-compiling build/bdist.macosx-10.9-intel/egg/pyethereum/dispatch/dispatcher.py to dispatcher.pyc
byte-compiling build/bdist.macosx-10.9-intel/egg/pyethereum/dispatch/weakref_backports.py to weakref_backports.pyc
byte-compiling build/bdist.macosx-10.9-intel/egg/pyethereum/eth.py to eth.pyc
byte-compiling build/bdist.macosx-10.9-intel/egg/pyethereum/indexdb.py to indexdb.pyc
byte-compiling build/bdist.macosx-10.9-intel/egg/pyethereum/opcodes.py to opcodes.pyc
byte-compiling build/bdist.macosx-10.9-intel/egg/pyethereum/packeter.py to packeter.pyc
byte-compiling build/bdist.macosx-10.9-intel/egg/pyethereum/peer.py to peer.pyc
byte-compiling build/bdist.macosx-10.9-intel/egg/pyethereum/peermanager.py to peermanager.pyc
byte-compiling build/bdist.macosx-10.9-intel/egg/pyethereum/processblock.py to processblock.pyc
byte-compiling build/bdist.macosx-10.9-intel/egg/pyethereum/pyethtool.py to pyethtool.pyc
byte-compiling build/bdist.macosx-10.9-intel/egg/pyethereum/rlp.py to rlp.pyc
byte-compiling build/bdist.macosx-10.9-intel/egg/pyethereum/signals.py to signals.pyc
byte-compiling build/bdist.macosx-10.9-intel/egg/pyethereum/stoppable.py to stoppable.pyc
byte-compiling build/bdist.macosx-10.9-intel/egg/pyethereum/tcpserver.py to tcpserver.pyc
byte-compiling build/bdist.macosx-10.9-intel/egg/pyethereum/test.py to test.pyc
byte-compiling build/bdist.macosx-10.9-intel/egg/pyethereum/transactions.py to transactions.pyc
byte-compiling build/bdist.macosx-10.9-intel/egg/pyethereum/trie.py to trie.pyc
byte-compiling build/bdist.macosx-10.9-intel/egg/pyethereum/utils.py to utils.pyc
byte-compiling build/bdist.macosx-10.9-intel/egg/tests/init.py to init.pyc
byte-compiling build/bdist.macosx-10.9-intel/egg/tests/test_chain.py to test_chain.pyc
byte-compiling build/bdist.macosx-10.9-intel/egg/tests/test_contracts.py to test_contracts.pyc
byte-compiling build/bdist.macosx-10.9-intel/egg/tests/utils.py to utils.pyc
byte-compiling build/bdist.macosx-10.9-intel/egg/tools/init.py to init.pyc
byte-compiling build/bdist.macosx-10.9-intel/egg/tools/fixture_to_example.py to fixture_to_example.pyc
byte-compiling build/bdist.macosx-10.9-intel/egg/tools/pyethtool_cli.py to pyethtool_cli.pyc
creating build/bdist.macosx-10.9-intel/egg/EGG-INFO
copying pyethereum.egg-info/PKG-INFO -> build/bdist.macosx-10.9-intel/egg/EGG-INFO
copying pyethereum.egg-info/SOURCES.txt -> build/bdist.macosx-10.9-intel/egg/EGG-INFO
copying pyethereum.egg-info/dependency_links.txt -> build/bdist.macosx-10.9-intel/egg/EGG-INFO
copying pyethereum.egg-info/entry_points.txt -> build/bdist.macosx-10.9-intel/egg/EGG-INFO
copying pyethereum.egg-info/requires.txt -> build/bdist.macosx-10.9-intel/egg/EGG-INFO
copying pyethereum.egg-info/top_level.txt -> build/bdist.macosx-10.9-intel/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
pyethereum.common: module references file
creating 'dist/pyethereum-0.0.1-py2.7.egg' and adding 'build/bdist.macosx-10.9-intel/egg' to it
removing 'build/bdist.macosx-10.9-intel/egg' (and everything under it)
Processing pyethereum-0.0.1-py2.7.egg
removing '/Library/Python/2.7/site-packages/pyethereum-0.0.1-py2.7.egg' (and everything under it)
creating /Library/Python/2.7/site-packages/pyethereum-0.0.1-py2.7.egg
Extracting pyethereum-0.0.1-py2.7.egg to /Library/Python/2.7/site-packages
pyethereum 0.0.1 is already the active version in easy-install.pth
Installing pyethtool script to /usr/local/bin
Installing eth script to /usr/local/bin
Installed /Library/Python/2.7/site-packages/pyethereum-0.0.1-py2.7.egg
Processing dependencies for pyethereum==0.0.1
Searching for pysha3
Reading http://pypi.python.org/simple/pysha3/
Best match: pysha3 0.3
Downloading https://pypi.python.org/packages/source/p/pysha3/pysha3-0.3.zip#md5=092da55212eb411845a18bf1d6b80295
Processing pysha3-0.3.zip
Running pysha3-0.3/setup.py -q bdist_egg --dist-dir /tmp/easy_install-TAAbhI/pysha3-0.3/egg-dist-tmp-pVUBAe
clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
error: Setup script exited with error: command 'cc' failed with exit status 1
To reproduce:
pip install -r requirements.txt
python pyethereum/eth.py
Outcome:
python pyethereum/eth.py
Traceback (most recent call last):
File "pyethereum/eth.py", line 18, in <module>
from pyethereum.signals import config_ready
File "/tmp/pe2/pyethereum/pyethereum/signals.py", line 1, in <module>
from dispatch import Signal
File "/tmp/pe2/pyethereum/pyethereum/dispatch/__init__.py", line 10, in <module>
from dispatcher import Signal, receiver # NOQA
File "/tmp/pe2/pyethereum/pyethereum/dispatch/dispatcher.py", line 6, in <module>
from six.moves import xrange
ImportError: No module named six.moves
Using the subcurrency.se example from http://blog.ethereum.org/2014/04/10/pyethereum-and-serpent-programming-guide-2/, the init clause persists the data in the invalid state '' instead of that of the contract itself ('da7ce79725418f4f6e13bf5f520c89cec5f6a974'):
{'coinbase': '0000000000000000000000000000000000000000',
'difficulty': 4194304,
'extra_data': '',
'gas_limit': 1000000,
'gas_used': 1973L,
'min_gas_price': 1000000000000000,
'nonce': '\x04\x99Og\xdcU\xb0\x9e\x81J\xb7\xff\xc8\xdf6\x86\xb4\xaf\xb2\xbbS\xe6\x0e\xae\x97\xef\x04?\xe0?\xb8)',
'number': 0,
'prevhash': '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00',
'state': {'': {'balance': 0L,
'code': '',
'nonce': 0L,
'storage': {1171285107467697789631807507971492729443352172582L: 1000000L}},
'0000000000000000000000000000000000000000': {'balance': 1973000000000000L,
'code': '',
'nonce': 0L,
'storage': {}},
'cd2a3d9f938e13cd947ec05abc7fe734df8dd826': {'balance': 998027000000000000L,
'code': '',
'nonce': 1L,
'storage': {}},
'da7ce79725418f4f6e13bf5f520c89cec5f6a974': {'balance': 0L,
'code': '6000609f556001602036040c0d61002759600035600054600053565b525b54602052f26100785833602054602053566040546000356060546020356080546080536040530a61006e59608053604053036020535760805360605356016060535760015b525b54602052f26100785860005b525b54602052f2',
'nonce': 0L,
'storage': {}}},
'state_root': '\x14\xae\\\xbb\xf2\xff]%\n,\xf4y\xc4\xf3\x10\x96?\xe0|\x1a\xc9)%\xe1\xbc\xf6E\x88\x8a\xacx\xce',
'timestamp': 0,
'tx_list_root': '\x94\x1e\xaa\xb7\x10\xfa\xe1b\xe1$,~Ek\x94\xec\xd4\xac?;\t>]\x159)\x06:\xfdy\xd1\x9b',
'uncles_hash': '\x1d\xccM\xe8\xde\xc7]z\xab\x85\xb5g\xb6\xcc\xd4\x1a\xd3\x12E\x1b\x94\x8at\x13\xf0\xa1B\xfd@\xd4\x93G'}
Test to reproduce:
https://github.com/EtherCasts/evm-sim/tree/master/tests/test_subcurrency.py
I did it this way for initial convenience since there were lots of bugs to get through; it should be reformatted into a more conventional test.
I was running serpent compile namecoin.se
while going through the Pyethereum and Serpent programming language guide. This error shows:
Traceback (most recent call last):
File "/usr/local/bin/serpent", line 42, in <module>
main()
File "/usr/local/bin/serpent", line 34, in main
o = getattr(serpent, cmd)(*args)
File "/usr/local/lib/python2.7/dist-packages/serpent/compiler.py", line 535, in compile
return assemble(compile_to_assembly(parse(source)))
File "/usr/local/lib/python2.7/dist-packages/serpent/parser.py", line 11, in parse
return parse_lines(document.split('\n'))
File "/usr/local/lib/python2.7/dist-packages/serpent/parser.py", line 53, in parse_lines
sub-clause! (%d)" % i)
Exception: If/else/while statement must have sub-clause! (1)
serpent.py
should live in /tools/
, while the library part can stay in the pyethereum
-package.serpent_gui
shall become a top-level package of its own.pyethtool.py
should also become a CLI tool in /tools/
This should also help solving #58
-n,--upnp <on/off> Use upnp for NAT (default: on).
step to reproduce the bug:
Then get("ABCD") won't return the correct value
account -> list of transactions
transaction -> block
Need to build some infrastructure to enable test network behavior.
option to enable server
option to set server port
cpp client uses:
-j,--json-rpc Enable JSON-RPC server (default: off).
--json-rpc-port Specify JSON-RPC server port (implies '-j', default: 8080).
When invoking
pyethtool applytx $genesis $tx
I've tried to discuss this in #23 (comment) and #23 (comment), but my comments there haven't been answered.
I do think py.test is a better choice than behave as a testing framework. I don't see the need to describe tests in "natural language" as I don't think non-technical people will write tests for pyethereum.
py.test is much more popular and provides a much more powerful proven framework for writing tests.
please reconsider your switch to behave.
Regardless of the actual naming the blockchain related code should be usable in other projects without requiring to link the whole project with its network wrapper.
Proposed split:
can't open file '/root/compiler/cllcompiler.py': [Errno 2] No such file or directory
The relevant code is at the bottom of server.js:
fs.writeFile(filename,req.param('data').replace(/\\n/g,'\n').replace('\\plus','+'),mkrespcb(res,400,function() {
cp.exec('python /root/compiler/cllcompiler.py '+filename,mkrespcb(res,400,function(r) {
li = r.lastIndexOf('\n')
li2 = r.substring(0,li).lastIndexOf('\n')
res.json(r.substring(li2+1,li));
}))
The original code for trie is hard to read, for example function with hundreds lines of code, and ten levels of indentation, so it's an obstacle for new developer to understand and fix bugs.
Now update/get methods are rewritten, but still need more test and bug fix.
Other codes(convert_to_dict etc) are not touched yet
Sorry, but neither me nor my coworkers do understand what "And the remain bits will be same of the original hex sequence" should mean.
Deprecated since version 2.7: The optparse module is deprecated and will not be developed further; development will continue with the argparse module.
The blocks module seems to implement an old version of the protocol. Also the genesis block generation looks wrong from here.
I'll be working on it now.
app which uses the json api and allows users to:
the wallet app connects to the eth.py process via http GET and PUT to the json api. it's running as a process separate to eth.py.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.