I have read this related question – Bitcoin without mining and I am trying to understand the very basics of Bitcoin network and the blockchain.
I wonder, if we take the mining out of Bitcoin, what would we need to implement in order to make it a working system again.
So far, I am aware of these components that rely on mining:
- new coin generation – without mining, we would need to implement a new way of introducing new coins to the system
- bitcoin mining is used to create and validate blocks which contain transactions that are to be included in the immutable blockchain – so, without mining, we would need to create another system of creating new blocks that all the nodes will accept (i.e. consensus)
My questions are:
- Is there anything else that would need to be done? In this question I assume everything else we would like to work like Bitcoin.
- What are the alternatives of building blockchain? If we think about Bitcoin as a currency scheme only (and disregard other aspects of having blockchain) – do we really need a chain that stores all the history? Can’t we just have accounts and their balances and update them? I.e. what are the other options of solving the double-spend problem besides having a full history in a chain.
So it’s a known problem that blockchain.info’s api only allows a gap of 20 unpaid addresses, which sucks and makes their api almost completely worthless. But I was thinking how could I make my own receive payments method with their other not so restricting API’s. and I came up with this Idea but I’m not sure if it’ll work and I need someone who has expierance with their api to tell if it will.
so here’s my idea:
- First I create a new address for when a user creates an account
- I save the new deposit address to the users database entry
- when the user views the deposit address the user is able to press a refresh button to check if the transaction is arrived with the needed confirmations.
- or the client sends a request to the server every 10mins to see if the transaction was sent and confirmed.
- if it arrived we create a new address and save this as the new deposit address and add the amount sent to the balance.
- the loop continues without any gap problems!
will this work or am I missing something. thank you.
I’ve been trying to understand the issue and repeat Willem Hengeveld’s answer, but I think I’m failing at getting correct script for hash.
I’m looking for this transaction, my scripts are:
And double SHA256 are:
z1 = 1a374484e71c12135cda76c1261801e9f8fc27108e3f5e439679ef13eb300eae
z2 = e366e7bc7d5c12808b88e1b89c27436ac9cb3ae482dd044faeb7fab4654cbeac
s1,s2 I’m getting those 4 private keys:
68d4ee844087fc39a62269c41a2c7d521966aa9687a596ab9207e997ddee0ba3 5d201313d68f45cfd5b187584efe4e5d9579a571a0876a3e1fb649ed91942897 a2dfecec2970ba302a4e78a7b101b1a1253537750ec135fda01c149f3ea218aa 972b117bbf7803c659dd963be5d382aca148325027a309902dca74f4f248359e
Which do not corresponded to that public key. What I’m doing wrong?
How can I send bitcoins to someone, without having to purchase them first or set up a wallet?
I’m looking for a service that will send N bitcoins to a given address. I pay them with my credit card or paypal. I don’t wish to purchase any bitcoins myself, have a wallet, set up any kind of account, or give anyone my email address. I don’t want to know anything about bitcoins beyond my initial instruction to send N bitcoins to a given address. Does such a service exist?
I’m having a problem with bloom filters when using the getdata message.
As I understand BIP 37, setting the bloom filter on a connection using the loadfilter message with flag BLOOM_UPDATE_P2PUBKEY_ONLY set, the responding client automatically inserts all outpoints (TXID and output index) in the bloom filter of transactions matching the filter. However, when I attempt to do exactly this, the node only ever sends transactions containing outputs TO the address I am filtering for, never transaction that contain outputs FROM the address I am filtering for.
My approach is as follows:
- Add the following public key to the bloom filter: 1JbFvyaMyHHmvvjc54h4YARq3uoX2ZZ4Qj (randomly picked)
Send the filterload message containing the filter (as seen in the wireshark snippet below).
Bitcoin protocol Packet magic: 0xf9beb4d9 Command name: filterload Payload Length: 261 Payload checksum: 0x2bb02c45 Filterload message Filter Count: 251 Data: 000000040004010000000100000000000000020000400000... nHashFunc: 13 nTweak: 0x1a689ff4 nFlags: BLOOM_UPDATE_P2PUBKEY_ONLY (0x02)
Send the getdata message with the hash of all blocks containing transactions to and from the wallet (which I have identified on a block explorer for the purpose of testing this). The inventories are typed MSG_FILTERED_BLOCK.
The node responds with the following messages in order:
MerkleBlock: 000000000000000001201ab2679db7c87a432967c060596bad0ac093dac94111 Tx:......... 187b00588e8d7844c405da9a15d78dbd7ebb9b2887fb5aace6651719fede923e Tx:......... dbbca0d839435ac77db65378a9607d17b0aa965f3027d84dcf0ee5115dc8d32f Tx:......... 17c12f45956082a913c0c862d573cf067fa5ee96ba5b954914371da6bef51f7f Tx:......... 36cce25d34a5da0f7d69253743eae7bb7c576e5543d0eb16db0f72967edb4bc6 Tx:......... 6ea48c6286b1691cd1ecec271a3f52a3fe099467bb6c926b41ba8942e21d4aa6 MerkleBlock: 0000000000000000049ee67931f6d4970a7d06b14b8aadd406223ab65efe5025 MerkleBlock: 0000000000000000019f3fc2c8da43e8a81373ae189ace4caec6c59969f46ff6 MerkleBlock: 000000000000000000f67dad206798db2e6c5dffec84d213397784be894e66fa
The 5 transactions in the list are correct, as the contain outputs targeting said wallet.
However, block 0000000000000000019f3… contains transactions with inputs from said wallet, but the merkleblock message of this block is not followed by these transactions.
Shouldn’t the node add the outputs of these 5 transactions to the bloom filter, and thereby match the later transactions containing inputs pointing at them?
I have confirmed that the node is in possession of the relevant transactions.
If i load the filter manually, adding the outputs myself, this works as intended.
Am I misunderstanding how BIP 37 is used?
I recently installed Bitcoin Core v0.12.1 on my home server (running Windows 7) and wanted to allow it to accept incoming connections and used the guide found here: https://bitcoin.org/en/full-node#windows-7 to ensure I did everything that was needed. Unfortunately, it hasn’t been showing any incoming connection and when I used the connection tool recommended in the guide (https://bitnodes.21.co/#join-the-network), it says my server is unreachable.
I have already setup port forwarding for port 8333 to both my server’s IP address, 192.168.1.105 (wireless) & 192.168.1.129 (ethernet). I ran a port scan on the following websites and they all indicate that Port 8333 is open:
- Ping.eu Port Check
- WhatMyIP Port Scanner
- T1 Shopper Port Scanner
(I would provide links for the above scanners, but I cannot post more than 2 links)
I also created two rules in Windows Firewall (under Inbound Rules) with the following properties:
- Local Port – 8333
- Remote Port – All Ports
- Scope – Local & Remote IP address set to Any IP Address
- Domain, Public, and Private all checked
- All programs that meet the specified conditions checked
- Set to allow the connection
- Rule is enabled
There are two rules with the above settings, one for TCP and one for UPD. Even with all the above setup, the “Join the Network” tool on Bitnodes website (second link from the top) still says my node is unreachable and the debug window inside the program shows 0 incoming connections and 8 outgoing connections.
I’m not sure what else needs to be setup since I completed everything in the guide and port 8333 is definitely open. Any help or information with this issue would be greatly appreciated. Thank you in advance.