For questions relating to the protocols by which crypto-currencies are transferred.

learn more… | top users | synonyms

1
vote
0answers
33 views

Bitcoin protocol: How do I build my block to get the newly generated coins? [duplicate]

I am writing a software to mine bitcoins (in golang) as part of a college project. I'd like to know how is it that I build a block (which would potentially get appended to the end of the block chain) ...
3
votes
0answers
34 views

bitcoin protocol: transaction encoding

I am writing a program (in golang) to mine bitcoins. Supposing I have this dummy transaction, how may I encode it so it can be used in the block im trying to mine? Also, supposing I have a block ...
0
votes
1answer
92 views

My own bitcoin miner

I am trying to write simple bitcoin miner on Java How to request miner pool? What is miner pool protocol? How to send data to stratum pool? (socket, post request or ect...) What need send there? ...
1
vote
2answers
80 views

How does each miner know when to create a block?

I have been trying to understand the protocol and reading related documents, there is a point where i get stuck. As far as i understand (correct me if not), when a transaction occurs, it is ...
1
vote
1answer
51 views

Would it be possible to change the p2p protocol used by the bitcoin-clients without a hard-fork?

I had a look at https://en.bitcoin.it/wiki/Protocol_documentation where the p2p protocol is documented. Although it states incompleteness I thought it is a good starting point to understand the ...
4
votes
4answers
88 views

What technical properties does a confirmed Tx have that an unconfirmed Tx does not?

From a user perspective, each block confirmation reduces the probability that a transaction payment will be reversed. However from the perspective of the software, what happens when a transaction is ...
0
votes
0answers
44 views

What is the correct code flow while sending a message

I have a fundamental doubt wrt boost signaling used in bitcoin. As far as I understand the following happens between main.cpp and init.cpp: StartNode() spawns a thread ThreadMessageHandler ...
1
vote
2answers
104 views

Block inventory messages

I've written some code for connecting to the network, receiving inventories, and requesting data. What I am noticing is that my local node never sends me inventory messages with blocks in them unless ...
3
votes
0answers
93 views

What is the actual reason for using boost:signals for few functions?

The src/main.cpp has RegisterNodeSignals and UnregisterNodeSignals to register the functions as boost signals as below: void RegisterNodeSignals(CNodeSignals& nodeSignals) { nodeSignals....
6
votes
1answer
91 views

What are the arguments for and against deprecating transaction priority?

A recent pull request moves ahead to deprecate the concept of transaction priority by changing the block priority space to zero. This has enraged some users who believe that deprecating transaction ...
1
vote
0answers
41 views

Why do transactions get verified before it is clear that the block header is valid?

When I researched for the answer on What happens in detail, when Bitcoin Core verifies a block during synchronization?, I noticed something: According to the Wiki-Entry on Protocol rules some of the ...
8
votes
2answers
743 views

Is it possible to “unmine” particular coins?

Imagine that a government seizes a large amount of bitcoins in a raid such as with "Silk Road". Is it possible to invalidate those particular coins and send them back to the "pool" to be re-mined so ...
3
votes
1answer
42 views

In bitcoin network will there be a path from every node to every other node?

In bitcoin's gossip network will there be a path from every node to every other node? It can certainly have different number of hops. I have a private testnet in which I modified some source code. I ...
2
votes
2answers
103 views

How do I use Stellar API to power my Universal Trading and Multicurrency Payment+Transacton Gateway?

I am planning to build on top of Stellar a unified universal gateway+trading platform(all frequencies) for banks and financial institutions to power ultrafast international payment transfers in fiat/...
5
votes
2answers
71 views

Using bitcoin in a startup company

We are a start up company going to open an online shopping website. Our CEO wants to incorporate Bitcoin as our payment method. How can we set up a Bitcoin network?
1
vote
1answer
154 views

What is the P2P technology/protocol used by Bitcoin to find nodes and distribute messages across them?

I am wondering if there is a standard/de facto P2P library/implementation/spec used by Bitcoin Core and other implementations of Bitcoin?
2
votes
0answers
14 views

Transaction ordering when one transaction redeems another within a block [duplicate]

Say we have txA and txB, and txB contains an input that redeems an output from txA. In order for a block containing both txA and txB to be valid, is it necessary that txB be after txA in the list of ...
1
vote
2answers
28 views

Bitcoin information data protocol

Obviously for the Bitcoin system to work, we need an information network on a global scale such as the Internet. I am sorry if this is a stupid question. What exact information protocol is being ...
3
votes
1answer
151 views

Does an OP_RETURN script always need another output within the transaction?

I was reading this: Explanation of what an OP_RETURN transaction looks like and I wondered if the second output "value" : 0.00200000, was at all necessary. Can I just have a OP_RETURN with a 0 output ...
3
votes
1answer
347 views

BIP65: “replacing ntimelock entirely”?

BIP65 discusses replacing the ntimelock field with the new CHECKLOCKTIMEVERIFY OP code: As an aside, note how if the SignatureHash() algorithm could optionally cover part of the scriptSig the ...
1
vote
2answers
42 views

Versions of protocols for BTC and TEST?

I'm dorking around with creating a TEST transaction using libbitcoin's bx command. Besides setting the inputs and outputs, the bx tx-encode sub-command allows one to specify lock_time and version. ...
5
votes
2answers
143 views

Why must UTXO be completely consumed?

Imagine Alice owns 10 BTC and wants to send 1 BTC to bob, with a 1 BTC miners fee. In the blockchain, the transaction is recorded as "Alice spent 10 bitcoins, 1 goes to Bob, 1 goes to the miner, and ...
2
votes
1answer
57 views

Maximum number of op_codes in script

Is there any part of the Bitcoin protocol that established a limit on the maximum number of op_codes in a script. Recently I have hit the limit for the bitcoin core client. In: https://github.com/...
1
vote
1answer
162 views

OP_EQUALVERIFY: non-equal data

I'm trying to push the following transaction but keep getting OP_EQUALVERIFY: non-equal data Here's the transaction ...
1
vote
2answers
93 views

txout script criteria (scriptpubkey critieria)

what is the criteria for a txout script to be accepted into a mined block? is there any criteria at all? the reason i ask is that OP_RETURN is regularly used in txout scripts yet it is not spendable: ...
1
vote
2answers
230 views

When creating a block, who actually generates the 25 bitcoins that act as a reward? [duplicate]

I realise that somebody who manages to find a new block in the blockchain gets 25 bitcoins as a "reward". Where do these bitcoins actually come from? How are they minted? How are they actually ...
1
vote
1answer
38 views

Authentication and key distribution in bitcoin

After going through the bitcoin protocol documentation it is still unclear to me how the bitcoin client is authenticated. Where can I find an overview of what the client sends and receives on the wire ...
1
vote
2answers
84 views

Does anyone have a formula for dynamic block durations?

I want to implement this, so does anyone have a formula for dynamic block durations instead of a fixed target of 10 minutes?
1
vote
1answer
48 views

Does anyone have a formula for adaptive blocksize?

I want to implement this, so does anyone have a formula for adaptive blocksize? I only found this: if(average size of last 4096 blocks*4>maxblocksize && median size of last 4096 ...
0
votes
2answers
34 views

Why doesn't the block time influence time the amount of time needed for a transaction to be confirmed?

Litecoin has faster blocks, but needs more confirms. I understand this is because of possible reorgs, but how come it also needs 10 minutes for confirms even though the blocks are faster?
1
vote
1answer
74 views

Meaning/Derivation of 32 byte TxID hash

A largely abstract question (set) I've tried to answer for awhile is the nature of a TxID (32 byte hex Transaction ID hash). First and foremost, I certainly understand the main function if this value(...
4
votes
2answers
637 views

Why is my raw transaction non-canonical, getting error -25, and being rejected?

I'm trying to port TX generation logic to a different (and unpopular) language. I've been beating my head against this way too long and should have walked away but, well, you know, closure, and ...
0
votes
1answer
94 views

Pseudo-Node and putative attack vectors on the network

Pseudo-Node is discussed here on Reddit's /r/Bitcoin Essentially it functions to relay calls from connected nodes in a random fashion. This was an experiment into how easily can full nodes be "...
0
votes
1answer
26 views

Computing the bitcoins of any address

What is the procedure to calculate the bitcoins owned by any address X? do we have to search for every transaction in every block in the block chain, with recipient as X? But this will not give ...
3
votes
3answers
1k views

How do I compose a transaction with OP_RETURN in Python?

Currently trying to figure out how to use Python to construct a transaction with OP_RETURN. I tried to encode the message myself, and had no luck. I found a function, OPReturn(), on the internet, but ...
3
votes
2answers
225 views

Non standard Tx with obscure OP codes: examples

I've been writing Python code to fetch various transactions and came across this: 77822fd6663c665104119cb7635352756dfc50da76a92d417ec1a12c518fad69. The script field is as follows: scriptPubKey: "...
1
vote
1answer
125 views

Are transaction ids always the same length?

Do all bitcoin transaction ids (hashes) have the same length? I guess it's defined somewhere here: https://en.bitcoin.it/wiki/Protocol_specification but still I couldn't find it.
2
votes
2answers
192 views

How can I reduce the time until I get the newest block ? Does the number of the outbound peers affect the speed?

I am running a full node on the Bitcoin network. Sometimes, I find that it takes a while until I get the newest block. I checked the source code, and found that every node can at most connect to eight ...
1
vote
1answer
75 views

where is the code about sending command getblocks in bitcoin source code

I am reading the protocol part. One silly question. I found the part processing getblocks part, but i did not find when and where to send the getblocks command.Or it is deleted in the new bitcoin ...
1
vote
2answers
126 views

Can new OP codes be added with a soft fork?

I understand that P2SH transaction types were added "softly" by repurposing a Tx message that is already valid, so old nodes won't reject them in blocks. Is there a similar method to adding new ...
7
votes
2answers
389 views

Atomic cross-chain trading

Atomic cross-chain trading describes a method where two parties, owning different crypto currencies, can safely exchange the crypto currencies without an intermediary. The method is described in the ...
0
votes
1answer
73 views

What is the order of block hashes in block-locator array?

I have to compose a "getblocks" command found in https://en.bitcoin.it/wiki/Protocol_specification#getblocks The "getblocks" command contains the "block locator hashes". In essence, I inform a remote ...
7
votes
1answer
1k views

Why is Bitcoin defined as having 8 decimal places?

At the protocol level bitcoins don't actually exists, but rather base units (recently called “satoshis”). Bitcoins are defined as 108 base units, meaning that for a 50 BTC mining reward, you are ...
2
votes
1answer
232 views

How do I query a remote bitcoin node like RPC?

I know how to query the blockchain stored on my machine programmatically using bitcoind commands. Is it possible to do the same on a public node? For example, is it possible to send “getblockcount” ...
1
vote
1answer
228 views

Understanding Bitcoin protocol (through practice)

OK, firstly, Ken Sheriff (the guy who mined Bitcoin using pencil and paper) has posted some fantastic Bitcoin articles on his blog. In "Using Bitcoins the Hard Way" he writes (emphasis added): It ...
2
votes
3answers
291 views

Why block height is required in coinbase?

While reading bitcoin source I found this short comment: // Height first in coinbase required for block.version=2 (From https://github.com/bitcoin/bitcoin/blob/master/src/miner.cpp#L338). Why this ...
3
votes
1answer
149 views

Growth Dependent Block Size Limit

Could the 1MB block size limit be replaced with a growth-dependent limit? From what I have read (here, for example) the 1MB limit is to prevent spamming of the blockchain. And if/when Bitcoin becomes ...
6
votes
2answers
131 views

Is it possible to force a person to honor a conditional promise-to-pay?

I'm thinking of the situation where you have an auction where bids are placed. There are two conditions that should be held: Placing a bid shouldn't expose you to paying the seller unless you win ...
4
votes
2answers
116 views

Why is two hours the maximum acceptable offset for Bitcoin blocks?

As far as I understand, Bitcoin transactions include a timestamp, but the only requirement is that they don't differ for more than two hours. But why two hours? For computers that are constantly ...
4
votes
2answers
199 views

Can an output be spent in the block in which it is contained?

Is a Bitcoin block containing both a transaction that funds an output, and another transaction that immediately spends the same output, allowed by the protocol? Does such behavior occur "in the wild",...