Author

Topic: Submitting a block/share to the network (Read 1707 times)

newbie
Activity: 4
Merit: 0
September 09, 2012, 11:26:28 AM
#9
How to connect to the nodes: make an outgoing TCP connection to them on port 8333.  As for how to talk, see https://en.bitcoin.it/wiki/Protocol_specification

I was there already, convinced that that wasn't what I was looking for. I'm making progress again, thank you!
newbie
Activity: 12
Merit: 0
September 09, 2012, 11:24:10 AM
#8
You could do it by hand but you would die before you could finish a couple of shares.
donator
Activity: 1218
Merit: 1079
Gerald Davis
September 09, 2012, 11:14:45 AM
#7
Yes nodes are arbitrary.  You maintain connections to peer nodes.  You can maintain as many connections are you like.  When you receive new "items" (inventory).  You relay them to the nodes you are connected to.  This includes new tx generated by your node and new blocks produced by your node as well as tx/blocks/headers you receive from other nodes. 

I have no interest in explaining the protocol line by line though.   Don't expect people to spoon feed you the answer.  At least do enough research so you can ask specific questions.

https://en.bitcoin.it/wiki/Protocol_specification

The satoshi client is the reference implementation of the protocol.  It is open source and can be used as a template:
https://github.com/bitcoin/bitcoin
vip
Activity: 1386
Merit: 1140
The Casascius 1oz 10BTC Silver Round (w/ Gold B)
September 09, 2012, 11:08:50 AM
#6

As a god, I originated from the big bang. 50% chance @ 13 billion years have been sufficient. (obviously i'm not doing it on paper, I just want to understand, and create, an interface)

So how do you connect to the nodes? I assume that which one is arbitrary, but what is the 'send' standard? Is it a post, or a get, JSON format like the output? how do you get the node to access your data?


How to connect to the nodes: make an outgoing TCP connection to them on port 8333.  As for how to talk, see https://en.bitcoin.it/wiki/Protocol_specification
newbie
Activity: 4
Merit: 0
September 09, 2012, 11:05:35 AM
#5
You don't submit just the nonce.  You submit the entire block (including all transactions, and a valid block header including the nonce) to the nodes you are connected to and they relay it to nodes they are connected to and eventually every node in the network receives the block.  You get paid because the block you submit has a coinbase tx which creates 50 BTC (currently) from nothing and sends it to the reward address you provide.

Still solving with paper is just beyond pointless.
Current difficulty is 2,694,047.  That means on average it will take 2,694,047 nonce ranges to solve a block.
Nonce range is 2^32 so it will take on average 11,570,843,758,886,900 solved hashes to find one which meets the target requirement (determined by difficulty).

If you could solve perform the SHA-256 double hash by hand every minute (unlikely) it would take on average 22 billion years to solve a block.


As a god, I originated from the big bang. 50% chance @ 13 billion years have been sufficient. (obviously i'm not doing it on paper, I just want to understand, and create, an interface)

So how do you connect to the nodes? I assume that which one is arbitrary, but what is the 'send' standard? Is it a post, or a get, JSON format like the output? how do you get the node to access your data?
donator
Activity: 1218
Merit: 1079
Gerald Davis
September 09, 2012, 10:54:37 AM
#4
You don't submit just the nonce.  You submit the entire block (including all transactions, and a valid block header including the nonce) to the nodes you are connected to (tcp port 8333).   Those nodes will verify your work and if the block is valid and its hash meets the current target (based on difficulty) they will relay the found block to all nodes they are connected to.  Those nodes will verify and relay it to all nodes they are connected to until eventually your block is known by the entire network.

You "get paid" because the block you constructed has a transaction called the coinbase.  It is the only tx which has no input but it does have an output (which can be any valid address).  The coinbase tx is where the 50 new BTC are created from "nothing" (plus any tx fees) and sent to address provided.

Still solving with paper is just beyond pointless.
Current difficulty is 2,694,047.  That means on average it will take 2,694,047 nonce ranges to solve a block.
Nonce range is 2^32 so it will take on average 11,570,843,758,886,900 solved hashes to find one which meets the target requirement (determined by difficulty).
If you could solve perform the SHA-256 double hash by hand every minute (unlikely) it would take on average 22 billion years to solve a block.


newbie
Activity: 4
Merit: 0
September 09, 2012, 10:53:50 AM
#3
Wouldn't you need to cut down all trees on planet and turn them into paper?

I have really tiny handwriting Smiley
full member
Activity: 218
Merit: 100
Firstbits: 19e3fc
September 09, 2012, 10:47:43 AM
#2
Wouldn't you need to cut down all trees on planet and turn them into paper?
newbie
Activity: 4
Merit: 0
September 09, 2012, 10:45:45 AM
#1
Assuming I found a block or share, how do I submit the nonce and claim the reward?

Assume I did all the hashing/mining on paper, with a pencil.

I know you can read the block headers simply by accessing the pool APIs, but how do you go about punching your results in?

Also, how do you get the data you get from the pool APIs (current block header and target, mainly) directly from the bitcoin net? w

I don't entirely understand the decentralized p2p network architecture, so I'm at a loss as to how to look for what i'm searching for in this mess, mainly because of poor documentation, and reasons, and ineptitude, and stuff and things.

Thanks!

Also, hi yall!
Jump to: