zack-bitcoin / augur-core Goto Github PK
View Code? Open in Web Editor NEWA truthcoin protocol. https://github.com/psztorc/Truthcoin
A truthcoin protocol. https://github.com/psztorc/Truthcoin
Not sure if this is an artifact from an incompletely downloaded blockchain, but, here's the CLI:
$ ./truth_cli.py info my_address
{u'count': 20, u'votes': {}, u'votecoin': {u'international': -123, u'random': 1296, u'elections': 0}, u'amount': 1890000, u'shares': {}}
Double-posting this at https://github.com/scottzer0/Truthcoin-UI. Snapped a pic of it too if that helps (attached):
Single and double quotes are not escaped when using ./truth_cli.py ask_decision <jury> my_decision_name Pappasito's Grill is delicious
-- instead, you get a prompt to enter more info. Suggest parsing quotes '
as \'
(and double quotes "
as \"
) instead.
it should be invalid if the price is outside the range
Running truth_cli.py on two separate machines. I'm getting the same address assigned, even though I'm specifying different passwords. The passwords I've tried are:
All of these result in the address 1137hWYZ6vzyfhCWYoHMSw7uYUravTY (displayed using ./truth_cli.py my_address
).
$ ./truth_cli.py peers
truthcoin api main failure : (<type 'exceptions.KeyError'>, KeyError('peers_ranked',), <traceback object at 0x1ce7680>)
Running ./truth_cli.py stop
only stops one of the Python processes; the others have to be killed manually.
Here is the sequence of commands that led to the error:
deploy@loopy:~/Truthcoin-POW$ ./truth_cli.py ask_decision j_1 bitcoin_350 The price of a Bitcoin will be below $350/BTC at 5 PM PST on October 15, 2014.
added tx: {'count': 8, 'vote_id': u'j_1', 'decision_id': u'bitcoin_350', 'signatures': ['HHicCzKDbgqfrsXKbX/LjW6EJMq0iqMdAt6LKxGJ3RYHL6KD6zTyCVuI5XHybS1CyOg5BzfkqidXrXm6CnPze74='], 'pubkeys': ['040f1b56080aea058f57f525df9175c036d506dd0cc46e206f2bfb41f01149597c9344575880f581d43e3879893db13eb9b9eba6fdd497cbd0b394f5624f2e3b49'], 'txt': u'bitcoin_350 The price of a Bitcoin will be below 50/BTC at 5 PM PST on October 15, 2014.', 'type': 'propose_decision'}
deploy@loopy:~/Truthcoin-POW$ ./truth_cli.py make_PM
What is the address or pubkey of the owner of the PM?
>11wN3DKx8n9uS68VgEtRnSZM3PWUZND
What is the unique name for this new prediction market?
>bitcoinpricepm
how big should B be? Initial investment is B*ln(n) where n is the number of states
>250000
how many decisions is this prediction market to be based upon?
>1
What is the unique name of the 0 decision?
>bitcoin_350
how many states can this PM result in?
>2
what is the text title of the 0 state?
>yes
how does the 0 state depend upon the outcome of the decisions? For example: if there are 2 decisions, and this market only comes true when the first is "yes" and the second is "no", then you would put: "1 0" here.
>1
what is the text title of the 1 state?
>no
failed to add tx because: decision is not in the database: bitcoin_350tx: {'count': 9, u'B': 250000, u'type': u'prediction_market', u'states': [u'yes', u'no'], u'PM_id': u'bitcoinpricepm', 'signatures': ['GxnV/N6fThwZIwcg9mwzdv8yT9m33lkdjcGuSHbl28qccYuTLPw4eXSR0Ms2Xeanb2NG2Ngyhxm2ExjRkacx4E8='], u'fees': 0, u'owner': u'11wN3DKx8n9uS68VgEtRnSZM3PWUZND', 'pubkeys': ['040f1b56080aea058f57f525df9175c036d506dd0cc46e206f2bfb41f01149597c9344575880f581d43e3879893db13eb9b9eba6fdd497cbd0b394f5624f2e3b49'], u'decisions': [u'bitcoin_350'], u'states_combinatory': [[1]]}
there should be a logging thread.
then it would be easier to make javascript web wallets.
buy_shares needs a POW component.
truthcoin api main failure : (<type 'exceptions.NameError'>, NameError("global name 'target' is not defined",), <traceback object at 0x10d1ee830>)
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.