How to use Bitcoin Core’s submitblock method

I’m trying to understand how mining works. For learning purpose I’m using Bitcoin Core as solo mining pool. Getblocktemplate will return data that is enough to start mining witch is simple founding correct nonce. But what is next step?

I found in bitcoin core method submitblock that have one argument / block data. I didn’t found any example how that data should be build. Please give me some advice.

How to check Bitcoin wallet balance without any API

I am building an application and that will involve large set of bitcoin wallets and need to keep on checking for balance. I don’t want to use any third party APIs as they all have hourly/secondly limits.

Is there any way I can check bitcoin wallets balance without any API? I am not sure is Bitcoin Demon and Bitcoin Core is for this purpose. Can anyone please suggest me the best way to verify bitcoin balances and transactions without any limits.

Why does the “global lottery” prove the validity of the blockchain?

As far as I understand it currently, when winning the “lottery” (mining) you can add a block, sum of transactions, to the blockchain. This block is in the first instance verified by all network users.

BUT can`t a lottery winner also add a fraudulent block to the chain?

What does this lottery contribute to the validity of the chain?

Or in other words: How are miners approving a bitcoin transaction, besides adding it to the blockchain when they win? Potentially, they could also add a lot of “sh**” to the blockchain.

Has the bitcoin network ever been “down”?

I’d be interested to know if the bitcoin network has ever been down. By “down” I mean that a client would not be able to synchronize with the network to obtain data like the txs in the mempool or recently mined blocks.

My guess would be that this would be extremely rare due to the decentralized architecture, but it’d be great to know for sure. If there have been downtimes, I’d be interested to know how frequent these have been and how long they have persisted.

Why do nodes trust other nodes to approve their transactions?

I know that the blockchain technology works so well, because everybody has basically a copy of the last ledger.

Therefore, if a transaction happens, everybody inside the network has to "approve" the transaction to do it.

These other participants are then seen as trusted sources.

However, what makes them into trusted sources? Let’s say there are only three participants, two make a transaction and one has to decide if the transaction is acceptable or not (does the clearing). What makes him a trusted source?

Are these thoughts right or where am I wrong?

I appreciate your replies!

Blockchain Receive API – custom Parameters

I am trying to get variables back from the callback URL, but I can’t figure out how to add custom parameters correctly. This is how I have them written right now:

$newAddy = json_decode(file_get_contents("$ID/new_address?password=$PW&funding_id=$funding_id"),true);
$parseAddy = $newAddy[address];

$funding_id is the extra one that I want to add. Any suggestions?

How does one checks which customer made a payment?

One question I’m not able to properly answer when asked is

How exactly the blockchain can verify the identity of the user without a centralized trusted party such as VeriSign?

I know this is done in a decentralized way and the ECDSA algorithm should do the trick, but other applications still need a centralized trusted party in order to verify if the user is really who he says he is even when they’re using ECDSA as well.

But how exactly can I guarantee that nobody can pretend to be someone else and spend their bitcoin instead?

Yes, I know the basic of how public-key cryptography works, but Information Security is not strong with me.

Edit: let me explore the question further.

Suppose I own a coffee house with intense flow of customers. How can I be sure about costumers that had already paid and others how didn’t pay?

Let’s say that Bob and Anna are my customers. Bob orders a Macchiato, Anna orders a Capuccino. Both coffees have the same prize. How can I know which payment came from each one of them?

Why does my Antminer S7 power down right after startup?

Before asking the question I’ll better introduce what I am doing:

I have:

  • Antminer S7 (Bought from BitMain)
  • BitMain PSU (Bought from BitMain)
  • 220V & 10-16A & 3*0.75mm^2 Power Cord for the PSU
  • A DAIYO laptop power protector which supports 10-16A & 250V

Yesterday, I received my Antminer S7, so when I had connected the PCI pins I connected the PSU’s power cord with the laptop power adapter.

The result looked like this:
Antminer plugged in

Then the Antminer powered up with variable fan speed. I connected the network cable and when I was going to my PC to configure the Antminer it just powered off. I am not sure which one powered off first, the PSU or the Antminer but they both had turned off.

I ran to unplug the Power Cord (It was very hot), so I thought that the power cord may have burned. To test that I connected it to my computer’s psu and my computer didn’t power up. So I think that it was burned, but 30min later my father tested it again and this time my computer powered up.

  • Can you tell me what the problem could be?
  • What made my Antminer to turn off automatically?
  • Someone told me I should have used a 3*1.5mm^2 Power Cord, is that the answer?
  • Could the Antminer have been damaged?