Bitcoin Forum
August 06, 2024, 04:58:35 PM *
News: Latest Bitcoin Core release: 27.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Submitting a block/share to the network  (Read 1701 times)
blue_ (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
September 09, 2012, 03:45:45 PM
 #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!
Ivica
Full Member
***
Offline Offline

Activity: 218
Merit: 100


Firstbits: 19e3fc


View Profile
September 09, 2012, 03:47:43 PM
 #2

Wouldn't you need to cut down all trees on planet and turn them into paper?

19e3fcoLTu8YVFAU1NywJ88YnHH5kF8ScP - donations are welcome.
blue_ (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
September 09, 2012, 03:53:50 PM
 #3

Wouldn't you need to cut down all trees on planet and turn them into paper?

I have really tiny handwriting Smiley
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
September 09, 2012, 03:54:37 PM
 #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.


blue_ (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
September 09, 2012, 04:05:35 PM
 #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?
casascius
Mike Caldwell
VIP
Legendary
*
Offline Offline

Activity: 1386
Merit: 1136


The Casascius 1oz 10BTC Silver Round (w/ Gold B)


View Profile WWW
September 09, 2012, 04:08:50 PM
 #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

Companies claiming they got hacked and lost your coins sounds like fraud so perfect it could be called fashionable.  I never believe them.  If I ever experience the misfortune of a real intrusion, I declare I have been honest about the way I have managed the keys in Casascius Coins.  I maintain no ability to recover or reproduce the keys, not even under limitless duress or total intrusion.  Remember that trusting strangers with your coins without any recourse is, as a matter of principle, not a best practice.  Don't keep coins online. Use paper or hardware wallets instead.
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
September 09, 2012, 04:14:45 PM
 #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
Anonymous.....
Newbie
*
Offline Offline

Activity: 12
Merit: 0



View Profile
September 09, 2012, 04:24:10 PM
 #8

You could do it by hand but you would die before you could finish a couple of shares.
blue_ (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
September 09, 2012, 04:26:28 PM
 #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!
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!