Bitcoin Forum
June 23, 2024, 03:46:53 AM *
News: Voting for pizza day contest
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Development & Technical Discussion / Transaction Version (expected to be 1 but I got 0) on: February 19, 2014, 01:59:09 AM

http://test.webbtc.com/tx/f1ebaf4604158a8a385cb55d1c0ca5efde98ab2d6f92bc667a02485f258c064e
http://test.webbtc.com/tx/f1ebaf4604158a8a385cb55d1c0ca5efde98ab2d6f92bc667a02485f258c064e.json

I thought all transactions are currently versioned 1. How come this is 0?  Does anyone have any clue as to why? I am not able to find any documentations on version 0 transactions
2  Bitcoin / Bitcoin Discussion / The noteblock - Roses will wither, but the Blockchain is forever on: February 13, 2014, 05:46:10 PM
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.
3  Bitcoin / Development & Technical Discussion / Re: Are off-chain transactions necessary to keep Bitcoin unbroken? on: January 09, 2014, 04:27:13 PM
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?
4  Bitcoin / Development & Technical Discussion / Re: How do I crawl through the block chain? on: January 08, 2014, 07:56:26 AM
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:



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
5  Bitcoin / Bitcoin Technical Support / Re: How private are shared addresses ? on: January 06, 2014, 03:28:14 PM
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
6  Bitcoin / Bitcoin Technical Support / Re: Anybody have private key w/ Double Spends? on: January 06, 2014, 06:43:21 AM
Go to http://brainwallet.org/ and take the key of the default passphrase "correct horse battery staple". This address has seen many double spend attempts in the past.

I don't understand why people ever send money to this. I understand immediately create a transaction to ship the amount back but just what is the point

https://blockchain.info/address/1JwSSubhmg6iPtRjtyqhUYYH7bZg3Lfy1T
7  Bitcoin / Bitcoin Technical Support / Re: Can block height change ? on: January 06, 2014, 06:35:35 AM
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 ?

Code:
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
8  Bitcoin / Bitcoin Technical Support / Re: TxHash to BlockHash using API on: January 06, 2014, 06:19:45 AM
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/277586

But, 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?
9  Bitcoin / Development & Technical Discussion / Re: How to get public key and scriptPubKey and scriptSig from private key? on: January 06, 2014, 06:00:15 AM
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
10  Bitcoin / Development & Technical Discussion / Re: Golang BIP 32 implementation on: January 06, 2014, 05:53:32 AM
Looks good!

I love seeing Bitcoin Go projects. It is just such a nicer language to write compares to c++
11  Bitcoin / Development & Technical Discussion / Re: How do I crawl through the block chain? on: January 06, 2014, 05:45:47 AM
http://codesuppository.blogspot.com/2013/07/bitcoin-code-snippets.html

I am also writing a thorough piece of documentation for this exact topic right now.  You can read what I have so far here, I created a detailed graphic.  I don't expect to be completely finished with the article until tomorrow.

http://codesuppository.blogspot.com/2014/01/how-to-parse-bitcoin-blockchain.html

John's documentation is awesome. I have been following it and building my own parser
12  Bitcoin / Development & Technical Discussion / Re: How to run abe? on: December 24, 2013, 05:36:55 PM
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?
13  Bitcoin / Development & Technical Discussion / Re: Local Wallet with Online Blockchain. Is it possible? on: December 22, 2013, 07:47:31 PM
I want to make a shameless plug for a little open source project I built recently. Also a local wallet with blockchain in the cloud

https://chrome.google.com/webstore/detail/sparecoins/nhkolgoaflkjhfkamdhiahingnendokj
https://github.com/BitcoinMafia/SpareCoinsExt
14  Bitcoin / Development & Technical Discussion / Re: Fastest way to execute a transaction? on: December 20, 2013, 03:25:16 AM
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)
15  Bitcoin / Bitcoin Discussion / Re: Do you want to pay the fee? on: November 24, 2013, 05:51:46 PM
Is the minimum bitcoin fee arbitrarily set in the system? Is there even scope to lower it substantially in the future?
16  Other / Beginners & Help / We want to write open source projects for Bitcoin. What problems do you have? on: November 24, 2013, 06:01:51 AM
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. ...
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!