Bitcoin Forum
June 22, 2024, 07:20:52 PM *
News: Voting for pizza day contest
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Development & Technical Discussion / Re: Turing completeness and state for smart contract on: April 25, 2016, 02:31:55 PM
A 'smart contract' that never interacts with anything outside the network (including users) is pointless. The smart contract itself may not set the history rewrite, but the possibility of them must be accounted for in the design of the contract.

I'm interested in what you mean by this. If we take a simple smart contract like a multisig, are you considering that to be something that "does not interact with anything outside the network"? If yes that seems to contradict your statement that those contracts are pointless. If not, what are the issues with chain reorgs in this example if any?
2  Bitcoin / Wallet software / Re: [ANNOUNCE] Bitcoinista -- Simple Python wallet for iOS on: July 01, 2014, 09:58:10 PM

Hi all,

Bitcoinista has been updated to version 0.2. This version includes

  • Full testnet support. Play around without risking real coins.
  • Now supports sending to P2SH addresses.

I originally created Bitcoinista as a way for me to get around Apples bitcoin blockade. Now that the blockade has been lifted it's awesome to see so many cool native wallets in the App Store! Grin Even with so many great wallets out there, Bitcoinista might still be of interest to you if you:

  • Prefer interpreted code instead of a compiled binary for transparency.
  • Enjoy a retro text base interface.
  • Are curious to see what your wallet software is doing under the hood.

Enjoy version 0.2!
3  Bitcoin / Development & Technical Discussion / Re: Issues with programming, Bitcoin, Private Keys, and Public Keys on: July 01, 2014, 08:51:13 PM

If anyone can make sense of:

def inverse(x, p):
"""
Calculate the modular inverse of x ( mod p )
the modular inverse is a number such that:
(inverse(x, p) * x) % p == 1
you could think of this as: 1/x
"""
inv1 = 1
inv2 = 0
while p != 1 and p!=0:
inv1, inv2 = inv2, inv1 - inv2 * (x / p)
x, p = p, x % p
 
return inv2

Which is in Python, it would solve my dilemma.  The commas don't make sense to me (IE: "How can a comma work with the equal sign").  That seems to be the part of my program which doesn't function correctly.  Yes, my code has that as well; that's the only part of my code I don't understand piece for piece (as I had to copy and paste that part).  All I'm really trying to do is to get this code to work.  This code should just spit out the public key for addresses represented by the number 4 through the number 10.

The algorithm above for the modular inverse is the Extended Euclidean Algorithm, basically the algorithm will spit out an integer a with the property that a*x + b*p = 1 for some number b.

As for the commas in python, in general a,b = c,d means that a=c and b=d, and you can also do things like swapping the values of a and b by using a,b = b,a.

In our case

Code:
inv1, inv2 = inv2, inv1 - inv2 * (x / p)
x, p = p, x % p

can be written more explicitly as

Code:
temp = inv2
inv2 = inv1 - inv2 * (x / p)
inv1 = temp

temp = p
p = x % p
x = temp

When you test the code, you can check if the value a returned by your function satisfies (a*x) % p == 1.
4  Bitcoin / Development & Technical Discussion / Stealth address question on: July 01, 2014, 07:58:41 PM
Hi all, I have a question about the general format of stealth addresses for anyone who has implemented them. In the Darkwallet Stealth wiki the address format is described as

Code:
[version:1=0x2a] [options:1] [scan_pubkey:33] [N:1] [spend_pubkey_1:33] ...
[spend_pubkey_N:33] [number_sigs:1] [prefix_length:1] [prefix:prefix_length/8, round up]

options bitfield = 0 or 1 (reuse scan_pubkey for spends)

It seems to me that the options bitfield above is redundant. If options = 1 you are not using the spend_pubkey:s so they can be omitted in order to shorten your address. If options = 0 you need the spend_pubkey:s since you don't want to reuse the scan_pubkey for spends. It seems to me that instead of having the options bitfield you can just look at if N = 0 or not. Or is it more like this bitfield is reserved for other options that might be introduced in the future?

/C
5  Bitcoin / Development & Technical Discussion / Re: CoinJoin: Bitcoin privacy for the real world on: May 30, 2014, 12:02:07 AM
There is absolutely no reason to use fixed units. It adds no anonymity, and increases blockchain traffic.

This surprised me. Surely a transaction with inputs 5,5,5,5 and outputs 5,5,5,5 will have better privacy characteristics than one with inputs 15, 5 and outputs 1,2,3,14?  Or am I misunderstanding what "fixed units" mean?
6  Bitcoin / Project Development / Re: New HTML5 Wallet with Native QR Code Scanning on iOS: Coin Pocket on: May 06, 2014, 05:01:46 AM
I looked into the Pythonista URL scheme and it looks like the only supported use cases are things like

Code:
pythonista://MyScript?action=run

and

Code:
pythonista://MyScript?action=run&argv=myargs

so it doesn't really look like it can pick up the ?code=xxx flag. No big deal though, it's still my favorite scan app, the one-click copy to clipboard is great! Smiley
7  Bitcoin / Development & Technical Discussion / Re: Could deterministic signatures be used to reduce Bitcoin's dependency on PRNG? on: May 06, 2014, 04:41:50 AM
Hi all, I looked up the RFC6979 implementation in pybitcointools (line 367) and it is very compact. Like you mention above, the implementation is made a lot easier if we're only considering the bitcoin usecase, so there is not that much complexity in terms of checking code.

I personally also really like the deterministic k for the reasons mentioned earlier:

  • Can use a solid randomness source (like dice) for initial high entropy seed and not worry about PRNG,
  • Reproducibility, unit testing and standardized test vectors.
8  Bitcoin / Project Development / Re: New HTML5 Wallet with Native QR Code Scanning on iOS: Coin Pocket on: May 04, 2014, 07:17:00 PM
Hi again,

Thanks for the info! It's clearer now what's going on. I guess I misunderstood what x-callback-url is, I thought it was what allows you to send these url callback type messages between apps in the first place, but apparently it's more of a standard for how to format these messages in a uniform way. I need to read up a bit on the Pythonista URL scheme to see if I can parse out the ?code=XXX in a good way.

Cheers,
Christian
9  Bitcoin / Project Development / Re: New HTML5 Wallet with Native QR Code Scanning on iOS: Coin Pocket on: May 04, 2014, 05:34:46 PM
Hi again, about the Scan Code app: From looking at the github code for coin pocket I was able to figure out that you're using an x-callback-url scheme, and I managed to use a URL like this

Code:
'scancode://scan?callback=myapp://'

to go from MyApp to Scan Code and then back again to MyApp after it scans. It seems you also have a field scancode-callback-path. Is this to get back the results of the scan? Would I use a URL like

Code:
'scancode://scan?callback=myapp://arg=scancode-callback-path'

or something like that to get the result of the scan into MyApp? Is there some documentation of the URL scheme somewhere?

Thanks again,
Christian
10  Bitcoin / Project Development / Re: New HTML5 Wallet with Native QR Code Scanning on iOS: Coin Pocket on: May 04, 2014, 01:50:33 PM
Hi enriquez! Your app looks really slick, and I also like how it interacts with your QR code app.

You say that the Scan Code app has the ability to interact with other apps through a URL scheme, and in your video it looks like when you scan the QR code it jumps directly to safari and your HTML5 app. I downloaded the app but I can't find anywhere to set up the URL scheme, not in the app itself and also not in the main iPhone Settings. How would I set it up?

The reason I'm asking is I've created my own minimalist wallet Bitcoinista that can run inside a Python sandbox in iOS. The wallet can send coins based on a bitcoin URI copied from a QR code app, but it would be awesome if I can use your app to launch Bitcoinista directly after scanning the QR code! Smiley

Cheers,
Christian
11  Bitcoin / Wallet software / Re: Python library for bitcoinwallet without blockchain data? on: May 01, 2014, 11:28:01 PM
Yeah, reliance on the centralized services does cause a point of failure that you might not want. Amir's suggestion of python-obelisk might be a better choice in that case.
12  Bitcoin / Wallet software / Re: Python library for bitcoinwallet without blockchain data? on: May 01, 2014, 06:23:37 PM
Have you looked at pybitcointools? It's very nice, and does not do any blockchain related stuff. It has support for multisig and electrum style deterministic wallets. It uses blockchain.info or blockr.io to send transactions to the network.
13  Bitcoin / Wallet software / [ANNOUNCE] Bitcoinista -- Simple Python wallet for iOS on: April 19, 2014, 04:19:16 PM
Github URL: https://github.com/christianlundkvist/bitcoinista
Blog post: http://whatdoesthequantsay.com/2014/04/18/introducing_bitcoinista/

Hi all,

I'd like to announce Bitcoinista, a Python wallet targeted for iOS based on Vitalik's pybitcointools. The idea is to run the wallet application inside a sandboxed Python environment app such as Pythonista on an iPhone or iPad. As long as Apple allows these kinds of Python environment apps in the App Store it will be possible to run bitcoin wallets like Bitcoinista.

Bitcoinista is meant for spending small amounts of bitcoin on the go and it has a simple text-based UI. Communication with the network is done using the pybitcointools functions, that means blockchain.info APIs with a fallback on blockr.io and eligius if blockchain.info is down.

Your private key never leaves your device and is also encrypted using AES.

Features

  • Runs on iOS, no jailbreak needed.
  • Quickly spend using a scanned QR code.
  • Private key encrypted with AES and never leaves device.
  • Ability to import your own private key in WIF format for spending from paper wallet etc.

Video demonstrating spending from bitcoin URI scanned from QR code:

http://youtu.be/JBRK0YJYMck

Video showing how to install and set up Bitcoinista:

http://youtu.be/Q2e3sX3Lkn0

If you're already a Pythonista fan and user, feel free to install Bitcoinista by following the directions on the github page. If you don't have Pythonista you can buy it for $6.99 in the App Store (Note: I'm not affiliated with Pythonista in any way, I'm just a fan).

If you're not ready to pull the trigger on Pythonista you can install Bitcoinista on your desktop in the same way (run installer.py) and play around with it there. I've also tested that Bitcoinista works with the app Python 2.7 for iOS although this app does not support the clipboard so only manual transactions work. If you find any other Python environment apps that Bitcoinista works with let me know.

For more information, see the github README at

https://github.com/christianlundkvist/bitcoinista

and the introductory blog post at

http://whatdoesthequantsay.com/2014/04/18/introducing_bitcoinista/

Please try it out, your feedback is greatly appreciated!
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!