Questions tagged [endianness]
The endianness tag has no usage guidance.
19
questions
5
votes
1
answer
665
views
How to parse a raw transaction field by field?
I am trying to understand all the parts of a legacy transaction. If I wanted to translate each part of the transaction to something human-readable, how would I need to go about that?
4
votes
2
answers
1k
views
When calculating the hash of transaction, why is the version used as "01000000" instead of "00000001"?
According to the protocol documentation for tx, the first field on the transaction data is a version number of size 4.
Based on this, I am trying to format the array of bytes needed to calculate the ...
5
votes
4
answers
857
views
Why is little endian used in transaction formatting and other parts of bitcoin?
I've noticed just from studying the raw hex values of transactions that many components are formatted in hexidecimal little endian.
For example, the amount specified in an output will be formatted as ...
-1
votes
1
answer
49
views
Does BIP-069 use littleEndian for txid comparison?
BIP-69 writes the following about how inputs should be ordered:
Previous transaction hashes (in reversed byte-order) are to be sorted in ascending order, lexicographically.
But then, in the examples ...
12
votes
1
answer
1k
views
Why does Bitcoin Core print SHA256 hashes (uint256) bytes in reverse order?
When converting uint256 (the datatype used to represent hashes) to string in Bitcoin Core, the bytes are reversed. When debugging functional tests, this can create potential confusion when comparing ...
1
vote
1
answer
229
views
Do I have to worry about endian swapping when calculating ECDSA public key values, Creation & Signing of transactions and verification of signature?
Do I have to worry about endian swapping when calculating ECDSA public key values, Creation & Signing of transactions and verification of signature?
This question is more of a straightforward yes/...
0
votes
1
answer
1k
views
What is the correct way to calculate timestamp for a Block(125552)?
I am just learning mining process.
Today I learned that we have to find nonce for given block header.
And for block header we need timestamp in UTC
I took the timestamp data from below link of 125552 ...
5
votes
1
answer
673
views
What does the little-endian notation improve for Bitcoin?
In another thread I read that the little-endian notation speeds things(?) up. Has someone info on what exactly it improves for Bitcoin?
1
vote
0
answers
227
views
Endianess of txids when calculating Merkle Root from getblocktemplate
I am trying to solve a merkle root from a previously mined block.
Specifically this block...
https://www.blockchain.com/en/btc/block/000000000003ba27aa200b1cecaad478d2b00432346c3f1f3986da1afd33e506
...
2
votes
2
answers
805
views
What are the hashes in Unspent outputs?
I am a newbie to Bitcoin.
Looking at
curl https://blockchain.info/unspent?active=1Cdid9KFAaatwczBwBttQcwXYCpvK8h7FK
I guess that the script is the owner's address.I am not sure about this.
"...
2
votes
0
answers
313
views
Is my understanding of Blockhain Endianness correct?
I know questions on this topic have been asked to death in a number of different ways. I also know that what endian order refers to specifically is dependent on context.
What I want are some ...
2
votes
3
answers
728
views
What is Bitcoin's "genesis hash"?
From Lightning Network documentation:
Used in several of the BOLT documents to denote the genesis hash of a target
blockchain. This allows nodes to create and reference channels on
several ...
3
votes
1
answer
537
views
How does the satoshi client handle endianness?
I'm looking through the source code of the satoshi client, particularly into how transactions are serialized and sent through the network or stored to the disk.
The CTransaction class has this block:
...
3
votes
1
answer
179
views
What was the intended benefit of truncating the Target?
I'm thinking about how the Target value is truncated to and later compared to the SHA-256hash of the Block Header.
Given that
The maximum target (lowest possible difficulty) is
...
7
votes
1
answer
4k
views
How does a miner perform hashing?
I'm trying to walk my way through the process by which a miner hashes.
Let's say the getwork request returns a data field of:
...
4
votes
1
answer
1k
views
How is the endian conversion done?
This answer seems simple, but I'm finding mixed answers. This question describes the conversion from little-endian to big-endian hex strings (or vice-versa) as switching the order of bytes in every ...
1
vote
2
answers
143
views
Proper getmemorypool data endianness?
As there are a couple endiannesses used by Bitcoin, what is the proper way to encode the data parameter for a getmemorypool JSON API call?
2
votes
1
answer
297
views
Getwork and GetMemoryPool - why is previous block hash different?
When I called:
print bitcoin.getmemorypool()
print bitcoin.getwork()
using Python JSON for a testnet BitcoinQT server, I got the following responces:
{'previousblockhash': '...
24
votes
4
answers
9k
views
Why does the Bitcoin protocol use the little-endian notation?
Why does the Bitcoin use the litte-endian notation? It is less common than big-endian notation, thus when programming low-level applications working with Bitcoin protocol, one quite often has to ...