Giter VIP home page Giter VIP logo

python-obelisk's Introduction

Obelisk zmq native client

Python native client for the obelisk blockchain server.

Dependencies:

  • python-twisted
  • python-ecdsa
  • python-zmqproto

Notes:

Don't forget to check out these other python projects:

  • electrum
  • pybitcointools

--

unsystem dev

python-obelisk's People

Contributors

bobalot avatar caedesvvv avatar dionyziz avatar genjix avatar lastcanal avatar veox avatar zodman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

python-obelisk's Issues

Threat model of python-obelisk

As python-obelisk is a core part of OpenBazaar, I wanted to inquire about the threat model behind the obelisk protocol and how much of it is inherited in the python-obelisk client. In particular, how much trust does the python-obelisk client give to the obeliskd, and what is the server capable of doing under these assumptions?

Clearly, a malicious obeliskd could deny service. However, is it possible that they fake transactions, transaction amounts, and generally respond with inaccurate data in a way that the client isn't able to detect?

Thanks for your input.

module is build against old version of pyzmq.

I'm trying to build our http gateway, what version of pyzmq do you have? There's some changes in the module layout, meaning i get error messages like.

  File "obelisk/zmq_fallback.py", line 27, in poll
    except zmq.core.error.ZMQError:
exceptions.AttributeError: 'module' object has no attribute 'core'

Ubuntu raring is v2.2.0 http://packages.ubuntu.com/raring/python-zmq,
saucy (13.10) is now 13.1.0 and newest in pip/trusty is 14.0.1

The error module is now in the root of the module, so it's just;
zmq.error.ZMQError

Since we'll probably be shipping with support for 13.10 onwards, this is the version we should target, I'll update the references tomorrow, just a heads up.

In [6]: zmq.__version__
Out[6]: '14.0.1'

problem installing python

hello team, i am using kali linux 64 and i am explaining below problems with installation
telling you everything step by step what i did and what i get
# apt-get install python-pip python-twisted
python-pip is already the newest version.
python-twisted is already the newest version.

          # pip install ecdsa
        Requirement already satisfied (use --upgrade to upgrade): ecdsa in /usr/local/lib/python2.7/dist-packages

Cleaning up...

           # apt-get install cython
           Reading state information... Done

cython is already the newest version.
and cython version Cython version 0.19.1

then the next step
$ wget "https://github.com/zeromq/pyzmq/releases/download/v14.1.1/pyzmq-14.1.1.tar.gz"

             there was some problem there with downloading it in terminal
              Resolving s3.amazonaws.com (s3.amazonaws.com)... failed: Name or service not known.
               wget: unable to resolve host address `s3.amazonaws.com'

             so i downloaded it from from browser and followed again

             user@localhost:~$ cd Downloads
             user@localhost:~/Downloads$ tar xf pyzmq-14.1.1.tar.gz
             user@localhost:~/Downloads$ cd pyzmq-14.1.1
             user@localhost:~/Downloads/pyzmq-14.1.1$ 
             user@localhost:~/Downloads/pyzmq-14.1.1$ python setup.py configure --zmq=/usr/local/
   so i get here this : 

running configure

Configure: Autodetecting ZMQ settings...
Custom ZMQ dir: /usr/local/
creating build/temp.linux-x86_64-2.7/scratch/tmp
cc -c /tmp/timer_create6xr9T9.c -o build/temp.linux-x86_64-2.7/scratch/tmp/timer_create6xr9T9.o
cc build/temp.linux-x86_64-2.7/scratch/tmp/timer_create6xr9T9.o -o build/temp.linux-x86_64-2.7/scratch/a.out
build/temp.linux-x86_64-2.7/scratch/tmp/timer_create6xr9T9.o: In function main': timer_create6xr9T9.c:(.text+0x15): undefined reference totimer_create'
collect2: error: ld returned 1 exit status
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include -Izmq/utils -Izmq/backend/cython -Izmq/devices -c build/temp.linux-x86_64-2.7/scratch/vers.c -o build/temp.linux-x86_64-2.7/scratch/vers.o
build/temp.linux-x86_64-2.7/scratch/vers.c:4:17: fatal error: zmq.h: No such file or directory
compilation terminated.

error: command 'gcc' failed with exit status 1

Fatal: Falling back on bundled libzmq, but setup.cfg has explicitly prohibited building the libzmq extension.

please help what shall i do next.
thank you.

Add namecoin support to obelisk

As part of OpenBazaar, we plan to use namecoin to query user-friendly names associated with markets. To verify authenticity of names, we wish to query the namecoin blockchain. Obelisk would be the ideal way to do this. Are there any plans to incorporate such queries into the protocol?

Creat pip package

Create an installable pip package for python-obelisk. Self-explanatory.

Recursion Bug when fetching too much data

When socket reads too much data, ZmqSocket fails with a "maximum recursion error".

Please fix zmq_fallback.py from recursion to iterative like this:

def poll(self):
    while True:
        try:
            data = self._socket.recv(flags=zmq.NOBLOCK)
        except zmq.error.ZMQError:
            return
        more = self._socket.getsockopt(zmq.RCVMORE)
        self._cb(data, more)

python syntax errors during install

$ sudo python setup.py install
/usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'install_requires'
warnings.warn(msg)
running install
running build
running build_py
running install_lib
byte-compiling /usr/lib/python3.4/site-packages/zmqproto/zmq2.py to zmq2.cpython-34.pyc
File "/usr/lib/python3.4/site-packages/zmqproto/zmq2.py", line 35
print "Connected to zmq server v2"
^
SyntaxError: invalid syntax

byte-compiling /usr/lib/python3.4/site-packages/zmqproto/zre.py to zre.cpython-34.pyc
File "/usr/lib/python3.4/site-packages/zmqproto/zre.py", line 99
print zre.parseBeacon(data)
^
SyntaxError: invalid syntax

byte-compiling /usr/lib/python3.4/site-packages/zmqproto/zrenode.py to zrenode.cpython-34.pyc
File "/usr/lib/python3.4/site-packages/zmqproto/zrenode.py", line 27
def datagramReceived(self, data, (host, port)):
^
SyntaxError: invalid syntax

byte-compiling /usr/lib/python3.4/site-packages/zmqproto/zmq1.py to zmq1.cpython-34.pyc
File "/usr/lib/python3.4/site-packages/zmqproto/zmq1.py", line 13
print "Incorrect server version"
^
SyntaxError: invalid syntax

byte-compiling /usr/lib/python3.4/site-packages/zmqproto/zmq3.py to zmq3.cpython-34.pyc
File "/usr/lib/python3.4/site-packages/zmqproto/zmq3.py", line 22
print "Connecting"
^
SyntaxError: invalid syntax

byte-compiling /usr/lib/python3.4/site-packages/zmqproto/zmqsocket.py to zmqsocket.cpython-34.pyc
File "/usr/lib/python3.4/site-packages/zmqproto/zmqsocket.py", line 31
print reason.getErrorMessage()
^
SyntaxError: invalid syntax

running install_egg_info
Removing /usr/lib/python3.4/site-packages/zmqproto-0.1.0-py3.4.egg-info
Writing /usr/lib/python3.4/site-packages/zmqproto-0.1.0-py3.4.egg-info

Sequence with wrong messages 1

Testing out the pubsub example, and I get lots of Sequence with wrong messages 1 errors.

Looks like the transaction_received method is being called, but only the raw tx is in _messages, the hash isn't present.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.