kayagoban / shadowlands Goto Github PK
View Code? Open in Web Editor NEWA Dapp platform and Ethereum terminal, entirely in Python.
License: MIT License
A Dapp platform and Ethereum terminal, entirely in Python.
License: MIT License
Hi I am trying shadowlands for the first time and I am getting the following exception:
$ shadowlands
Activating Shadowlands virtual environment
No Infura API Key found. Add environment variable INFURA_API_KEY to ensure continued API access. New keys are available at https://infura.io/signup
Connected to Geth/v1.8.15-omnibus-255989da/linux-amd64/go1.10.1
Bootstrapping sloader.shadowlands.eth at 0x6b600Bc4CEDF9E9845B85d9195e7470e88999B18
Collecting package info for app.shadowlands.eth
Contract reports latest checksum is 72f17fe74bbd34eb63ba1afbdc2ef41b242ca3fb50da81083b668bf440408ae8
Checksum matched cached copy of Shadowlands...
Loading Shadowlands...
Traceback (most recent call last):
File "/home/fccoelho/.shadowlands/shadowlands.py", line 112, in <module>
mod = importer.load_module('shadowlands')
File "/home/fccoelho/.shadowlands/cache/shadowlands-v0.12a.zip/shadowlands/__init__.py", line 34, in <module>
File "/home/fccoelho/.shadowlands/cache/shadowlands-v0.12a.zip/shadowlands/tui/tui.py", line 64, in load
File "/home/fccoelho/.shadowlands/lib/python3.6/site-packages/asciimatics/screen.py", line 1173, in wrapper
return func(screen)
File "/home/fccoelho/.shadowlands/cache/shadowlands-v0.12a.zip/shadowlands/tui/tui.py", line 55, in tui
File "/home/fccoelho/.shadowlands/lib/python3.6/site-packages/asciimatics/screen.py", line 1353, in play
self.draw_next_frame(repeat=repeat)
File "/home/fccoelho/.shadowlands/lib/python3.6/site-packages/asciimatics/screen.py", line 1451, in draw_next_frame
effect.update(self._frame)
File "/home/fccoelho/.shadowlands/lib/python3.6/site-packages/asciimatics/effects.py", line 71, in update
self._update(frame_no)
File "/home/fccoelho/.shadowlands/cache/shadowlands-v0.12a.zip/shadowlands/tui/effects/dynamic_cursor.py", line 35, in _update
File "/home/fccoelho/.shadowlands/cache/shadowlands-v0.12a.zip/shadowlands/tui/effects/cursor.py", line 132, in _update
File "/home/fccoelho/.shadowlands/cache/shadowlands-v0.12a.zip/shadowlands/tui/effects/cursor.py", line 110, in _update_thread
File "/home/fccoelho/.shadowlands/cache/shadowlands-v0.12a.zip/shadowlands/tui/effects/dynamic_cursor.py", line 18, in get_buffer
File "/home/fccoelho/.shadowlands/cache/shadowlands-v0.12a.zip/shadowlands/tui/effects/dynamic_cursor.py", line 11, in need_new_buffer
File "/home/fccoelho/.shadowlands/lib/python3.6/site-packages/asciimatics/renderers.py", line 269, in rendered_text
return self._render_now()
File "/home/fccoelho/.shadowlands/cache/shadowlands-v0.12a.zip/shadowlands/tui/renderers.py", line 18, in _render_now
File "/home/fccoelho/.shadowlands/cache/shadowlands-v0.12a.zip/shadowlands/eth_node.py", line 80, in network_name
KeyError: '1539104825824'
When connected to Infura, creating a transaction does not result in the TX queue entry being
displayed on the bottom of the screen.
To Reproduce
Please add support to use Shadowlands in Windows.
output:
┌─[mota:~/Downloads]
│ 2019-06-21T22:01:43Z
└─❯❯❯ brew install shadowlands
Updating Homebrew...
==> Auto-updated Homebrew!
Updated Homebrew from 0b8ad710e to 3cef10889.
Updated 3 taps (homebrew/core, homebrew/cask and osgeo/osgeo4mac).
==> New Formulae
antibody cxxopts k6 yapf
contentful-cli k3d [email protected]
==> Updated Formulae
harfbuzz ✔ juju
kubernetes-cli ✔ kibana
libssh2 ✔ kops
neovim ✔ kotlin
youtube-dl ✔ libmpdclient
agda libxlsxwriter
aliyun-cli mariadb
alot maxwell
amqp-cpp metricbeat
angle-grinder mikutter
ansible minio
asciidoctor minio-mc
ask-cli nethack
auditbeat notmuch
bind openapi-generator
byobu osgeo/osgeo4mac/osgeo-postgis
cfn-lint osgeo/osgeo4mac/[email protected]
clozure-cl osgeo/osgeo4mac/osgeo-postgresql
convox osgeo/osgeo4mac/osgeo-postgresql@10
diff-pdf pdfpc
elasticsearch pdftoipe
erlang poppler
expat postgresql@10
exploitdb [email protected]
f3 [email protected]
firebase-cli [email protected]
flow pulumi
gawk sceptre
git-recent skaffold
gmic sn0int
gromacs terrahub
h3 triton
hadolint webpack
helmfile xmake
jhipster xonsh
Error: Failed to import: /usr/local/Homebrew/Library/Taps/wysenynja/homebrew-bitcoin/Formula/bitcoinxt.rb
bitcoinxt: unknown version :lion
Error: Failed to import: /usr/local/Homebrew/Library/Taps/wysenynja/homebrew-bitcoin/Formula/bitcoinclassic.rb
bitcoinclassic: unknown version :lion
Error: Failed to import: /usr/local/Homebrew/Library/Taps/wysenynja/homebrew-bitcoin/Formula/armory.rb
armory: Unsupported special dependency :python
Error: Failed to import: /usr/local/Homebrew/Library/Taps/wysenynja/homebrew-bitcoin/Formula/bitcoind.rb
bitcoind: unknown version :lion
Warning: Aleth (formerly cpp-ethereum) has been removed from Homebrew. Please install binary releases from https://github.com/ethereum/aleth/releases.
==> Installing shadowlands from kayagoban/shadowlands
==> Installing dependencies for kayagoban/shadowlands/shadowlands: openssl
==> Installing kayagoban/shadowlands/shadowlands dependency: openssl
==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2s.mojave.bottl
==> Downloading from https://akamai.bintray.com/c4/c4a762d719c2be74ac686f1aafabb
######################################################################## 100.0%
==> Pouring openssl-1.0.2s.mojave.bottle.tar.gz
==> Caveats
A CA file has been bootstrapped using certificates from the SystemRoots
keychain. To add additional certificates (e.g. the certificates added in
the System keychain), place .pem files in
/usr/local/etc/openssl/certs
and run
/usr/local/opt/openssl/bin/c_rehash
openssl is keg-only, which means it was not symlinked into /usr/local,
because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries.
If you need to have openssl first in your PATH run:
echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile
For compilers to find openssl you may need to set:
export LDFLAGS="-L/usr/local/opt/openssl/lib"
export CPPFLAGS="-I/usr/local/opt/openssl/include"
For pkg-config to find openssl you may need to set:
export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig"
==> Summary
🍺 /usr/local/Cellar/openssl/1.0.2s: 1,795 files, 12.0MB
==> Installing kayagoban/shadowlands/shadowlands
==> Downloading https://github.com/kayagoban/shadowlands/archive/1.1.0.tar.gz
==> Downloading from https://codeload.github.com/kayagoban/shadowlands/tar.gz/1.
######################################################################## 100.0%
🍺 /usr/local/Cellar/shadowlands/1.1.0: 124 files, 14MB, built in 8 seconds
==> `brew cleanup` has not been run in 30 days, running now...
Removing: /usr/local/Cellar/openssl/1.0.2r... (1,795 files, 12.1MB)
Pruned 0 symbolic links and 4 directories from /usr/local
==> Caveats
==> openssl
A CA file has been bootstrapped using certificates from the SystemRoots
keychain. To add additional certificates (e.g. the certificates added in
the System keychain), place .pem files in
/usr/local/etc/openssl/certs
and run
/usr/local/opt/openssl/bin/c_rehash
openssl is keg-only, which means it was not symlinked into /usr/local,
because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries.
If you need to have openssl first in your PATH run:
echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile
For compilers to find openssl you may need to set:
export LDFLAGS="-L/usr/local/opt/openssl/lib"
export CPPFLAGS="-I/usr/local/opt/openssl/include"
For pkg-config to find openssl you may need to set:
export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig"
┌─[mota:~/Downloads]
│ 2019-06-21T22:02:59Z
└─❯❯❯ shadowlands
Detected darwin18
Found a usable python binary at Python 3.6.0a1
Making a virtual python env for Shadowlands in ~/.shadowlands
Collecting git+https://github.com/kayagoban/asciimatics (from -r /usr/local/opt/shadowlands/lib/shadowlands/requirements.txt (line 1))
Cloning https://github.com/kayagoban/asciimatics to /var/folders/k1/m2rmftgd48q97pj0xf9csdb00000gn/T/pip-h3lbn3x7-build
Complete output from command python setup.py egg_info:
Download error on https://pypi.python.org/simple/setuptools_scm/: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:645) -- Some packages may not be found!
Download error on https://pypi.python.org/simple/setuptools-scm/: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:645) -- Some packages may not be found!
Couldn't find index page for 'setuptools_scm' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:645) -- Some packages may not be found!
No local packages or download links found for setuptools_scm
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/var/folders/k1/m2rmftgd48q97pj0xf9csdb00000gn/T/pip-h3lbn3x7-build/setup.py", line 78, in <module>
test_suite='nose.collector',
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/Users/mota/.shadowlands/lib/python3.6/site-packages/setuptools/dist.py", line 269, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/Users/mota/.shadowlands/lib/python3.6/site-packages/setuptools/dist.py", line 313, in fetch_build_eggs
replace_conflicting=True,
File "/Users/mota/.shadowlands/lib/python3.6/site-packages/pkg_resources/__init__.py", line 826, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/Users/mota/.shadowlands/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1092, in best_match
return self.obtain(req, installer)
File "/Users/mota/.shadowlands/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1104, in obtain
return installer(requirement)
File "/Users/mota/.shadowlands/lib/python3.6/site-packages/setuptools/dist.py", line 380, in fetch_build_egg
return cmd.easy_install(req)
File "/Users/mota/.shadowlands/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 634, in easy_install
raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('setuptools_scm')
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /var/folders/k1/m2rmftgd48q97pj0xf9csdb00000gn/T/pip-h3lbn3x7-build/
Activating Shadowlands virtual environment
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 184, in _run_module_as_main
"__main__", mod_spec)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/local/opt/shadowlands/lib/shadowlands/__main__.py", line 5, in <module>
from shadowlands.credstick import Credstick
File "/usr/local/opt/shadowlands/lib/shadowlands/credstick/__init__.py", line 1, in <module>
import hid, threading, time
ImportError: No module named 'hid'
┌─[mota:~/Downloads]
│ 2019-06-21T22:03:12Z
└─❯❯❯ uname -a
Darwin computer.local 18.5.0 Darwin Kernel Version 18.5.0: Mon Mar 11 20:40:32 PDT 2019; root:xnu-4903.251.3~3/RELEASE_X86_64 x86_64
┌─[mota:~/Downloads]
│ 2019-06-21T22:03:54Z
└─❯❯❯ brew -v
Homebrew 2.1.6-22-g3cef108
Homebrew/homebrew-core (git revision c0915; last commit 2019-06-21)
Homebrew/homebrew-cask (git revision 8bf047; last commit 2019-06-21)
┌─[mota:~/Downloads]
│ 2019-06-21T22:06:18Z
└─❯❯❯ python --version
Python 3.6.0a1
It would be really cool if I could download the shadowlands package directly in pip. The idea of validating the package using an on-chain registry is awesome, though. The registry could host the exact pip version, instead of having the zip url. (keeping a checksum, of course)
A big reason I want this is to personally verify what shadowlands is doing on install. It takes longer to read through the debian packaging and bootstrap script than it would a more traditional pip installation. (at least for me)
It says
This recording has been archived
All unclaimed recordings (the ones not linked to any user account) are automatically archived 7 days after upload.
It doesn't look like the connection and network ID are being enforced in line 78:
shadowlands/debian/shadowlands_1_all__dbp__/usr/local/bin/shadowlands
Lines 76 to 80 in dbe831e
Am I missing something?
Hi I tried connecting my Trezor 1.0 but I encoutered an error because I have a passphrase configured on my Trezor besides the numeric code. It seems that Shadowlands don't expect this and crashes with an AttributeError.
This would make a killer plugin for Trinity.
cc @cburgdorf
We've got an alpha API right now for running 3rd party code (which we call plugins) in trinity. This would make a pretty amazing plugin and I think it would fit in reasonably easily into the architecture.
Assuming all of the shadowlands app stuff can be made installable via pip
the UX for getting started with this could be as simple as:
$ pip install trinity trinity-shadowlands
# run trinity in one process:
$ trinity
# run the shadowlands UI
$ trinity shadowlands
Very cool stuff.
There are some backwards-incompatible changes in Trezor T firmware: without host-side support, it will not be possible to enter passphrase on the device screen.
Normally I'd recommend you upgrade to trezorlib 0.12 to resolve the problems easily, but your Trezor implementation seems to be a hodge-podge of internals and some manual handling, so the upgrade might be more involved.
I would recommend getting a TrezorClient
instance and implementing the user interaction methods as callbacks on the UI object. I can provide more detailed guidance, but won't have time to prepare a fully functional PR.
$ python -m shadowlands
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.6/runpy.py", line 142, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/lib/python3.6/runpy.py", line 109, in _get_module_details
__import__(pkg_name)
File "/home/jcarver/code/shadowlands-core/shadowlands/__init__.py", line 34, in <module>
interface.load()
File "/home/jcarver/code/shadowlands-core/shadowlands/tui/tui.py", line 64, in load
screen = Screen.wrapper(self.tui)
File "/home/jcarver/code/shadowlands-core/venv/lib/python3.6/site-packages/asciimatics/screen.py", line 1173, in wrapper
return func(screen)
File "/home/jcarver/code/shadowlands-core/shadowlands/tui/tui.py", line 55, in tui
screen.play(scenes, stop_on_resize=True)
File "/home/jcarver/code/shadowlands-core/venv/lib/python3.6/site-packages/asciimatics/screen.py", line 1353, in play
self.draw_next_frame(repeat=repeat)
File "/home/jcarver/code/shadowlands-core/venv/lib/python3.6/site-packages/asciimatics/screen.py", line 1436, in draw_next_frame
event = scene.process_event(event)
File "/home/jcarver/code/shadowlands-core/venv/lib/python3.6/site-packages/asciimatics/scene.py", line 101, in process_event
event = effect.process_event(event)
File "/home/jcarver/code/shadowlands-core/venv/lib/python3.6/site-packages/asciimatics/widgets.py", line 878, in process_event
event = self._layouts[self._focus].process_event(event, self._hover_focus)
File "/home/jcarver/code/shadowlands-core/venv/lib/python3.6/site-packages/asciimatics/widgets.py", line 1198, in process_event
self._live_col][self._live_widget].process_event(event)
File "/home/jcarver/code/shadowlands-core/venv/lib/python3.6/site-packages/asciimatics/widgets.py", line 3186, in process_event
self._on_click()
File "/home/jcarver/code/shadowlands-core/shadowlands/tui/effects/widgets.py", line 95, in <lambda>
layout2.add_widget(Button("Sign Tx", lambda: ok_func(self._gas_price_wei)), 0)
File "/home/jcarver/code/shadowlands-core/shadowlands/tui/effects/widgets.py", line 226, in _ok
rx = self._interface.node.send_ether(address_text._value, Decimal(amount_text._value), gas_price_wei)
File "/home/jcarver/code/shadowlands-core/shadowlands/eth_node.py", line 309, in send_ether
signed_tx = self._credstick.signTx(tx_dict)
File "/home/jcarver/code/shadowlands-core/shadowlands/credstick/trezor_ethdriver.py", line 223, in signTx
int(_s.hex(), 16)
File "/home/jcarver/code/shadowlands-core/shadowlands/credstick/__init__.py", line 140, in signed_tx
enctx = encode_transaction(transaction_dict, (v, r, s))
File "/home/jcarver/code/shadowlands-core/venv/lib/python3.6/site-packages/eth_account/internal/transactions.py", line 52, in encode_transaction
chain_naive_transaction = dissoc(unsigned_transaction.as_dict(), 'v', 'r', 's')
AttributeError: 'dict' object has no attribute 'as_dict'
$ git log -1
commit e04b2bd90d3a5a02679f20b6d5c56c84ed4c0b7e (HEAD -> master, tag: 0.16a, upstream/master, upstream/HEAD)
Author: C. Thomas <[email protected]>
Date: Sat Nov 17 07:47:52 2018 -0600
Version bump to sync with release tag
$ pip freeze
asciimatics==1.9.1.dev105+g760274f
attrdict==2.0.0
bitcoin==1.1.42
certifi==2018.8.24
chardet==3.0.4
Click==7.0
cryptocompy==0.1.1.dev1
cytoolz==0.9.0.1
ecdsa==0.13
ECPy==0.9.1
eth-abi==1.2.0
eth-account==0.3.0
eth-hash==0.2.0
eth-keyfile==0.5.1
eth-keys==0.2.0b3
eth-rlp==0.1.2
eth-typing==1.3.0
eth-utils==1.2.2
ethereum==1.0.8
ethjsonrpc==0.3.0
future==0.16.0
hexbytes==0.1.0
hidapi==0.7.99.post21
idna==2.7
ledgerblue==0.1.20
libusb1==1.6.6
lru-dict==1.1.6
mnemonic==0.18
numpy==1.15.2
parsimonious==0.8.0
pathlib==1.0.1
pbkdf2==1.3
Pillow==5.2.0
pkg-resources==0.0.0
protobuf==3.6.1
py-solc==3.1.0
pyblake2==1.1.2
pycryptodome==3.6.6
pycryptodomex==3.6.6
pyethash==0.1.27
pyfiglet==0.7.5
pyperclip==1.7.0
pysha3==1.0.2
python-u2flib-host==3.0.3
PyYAML==3.13
qrcode==6.1.dev0
repoze.lru==0.7
requests==2.20.1
rlp==1.0.2
scrypt==0.8.6
semantic-version==2.6.0
six==1.11.0
toolz==0.9.0
trezor==0.10.2
urllib3==1.23
wcwidth==0.1.7
web3==4.7.2
websockets==6.0
wget==3.2
My fingers keep expecting [Enter] to work to submit a dialog. That would be nice IMO.
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.