Show Posts
|
Pages: [1]
|
This is a small side project that I worked on over the weekend. This will allow you to embed a love message for your significant other on Valentine's day into the blockchain. http://www.thenoteblock.com/The project was inspired by the upcoming v0.9 release which makes OP_RETURN (allows you to create immediately prunable output to attach message bytes) a standard transaction output in Bitcoin. And when does get released we will move to use OP_RETURN instead of creating messaging outputs. Bitcoin as a programmable currency protocol has enormous potentials beyond just sending transactions. And OP_RETURN (when it does become standard) has important implications for smart contracts, using Bitcoin transactions to prove / transfer ownership. The objective of this project is to raise awareness in that area. And make developers realize the potential in a fun way on Valentine's Day.
|
|
|
However today this is limited to a single entity. It only works if you and your receiver are both on MtGox. However look forward a couple years and say you have a MtGox account and someone else has a coinbase tx. In theory MtGox and Coinbase could extend reciprocal lines of credit so MtGox notifies coinbase and coinbase instantly reflects your new balance. Once a day MtGox and coinbase "settle" the books with a single blockchain tx. Just to be clear this does NOT currently exist but it could. Eventually a network of these entities could exist. In someways this resembles a banking network with one SIGNIFICANT difference. Today you can't be your own fiat bank (well at least not with any reasonable cost) but you can choose to be your own Bitcoin bank. All you need the ability to run a full node and willingness to put all tx on the blockchain.
Don't forget that because Bitcoin is based on cryptography, you can audit that Bitcoin bank and prove they, for instance, hold funds they claim they do, whereas in the real world you just can't get absolute, mathematical proof. inputs.io, for example, have told me they are planning on implementing proof-of-ownership soon. Essentially that means they will prove to their customers that the funds held by them on their behalf really are backed 100% by coins on the blockchain. Of course, that doesn't stop them from taking the funds, but it means if they do they will be quickly caught. In the future mechanisms can be implemented like fidelity bonds and trusted hardware that make even stealing the money unprofitable - much like Bitcoin itself is designed so that miners have economic incentives to "mine honestly" FWIW I keep a few BTC worth of "day-to-day" spending money at inputs.io, as well as easywallet, even without any auditing. To me the privacy is worth the risk of the funds getting stolen. (I lost about $100 worth at instawallet) Peter, how does this proof of ownership work. Does it require the wallet to disclose all the addresses that they own so that people can check?
|
|
|
I want to anwer questions like "how many transaction with lower input value than 1btc have ever been completed after 1.1.2013" and similar.
You basically want to parse the blockchain into a database like MySQL/Postgres so that you can answer that question by executing a query against it. For example, I parsed it into a database called Datomic and that query looks like this: ![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2FtQcuIN8.png&t=663&c=kuYkRrac4zigJA) The blocks are stored in the blkXXXXX.dat files found in the ~/.bitcoin directory. Each blkdat file is a sequence of block data where each block can be parsed like this: - Magic bytes: uint32-le
- Byte-count of the block: uint32-le
- Block: BlockCodec
The file may be padded at the end with null-bytes. You also need to know that blkdat files are not a validated blockchain, just the blocks that bitcoind received over the network. The easiest thing to do is just add all blocks to the database and assume that the longest chain of `latestBlock->prevBlock->prevBlock->...->genesisBlock` is the one you want to query. Database schema looks something like this: - Block has many Txns - Block has one PreviousBlock - Txn has many TxOuts - Txn has many TxIns The pseudocode for it all is pretty simple and parsing is straight forward. Word of warning: I went so far as to get a local blockexplorer working ( https://github.com/danneu/chaingun), but of course I wandered off into the dragon lair of reimplementing blockchain validation and ran out of free time. It became evident that I was in fact climbing a large mountain when I passed by Jon Krakauer's corpse frozen in the snow. At which point I realized I wasn't climbing a mountain at all but slowly sliding down one slippery slope. And when I reached the bottom and turned back around, I realized it wasn't even a slope but instead a heap of my own yak shavings. I have'nt met many people that use Datomic. And now I think about it the blockchain is actually quite datomic like. (none stateful , append only). How are you finding datomic as a data store? I have always been interested in these new data stores, but postgresql/mysql gives you so much flexibility, powerful, rich querying syntax. And for blockchain data (only a few dozens inserts per minutes), it performs extremely well. My question is: what advantage do you feel datomic has over something like postgresql? It is purely out of my curiosity for datomic
|
|
|
Do shared addresses really make things completely private ? Or is it just a slight obscuring that can still be traced ?
If anything, wouldn't you think that a shared address makes thing less private? The fact that the shared address has to keep track of your account and your account balance. For example, an exchange might use shared addresses and also have my credit card information
|
|
|
registered means I noted down that value.
Ah, ok. While not impossible it is highly improbable that the block height of that transaction change by such a degree. A much more likely scenario is that the original number was erroneous. OMG !!! Does it happen in Bitcoin protocol ? The block height can change !!! OOOPS. Neways, can u plz tell me why this is happening ? I was checking this : http://blockexplorer.com/q/getblockhash/273824 ...It used to return a proper block hash a few days ago. Now it says the following. Why so ? ERROR: unknown (Most likely my bitcoind stopped working or this page is too large/complex.) Probably a bug in in blockexplorer blockchain info endpoint is just fine https://blockchain.info/block-height/273824
|
|
|
The first question is - what are you trying to do? The questions you ask likely do not solve the problem or answer the question you may have.
If this is your own transaction in Bitcoin-Qt, you can get information about the block it was included in with the console command:
gettransaction 5602487e624ee14193f646e29a9ac203335bc962b30155b66d142ab15f79018c
{ "amount" : 0.10000000, "fee" : -0.0001000, "confirmations" : 3592, "blockhash" : "00000000000000040e4c97bace0df699cabdf5ef68dce31ed62a07fdcb576e6b", "blockindex" : 22, "blocktime" : 1387048657, "txid" : "5602487e624ee14193f646e29a9ac203335bc962b30155b66d142ab15f79018c", "time" : 1387048401, "timereceived" : 1387048401, ... (fake example information above)
If it is an unspent transaction, you can get the transaction itself, but not information about the blockchain:
getrawtransaction 5602487e624ee14193f646e29a9ac203335bc962b30155b66d142ab15f79018c
010000000112e3e4d6554d49d58bb2ebea92cf503c478f3f4c9ac67089644521a7ef41da6000000 0006a47304402207b66a4d39a5e37e501afa84b6499e47928ef2e38bcc09ff079aa9ac08025ddd3 0220378843c39ec76d5f587e3d055a0df0422e66c7e0f6567d38537f59e67938ec8901210217231 bb72798cb5d42b77b8dec1831adf52cdc5a02d23684dd4827c28197a65effffffff021458725800 0000001976a914a41de2dfd3a06aa6ff11e6ff77cd7241df805b0788ac00c2eb0b000000001976a 914ece1ef04103991b1d1241209a37f5d6b84b906fd88ac00000000
Bitcoin does not store a database with more information than it needs to operate, you need to use other tools or a modified Bitcoin to make general queries about other's old transaction information.
You can just put the transaction hash in the front page search box of blockchain.info if you want to find out what block it was included in.
First of all thank you so much for taking your time to explain my query. What am I trying to do ? I am trying to get the no. of confirmations of any transaction through web api. I asked the question here => https://bitcointalk.org/index.php?topic=385733.0 and it was almost answered by DeathAndTaxes except the method to find out block hash from tx hash. Block Hash was required to ensure that the transaction in question is still in the main chain, as u'll find in the thread I mentioned. As you have mentioned above, if I were looking into my own transaction, I could get it using gettransaction through my own Bitcoin-QT. But, as I am writing a web app, I want to query a third party service like blockchain.info or blockexplorer.com, because with the current resource I have, I cant afford to run a Bitcoin-QT on my server. As I have mentioned above, from rawtx on blockchain.info I even get the block height, but not the block hash. I used to find blockhash by querying blockexplorer.com through like the following... http://blockexplorer.com/q/getblockhash/277586But, for some unknown reason, it is now throwing Error !!! Neways, my basic question remains the same. I need to find out the block hash from a given transaction through web api. Hey Upal, I wanted to confirm one thing, if you already have the blockheight can't you work out the no. of confirmations by latestblockheight - blockheight the transaction appeared in?
|
|
|
This question doesn't sound right. Could you post your specific case? You can get your pubkey from your privateKey, that is called Elliptic curve crytography scriptSig is signture + pubkey where the signature proves that you have the private key scriptPubkey is typically something like op_dup op_hash160 pubkeyhash op_checksig or just pubkey op_checksig and the pubkey hash is the sha256 + hash160 of your publickey. But the question doesn't actually make a lot of sense I am afraid Below is probably a good article to start you off. http://procbits.com/2013/08/27/generating-a-bitcoin-address-with-javascript
|
|
|
Looks good!
I love seeing Bitcoin Go projects. It is just such a nicer language to write compares to c++
|
|
|
John's documentation is awesome. I have been following it and building my own parser
|
|
|
Before we begin, are you a developer? Wanted to see what are the steps that I should explain.
have you set up the database etc? and what do you mean nothing is happenning? So I ran it the file, did you see any logs?
|
|
|
actually, if you have private keys to all the inputs you're spending, you can do the signing entirely off line.
That's correct and to add a bit more details to this answer, you can sign all the inputs offline and serialize the transaction into hex and then push the transaction through an API like https://blockchain.info/pushtx (a post request sends the raw transaction) or send it through the bitcoind JSON RPC "sendrawtransaction" ( https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list)
|
|
|
Is the minimum bitcoin fee arbitrarily set in the system? Is there even scope to lower it substantially in the future?
|
|
|
We are bitcoin fans and are writing a number of open source projects for Bitcoin.
What problems do you currently have and need solved? Suggest some ideas and maybe this could be a thread for list of open source bitcoin project ideas:
1. Light weight chrome browser extension bitcoin client 2. ...
|
|
|
|